/*! For license information please see fitAssistant.37fa371f17fc03f02f70.js.LICENSE.txt */ "use strict";(self.webpackChunkglobal_main=self.webpackChunkglobal_main||[]).push([[261],{9742:function(e,t,n){n.d(t,{E$:function(){return a},GF:function(){return i},hq:function(){return o},pV:function(){return r}});var r="SHOW_FIT_ASSISTANT",o="SET_FIT_STATUS",a=function(e){return{type:r,value:e}},i=function(e){return{type:o,value:e}}},1275:function(e,t,n){n.d(t,{Az:function(){return g},CI:function(){return w},Ds:function(){return h},FP:function(){return y},Go:function(){return C},J3:function(){return a},J4:function(){return k},QZ:function(){return u},So:function(){return r},Ul:function(){return P},Uu:function(){return x},VP:function(){return F},Xm:function(){return d},YG:function(){return E},YN:function(){return p},b4:function(){return o},gJ:function(){return m},hW:function(){return v},oO:function(){return S},th:function(){return b},uK:function(){return c},vC:function(){return f},xf:function(){return l},yp:function(){return i},yx:function(){return s}});var r="SET_SHOW_RESET_BUTTON",o="ADD_STEP_CONTENT",a="ADD_STEP_TO_LIST",i="ADD_CAR_INFORMATION",l="SET_STEP_ENUM",u="GO_BACK_ONE_STEP",c="SHOW_MORE_INFO",s="SELECT_OPTION",d="SELECT_OPTION_BY_INDEX",f="SET_ERROR",m="RESET",p="SET_IS_PARTIALLY_FIT",h="ADD_SELECTED_CAR_FROM_COOKIE",v="SET_CONFIRMED_COMPATIBILITY",g=function(e){return{type:r,value:e}},y=function(e){return{type:a,value:e}},b=function(e){return{type:l,value:e}},S=function(e){return{type:i,value:e}},w=function(){return{type:u}},k=function(e){return{type:c,value:e}},E=function(e){return{type:s,value:e}},x=function(e){return{type:d,value:e}},C=function(e){return{type:f,value:e}},P=function(){return{type:m}},F=function(e){return{type:h,value:e}}},9144:function(e,t,n){n.d(t,{Gp:function(){return o},R9:function(){return a},Zq:function(){return u},hY:function(){return l},iw:function(){return r},sO:function(){return i}});var r="ADD_MATCHING_PRODUCTS",o="ADD_SOLUTION_COMPONENTS",a="CLEAR_MATCHING_PRODUCTS",i=function(e){return{type:r,value:e}},l=function(e){return{type:o,value:e}},u=function(){return{type:a}}},4801:function(e,t){var n=Object.freeze({NoSelection:"noselection",Confirmed:"confirmed",Unconfirmed:"unconfirmed",NoFit:"nofit",RackMounting:"rackmounting"});t.Z=n},973:function(e,t){var n=Object.freeze({Mounting:"mounting",RackMounting:"rackmounting",Makes:"make",Models:"model",Years:"year",Variations:"variation",OtherFits:"otherfits",NoFits:"nofits",GenericRoofRacks:"genericroofracks",RoofRacks:"roofracks",VanSize:"vansize",Unconfirmed:"unconfirmed",NoRackFit:"norackfit",RackNotCompatible:"racknotcompatible",EnsureThirdParty:"ensurethirdparty"});t.Z=n},6464:function(e,t,n){n.d(t,{Z:function(){return De}});var r,o,a=n(7294),i=n(6113),l=n(4858),u=n(973),c=n(4801),s=function(e){return e.FitAssistantReducer.showFitAssistant},d=function(e){return e.FitAssistantReducer.fitStatus},f=function(e){return e.FitAssistantContentReducer.initialData},m=function(e){return e.FitAssistantContentReducer.initialData.Steps},p=function(e){return e.FitAssistantContentReducer.showMoreInfo},h=function(e){return e.FitAssistantContentReducer.stepData},v=function(e){return e.FitAssistantContentReducer.step},g=function(e){return e.FitAssistantContentReducer.carInformation},y=function(e){return e.FitAssistantContentReducer.error},b=function(e){return e.FitAssistantContentReducer.initialData.Translations},S=function(e){return e.FitAssistantContentReducer.showResetButtons},w=n(9742),k=n(1275),E=n(9144),x=n(6162),C=n(4311);function P(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var F=(0,C.Ps)(r||(r=P(["\n query Get(\n $siteName: String!\n $ispreview: Boolean!\n $language: String!\n $configurationItem: String!\n $parameters: String!\n $selectedproductpimid: String!\n $additionalFilter: String\n ) {\n getCarSelectorProducts(\n siteName: $siteName\n ispreview: $ispreview\n language: $language\n configurationItem: $configurationItem\n parameters: $parameters\n selectedproductpimid: $selectedproductpimid\n additionalFilter: $additionalFilter\n ) {\n carSelectorProductsResponse\n }\n }\n"]))),I=(0,C.Ps)(o||(o=P(["\n query Get(\n $siteName: String!\n $language: String!\n $configurationItem: String!\n $parameters: String!\n $additionalFilter: String\n ) {\n getCarSelectorOptions(\n siteName: $siteName\n language: $language\n configurationItem: $configurationItem\n parameters: $parameters\n additionalFilter: $additionalFilter\n ) {\n carSelectorOptionsResponse\n }\n }\n"]))),N=n(7212),T=function(e,t){var n=new URL(document.location),r=t.map((function(e){return"".concat(e.parameterName,":").concat(e.value,"|").concat(encodeURI(e.text))})).join(",");n.searchParams.set(e,r),history.replaceState(null,null,n.toString())},A=function(e){var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.search);return null===t?null:decodeURIComponent(t[1].replace(/\+/g," "))},O=function(){return"true"===A("openfa")},R=n(4663),D=n(4434),_=n(444);function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0){var v=(0,_.KI)(d,i,t,s),g=i.filter((function(e){return e.parameterName!==u.Z.RoofRacks})),y=g[g.length-1].parameterName;e((0,E.sO)(a)),e((0,k.th)(y)),e((0,w.GF)(v)),e((0,w.E$)(!1)),e((0,k.Az)(!0))}else if((null===(m=d.MatchingProducts)||void 0===m?void 0:m.length)>0&&(null===(p=d.MatchingProducts)||void 0===p||null===(p=p.filter((function(e){return e.CompatibleBarForCaprock})))||void 0===p?void 0:p.length)>0)e((0,k.Az)(!1)),e((0,k.th)(u.Z.RoofRacks));else{var b=(0,_.KI)(d,i,t,s);e((0,E.sO)(a)),e((0,w.GF)(b)),e((0,k.th)(u.Z.NoFits))}}else if(t.IsRooftopTents){var S,x,C,P,F,I,N,T=i.filter((function(e){return"0"!==e.value&&"confirmCompatibility"!==e.parameterName})),A=T[T.length-1];if(l?(P=null===(F=l.getSliderList.find((function(e){return e.parameters===A.parameterName})))||void 0===F||null===(F=F.data)||void 0===F?void 0:F.find((function(e){return e.Selected})),null==l||null===(I=l.getSelectedCar)||void 0===I||I.find((function(e){return"confirmCompatibility"===e.parameterName}))):(P=null===(N=n.find((function(e){return e.parameters===A.parameterName})))||void 0===N||null===(N=N.data)||void 0===N?void 0:N.find((function(e){return e.Selected})),null==r||r.find((function(e){return"confirmCompatibility"===e.parameterName}))),(null===(S=P)||void 0===S?void 0:S.CompatibleRackForTent)!==j.Confirmed||!r.find((function(e){return"confirmCompatibility"===e.parameterName}))&&null!==(x=P)&&void 0!==x&&x.StructurallySupported&&(null===(C=P)||void 0===C?void 0:C.StructurallySupported)!=j.Confirmed)e((0,k.th)(u.Z.RackNotCompatible)),e((0,w.GF)(c.Z.NoFit)),(0,_.AZ)(c.Z.NoFit);else{var O=(0,_.KI)(d,i,t,s);if(e((0,E.sO)(a)),O===c.Z.NoFit&&(e((0,k.th)(u.Z.NoFits)),e((0,k.Az)(!0))),e((0,w.GF)(O)),O==c.Z.Confirmed){var R=i.filter((function(e){return"0"!==e.value&&"confirmCompatibility"!==e.parameterName})),L=R[R.length-1].parameterName;e((0,k.th)(L)),e((0,w.E$)(!1)),e((0,k.Az)(!0))}}}else{var M,Z=(0,_.KI)(d,i,t,s);if(e((0,E.sO)(a)),Z===c.Z.NoFit&&((null===(M=d.MatchingProducts)||void 0===M?void 0:M.length)>0&&D.A?(e((0,k.th)(u.Z.OtherFits)),e((0,k.Az)(!0))):(e((0,k.th)(u.Z.NoFits)),e((0,k.Az)(!0)))),e((0,w.GF)(Z)),Z==c.Z.Confirmed){var B=i.filter((function(e){return"0"!==e.value})),$=B[B.length-1].parameterName;e((0,k.th)($)),e((0,w.E$)(!1)),e((0,k.Az)(!0))}}}}))}},B=function(e){var t=e.showDefault,n=e.showSecondary,r=e.textDefault,o=e.textSecondary,i=e.onClickDefault,l=e.onClickSecondary;return a.createElement(a.Fragment,null,(t||n)&&a.createElement("div",{className:"confirmation ".concat(t&&n?"with-reset":"")},t&&a.createElement("button",{className:"btn thule-btn-default w-100",onClick:i},r),n&&a.createElement("button",{className:"btn thule-btn-secondary w-100",onClick:l},o)))};function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&l((0,E.Zq)()),l((0,k.CI)()),-1===f.indexOf(s)&&l((0,w.GF)(c.Z.NoSelection)),(0,_.Ep)(),void(x&&l((0,k.Go)(!1)))}},a.createElement("span",null,a.createElement("i",{className:"le-icon-arrow"})),a.createElement("span",{className:"sr-only"},"Back")),a.createElement("button",{className:"btn hide-fit-guide-modal",onClick:function(){l((0,w.E$)(!1)),s!==u.Z.Confirmed&&s!==u.Z.NoFits&&s!==u.Z.OtherFits||l((0,k.Az)(!0))}},a.createElement("span",null,a.createElement("i",{className:"le-icon-x"})),a.createElement("span",{className:"sr-only"},"Close fit assistant"))),a.createElement("div",{className:"info d-flex flex-column w-100"},a.createElement("span",{className:"selection mt-6 mb-3 display-block"},S.filter((function(e){return"make"===e.parameterName||"model"===e.parameterName||"year"===e.parameterName})).map((function(e){return e.text})).join(" ")||a.createElement(a.Fragment,null," ")),a.createElement("h3",{className:"heading3 header mb-0"},null==d||null===(t=d.find((function(e){return e.Parameter===s})))||void 0===t?void 0:t.Headline),a.createElement(z,{step:r,steps:o}))),b&&a.createElement("div",{className:"fit-guide-modal-header flex-column px-6 px-lg-9 mt-6"},a.createElement("div",{className:"buttons w-100"},a.createElement("button",{className:"btn fit-guide-modal-back invisible"},a.createElement("span",null,a.createElement("i",{className:"le-icon-arrow"})),a.createElement("span",{className:"sr-only"},"Back")),a.createElement("button",{className:"btn hide-fit-guide-modal",onClick:function(){l((0,w.E$)(!1)),l((0,k.J4)(!1))}},a.createElement("span",null,a.createElement("i",{className:"le-icon-x"})),a.createElement("span",{className:"sr-only"},"Close fit assistant"))),a.createElement("div",{className:"info d-flex flex-column w-100"},a.createElement("span",{className:"selection mt-6 mb-3"}),a.createElement("h3",{className:"heading3 header mb-0"},null===(n=d.find((function(e){return e.Parameter===s})))||void 0===n||null===(n=n.MoreInfoContent)||void 0===n?void 0:n.Header))))},G=function(e){var t=e.showDefault,n=e.showSecondary,r=e.textDefault,o=e.textSecondary,l=e.onClickDefault,u=e.onClickSecondary,c=e.showRackOption,s=e.onRackClick,d=(0,i.v9)(m),f=(0,i.v9)(v),p=(0,i.v9)(b),h=d.find((function(e){return e.Parameter===f}));return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("div",{className:"mb-6",dangerouslySetInnerHTML:{__html:null==h?void 0:h.Text}}),(null==h?void 0:h.ImageUrl)&&a.createElement("img",{src:null==h?void 0:h.ImageUrl,alt:null==h?void 0:h.ImageAlt}),c&&a.createElement("div",{className:"rack-selector d-flex flex-column justify-content-center"},a.createElement("div",{className:"rack-options mt-6",onClick:s},a.createElement("div",{className:"rack-option d-flex mb-4 px-1 py-1"},a.createElement("div",{className:"image-wrapper d-flex justify-content-center w-100"}),a.createElement("div",{className:"info d-flex flex-column justify-content-center"},a.createElement("h5",{className:"mb-1"},p.mountOnExistingRack)))))),a.createElement(B,{showDefault:t,textDefault:r,onClickDefault:l,showSecondary:n,textSecondary:o,onClickSecondary:u}))};function W(e){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(e)}function Y(e,t){if(e){if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,t):void 0}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?o.map((function(n,o){return o===l?K(K({},n),{},{text:e,englishText:a,value:t,configurationItem:null===r[r.length-1].configItems?r[r.length-2].configItems:n.configurationItem}):n})):o.concat({parameterName:n,configurationItem:null===r[r.length-1].configItems?r[r.length-2].configItems:r[r.length-1].configItems,text:e,englishText:a,value:t})).findIndex((function(e){return e.parameterName===n}));return i.slice(0,u+1)}),[o,r]),s=(e=(0,x.t)(I,{fetchPolicy:"cache-and-network",onCompleted:function(e){if(e){if(n((0,k.FP)({data:e.getCarSelectorOptions.carSelectorOptionsResponse.Options,messages:e.getCarSelectorOptions.carSelectorOptionsResponse.OptionMessages,parameters:e.getCarSelectorOptions.carSelectorOptionsResponse.ParameterName,configItems:e.getCarSelectorOptions.carSelectorOptionsResponse.NextConfigurationItem})),0===e.getCarSelectorOptions.carSelectorOptionsResponse.Options.length&&null===e.getCarSelectorOptions.carSelectorOptionsResponse.NextConfigurationItem){var t=c("no-value","0",e.getCarSelectorOptions.carSelectorOptionsResponse.ParameterName);n((0,k.oO)(t))}n((0,k.th)(e.getCarSelectorOptions.carSelectorOptionsResponse.ParameterName))}},onError:function(){return n((0,k.Go)(!0))}}),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||Y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=s[0];return{isLoading:s[1].loading,fetchNewCarItem:(0,a.useCallback)((function(e){var t=e.text,r=e.englishText,o=e.value,a=e.parameter,i=e.language;if(void 0===t||void 0===o||void 0===a)return{fetchedData:null};var s=c(t,o,a,r),f=(0,N.G)(s),m=(0,N.J)(s),p=function(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(s).reverse().find((function(e){return null!==e.configurationItem})),h=u.find((function(e){return e.Id===(null==p?void 0:p.configurationItem)}));d({variables:{siteName:(0,R.y)().SitecoreSiteName,language:i,configurationItem:p.configurationItem,parameters:"".concat(f,",").concat(m),additionalFilter:(0,_.eR)(h,l.AdditionalFilters)}}),n((0,k.oO)(s))}),[n,d,c])}},ee=function(e){var t=e.item,n=e.modalContentSectionRef,r=Q(),o=r.fetchNewCarItem,l=(r.isLoading,(0,i.v9)(h));return a.createElement("div",{className:"list-item",onClick:function(){return function(e){var t;o({text:e.Text,value:e.Value,parameter:l[l.length-1].parameters,language:(0,R.y)().SitecoreLanguage}),null===(t=n.current)||void 0===t||t.scrollTo(0,0)}(t)}},a.createElement("div",{className:"list-item-text"},a.createElement("span",{className:"header"},t.Text),a.createElement("i",{className:"le-icon-chevron rot-180"})))},te=function(){var e,t=(0,i.I0)(),n=(0,i.v9)(m),r=(0,i.v9)(v),o=(0,i.v9)(b);return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("span",{dangerouslySetInnerHTML:{__html:null===(e=n.find((function(e){return e.Parameter===r})))||void 0===e||null===(e=e.MoreInfoContent)||void 0===e?void 0:e.Text}})),a.createElement(B,{showDefault:!0,textDefault:o.back,onClickDefault:function(){return t((0,k.J4)(!1))}}))},ne=function(e){var t=e.shouldBeFixed,n=(0,i.I0)(),r=(0,i.v9)(b);return a.createElement("div",{className:"footer-link ".concat(t?"fixed":"")},a.createElement("a",{className:"w-100 text-center",onClick:function(){return n((0,k.J4)(!0))}},r&&r.moreInfo))},re=function(e){var t,n;return(null===(t=document.querySelector(e))||void 0===t?void 0:t.clientHeight)-68+88<(null===(n=document.querySelector(".modal-content-section"))||void 0===n?void 0:n.clientHeight)},oe=function(e){var t=e.item,n=e.isSelected,r=e.onSelect;return a.createElement("div",{className:"list-item select",onClick:function(){return r(t)}},a.createElement("div",{className:"list-item-text"},a.createElement("span",{className:"header"},t.Text),n&&a.createElement("i",{className:"le-icon-check"})))};function ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||ie(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)){var e=s.find((function(e){return e.Parameter===y}));$({variables:{siteName:(0,R.y)().SitecoreSiteName,language:(0,R.y)().SitecoreLanguage,configurationItem:null==e?void 0:e.Id,parameters:"",additionalFilter:(0,_.eR)(e,j.AdditionalFilters)}})}}),[o]),(0,a.useEffect)((function(){T("")}),[o]);var q=ae((0,x.t)(F,{onCompleted:function(e){var t,n=null==e||null===(t=e.getCarSelectorProducts)||void 0===t?void 0:t.carSelectorProductsResponse,o=(0,_.KI)(n,M,j,!0);if(r((0,E.sO)(e)),o===c.Z.NoFit){var a,i=(null===(a=n.MatchingProducts)||void 0===a?void 0:a.length)>0&&D.A?u.Z.OtherFits:u.Z.NoFits;r((0,k.th)(i))}r((0,w.GF)(o)),o==c.Z.Confirmed&&(r((0,w.E$)(!1)),r((0,k.Az)(!0)))}}),2),U=q[0],H=q[1],z=(H.loading,H.error,function(){return s.filter((function(e){return e.Parameter===y&&e.DoProductSearch})).length>0}),V=function(){return o.filter((function(e){var t;return e.parameters===y&&(null===(t=e.data)||void 0===t?void 0:t.filter((function(e){return e.Selected})).length)>0})).length>0},G=function(e){var t,n,a,i,l;r((0,k.YG)(e.Value)),r((0,k.oO)((t=e,a=null==o||null===(n=o.find((function(e){return e.parameters===y})))||void 0===n?void 0:n.configItems,i={parameterName:y,configurationItem:a,text:t.Text,value:t.Value},[].concat(function(e){if(Array.isArray(e))return le(e)}(l=M.filter((function(e){return e.parameterName!=y})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||ie(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[i]))))};return a.createElement(a.Fragment,null,!d&&a.createElement("div",{className:"select-list d-flex flex-column justify-content-center"},a.createElement("div",{className:"search-bar ".concat(y===u.Z.Years?"d-none":"")},a.createElement("input",{type:"text",placeholder:S.search,onChange:function(e){return T(e.target.value)},value:P}),a.createElement("i",{className:"le-icon-search"})),a.createElement("div",{className:"list-wrapper"},null===(t=o.find((function(e){return e.parameters===y})))||void 0===t||null===(t=t.data)||void 0===t?void 0:t.filter((function(e){return e.Text.toLowerCase().includes(P.toLowerCase())})).map((function(e,t){return z()?a.createElement(oe,{item:e,key:t,isSelected:e.Selected,onSelect:G}):a.createElement(ee,{item:e,modalContentSectionRef:n,key:t})})),a.createElement(ne,{shouldBeFixed:O}))),d&&a.createElement(te,null),z()&&V()&&a.createElement(B,{showDefault:!0,textDefault:S.confirm,onClickDefault:function(){var e;D.A&&(e=document.getElementById("currentProductPimId").value);var t=s.find((function(e){return e.Parameter===y})),n={variables:{siteName:(0,R.y)().SitecoreSiteName,language:(0,R.y)().SitecoreLanguage,ispreview:j.IsPreview,configurationItem:s.find((function(e){return e.Parameter==y})).Id,selectedproductpimid:e||"",parameters:"".concat((0,N.G)(M),",").concat((0,N.J)(M)),additionalFilter:(0,_.kY)(t,j.AdditionalFilters)}};U(n)},showSecondary:!0,textSecondary:S.reset,onClickSecondary:function(){r((0,k.Ul)(s[0].Parameter)),r((0,w.GF)(c.Z.NoSelection)),(0,_.Ep)(),l.Z.remove(j.FitAssistantCookieName,{path:"/".concat(j.Language.toLowerCase(),"/")}),l.Z.remove(j.FitAssistantCookieName,{path:window.location.pathname.split("/").filter((function(e){return!e.includes("-_-")})).join("/")})}}))},ce=function(e){var t=e.image,n=e.alt,r=e.header,o=e.text,i=e.onClick;return a.createElement("div",{className:"mounting-option mb-4 px-4 py-4",onClick:i},a.createElement("div",{className:"image-wrapper d-flex justify-content-center w-100 mb-3"},a.createElement("img",{src:t,alt:n})),a.createElement("h5",{className:"mb-2"},r),a.createElement("p",null,o))},se=function(){var e,t=(0,i.I0)(),n=(0,i.v9)(v),r=(0,i.v9)(m),o=(0,i.v9)(p);return a.createElement(a.Fragment,null,!o&&a.createElement("div",{className:"mounting-selector d-flex flex-column justify-content-center"},a.createElement("div",{className:"mounting-options"},null==r||null===(e=r.find((function(e){return e.Parameter===n})))||void 0===e||null===(e=e.ContentOptions)||void 0===e?void 0:e.map((function(e,n){return a.createElement(ce,{onClick:function(){t((0,k.th)(e.NextStep))},image:e.ImageUrl,alt:e.ImageAlt,header:e.Title,text:e.Description,key:n})})))),o&&a.createElement(te,null))},de=function(e){var t=e.image,n=e.header,r=e.text,o=e.isSelected,i=e.hasSolutions,l=e.onClick;return a.createElement("div",{className:"roof-type-option px-4 py-4 ".concat(o?"selected":""," ").concat(i?"":"disabled"),onClick:l},a.createElement("div",{className:"image-wrapper d-flex justify-content-center w-100 mb-3"},a.createElement("img",{src:t,alt:r,onLoad:function(e){document.dispatchEvent(new CustomEvent("roofTypeImageLoad",{detail:{height:e.target.clientHeight}}))}})),a.createElement("h5",{className:"mb-2"},n),r&&a.createElement("p",null,r))};function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||me(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(e,t){if(e){if("string"==typeof e)return pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pe(e,t):void 0}}function pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(null==d||null===(e=d.find((function(e){return e.parameters===s})))||void 0===e||null===(e=e.data)||void 0===e?void 0:e.some((function(e){return e.Selected})))};return a.createElement(a.Fragment,null,!y&&a.createElement(a.Fragment,null,a.createElement("div",{className:"roof-type-selector d-flex flex-column justify-content-center"},a.createElement("div",{className:"roof-type-options"},null==d||null===(e=d.find((function(e){return e.parameters===s})))||void 0===e||null===(e=e.data)||void 0===e?void 0:e.map((function(e,t){return a.createElement(de,{onClick:function(){var n,r,a;null!==(n=(a=null==C?void 0:C.Steps.filter((function(e){return e.Parameter===s})))&&a.length>0?a[0]:null)&&void 0!==n&&n.DoProductSearch?e.Selected||(o((0,k.Uu)(t)),o((0,k.Az)(!1)),o((0,k.oO)(X(e)))):z({text:(r=e).Text,value:r.Value,parameter:d[d.length-1].parameters,language:(0,R.y)().SitecoreLanguage})},image:e.Image,header:e.Text,text:e.Description,isSelected:e.Selected,hasSolutions:e.HasSolutions,key:t})})),0===(null==d||null===(t=d.find((function(e){return e.parameters===s})))||void 0===t?void 0:t.data.length)&&a.createElement("span",{dangerouslySetInnerHTML:{__html:null===(n=P.find((function(e){return"nofits"===e.Parameter})))||void 0===n?void 0:n.Text}}),a.createElement(ne,{shouldBeFixed:L}))),a.createElement(B,{showDefault:K(),textDefault:S.confirm,onClickDefault:function(){var e,t=null==C?void 0:C.Steps.find((function(e){return e.Parameter===s})),n=null==d||null===(e=d.find((function(e){return e.parameters===t.Parameter})))||void 0===e||null===(e=e.data)||void 0===e?void 0:e.find((function(e){return e.Selected})),a=I.find((function(e){return e.parameterName===t.Parameter})),i=X(n);if(n&&!a&&o((0,k.oO)(i)),null!=C&&C.IsRooftopTents){var f;switch(null===(f=d.find((function(e){return e.parameters===s})))||void 0===f||null===(f=f.data)||void 0===f||null===(f=f.find((function(e){return e.Selected})))||void 0===f?void 0:f.RooftopTentStatus){case j.Confirmed:o((0,k.th)(u.Z.GenericRoofRacks));break;case j.NoFit:(0,_.AZ)(c.Z.NoFit),o((0,w.GF)(c.Z.NoFit)),o((0,k.th)(u.Z.NoFits)),o((0,k.Az)(!0));break;case j.Unconfirmed:(0,_.AZ)(c.Z.NoFit),o((0,w.GF)(c.Z.NoFit)),o((0,k.th)(u.Z.Unconfirmed))}var m=(0,N.G)(I),p=(0,N.J)(I);D.A&&T(C.FitAssistantCookieName,I),l.Z.set(C.FitAssistantCookieName,m,{expires:365,path:"/".concat(C.Language.toLowerCase(),"/"),secure:!0}),l.Z.set(C.FitAssistantPerCategoryCookieName,p,{expires:365,path:window.location.pathname.split("/").filter((function(e){return!e.includes("-_-")})).join("/"),secure:!0})}else{var h=(0,N.G)(null!=i?i:I),v=(0,N.J)(null!=i?i:I),g={variables:{siteName:(0,R.y)().SitecoreSiteName,language:(0,R.y)().SitecoreLanguage,ispreview:C.IsPreview,configurationItem:P.find((function(e){return e.Parameter==s})).Id,selectedproductpimid:r||"",parameters:"".concat(h,",").concat(v),additionalFilter:(0,_.kY)(t,C.AdditionalFilters)}};Y(g)}},showSecondary:(null==A?void 0:A.length)>0,textSecondary:S.reset,onClickSecondary:function(){o((0,k.Ul)(P[0].Parameter)),o((0,w.GF)(c.Z.NoSelection)),o((0,E.Zq)()),(0,_.Ep)(),l.Z.remove(C.FitAssistantCookieName,{path:"/".concat(C.Language.toLowerCase(),"/")})}})),y&&a.createElement(te,null))},ve=function(e){var t=e.image,n=e.alt,r=e.name,o=e.description,i=e.price,l=e.isSelected,u=e.onClick,c=e.showPlusIcon;return a.createElement("div",{className:"rack-option d-flex mb-4 px-1 py-1 ".concat(l?"selected":""),onClick:u},a.createElement("div",{className:"image-wrapper d-flex justify-content-center w-100"},c&&a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},a.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),a.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"})),a.createElement("img",{src:t,alt:n})),a.createElement("div",{className:"info d-flex flex-column justify-content-center"},a.createElement("h6",{className:"mb-1"},r),a.createElement("p",{className:"".concat(o?"":"d-none")},o),a.createElement("h6",{className:"".concat(i?"":"d-none")},"+ ",i)))};function ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||ye(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){if(e){if("string"==typeof e)return be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,t):void 0}}function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&r((0,k.FP)({data:e.getCarSelectorOptions.carSelectorOptionsResponse.Options,messages:e.getCarSelectorOptions.carSelectorOptionsResponse.OptionMessages,parameters:e.getCarSelectorOptions.carSelectorOptionsResponse.ParameterName,configItems:e.getCarSelectorOptions.carSelectorOptionsResponse.NextConfigurationItem}))},onError:function(){return r((0,k.Go)(!0))}}),2)),z=H[0];return H[1].data,a.createElement(a.Fragment,null,!P&&a.createElement(a.Fragment,null,a.createElement("div",{className:"rack-selector d-flex flex-column justify-content-center"},a.createElement("div",{className:"info-text",dangerouslySetInnerHTML:{__html:null==O?void 0:O.Text}}),a.createElement("h5",null,C.selectRoofRack),a.createElement("div",{className:"rack-options mt-6"},null==L||null===(e=L.data)||void 0===e?void 0:e.map((function(e,t){return a.createElement(ve,{onClick:function(){e.Selected||(r((0,k.YG)(e.Value)),r((0,k.Az)(!1)),r((0,k.oO)(function(e){var t,n=null==L?void 0:L.configItems,r={parameterName:y,configurationItem:n,text:e.Text,value:e.Value};return[].concat(function(e){if(Array.isArray(e))return be(e)}(t=d.filter((function(e){return e.parameterName!=y})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||ye(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[r])}(e))))},name:e.Text,description:e.Description,price:e.FormattedPrice,image:e.Image,alt:e.AltText,isSelected:e.Selected,key:t})})),a.createElement(ve,{onClick:function(){r((0,k.th)(u.Z.RoofRacks))},showPlusIcon:!0,name:C.iNeedARoofrack}),a.createElement("div",{className:"footer-link"},a.createElement("a",{className:"w-100 text-center",onClick:function(){r((0,k.th)(u.Z.EnsureThirdParty))}},C.iHaveAnotherRoofrack)))),a.createElement(B,{showDefault:null==L||null===(t=L.data)||void 0===t?void 0:t.some((function(e){return e.Selected})),textDefault:C.confirm,onClickDefault:function(){var e,t=null==L||null===(e=L.data)||void 0===e?void 0:e.find((function(e){return e.Selected}));if((null==t?void 0:t.CompatibleRackForTent)!==j.Confirmed||!d.find((function(e){return"confirmCompatibility"===e.parameterName}))&&null!=t&&t.StructurallySupported&&(null==t?void 0:t.StructurallySupported)!=j.Confirmed)r((0,k.th)(u.Z.RackNotCompatible)),(0,_.AZ)(c.Z.NoFit);else{var o={variables:{siteName:(0,R.y)().SitecoreSiteName,language:(0,R.y)().SitecoreLanguage,ispreview:T.IsPreview,configurationItem:O.Id,selectedproductpimid:n||"",parameters:"".concat((0,N.G)(d),",").concat((0,N.J)(d)),additionalFilter:(0,_.kY)(O,T.AdditionalFilters)}};q(o)}},showSecondary:A,textSecondary:C.reset,onClickSecondary:function(){r((0,k.Ul)(o[0].Parameter)),r((0,w.GF)(c.Z.NoSelection)),r((0,E.Zq)()),(0,_.Ep)(),l.Z.remove(T.FitAssistantCookieName,{path:"/".concat(T.Language.toLowerCase(),"/")}),l.Z.remove(T.FitAssistantPerCategoryCookieName,{path:window.location.pathname.split("/").filter((function(e){return!e.includes("-_-")})).join("/")})}})))},we=n(433);function ke(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||xe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?r((0,k.FP)({data:e.getCarSelectorOptions.carSelectorOptionsResponse.Options,messages:e.getCarSelectorOptions.carSelectorOptionsResponse.OptionMessages,parameters:e.getCarSelectorOptions.carSelectorOptionsResponse.ParameterName,configItems:e.getCarSelectorOptions.carSelectorOptionsResponse.NextConfigurationItem})):A.IsRooftopTents&&(r((0,k.th)(u.Z.NoRackFit)),r((0,k.Az)(!0))))},onError:function(){return r((0,k.Go)(!0))}}),2),z=H[0],V=Ee((H[1].data,(0,x.t)(F,{fetchPolicy:"network-only",onCompleted:function(e){U({data:e,selectedCar:d,setCookie:!0}),D.A&&Y()}})),2),G=V[0],W=V[1],Y=(W.loading,W.error,function(){var e,t,n,o=null==M?void 0:M.data.find((function(e){return!0===e.Selected})),a=o.SolutionProducts.map((function(e){return e.ProductId})),i=window._THULEDATA.ProductDetail.ProductId,l={ProductId:i,Name:window._THULEDATA.ProductDetail.ProductName,Webtitle2:window._THULEDATA.ProductDetail.WebTitle2},u=null==A||null===(e=A.RackMountingAdapter)||void 0===e?void 0:e.ProductId,c={ProductId:u,Name:null==A||null===(t=A.RackMountingAdapter)||void 0===t?void 0:t.Name,Webtitle2:null==A||null===(n=A.RackMountingAdapter)||void 0===n?void 0:n.Webtitle2},s=[].concat(ke(a),u?[i,u]:[i]);(0,_.Gu)(s),r((0,E.hY)(u?[l].concat(ke(o.SolutionProducts),[c]):[l].concat(ke(o.SolutionProducts)))),T(A.FitAssistantCookieName,d)}),J=function(e){return!A.IsRooftopTents||!e.Value.includes("!-")};return a.createElement(a.Fragment,null,!P&&a.createElement(a.Fragment,null,a.createElement("div",{className:"rack-selector d-flex flex-column justify-content-center"},a.createElement("div",{className:"info-text",dangerouslySetInnerHTML:{__html:null==L?void 0:L.Text}}),a.createElement("h5",null,C.selectRoofRack),a.createElement("div",{className:"rack-options mt-6"},null==M||null===(e=M.data)||void 0===e?void 0:e.map((function(e,t){return a.createElement(ve,{onClick:function(){e.Selected||(r((0,k.YG)(e.Value)),r((0,k.Az)(!1)),r((0,k.oO)(function(e){var t=null==M?void 0:M.configItems,n={parameterName:y,configurationItem:t,text:e.Text,value:e.Value};return[].concat(ke(d.filter((function(e){return e.parameterName!=y}))),[n])}(e))))},name:e.Text,description:e.Description,price:e.FormattedPrice,image:e.Image,alt:e.AltText,isSelected:e.Selected,key:t})}))),a.createElement(ne,{shouldBeFixed:$})),a.createElement(B,{showDefault:null==M||null===(t=M.data)||void 0===t?void 0:t.some((function(e){return e.Selected})),textDefault:C.confirm,onClickDefault:function(){var e=(0,N.G)(d),t=(0,N.J)(d);if(l.Z.set(A.FitAssistantCookieName,e,{expires:365,path:"/".concat(A.Language.toLowerCase(),"/"),secure:!0}),l.Z.set(A.FitAssistantPerCategoryCookieName,t,{expires:365,path:window.location.pathname.split("/").filter((function(e){return!e.includes("-_-")})).join("/"),secure:!0}),A.IsRooftopTents){var o={variables:{siteName:(0,R.y)().SitecoreSiteName,language:(0,R.y)().SitecoreLanguage,ispreview:A.IsPreview,configurationItem:L.Id,selectedproductpimid:n||"",parameters:"".concat((0,N.G)(d),",").concat((0,N.J)(d)),additionalFilter:(0,_.kY)(L,A.AdditionalFilters)}};G(o)}else(0,_.AZ)(c.Z.Confirmed),r((0,w.GF)(c.Z.Confirmed)),r((0,w.E$)(!1)),r((0,k.Az)(!0)),(0,we.e)(d);D.A&&Y()},showSecondary:O,textSecondary:C.reset,onClickSecondary:function(){r((0,k.Ul)(o[0].Parameter)),r((0,w.GF)(c.Z.NoSelection)),r((0,E.Zq)()),(0,_.Ep)(),l.Z.remove(A.FitAssistantCookieName,{path:"/".concat(A.Language.toLowerCase(),"/")}),l.Z.remove(A.FitAssistantPerCategoryCookieName,{path:window.location.pathname.split("/").filter((function(e){return!e.includes("-_-")})).join("/")})}})),P&&a.createElement(te,null))};function Fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&(null===(t=e.Options)||void 0===t?void 0:t.find((function(e){return e.Selected})))})))||void 0===t?void 0:t.length)<3;S(s);var d=i.map((function(e){var t;return[e,null===(t=e.Options)||void 0===t?void 0:t.find((function(e){return e.Selected}))]})).map((function(e){var t=L(e,2),n=t[0],r=t[1];return{parameterName:n.ParameterName,configurationItem:n.NextConfigurationItem,text:r&&r.Text?r.Text:"no-value",englishText:r&&r.EnglishText?r.EnglishText:null,value:r&&null!=r&&r.BedTypeLovId?r.BedTypeLovId:null!=r&&r.Value?r.Value:"0"}}));b.selectedCarFromCookieOrQuery.toLowerCase().includes("confirmcompatibility")&&d.push({parameterName:"confirmCompatibility",value:!0});var f=l.map((function(e){return[e,d.find((function(t){return t.parameterName===e.parameters}))]})).filter((function(e){var t,n=L(e,2),r=n[0],o=n[1];return(null===(t=r.data)||void 0===t?void 0:t.length)>0&&"no-value"===o.text})).map((function(e){return L(e,1)[0].parameters}));!(f.length>0&&(!r.IsRooftopTents||f.find((function(e){return"roofracks"===e}))&&f.find((function(e){return"genericroofracks"===e}))))||r.IsPlatform&&f.find((function(e){return"roofracks"===e}))?f=[]:(j(f),$(!0));var m=(0,N.G)(d),h=(0,N.J)(d),v=function(e){var t,n=e.filter((function(e){return"0"===e.value})).map((function(e){return e.parameterName})),r=o.filter((function(e){return!e.SkipWhenLoadingFromCookie&&!n.includes(e.Parameter)}));return r.length>0&&(t=r[r.length-1]),t}(d.filter((function(e){return e.parameterName!==u.Z.RoofRacks})));0===f.length&&U({variables:{siteName:(0,R.y)().SitecoreSiteName,language:r.Language,configurationItem:null==v?void 0:v.Id,ispreview:r.IsPreview,selectedproductpimid:n||"",parameters:"".concat(m,",").concat(h),additionalFilter:(0,_.kY)(v,r.AdditionalFilters)}}),p({getSliderList:l,getSelectedCar:d})}else g(!1)})).catch((function(e){return console.log(e)}))}}),[r.FitAssistantCookieName,D.A,o,U]);return(0,a.useEffect)((function(){"Thule"!==(0,R.y)().SitecoreSiteName&&O()?t():r.FitAssistantCookieName&&G()}),[]),{selectedCarFromCookie:d,hasMissingParameters:M,partiallyFit:B,hasCookie:v,getMatchingProducts:P,loadingProductsFromCookie:z,errorFromProductCookie:V,clearSelectedCar:b}}({reset:j}),$=B.selectedCarFromCookie,U=B.hasCookie,H=B.getMatchingProducts,z=B.errorFromProductCookie,W=B.hasMissingParameters,Y=B.partiallyFit,J=B.clearSelectedCar,X=Z().handleLoadProducts;return(0,a.useEffect)((function(){if(!o&&P&&P.length>0&&e((0,k.th)(P[0].Parameter)),$&&U&&H&&!W)e((0,k.VP)($)),X({data:H,selectedCar:$.getSelectedCar,selectedCarFromCookie:$,setCookie:!1}),D.A&&T(h.FitAssistantCookieName,$.getSelectedCar),e((0,E.sO)(H)),J&&j();else if(W){var t,n=null===(t=$.getSelectedCar)||void 0===t?void 0:t.find((function(e){return"0"===e.value})),r=n?$.getSelectedCar[$.getSelectedCar.indexOf(n)-1].parameterName:$.getSelectedCar[$.getSelectedCar.length-1].parameterName;e((0,k.VP)($)),e((0,k.th)(r)),e((0,w.E$)(!1))}}),[U,$,H,z,e,W,Y]),a.createElement(a.Fragment,null,a.createElement("div",{className:"fit-guide-modal on-top ".concat(n?"wrapper-visible":"")},a.createElement("header",null,a.createElement(V,{progressBarStep:function(){switch(o){case u.Z.Makes:return 1;case u.Z.Models:return 2;case u.Z.Years:return 3;case u.Z.Variations:return 4;case u.Z.VanSize:case u.Z.GenericRoofRacks:return 5;default:return null}}(),numberOfSteps:P.filter((function(e){return e.Parameter===u.Z.Makes||e.Parameter===u.Z.Models||e.Parameter===u.Z.Years||e.Parameter===u.Z.Variations||e.Parameter===u.Z.VanSize||e.Parameter===u.Z.GenericRoofRacks})).length})),a.createElement("section",{className:"modal-content-section d-inline-block h-100",ref:t},a.createElement("div",{className:"fit-guide-modal-body"},C?a.createElement(q,null):o===u.Z.Mounting?a.createElement(se,null):o===u.Z.Makes||o===u.Z.Models||o===u.Z.Years||o===u.Z.VanSize?a.createElement(ue,{modalContentSectionRef:t}):o===u.Z.Variations?a.createElement(he,null):o===u.Z.GenericRoofRacks?a.createElement(Se,null):o===u.Z.RoofRacks?a.createElement(Pe,null):o===u.Z.RackMounting?a.createElement(G,{showDefault:!0,showSecondary:r===c.Z.RackMounting,textDefault:p.confirm,textSecondary:p.reset,onClickDefault:function(){if(e((0,w.GF)(c.Z.RackMounting)),D.A){var t,n,r,o=window._THULEDATA.ProductDetail.ProductId,a={ProductId:o,Name:window._THULEDATA.ProductDetail.ProductName,Webtitle2:window._THULEDATA.ProductDetail.WebTitle2},i=null==h||null===(t=h.RackMountingAdapter)||void 0===t?void 0:t.ProductId,u={ProductId:i,Name:null==h||null===(n=h.RackMountingAdapter)||void 0===n?void 0:n.Name,Webtitle2:null==h||null===(r=h.RackMountingAdapter)||void 0===r?void 0:r.Webtitle2},s=i?[o,i]:[o];(0,_.Gu)(s),i&&e((0,E.hY)([a,u]))}else(0,_.AZ)(c.Z.Confirmed);l.Z.set(h.FitAssistantPerCategoryCookieName,c.Z.RackMounting,{expires:365,path:"/".concat(h.Language.toLowerCase(),"/"),secure:!0}),e((0,w.E$)(!1))},onClickSecondary:function(){return j()}}):o===u.Z.OtherFits?a.createElement(G,{showDefault:!0,showSecondary:!0,onClickDefault:function(){window.location.href=h.ParentPageLink},onClickSecondary:function(){I?j():e((0,w.E$)(!1))},textDefault:p.exploreAlternatives,textSecondary:I?p.reset:p.close}):o===u.Z.NoFits?a.createElement(G,{showDefault:!0,onClickDefault:function(){e((0,w.E$)(!1)),e((0,k.Az)(!0))},textDefault:p.close,showSecondary:I,textSecondary:p.reset,onClickSecondary:function(){return j()},showRackOption:P.find((function(e){return e.Parameter===u.Z.RackMounting})),onRackClick:function(){j(),e((0,w.GF)(c.Z.NoSelection)),e((0,k.th)(u.Z.RackMounting))}}):o===u.Z.Unconfirmed?a.createElement(G,{showDefault:!0,onClickDefault:function(){var t,n=[].concat(function(e){if(Array.isArray(e))return Te(e)}(t=M.filter((function(e){return"confirmCompatibility"!=e.parameterName})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[{parameterName:"confirmCompatibility",value:!0}]);e((0,k.oO)(n)),e((0,k.th)(u.Z.GenericRoofRacks))},textDefault:p.iConfirmCompatibility,showSecondary:!0,textSecondary:p.close,onClickSecondary:function(){e((0,w.GF)(c.Z.NoFit)),e((0,w.E$)(!1))}}):o===u.Z.RackNotCompatible?a.createElement(G,{showDefault:!0,onClickDefault:function(){e((0,k.th)(u.Z.RoofRacks))},textDefault:p.buyRoofRack,showSecondary:!0,textSecondary:p.close,onClickSecondary:function(){e((0,w.GF)(c.Z.NoFit)),e((0,w.E$)(!1))}}):o===u.Z.NoRackFit?a.createElement(G,{showDefault:!0,onClickDefault:function(){e((0,w.GF)(c.Z.NoFit)),e((0,w.E$)(!1))},textDefault:p.iUnderstand,showSecondary:I,textSecondary:p.reset,onClickSecondary:function(){return j()}}):o===u.Z.EnsureThirdParty?a.createElement(Ne,null):void 0))),a.createElement("div",{className:"fit-guide-modal-left-slide-in-backdrop ".concat(n?"active":""),onClick:function(){e((0,w.E$)(!1)),o!==u.Z.Confirmed&&o!==u.Z.NoFits&&o!==u.Z.OtherFits||e((0,k.Az)(!0))}}))},Oe=function(e){var t=e.showfitGuideModal,n=e.setShowFitGuideModal,r=(0,i.v9)(f);return a.createElement("div",{className:"my-3 fit-guide"},a.createElement("div",{onClick:function(){return n(!t)},className:"fit-guide-left-slide-in-menu-backdrop backdrop ".concat(t?"active":"")}),a.createElement("div",{className:"fit-guide-menu left-slide-in-menu-wrapper ".concat(t?"":"wrapper-hidden")},a.createElement("section",{className:"menu-content-section d-inline-block"},a.createElement("div",{className:"menu-buttons slide-in-menu-heading justify-content-end"},a.createElement("button",{type:"button",className:"top-left-mini-btn hide-fit-guide-overlay d-flex fit-guide-button p-0",onClick:function(){return n(!1)}},a.createElement("i",{className:"le-icon-x"}),a.createElement("span",{class:"sr-only"},"Close modal"))),a.createElement("div",null,a.createElement("p",{className:"heading4"},r.FitGuide.Title)),a.createElement("div",{dangerouslySetInnerHTML:{__html:r.FitGuide.Content}}))))};function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=3?h[0].text+" "+h[1].text+" "+h[2].text:"";case c.Z.RackMounting:return p.rackMounting;default:return""}}()),a.createElement("i",{className:"le-icon-arrow rot-180 ".concat(y!==c.Z.NoSelection?"d-none":"")})),D.A&&S===u.Z.OtherFits&&a.createElement("div",{className:"my-3"},a.createElement("span",{className:"text-color--gray80"},p.otherFitsText,". "),a.createElement("a",{href:k.ParentPageLink,className:"text-decoration-underline text-color--gray80"},p.exploreAlternatives)),S===u.Z.NoFits&&a.createElement("div",{className:"my-3"},a.createElement("span",{className:"text-color--gray80"},p.noFitsText,". ")),S===u.Z.Unconfirmed&&a.createElement("div",{className:"my-3"},a.createElement("span",{className:"text-color--gray80"},p.unconfirmedText,". ")),(null==E?void 0:E.length)>0&&a.createElement("div",{className:"my-5 text-color--gray80"},a.createElement("span",null,p.includedToFit),a.createElement("ul",null,E.map((function(e,t){return e.Name.includes("Kit")?a.createElement("li",{key:e.Name},e.Name):a.createElement("li",{key:t},e.Name," ",e.Webtitle2," | ",e.ProductId)}))))),a.createElement(Ae,null),(null===(t=k.FitGuide)||void 0===t?void 0:t.LinkText)&&D.A&&a.createElement(Oe,{showfitGuideModal:C,setShowFitGuideModal:P}))}},6734:function(e,t,n){n.d(t,{y:function(){return P}});var r=n(5857),o=n(3894),a=n(1275);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case m.pV:return v(v({},e),{},{showFitAssistant:t.value});case m.hq:return v(v({},e),{},{fitStatus:t.value});default:return e}},FitAssistantContentReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case a.So:return s(s({},e),{},{showResetButtons:t.value});case a.b4:return s(s({},e),{},{initialData:s({},t.value.content)});case a.J3:var n,r=e.stepData.findIndex((function(e){return e.parameters===t.value.parameters}));if(r>=0){var o;n=e.stepData.map((function(e,n){return n===r?t.value:e}));var i=null===(o=e.stepData)||void 0===o?void 0:o.findIndex((function(e){return e.parameters===t.value.parameters}));return i&&(n=n.slice(0,i+1)),s(s({},e),{},{stepData:n})}return s(s({},e),{},{stepData:[].concat(l(e.stepData),[t.value])});case a.yp:return s(s({},e),{},{carInformation:t.value});case a.xf:return s(s({},e),{},{step:t.value});case a.vC:return s(s({},e),{},{error:t.value});case a.QZ:if(e.stepData.find((function(t){return t.parameters===e.step}))){var u=e.initialData.IsRooftopTents&&"roofracks"===e.step,c=u?-2:-1,d=u&&e.carInformation.find((function(e){return"roofracks"===e.parameterName}))&&e.carInformation.find((function(e){return"genericroofracks"===e.parameterName}))?-2:-1,m=e.stepData.slice(0,c),p=e.carInformation.slice(0,d),h=m.length,v=m.length-1>=0?m[m.length-1].parameters:e.initialData.Steps[0].Parameter;return h>=0?s(s({},e),{},{stepData:e.stepData.slice(0,h),carInformation:p.slice(0,h),step:v,missingParametersError:[],showResetButtons:!1,confirmedCompatibility:!1}):(1===m.length&&(p=[]),s(s({},e),{},{stepData:m,carInformation:p,step:v,showResetButtons:!1,confirmedCompatibility:!1}))}var g=e.stepData.length>0?e.stepData[e.stepData.length-1].parameters:e.initialData.Steps[0].Parameter;return s(s({},e),{},{step:g,showResetButtons:!1,confirmedCompatibility:!1});case a.uK:return s(s({},e),{},{showMoreInfo:t.value});case a.yx:var y=e.stepData.find((function(t){return t.parameters===e.step})).data.map((function(e){return e.Value===t.value?s(s({},e),{},{Selected:!0}):s(s({},e),{},{Selected:!1})})),b=e.stepData.map((function(t){return t.parameters===e.step?s(s({},t),{},{data:y}):t}));return s(s({},e),{},{stepData:l(b)});case a.Xm:var S=e.stepData.find((function(t){return t.parameters===e.step})).data.map((function(e,n){return n===t.value?s(s({},e),{},{Selected:!0}):s(s({},e),{},{Selected:!1})})),w=e.stepData.map((function(t){return t.parameters===e.step?s(s({},t),{},{data:S}):t}));return s(s({},e),{},{stepData:l(w)});case a.gJ:return s(s({},e),{},{step:e.initialData.Steps[0].Parameter,stepData:[],carInformation:[],showResetButtons:!1,confirmedCompatibility:!1});case a.YN:return s(s({},e),{},{isPartialFit:t.value});case a.Ds:return s(s({},e),{},{stepData:t.value.getSliderList,carInformation:t.value.getSelectedCar,step:t.value.step,showResetButtons:!0});case a.hW:return s(s({},e),{},{confirmedCompatibility:!0});default:return e}},MatchingProductsReducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case y.iw:return w(w({},e),{},{matchingProducts:t.value.getCarSelectorProducts.carSelectorProductsResponse.MatchingProducts,solutionComponents:t.value.getCarSelectorProducts.carSelectorProductsResponse.SolutionComponents,productPageMatch:t.value.getCarSelectorProducts.carSelectorProductsResponse.ProductPageMatch});case y.Gp:return w(w({},e),{},{solutionComponents:t.value});case y.R9:return w(w({},e),{},{matchingProducts:null,solutionComponents:null});default:return e}}}),P=(0,r.MT)(C,void 0,x)},4434:function(e,t,n){n.d(t,{A:function(){return r}});var r=window.location.href.includes("-_-")},7212:function(e,t,n){n.d(t,{G:function(){return r},J:function(){return o}});var r=function(e){return e.filter((function(e){return["make","model","year"].includes(e.parameterName.toLowerCase())})).map((function(e){return"".concat(e.parameterName.toLowerCase(),":").concat(e.value,"|").concat(encodeURI(e.text))})).join(",")},o=function(e){return e.filter((function(e){return!["make","model","year"].includes(e.parameterName.toLowerCase())})).map((function(e){return"".concat(e.parameterName.toLowerCase(),":").concat(e.value,"|").concat(encodeURI(e.text))})).join(",")}},433:function(e,t,n){n.d(t,{X:function(){return l},e:function(){return u}});var r=n(973);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;tm&&e.target.innerWidth<=m||f<=m&&e.target.innerWidth>m)&&(v(),f=e.target.innerWidth)}(e),100)})),v()},444:function(e,t,n){n.d(t,{Ep:function(){return v},AZ:function(){return h},zq:function(){return g},Gu:function(){return b},eR:function(){return O},kY:function(){return R},KI:function(){return C}});var r=n(7212),o=n(4801),a=n(4858),i=n(4434),l=n(7294),u=function(e){var t,n=e.component;return l.createElement(l.Fragment,null,n&&n.IsYoutube&&l.createElement("div",{className:"instruction-item m-3 fittingInstructionMovie"},l.createElement("div",null,l.createElement("lite-youtube",{videoid:null==n||null===(t=n.AssetURL)||void 0===t?void 0:t.split("/")[n.AssetURL.split("/").length-1].split("?")[0],videotitle:n.VideoTitle,params:"controls=0&modestbranding=2&rel=0&enablejsapi=1"})),l.createElement("span",{className:"heading6 m-2"},n.VideoTitle)))},c=n(7762),s=n(433),d=n(3581);function f(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=19)&&(e.dispatchEvent(t),clearInterval(r)),n++}),100)},b=function(e){fetch("/api/sitecore/fitguide/getfitguideatcandprice",{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify({ProductIds:e})}).then((function(e){return e.json()})).then((function(e){S(e.Button,!0),E(e.PriceContainer),x(e.PriceContainer)}))},S=function(e,t){if(e){var n=document.querySelector(".product-detail__buy-area .product-add-to-cart");if(n){if(n.querySelector(".product-ids-for-solution").value=e.ProductIdsForSolution,!t)return;_THULEDATA.FitGuideRacksData?w(e):k(e)}}},w=function(e){if(e||i.A){var t=document.querySelector(".product-add-to-cart button:not(.d-none)"),n=document.querySelector(".product-add-to-cart .tpd-product-stock-status");t&&n&&(t.innerHTML=e.ButtonText,n.innerHTML=e.ButtonSubText,e.IsInStock&&e.IsSellable?(t.classList.add("thule-btn-shop"),t.classList.remove("thule-btn-secondary"),t.classList.remove("disabled")):(t.classList.remove("thule-btn-shop"),t.classList.add("thule-btn-secondary"),t.classList.add("disabled")))}},k=function(e){if(e){var t=document.querySelector(".product-detail__buy-area .product-add-to-cart");if(t){var n=t.querySelector(".solution-btn.buyable button"),r=t.querySelector(".solution-btn.not-buyable button");if(!n||!r)return;e.Status<=2&&(t.querySelector(".buyable .tpd-product-stock-status span").textContent=e.ButtonSubText,t.querySelector(".not-buyable .tpd-product-stock-status span").textContent=e.ButtonSubText),e.IsSellable&&(e.IsInStock||!e.IsInStock&&e.IsAvailableToPromiseFulfilled)?(n.textContent=e.ButtonText,n.parentElement.classList.remove("d-none"),r.parentElement.classList.add("d-none")):(r.textContent=e.ButtonText,r.parentElement.classList.remove("d-none"),n.parentElement.classList.add("d-none"));var o=document.querySelector(".product-detail__buy-area .product-add-to-cart > button:not(.roof-rack-btn, .d-none)");o&&o.classList.add("d-none"),t.querySelector(".atc-stockstatus").value=e.StockStatusText}}},E=function(e){var t;if(e){var n=document.querySelector(".product-detail__buy-area .price");if(null!==n){var r=n.querySelector(".price-value"),o=n.querySelector(".discount-price-value");n.querySelector(".ga-price").innerHTML=e.Price,n.querySelector(".ga-discount-price").innerHTML=e.DiscountPrice;var a,i=document.querySelector(".product-detail__buy-area .product-add-to-cart");null!==(t=window._THULEDATA)&&void 0!==t&&t.isExtranet?(n.querySelector(".RRP-value").innerHTML=e.PriceFormatted,null!==(a=window._THULEDATA)&&void 0!==a&&null!==(a=a.FitAssistant)&&void 0!==a&&a.IsRooftopTents||(r.innerHTML="")):e.DiscountPrice>0?(r.innerHTML=e.PriceFormatted,o.innerHTML=e.DiscountPriceFormatted,r.classList.add("line-through-text"),i&&(i.querySelector(".atc-product-price").value=e.DiscountPriceFormatted)):(r.innerHTML=e.PriceFormatted,o.innerHTML="",i&&(i.querySelector(".atc-product-price").value=e.PriceFormatted),r.classList.remove("line-through-text"))}}},x=function(e){e&&(document.getElementsByTagName("afterpay-placement")[0]&&document.getElementsByTagName("afterpay-placement")[0].setAttribute("data-amount",e.Price),document.getElementsByTagName("klarna-placement")[0]&&document.getElementsByTagName("klarna-placement")[0].setAttribute("data-purchase-amount",Math.round(100*e.Price)),window.KlarnaOnsiteService&&window.Klarna.OnsiteMessaging.refresh())},C=function(e,t,l,u){if(!e||!e.Success)return o.Z.Unconfirmed;var c,d,f=o.Z.NoFit;if(null!==e){if(e&&e.SolutionComponents&&I(e.SolutionComponents),u){var p=(0,r.G)(t),h=(0,r.J)(t);i.A&&F(l.FitAssistantCookieName,t),a.Z.set(l.FitAssistantCookieName,p,{expires:365,path:"/".concat(l.Language.toLowerCase(),"/"),secure:!0}),a.Z.set(l.FitAssistantPerCategoryCookieName,h,{expires:365,path:window.location.pathname.split("/").filter((function(e){return!e.includes("-_-")})).join("/"),secure:!0}),(0,s.e)(t)}var v=[];if(i.A){var y,b;f=e.ProductPageMatch?o.Z.Confirmed:o.Z.NoFit;var w=document.querySelector(".product-ids-for-solution");if(w){var k,C=w.dataset.defaultids,N=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}(e.MatchingProducts);try{for(N.s();!(k=N.n()).done;){var T=k.value;if(null!=C&&C.includes(T.PimId)){f=o.Z.Confirmed;break}}}catch(e){N.e(e)}finally{N.f()}}null===(y=window._THULEDATA)||void 0===y||!y.isExtranet||null!==(b=window._THULEDATA)&&void 0!==b&&null!==(b=b.FitAssistant)&&void 0!==b&&b.IsRooftopTents?(c=e.SolutionPriceContainer,d=e.AddToCartButton,S(d,!0),E(c),x(c)):function(e,t){if(e){var r=document.querySelector("#productBuyArea"),o=r.querySelector(".price"),a=r.querySelector(".add-to-your-cart"),i=r.querySelector(".loading-spinner");i.classList.remove("d-none"),o.classList.add("d-none"),a.classList.add("d-none"),Promise.all([n.e(4770),n.e(7210)]).then(n.bind(n,7210)).then((function(n){return n.getSolutionPriceFromM3(e,t)})).then((function(){i.classList.add("d-none"),o.classList.remove("d-none"),a.classList.remove("d-none")}))}}(e.SolutionComponents,e.SolutionPriceContainer),null!=e&&e.MatchingProducts&&(null==e?void 0:e.MatchingProducts.length)>0&&A(e.MatchingProducts[0].SolutionFootGeneration,e.MatchingProducts[0].SolutionFootType)}else{var O=e.MatchingProducts.map((function(e){return e.PimId}));document.querySelectorAll("div.isotope-item[data-pimid]").forEach((function(t){var n,r=t.getAttribute("data-pimid"),o=null;r&&O.indexOf(r)>-1&&(v.push(t),function(e,t){var n;if(t&&e){var r=e.querySelector(".price-value");if(r)if(null!==(n=window._THULEDATA)&&void 0!==n&&n.isExtranet)e.querySelector(".RRP-value").innerHTML=t.PriceFormatted,r.innerHTML="";else{var o=e.querySelector(".discount-price-value");if(!o)return;t.DiscountPrice>0?(r.innerHTML=t.PriceFormatted,o.innerHTML=t.DiscountPriceFormatted,r.classList.add("line-through-text")):(r.innerHTML=t.PriceFormatted,o.innerHTML="",r.classList.remove("line-through-text"))}}}(t,null===(n=o=e.MatchingProducts.find((function(e){return e.PimId===r})))||void 0===n?void 0:n.SolutionPriceContainer),function(e,t){var n;if(e&&t&&null!==(n=_THULEDATA)&&void 0!==n&&n._buyersGuide){var r=e.querySelector(".product-add-to-cart .product-ids-for-solution");r&&(r.value=t.ProductIds.join(","))}}(t,o)),P(t,o)})),v.length>0&&(f=o.Z.Confirmed),g(v)}}return f},P=function(e,t){if(e){var n=e.getAttribute("data-pimid");n&&e.querySelectorAll(".img-container img[data-pimid='".concat(n,"'][data-defaultimage]")).forEach((function(e){var n=e.getAttribute("data-defaultimage");t&&t.ImageUrl?e.setAttribute("src",t.ImageUrl):n&&e.setAttribute("src",n)}))}},F=function(e,t){var n=new URL(document.location),r=t.map((function(e){return"".concat(e.parameterName,":").concat(e.value,"|").concat(encodeURI(e.text))})).join(",");n.searchParams.set(e,r),history.replaceState(null,null,n.toString())},I=function(e){var t=document.querySelector("#documentsContainer"),n=document.getElementById("image-navigation");if(t&&e){t.innerHTML="",n&&n.querySelectorAll(".fittingInstructionMovie").forEach((function(e){e.remove()}));var r=[];e.forEach((function(e){var t,o,a,i;(null===(t=e.Informationdoc)||void 0===t?void 0:t.length)>0&&T(e.Informationdoc,e.InformationDocumentsLinkText,r),(null===(o=e.FittingInstruction)||void 0===o?void 0:o.length)>0&&T(e.FittingInstruction,e.FittingInstructionLinkText,r),(null===(a=e.CompatibilityDocuments)||void 0===a?void 0:a.length)>0&&T(e.CompatibilityDocuments,e.CompatibilityDocumentsLinkText,r),(null===(i=e.FittingInstructionMovies)||void 0===i?void 0:i.length)>0&&N(e,n)}))}},N=function(e,t){null!=e&&e.FittingInstructionMovies&&t&&e.FittingInstructionMovies.forEach((function(e){var n=(0,c.Dq)(l.createElement(u,{component:e}));t.innerHTML+=n}))},T=function(e,t,n){var r=document.querySelector("#documentsContainer");r&&e.forEach((function(e){if(-1===n.indexOf(e.AssetId)){n.push(e.AssetId);var o=e.IconCssClass?''):"";r.innerHTML+='
  • '.concat(o,' ').concat(t,"
  • ")}}))},A=function(e,t){var n=document.querySelector('.pdp__mainImages[data-isroofrack="True"]');n&&e&&t&&(n.querySelectorAll(".pdp__mainImageWrapper").forEach((function(n){n.dataset.generation===e&&n.dataset.foottype===t?(n.classList.remove("d-none"),n.classList.add("splide__slide")):(n.classList.add("d-none"),n.classList.remove("splide__slide"))})),(0,d.V)())},O=function(e,t){return t&&e.FilterOptions?JSON.stringify(t):null},R=function(e,t){return t&&e.FilterProductResult?JSON.stringify(t):null}},3356:function(e,t,n){n.d(t,{L:function(){return a}});var r=n(4377),o=n(3331),a=new r.f({uri:"".concat("/sitecore/api/graph/tgv2","?sc_apikey=").concat("f894ab82-a4b8-4b79-a010-385a53a12d6d"),cache:new o.h,fetchOptions:{mode:"no-cors"}})},8271:function(){},7774:function(e,t,n){var r=n(7294);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n