{"version":3,"sources":["ecom.product.list.with.facets.js"],"names":["e4","productListWithFacets","debug","jProductList","jQuery","init","objContext","length","event","util","registerEvents","bindEvents","context","get","products","facets","set","window","on","clear","preventDefault","addToCart","target","loadNextPage","apply","setSort","loadProductsAndFacets","keyCode","clearSelectedFacetOption","currentTarget","clearAllSelectedFacetOptions","ajax","objAjaxSettings","jqXHR","extend","method","dataType","url","getFeedUrl","cache","data","getParamsFromForm","fail","textStatus","errorThrown","find","html","always","loading","resolveWait","removeClass","setPageNumber","currentPageNumber","beforeSend","addClass","done","jsonData","trigger","build","list","builded","boolIncludeFacets","strReturnValue","settings","ecom","feedUrl","strCustomUrl","looksLikeUrl","includes","serialize","showLoadMoreButton","hideLoadMoreButton","observeIntersectionOnLastItemOrShowLoadMoreButton","hasMorePages","pageCount","isShowLoadMoreButtonIntervalReached","lazyLoad","buttonShowInterval","isNextPageFullPageSize","productCount","pageSize","isLoadMoreButtonDisabled","autoLoadCount","observeIntersectionOnLastItem","intPageNumber","val","getPageNumberByProductItemNode","domNode","intPageSize","intProductItemIndex","closest","parent","index","Math","ceil","jInput","objSortInfo","jSelectMultiple","objSortInfoDefault","sortByPropertyName","sortOrderPropertyName","boolSortIsDefault","setScrollTop","intScrollTop","scrollTop","getScrollTop","floor","hideAlert","alcadon","toggleListView","setStateByProductlistContext","observer","isSupported","setSkeletonItemHeight","observeIntersectionOnSkeleton","prop","showAlert","jProducts","strItemClasses","arrProductsHtml","map","p","getListItemHtmlWithItemClasses","listItemHtml","join","toggleState","toggleAll","strListItemHtml","loadProductsByPageNumber","fnCallback","arrDomObservables","last","toArray","bind","loadNextPageOnLastItemIntersection","observerOptions","objEntry","objObserver","isIntersecting","unobserve","domLastItem","intNextPageNumber","appendItems","each","intIndex","objProduct","append","itemAppended","getSkeletonItem","intFirstItemHeight","not","first","outerHeight","intFirstExpandedItem","css","height","arrObservableSkeletons","filter","loadPageOnSkeletonIntersection","jEntryTarget","parseInt","replaceSkeletonItems","intPageNum","jSkeletonItem","undefined","replaceWith","skeletonReplaced","navigateToProductPage","off","strProductPageUrl","jTriggerNode","when","then","attr","getSelection","toString","expendedState","expandedItems","location","href","domForm","disableAllSubmitButtonsInForm","require","js","jQueryValidate","jForm","objValidator","validate","submitHandler","product","enableAllSubmitButtonsInForm","valid","call","currentForm","selectMultiple","setSelection","selectedFacetOptionsCount","jNode","strFacetParameterName","strFacetOptionValue","jSelectedFacetOptionInput","jSelectedFacetOptionInputs","history","state","boolIsNavigatingToProductPage","objContextNew","replaceState","getBrowserUrl","scrollRestoration","pathname","arrParams","split","arrParamsToShowInUrl","arrParamNamesToExcludeFromUrl","showParamsInUrl","push","search","toLowerCase","i","strParamName"],"mappings":"AAAAA,GAAAC,sBAAA,CACAC,OAAA,EACAC,aAAAC,OAAA,iCACAC,KAAA,WACA,IAGAC,EAHA,IAAAN,GAAAC,sBAAAE,aAAAI,SACAP,GAAAC,sBAAAO,MAAAR,GAAAS,KAAAC,eAAA,8CAAA,yBACAV,GAAAC,sBAAAU,aACAL,EAAAN,GAAAC,sBAAAW,QAAAC,MACAb,GAAAC,sBAAAa,SAAAT,KAAAC,GACAN,GAAAC,sBAAAc,OAAAV,KAAAC,GACAN,GAAAC,sBAAAW,QAAAI,IAAAV,KAGAK,WAAA,WACAP,OAAAa,QAAAC,GAAA,eAAAlB,GAAAC,sBAAAW,QAAAO,OAEAnB,GAAAC,sBAAAE,aAAAe,GAAA,SAAA,qBAAA,SAAAV,GACAA,EAAAY,iBACApB,GAAAC,sBAAAa,SAAAO,UAAAb,EAAAc,UAEAtB,GAAAC,sBAAAE,aAAAe,GAAA,QAAA,2CAAA,SAAAV,GACAA,EAAAY,iBACApB,GAAAC,sBAAAa,SAAAS,iBAGAvB,GAAAC,sBAAAE,aAAAe,GAAA,SAAA,yBAAA,SAAAV,GACAA,EAAAY,iBACApB,GAAAC,sBAAAuB,MAAAhB,EAAAc,UAEAtB,GAAAC,sBAAAE,aAAAe,GAAA,SAAA,yBAAA,SAAAV,GACAR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cAAArJ,SAAA,YACAiJ,EAAAE,KAAA,SAAA,aAEA,IAAA,IAAAG,EAAA,EAAAA,EAAAR,EAAA3M,OAAAmN,IAAA,CACA,IAAAC,EAAAT,EAAAQ,GAAAP,MAAA,KAAA,GAAAM,cACA,KAAAE,IAAA,IAAAN,EAAAjJ,SAAAuJ,KAAA,IAAAN,EAAAjJ,SAAA8I,EAAAQ,GAAAD,gBACAL,EAAAG,KAAAL,EAAAQ,KAGA,IAAAd,GAAA,EAAAtM,EAAA8C,mBACAgK,EAAAG,KAAA,WAAAjN,EAAA8C,mBAEA,EAAAgK,EAAA7M,SACAuD,GAAA,IAAAsJ,EAAAxF,KAAA,MAGA,OAAA9D","file":"ecom.product.list.with.facets.js","sourcesContent":["e4.productListWithFacets = {\r\n debug: false,\r\n jProductList: jQuery( '.js-e-productlist-with-facets' ),\r\n init: function () {\r\n if ( e4.productListWithFacets.jProductList.length === 1 ) {\r\n e4.productListWithFacets.event = e4.util.registerEvents( 'build builded itemAppended skeletonReplaced', 'productListWithFacets' );\r\n e4.productListWithFacets.bindEvents();\r\n var objContext = e4.productListWithFacets.context.get();\r\n e4.productListWithFacets.products.init( objContext );\r\n e4.productListWithFacets.facets.init( objContext );\r\n e4.productListWithFacets.context.set( objContext );\r\n }\r\n },\r\n bindEvents: function () {\r\n jQuery( window ).on( 'beforeunload', e4.productListWithFacets.context.clear );\r\n\r\n e4.productListWithFacets.jProductList.on( 'submit', '.js-e-product-form', function ( event ) {\r\n event.preventDefault();\r\n e4.productListWithFacets.products.addToCart( event.target );\r\n } );\r\n e4.productListWithFacets.jProductList.on( 'click', '.js-e-productlist-load-more-products-btn', function ( event ) {\r\n event.preventDefault();\r\n e4.productListWithFacets.products.loadNextPage();\r\n } );\r\n\r\n e4.productListWithFacets.jProductList.on( 'submit', '.js-e-productlist-form', function ( event ) {\r\n event.preventDefault();\r\n e4.productListWithFacets.apply( event.target );\r\n } );\r\n e4.productListWithFacets.jProductList.on( 'change', '.js-e-productlist-sort', function ( event ) {\r\n e4.productListWithFacets.setSort( event.target );\r\n e4.productListWithFacets.loadProductsAndFacets();\r\n } );\r\n\r\n e4.productListWithFacets.jProductList.on( 'selectionChanged.e4.selectMultiple', '.js-e-productlist-facet-group', function ( event ) {\r\n e4.productListWithFacets.facets.apply( event.target );\r\n } );\r\n e4.productListWithFacets.jProductList.on( 'keydown keypress', '.js-e-productlist-facet-option-input[type=\"text\"]', function ( event ) {\r\n //console.log( event.type, event.keyCode );\r\n if ( event.keyCode === 13 ) {\r\n event.preventDefault();\r\n e4.productListWithFacets.facets.apply( event.target );\r\n }\r\n } );\r\n e4.productListWithFacets.jProductList.on( 'click', '.js-e-productlist-clear-selected-facet-option-btn', function ( event ) {\r\n event.preventDefault();\r\n e4.productListWithFacets.facets.clearSelectedFacetOption( event.currentTarget );\r\n } );\r\n e4.productListWithFacets.jProductList.on( 'click', '.js-e-productlist-clear-all-selected-facet-options-btn', function ( event ) {\r\n event.preventDefault();\r\n e4.productListWithFacets.facets.clearAllSelectedFacetOptions();\r\n } );\r\n },\r\n ajax: function ( objAjaxSettings ) {\r\n var jqXHR = jQuery.ajax( jQuery.extend( {\r\n method: 'GET',\r\n dataType: 'json',\r\n url: e4.productListWithFacets.getFeedUrl(),\r\n cache: false,\r\n data: e4.productListWithFacets.getParamsFromForm(),\r\n }, objAjaxSettings ) );\r\n\r\n jqXHR.fail( function ( jqXHR, textStatus, errorThrown ) {\r\n e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).html( '

' + errorThrown + '

' );\r\n } );\r\n jqXHR.always( function () {\r\n e4.loading.resolveWait( '.js-e-productlist-with-facets' );\r\n e4.productListWithFacets.jProductList.find( '.js-e-loading-overlay' ).removeClass( 'is-loading' );\r\n } );\r\n return jqXHR;\r\n },\r\n loadProductsAndFacets: function () {\r\n e4.productListWithFacets.setPageNumber( 1 );\r\n e4.productListWithFacets.context.set( { currentPageNumber: 1 } );\r\n return e4.productListWithFacets.ajax( {\r\n beforeSend: function () {\r\n e4.productListWithFacets.jProductList.find( '.js-e-loading-overlay' ).addClass( 'is-loading' );\r\n }\r\n } ).done( function ( jsonData ) {\r\n e4.productListWithFacets.jProductList.trigger( e4.productListWithFacets.event.build );\r\n e4.productListWithFacets.context.set( jsonData.list );\r\n var objContext = e4.productListWithFacets.context.get();\r\n e4.productListWithFacets.products.build( jsonData );\r\n e4.productListWithFacets.products.init( objContext );\r\n e4.productListWithFacets.facets.build( jsonData );\r\n e4.productListWithFacets.facets.init( objContext );\r\n e4.productListWithFacets.jProductList.trigger( e4.productListWithFacets.event.builded, jsonData );\r\n } );\r\n },\r\n getFeedUrl: function ( boolIncludeFacets ) {\r\n // Get custom feed url if any, to support alternative feeds.\r\n var strReturnValue = e4.settings.ecom.productListWithFacets.feedUrl,\r\n strCustomUrl = e4.productListWithFacets.jProductList.data( 'feed-url' );\r\n if ( e4.util.looksLikeUrl( strCustomUrl ) === true ) {\r\n strReturnValue = strCustomUrl;\r\n }\r\n if ( boolIncludeFacets !== false ) {\r\n strReturnValue += ( strReturnValue.includes( '?' ) === true ? '&' : '?' ) + 'includeFacets=true';\r\n }\r\n return strReturnValue;\r\n },\r\n getParamsFromForm: function () {\r\n return e4.productListWithFacets.jProductList.find( '.js-e-productlist-form' ).serialize();\r\n },\r\n showLoadMoreButton: function () {\r\n jQuery( '.js-e-productlist-load-more-products-btn' ).removeClass( 'd-none' );\r\n },\r\n hideLoadMoreButton: function () {\r\n jQuery( '.js-e-productlist-load-more-products-btn' ).addClass( 'd-none' );\r\n },\r\n observeIntersectionOnLastItemOrShowLoadMoreButton: function ( objContext ) {\r\n var hasMorePages = objContext.pageCount > objContext.currentPageNumber,\r\n isShowLoadMoreButtonIntervalReached = objContext.currentPageNumber % e4.settings.ecom.productListWithFacets.lazyLoad.buttonShowInterval === 0,\r\n isNextPageFullPageSize = hasMorePages === true && objContext.productCount - ( objContext.pageSize * objContext.currentPageNumber ) > objContext.pageSize,\r\n isLoadMoreButtonDisabled = objContext.productCount < e4.settings.ecom.productListWithFacets.lazyLoad.autoLoadCount;\r\n\r\n if ( isShowLoadMoreButtonIntervalReached === true && isNextPageFullPageSize === true && isLoadMoreButtonDisabled === false ) {\r\n // Show load-more btn if we have more pages and the setting for auto-lazyload is not achieved by the total count of products\r\n e4.productListWithFacets.showLoadMoreButton();\r\n }\r\n else {\r\n e4.productListWithFacets.hideLoadMoreButton();\r\n if ( hasMorePages === true ) {\r\n e4.productListWithFacets.products.observeIntersectionOnLastItem();\r\n }\r\n }\r\n },\r\n setPageNumber: function ( intPageNumber ) {\r\n e4.productListWithFacets.jProductList.find( 'input[name=\"PageNum\"]' ).val( intPageNumber );\r\n },\r\n getPageNumberByProductItemNode: function ( domNode ) {\r\n var intPageSize = e4.productListWithFacets.context.get().pageSize,\r\n intProductItemIndex = ( jQuery( domNode ).closest( '.js-e-productlist-item' ).parent().index() + 1 ),\r\n intPageNumber = Math.ceil( intProductItemIndex / intPageSize );\r\n return intPageNumber;\r\n },\r\n setSort: function ( domNode ) {\r\n var jInput = e4.productListWithFacets.jProductList.find( domNode ),\r\n objSortInfo = jInput.data(),\r\n jSelectMultiple = jInput.closest( '.js-e-select-multiple' ),\r\n objSortInfoDefault = jSelectMultiple.data(),\r\n sortByPropertyName = 'sortBy',\r\n sortOrderPropertyName = 'sortOrder',\r\n boolSortIsDefault = false;\r\n if ( sortByPropertyName in objSortInfo && sortOrderPropertyName in objSortInfo ) {\r\n e4.productListWithFacets.jProductList.find( 'input[name=\"SortBy\"]' ).val( objSortInfo[ sortByPropertyName ] );\r\n e4.productListWithFacets.jProductList.find( 'input[name=\"SortOrder\"]' ).val( objSortInfo[ sortOrderPropertyName ] );\r\n if ( sortByPropertyName in objSortInfoDefault && sortOrderPropertyName in objSortInfoDefault && objSortInfo[ sortByPropertyName ] === objSortInfoDefault[ sortByPropertyName ] && objSortInfo[ sortOrderPropertyName ] === objSortInfoDefault[ sortOrderPropertyName ] ) {\r\n boolSortIsDefault = true;\r\n }\r\n }\r\n else {\r\n e4.productListWithFacets.jProductList.find( 'input[name=\"SortBy\"], input[name=\"SortOrder\"]' ).val( '' );\r\n }\r\n jSelectMultiple.data( 'is-default', boolSortIsDefault );\r\n },\r\n setScrollTop: function ( intScrollTop ) {\r\n jQuery( 'html,body' ).scrollTop( intScrollTop );\r\n },\r\n getScrollTop: function () {\r\n return Math.floor( jQuery( window ).scrollTop() );\r\n },\r\n products: {\r\n init: function ( objContext ) {\r\n if ( objContext.productCount > 0 ) {\r\n e4.productListWithFacets.products.hideAlert();\r\n alcadon.ecom.toggleListView.setStateByProductlistContext( objContext );\r\n if ( e4.util.observer.isSupported === true ) {\r\n e4.productListWithFacets.products.setSkeletonItemHeight();\r\n e4.productListWithFacets.products.observeIntersectionOnSkeleton();\r\n if ( objContext.scrollTop !== null ) {\r\n e4.productListWithFacets.setScrollTop( objContext.scrollTop );\r\n }\r\n e4.productListWithFacets.observeIntersectionOnLastItemOrShowLoadMoreButton( objContext );\r\n }\r\n else {\r\n e4.util.debug(\r\n [\r\n 'IntersectionObserver not available',\r\n 'switching to pagination'\r\n ],\r\n e4.productListWithFacets.debug );\r\n jQuery( '.js-e-productlist-pagination' ).prop( 'hidden', false );\r\n e4.productListWithFacets.jProductList.addClass( 'has-pagination' );\r\n }\r\n }\r\n else {\r\n e4.productListWithFacets.products.showAlert();\r\n }\r\n },\r\n build: function ( jsonData ) {\r\n if ( jsonData.products !== null ) {\r\n var jProducts = e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' );\r\n jQuery( '.js-e-productlist-products-count' ).html( jsonData.list.productCount );\r\n var strItemClasses = jProducts.data( 'item-classes' ),\r\n arrProductsHtml = jsonData.products.map( p => e4.productListWithFacets.products.getListItemHtmlWithItemClasses( p.listItemHtml, strItemClasses ) );\r\n jProducts.html( arrProductsHtml.join( '' ) );\r\n if ( alcadon.ecom.toggleListView.toggleState === 'expanded' ) {\r\n alcadon.ecom.toggleListView.toggleAll( alcadon.ecom.toggleListView.toggleState );\r\n }\r\n\r\n }\r\n },\r\n getListItemHtmlWithItemClasses: function ( strListItemHtml, strItemClasses ) {\r\n return '
' + strListItemHtml + '
';\r\n },\r\n showAlert: function () {\r\n e4.productListWithFacets.jProductList.find( '.js-e-productlist-products-alert' ).removeClass( 'd-none' );\r\n },\r\n hideAlert: function () {\r\n e4.productListWithFacets.jProductList.find( '.js-e-productlist-products-alert' ).addClass( 'd-none' );\r\n },\r\n loadProductsByPageNumber: function ( intPageNumber, fnCallback ) {\r\n e4.productListWithFacets.setPageNumber( intPageNumber );\r\n e4.productListWithFacets.ajax( {\r\n url: e4.productListWithFacets.getFeedUrl( false ),\r\n } ).done( function ( jsonData ) {\r\n if ( typeof fnCallback === 'function' ) {\r\n fnCallback( jsonData );\r\n }\r\n } );\r\n },\r\n observeIntersectionOnLastItem: function () {\r\n var arrDomObservables = e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).find( '.js-e-productlist-item' ).last().toArray();\r\n e4.util.observer.bind( arrDomObservables, e4.productListWithFacets.products.loadNextPageOnLastItemIntersection, e4.settings.ecom.productListWithFacets.lazyLoad.observerOptions );\r\n },\r\n loadNextPageOnLastItemIntersection: function ( objEntry, objObserver ) {\r\n if ( objEntry.isIntersecting === true ) {\r\n e4.productListWithFacets.products.loadNextPage();\r\n objObserver.unobserve( objEntry.target );\r\n }\r\n },\r\n loadNextPage: function () {\r\n // Manually load next batch on click load-more btn or if last server-loaded product item is in viewport\r\n var domLastItem = e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).find( '.js-e-productlist-item' ).get( -1 ),\r\n intNextPageNumber = e4.productListWithFacets.getPageNumberByProductItemNode( domLastItem ) + 1;\r\n e4.productListWithFacets.context.set( {\r\n currentPageNumber: intNextPageNumber\r\n } );\r\n e4.productListWithFacets.products.loadProductsByPageNumber( intNextPageNumber, function ( jsonData ) {\r\n e4.productListWithFacets.products.appendItems( jsonData );\r\n e4.productListWithFacets.observeIntersectionOnLastItemOrShowLoadMoreButton( e4.productListWithFacets.context.get() );\r\n } );\r\n },\r\n appendItems: function ( jsonData ) {\r\n var strItemClasses = e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).data( 'item-classes' );\r\n jQuery.each( jsonData.products, function ( intIndex, objProduct ) {\r\n e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).append( e4.productListWithFacets.products.getListItemHtmlWithItemClasses( objProduct.listItemHtml, strItemClasses ) );\r\n e4.productListWithFacets.jProductList.trigger( e4.productListWithFacets.event.itemAppended, objProduct );\r\n } );\r\n if ( alcadon.ecom.toggleListView.toggleState === 'expanded' ) {\r\n alcadon.ecom.toggleListView.toggleAll( alcadon.ecom.toggleListView.toggleState );\r\n }\r\n },\r\n getSkeletonItem: function ( intPageNumber, intIndex ) {\r\n return e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).find( '.js-e-productlist-skeleton-item[data-page=\"' + intPageNumber + '\"][data-index=\"' + intIndex + '\"]' );\r\n },\r\n setSkeletonItemHeight: function () {\r\n // Get and set the height of the skeleton items.\r\n var intFirstItemHeight = e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).find( '.js-e-productlist-item' ).not( '.is-expanded' ).first().outerHeight(),\r\n intFirstExpandedItem = e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).find( '.js-e-productlist-item.is-expanded' ).first().outerHeight();\r\n if ( alcadon.ecom.toggleListView.toggleState === 'expanded' ) {\r\n intFirstItemHeight = intFirstExpandedItem;\r\n }\r\n jQuery( '.js-e-productlist-skeleton-item' ).css( { height: intFirstItemHeight } );\r\n },\r\n observeIntersectionOnSkeleton: function () {\r\n var arrObservableSkeletons = jQuery( '.js-e-productlist-skeleton-item' ).filter( '.is-observable' ).toArray();\r\n if ( arrObservableSkeletons.length > 0 ) {\r\n e4.util.observer.bind( arrObservableSkeletons, e4.productListWithFacets.products.loadPageOnSkeletonIntersection, e4.settings.ecom.productListWithFacets.lazyLoad.observerOptions );\r\n }\r\n },\r\n loadPageOnSkeletonIntersection: function ( objEntry, objObserver ) {\r\n if ( objEntry.isIntersecting === true ) {\r\n var jEntryTarget = jQuery( objEntry.target ),\r\n intPageNumber = parseInt( jEntryTarget.data( 'page' ) );\r\n objObserver.unobserve( objEntry.target );\r\n e4.productListWithFacets.products.loadProductsByPageNumber( intPageNumber, e4.productListWithFacets.products.replaceSkeletonItems );\r\n }\r\n },\r\n replaceSkeletonItems: function ( jsonData ) {\r\n var strItemClasses = e4.productListWithFacets.jProductList.find( '.js-e-productlist-products' ).data( 'item-classes' );\r\n // replace each matching skeleton item (by pagenum and index) with matching product in fetched json\r\n jQuery.each( jsonData.products, function ( intIndex, objProduct ) {\r\n var intPageNum = jsonData.list.currentPageNumber,\r\n jSkeletonItem = e4.productListWithFacets.products.getSkeletonItem( intPageNum, intIndex );\r\n if ( jSkeletonItem !== undefined ) {\r\n jSkeletonItem.parent().replaceWith( e4.productListWithFacets.products.getListItemHtmlWithItemClasses( objProduct.listItemHtml, strItemClasses ) );\r\n e4.productListWithFacets.jProductList.trigger( e4.productListWithFacets.event.skeletonReplaced, objProduct );\r\n }\r\n } );\r\n if ( alcadon.ecom.toggleListView.toggleState === 'expanded' ) {\r\n alcadon.ecom.toggleListView.toggleAll( alcadon.ecom.toggleListView.toggleState );\r\n }\r\n else if ( alcadon.ecom.toggleListView.toggleState === '' ) {\r\n alcadon.ecom.toggleListView.set();\r\n }\r\n },\r\n navigateToProductPage: function ( domNode ) {\r\n jQuery( window ).off( 'beforeunload', e4.productListWithFacets.context.clear );\r\n var strProductPageUrl = null,\r\n jTriggerNode = jQuery( domNode );\r\n jQuery.when( e4.productListWithFacets.getPageNumberByProductItemNode( domNode ) ).then( function ( intPageNumber ) {\r\n if ( jTriggerNode.closest( 'a[href]' ).length === 1 ) {\r\n strProductPageUrl = jTriggerNode.attr( 'href' );\r\n }\r\n else if ( jTriggerNode.closest( 'form, .dropdown' ).length === 0 && window.getSelection().toString() === '' ) {\r\n strProductPageUrl = jTriggerNode.closest( '.js-e-productlist-item' ).find( 'a[href]' ).not( 'a[href=\"#\"]' ).first().attr( 'href' );\r\n }\r\n if ( strProductPageUrl !== null ) {\r\n e4.productListWithFacets.context.set( {\r\n currentPageNumber: intPageNumber,\r\n expendedState: alcadon.ecom.toggleListView.toggleState,\r\n expandedItems: alcadon.ecom.toggleListView.get()\r\n }, true );\r\n location.href = strProductPageUrl;\r\n }\r\n } );\r\n },\r\n addToCart: function ( domForm ) {\r\n e4.util.disableAllSubmitButtonsInForm( domForm );\r\n e4.require.js( e4.settings.require.jQueryValidate, function () {\r\n var jForm = jQuery( domForm ),\r\n objValidator = jForm.validate( {\r\n submitHandler: function () {\r\n e4.product.addToCart( domForm ).done( function () {\r\n e4.util.enableAllSubmitButtonsInForm( domForm );\r\n } );\r\n }\r\n } );\r\n if ( jForm.valid() === true ) {\r\n objValidator.settings.submitHandler.call( objValidator, objValidator.currentForm );\r\n }\r\n else {\r\n e4.util.enableAllSubmitButtonsInForm( domForm );\r\n }\r\n } );\r\n }\r\n },\r\n facets: {\r\n init: function ( ) {\r\n },\r\n build: function ( jsonData ) {\r\n if ( jQuery( '.js-alcadon-project-list' ).length === 0 ) {\r\n if ( jsonData.facets !== null ) {\r\n jQuery( '.js-e-productlist-facets' ).html( jsonData.facets.html ).find( '.js-e-select-multiple' ).each( function ( intIndex, domNode ) {\r\n e4.selectMultiple.setSelection( domNode );\r\n } );\r\n jQuery( '.js-e-productlist-selected-facet-options-count' ).html( jsonData.facets.selectedFacetOptionsCount === 0 ? '' : jsonData.facets.selectedFacetOptionsCount );\r\n }\r\n }\r\n\r\n },\r\n apply: function () {\r\n e4.productListWithFacets.loadProductsAndFacets();\r\n },\r\n clearSelectedFacetOption: function ( domNode ) {\r\n var jNode = jQuery( domNode ),\r\n strFacetParameterName = jNode.data( 'facet-parameter-name' ),\r\n strFacetOptionValue = jNode.data( 'facet-option-value' ),\r\n jSelectedFacetOptionInput = e4.productListWithFacets.jProductList.find( '.js-e-productlist-facet-option-input[name=\"' + strFacetParameterName + '\"][value=\"' + strFacetOptionValue + '\"]' );\r\n if ( jSelectedFacetOptionInput.attr( 'type' ) === 'text' ) {\r\n jSelectedFacetOptionInput.val( '' );\r\n }\r\n else {\r\n jSelectedFacetOptionInput.prop( 'checked', false );\r\n }\r\n e4.productListWithFacets.facets.apply();\r\n },\r\n clearAllSelectedFacetOptions: function () {\r\n var jSelectedFacetOptionInputs = e4.productListWithFacets.jProductList.find( '.js-e-productlist-facet-option-input' );\r\n jSelectedFacetOptionInputs.filter( '[type=\"checkbox\"]' ).prop( 'checked', false );\r\n jSelectedFacetOptionInputs.filter( '[type=\"text\"]' ).val( '' );\r\n e4.productListWithFacets.facets.apply();\r\n }\r\n },\r\n context: {\r\n get: function () {\r\n var returnValue = jQuery.extend( {}, {\r\n currentPageNumber: 1,\r\n pageSize: null,\r\n pageCount: null,\r\n productCount: null,\r\n expandedItems: [],\r\n expendedState: '',\r\n scrollTop: 0,\r\n }, history.state || e4.productListWithFacets.jProductList.data() );\r\n return returnValue;\r\n },\r\n set: function ( objContext, boolIsNavigatingToProductPage ) {\r\n var objContextNew = jQuery.extend( {}, e4.productListWithFacets.context.get(), objContext );\r\n\r\n if ( objContext.scrollTop === undefined ) {\r\n objContextNew.scrollTop = e4.productListWithFacets.getScrollTop();\r\n }\r\n if ( objContextNew.expendedState === '' ) {\r\n objContextNew.expendedState = alcadon.ecom.toggleListView.toggleState;\r\n }\r\n else {\r\n alcadon.ecom.toggleListView.toggleState = objContextNew.expendedState;\r\n }\r\n\r\n history.replaceState( objContextNew, null, e4.productListWithFacets.context.getBrowserUrl( objContextNew, boolIsNavigatingToProductPage ) );\r\n history.scrollRestoration = 'manual';\r\n },\r\n clear: function () {\r\n history.replaceState( null, null, null );\r\n history.scrollRestoration = 'manual';\r\n },\r\n getBrowserUrl: function ( objContext, boolIsNavigatingToProductPage ) {\r\n var strReturnValue = location.pathname,\r\n arrParams = e4.productListWithFacets.getParamsFromForm().split( '&' ),\r\n arrParamsToShowInUrl = [],\r\n arrParamNamesToExcludeFromUrl = [ 'pagenum', 'fg', 'pagesize', 'q=' ];\r\n if ( e4.settings.ecom.productListWithFacets.showParamsInUrl === true ) {\r\n if ( e4.productListWithFacets.jProductList.data( 'is-using-ecommerce-navigation' ) === true ) {\r\n arrParamNamesToExcludeFromUrl.push( 'groupid' );\r\n }\r\n if ( e4.productListWithFacets.jProductList.find( '.js-e-productlist-sort' ).data( 'is-default' ) === true && location.search.toLowerCase().includes( 'sortby=' ) === false ) {\r\n arrParamNamesToExcludeFromUrl.push( 'sortby', 'sortorder' );\r\n }\r\n for ( var i = 0; i < arrParams.length; i++ ) {\r\n var strParamName = arrParams[ i ].split( '=' )[ 0 ].toLowerCase();\r\n if ( strParamName !== '' && arrParamNamesToExcludeFromUrl.includes( strParamName ) === false && arrParamNamesToExcludeFromUrl.includes( arrParams[ i ].toLowerCase() ) === false ) {\r\n arrParamsToShowInUrl.push( arrParams[ i ] );\r\n }\r\n }\r\n if ( boolIsNavigatingToProductPage === true && objContext.currentPageNumber > 1 ) {\r\n arrParamsToShowInUrl.push( 'PageNum=' + objContext.currentPageNumber );\r\n }\r\n if ( arrParamsToShowInUrl.length > 0 ) {\r\n strReturnValue += '?' + arrParamsToShowInUrl.join( '&' );\r\n }\r\n }\r\n return strReturnValue;\r\n },\r\n }\r\n};\r\n"]}