text: webpackJsonpCoveo__temporary([4,1,17,84],{111:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),o=i(87),s=i(1),a=i(0),r=i(9),l=function(){function e(){}return e.hideIfInfiniteScrollEnabled=function(t){e.isInfiniteScrollEnabled(t.searchInterface.element)?(t.disable(),s.$$(t.element).hide(),e.warnIfComponentNotNeeded(t)):(t.enable(),s.$$(t.element).unhide())},e.isInfiniteScrollEnabled=function(t){var i=e.getActiveResultList(t);return!!i&&!!i.options.enableInfiniteScroll},e.scrollToTop=function(t){var i=e.getActiveResultList(t);if(!i)return new r.Logger(this).warn("No active ResultList, scrolling to the top of the Window"),window.scrollTo(0,0);var n=i.searchInterface.element.getBoundingClientRect().top;if(!(n>0)){var o=i.options.infiniteScrollContainer;"function"==typeof o.scrollTo?o.scrollTo(0,window.pageYOffset+n):o.scrollTop=0}},e.getActiveResultList=function(t){var i=e.getResultLists(t);return a.find(i,function(e){return!e.disabled})},e.getResultLists=function(t){return s.$$(t).findAll("."+e.cssClass()).map(function(e){return n.Component.get(e,o.ResultList)})},e.cssClass=function(){return n.Component.computeCssClassName(o.ResultList)},e.warnIfComponentNotNeeded=function(t){var i=t.searchInterface.root;e.allResultListsUseInfiniteScroll(i)&&e.notNeededComponentWarning(t)},e.allResultListsUseInfiniteScroll=function(t){return 0===e.getResultLists(t).filter(function(e){return!e.options.enableInfiniteScroll}).length},e.notNeededComponentWarning=function(t){var i=n.Component.computeCssClassNameForType(t.type),o="The "+i+" component is not needed because all "+e.cssClass()+" components have enableInfiniteScroll set to 'true'.\n    For the best performance, remove the "+i+" component from your search page.";new r.Logger(t).warn(o)},e}();t.ResultListUtils=l},112:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i(4),s=i(23),a=i(0),r=function(){function e(){this.selected=!1,this.excluded=!1,this.waitingForDelta=!1}return e.prototype.reset=function(){this.selected=!1,this.excluded=!1},e.prototype.updateCountsFromNewValue=function(e){n.Assert.exists(e),this.occurrences=e.occurrences,this.delta=e.delta,this.computedField=e.computedField},e.prototype.clone=function(){return this.computedField=void 0,this.delta=void 0,this},e.prototype.cloneWithZeroOccurrences=function(){return this.occurrences=0,this.clone()},e.prototype.cloneWithDelta=function(e,t){n.Assert.isLargerOrEqualsThan(0,e);var i=this.cloneWithZeroOccurrences();return i.delta=t,i.occurrences=e,i},e.prototype.getFormattedCount=function(){var e=void 0;return o.Utils.exists(this.delta)&&this.delta>0?e="+"+s.format(this.delta,"n0"):this.occurrences>0&&(e=s.format(this.occurrences,"n0")),e},e.prototype.getFormattedComputedField=function(e){return 0!=this.computedField?s.format(this.computedField,e):void 0},e.create=function(t){if(a.isString(t))return e.createFromValue(t);if(a.isObject(t))return"computedFieldResults"in t?e.createFromGroupByValue(t):e.createFromFieldValue(t);throw new Error("Can't create value from "+t)},e.createFromValue=function(t){n.Assert.isNonEmptyString(t);var i=new e;return i.value=t,i.lookupValue=t,i},e.createFromGroupByValue=function(t){n.Assert.exists(t),n.Assert.exists(t);var i=new e;return i.value=t.value,i.lookupValue=o.Utils.exists(t.lookupValue)?t.lookupValue:t.value,i.occurrences=t.numberOfResults,i.computedField=o.Utils.isNonEmptyArray(t.computedFieldResults)?t.computedFieldResults[0]:void 0,i.score=t.score,i},e.createFromFieldValue=function(t){n.Assert.exists(t);var i=new e;return i.value=t.value,i.lookupValue=t.lookupValue,i.occurrences=t.numberOfResults,i},e}();t.FacetValue=r},126:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(88),o=function(){function e(){}return e.shouldDrawFacetSlider=function(e,t){return n.ResponsiveDropdownContent.isTargetInsideOpenedDropdown(t)||!this.isSmallFacetActivated(e)},e.isSmallTabsActivated=function(e){return e.hasClass(this.smallTabsClassName)},e.isSmallFacetActivated=function(e){return e.hasClass(this.smallFacetClassName)},e.isSmallRecommendationActivated=function(e){return e.hasClass(this.smallRecommendationClassName)},e.activateSmallTabs=function(e){e.addClass(this.smallTabsClassName)},e.deactivateSmallTabs=function(e){e.removeClass(this.smallTabsClassName)},e.activateSmallFacet=function(e){e.addClass(this.smallFacetClassName)},e.deactivateSmallFacet=function(e){e.removeClass(this.smallFacetClassName)},e.activateSmallRecommendation=function(e){e.addClass(this.smallRecommendationClassName)},e.deactivateSmallRecommendation=function(e){e.removeClass(this.smallRecommendationClassName)},e.smallTabsClassName="coveo-small-tabs",e.smallFacetClassName="coveo-small-facets",e.smallRecommendationClassName="coveo-small-recommendation",e}();t.ResponsiveComponentsUtils=o},127:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(468),s=function(e){function t(t,i,n){var o=e.call(this,t,i)||this;return o.facet=t,o.facetValue=i,o.keepDisplayedValueNextTime=n,o}return n(t,e),t.prototype.bindEvent=function(){e.prototype.bindEvent.call(this,{displayNextTime:this.keepDisplayedValueNextTime,pinFacet:this.facet.options.preservePosition})},t}(o.ValueElement);t.FacetValueElement=s},172:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),o=i(39),s=i(46),a=i(1),r=i(0),l=i(467),c=function(){function e(e){this.facet=e,this.valueToSearch="",this.alwaysInclude=[],this.alwaysExclude=[],this.sortCriteria="occurrences",this.fetchMore=!1,this.completeFacetWithStandardValues=!0,this.nbResults=e.options.numberOfValuesInFacetSearch,this.ignoreAccents=e.options.facetSearchIgnoreAccents}return e.prototype.setValueToSearch=function(e){return this.valueToSearch=e,n.Utils.isNonEmptyString(e)&&(this.valueToSearch=this.valueToSearch.trim(),this.alwaysInclude=this.alwaysInclude.concat(o.FacetUtils.getValuesToUseForSearchInFacet(this.valueToSearch,this.facet))),this},e.prototype.excludeCurrentlyDisplayedValuesInSearch=function(e){var t=this;r.each(this.getCurrentlyShowedValueInSearch(e),function(e){var i=o.FacetUtils.getValuesToUseForSearchInFacet(e,t.facet);r.each(i,function(e){t.alwaysExclude.push(e)})}),r.each(this.facet.getDisplayedFacetValues(),function(e){t.alwaysExclude.push(e.value)})},e.prototype.getGroupByRequest=function(){this.lowerCaseAll();var e=this.nbResults;e+=this.alwaysExclude.length;var t=[];this.valueToSearch&&(t=["*"+this.valueToSearch+"*"]);var i;i=this.valueToSearch?t.concat(this.alwaysInclude).concat(this.alwaysExclude):r.compact(t.concat(this.alwaysInclude).concat(this.facet.options.allowedValues));var n=this.completeFacetWithStandardValues;null!=this.facet.options.lookupField&&(n=!1);var o={allowedValues:i,allowedValuesPatternType:this.facet.options.useWildcardsInFacetSearch?l.AllowedValuesPatternType.Wildcards:l.AllowedValuesPatternType.Legacy,maximumNumberOfValues:e,completeFacetWithStandardValues:n,field:this.facet.options.field,sortCriteria:this.facet.options.sortCriteria||this.sortCriteria,injectionDepth:this.facet.options.injectionDepth};return this.facet.options.lookupField&&(o.lookupField=this.facet.options.lookupField),this.facet.options.computedField&&(o.computedFields=[{field:this.facet.options.computedField,operation:this.facet.options.computedFieldOperation}]),o},e.prototype.getQuery=function(){var e=r.clone(this.facet.queryController.getLastQuery());return e||(e=(new s.QueryBuilder).build()),e.enableQuerySyntax?e.q=this.facet.facetQueryController.basicExpressionToUseForFacetSearch:n.Utils.isNonEmptyString(this.facet.facetQueryController.basicExpressionToUseForFacetSearch)?e.q="<@- "+this.facet.facetQueryController.basicExpressionToUseForFacetSearch+" -@>":e.q="",e.enableQuerySyntax=!0,e.cq=this.facet.facetQueryController.constantExpressionToUseForFacetSearch,e.aq=this.facet.facetQueryController.advancedExpressionToUseForFacetSearch,e.enableDidYouMean=!1,e.firstResult=0,e.numberOfResults=0,e.fieldsToInclude=[],e.groupBy=[this.getGroupByRequest()],e},e.prototype.getCurrentlyShowedValueInSearch=function(e){return r.map(a.$$(e).findAll(".coveo-facet-value-caption"),function(e){return a.$$(e).getAttribute("data-original-value")||a.$$(e).text()})},e.prototype.lowerCaseAll=function(){this.alwaysExclude=r.chain(this.alwaysExclude).map(function(e){return e.toLowerCase()}).uniq().value(),this.alwaysInclude=r.chain(this.alwaysInclude).map(function(e){return e.toLowerCase()}).uniq().value()},e}();t.FacetSearchParameters=c},173:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(20),s=i(18),a=i(45),r=i(1),l=i(17),c=function(){function e(e){var t=this;this.facet=e,this.facet.ref.bind.onRootElement(o.QueryEvents.buildingQuery,function(){return t.handleBuildingQuery()}),this.getDependsOn(this.facet.ref)&&this.facet.ref.bind.onRootElement(l.InitializationEvents.afterComponentsInitialization,function(){return t.setupDependentFacet()})}return e.prototype.setupDependentFacet=function(){var e=this;r.$$(this.facet.ref.element).addClass("coveo-hidden"),this.parentFacetRef=this.getParentFacet(this.facet.ref),this.parentFacetRef&&this.facet.ref.bind.onQueryState(s.MODEL_EVENTS.CHANGE,void 0,function(){return e.resetIfConditionUnfullfiled()})},e.prototype.resetIfConditionUnfullfiled=function(){this.getDependsOnCondition(this.facet.ref)(this.parentFacetRef)||this.facet.reset()},e.prototype.getId=function(e){var t=e.options.id;return t?""+t:null},e.prototype.getDependsOn=function(e){var t=e.options.dependsOn;return t?""+t:null},e.prototype.getDependsOnCondition=function(e){var t=this,i=e.options.dependsOnCondition;return i&&n.isFunction(i)?i:function(){return t.parentHasSelectedValues(e)}},e.prototype.parentHasSelectedValues=function(e){var t=this.getParentFacet(e);return t&&this.valuesExistForFacetWithId(this.getId(t))},e.prototype.valuesExistForFacetWithId=function(e){var t=this.facet.ref.queryStateModel.get(o.QueryStateModel.getFacetId(e));return!!t&&!!t.length},Object.defineProperty(e.prototype,"allFacetsInInterface",{get:function(){return a.ComponentsTypes.getAllFacetsFromSearchInterface(this.facet.ref.searchInterface)},enumerable:!0,configurable:!0}),e.prototype.getParentFacet=function(e){var t=this,i=this.allFacetsInInterface.filter(function(i){return t.getId(i)===t.getDependsOn(e)});return i.length?i[0]:(e.logger.warn("DependsOn reference does not exist",this.getDependsOn(this.facet.ref)),null)},Object.defineProperty(e.prototype,"dependentFacets",{get:function(){var e=this;return this.allFacetsInInterface.filter(function(t){return e.getId(e.facet.ref)===e.getDependsOn(t)})},enumerable:!0,configurable:!0}),e.prototype.handleBuildingQuery=function(){var e=this;this.dependentFacets.forEach(function(t){if(e.getDependsOnCondition(t)(e.facet.ref))return r.$$(t.element).removeClass("coveo-hidden"),t.enable();t.disable(),r.$$(t.element).addClass("coveo-hidden")})},Object.defineProperty(e.prototype,"hasDependentFacets",{get:function(){return!!this.dependentFacets.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dependentFacetsHaveSelectedValues",{get:function(){var e=this;return this.dependentFacets.some(function(t){return e.valuesExistForFacetWithId(e.getId(t))})},enumerable:!0,configurable:!0}),e}();t.DependsOnManager=c},174:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(212),s=i(67),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.init=function(e,i,n){o.ResponsiveFacetColumn.init(t,e,i,n,s.Facet.ID)},t}(o.ResponsiveFacetColumn);t.ResponsiveFacets=a},175:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(8),a=i(3),r=i(20),l=i(2),c=function(e){function t(i,n,o){var a=e.call(this,i,t.ID,o)||this;if(a.element=i,a.options=s.ComponentOptions.initComponentOptions(i,t,n),a.options.preventScrolling){var r=a.options.scrollContainer||a.searchInterface.element;a.options.scrollContainer=s.ComponentOptions.findParentScrollLockable(r)}return a}return n(t,e),t.ID="FacetsMobileMode",t.options={breakpoint:s.ComponentOptions.buildNumberOption(),isModal:s.ComponentOptions.buildBooleanOption({defaultValue:!1}),displayOverlayWhileOpen:s.ComponentOptions.buildBooleanOption({postProcessing:function(e,t){return r.Utils.isNullOrUndefined(e)?!t.isModal:e}}),preventScrolling:s.ComponentOptions.buildBooleanOption({postProcessing:function(e,t){return r.Utils.isNullOrUndefined(e)?t.isModal:e}}),scrollContainer:s.ComponentOptions.buildChildHtmlElementOption({depend:"preventScrolling"})},t.doExport=function(){a.exportGlobally({FacetsMobileMode:t})},t}(o.Component);t.FacetsMobileMode=c,l.Initialization.registerAutoCreateComponent(c)},211:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),o=i(0),s=function(){function e(e,t){this.resultListOptions=e,this.autoCreateComponentsFn=t}return e.prototype.renderResults=function(e,t,i){var s=this;return void 0===t&&(t=!1),Promise.all([this.getStartFragment(e,t),this.getEndFragment(e,t)]).then(function(t){var a=t[0],r=t[1],l=document.createDocumentFragment();a&&l.appendChild(a),o.each(e,function(e){l.appendChild(e),i(n.Component.getResult(e),e)}),r&&l.appendChild(r),s.resultListOptions.resultsContainer.appendChild(l)})},e.prototype.getStartFragment=function(e,t){return Promise.resolve(document.createDocumentFragment())},e.prototype.getEndFragment=function(e,t){return Promise.resolve(document.createDocumentFragment())},e}();t.ResultListRenderer=s},212:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i(529);var n=i(11),o=i(9),s=i(6),a=i(1),r=i(4),l=i(7),c=i(19),u=i(52),h=i(60),p=i(126),d=i(117),f=i(88),m=i(131),y=i(0),v=i(45),g=i(530),b=i(175),S=i(531),C=function(){function e(e,t,i,n){this.coveoRoot=e,this.ID=t,this.componentsInFacetColumn=[],this.preservePositionOriginalValues=[],this.searchInterface=l.Component.get(this.coveoRoot.el,c.SearchInterface,!1),this.dropdownHeaderLabel=this.getDropdownHeaderLabel(),this.dropdown=this.buildDropdown(n),this.bindDropdownContentEvents(),this.bindFacetsMobileModeEvents(),this.registerOnCloseHandler(),this.registerQueryEvents(),this.initializeBreakpoint(i.responsiveBreakpoint)}return e.init=function(t,i,n,o,s){this.findColumn(i)&&(h.ResponsiveComponentsManager.register(e,a.$$(i),"ResponsiveFacetColumn",n,o),h.ResponsiveComponentsManager.register(t,a.$$(i),s,n,o))},e.findColumn=function(e){var t=a.$$(e).find(".coveo-facet-column");if(!t){new o.Logger("ResponsiveFacets").info("No element with class coveo-facet-column. Responsive facets cannot be enabled")}return t},Object.defineProperty(e.prototype,"facetsMobileModeComponent",{get:function(){return this.searchInterface?this.searchInterface.getComponents(b.FacetsMobileMode.ID)[0]:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"facetsMobileModeOptions",{get:function(){var e=this.facetsMobileModeComponent;return e?e.options:{isModal:!1,preventScrolling:!1,displayOverlayWhileOpen:!0}},enumerable:!0,configurable:!0}),e.prototype.registerComponent=function(e){return this.componentsInFacetColumn.push(e),this.preservePositionOriginalValues.push(e.options.preservePosition),!0},e.prototype.needDropdownWrapper=function(){return this.needSmallMode()},e.prototype.handleResizeEvent=function(){this.needSmallMode()&&!p.ResponsiveComponentsUtils.isSmallFacetActivated(this.coveoRoot)?this.changeToSmallMode():!this.needSmallMode()&&p.ResponsiveComponentsUtils.isSmallFacetActivated(this.coveoRoot)&&this.changeToLargeMode(),this.dropdown.isOpened&&this.dropdown.dropdownContent.positionDropdown()},e.prototype.dismissFacetSearches=function(){y.each(this.componentsInFacetColumn,function(e){e.facetSearch&&e.facetSearch.currentlyDisplayedResults&&e.facetSearch.dismissSearchResults()})},e.prototype.needSmallMode=function(){if(!this.searchInterface)return this.coveoRoot.width()<=(r.Utils.isNullOrUndefined(this.breakpoint)?(new u.ResponsiveComponents).getMediumScreenWidth():this.breakpoint);switch(this.searchInterface.responsiveComponents.getResponsiveMode()){case"small":case"medium":return!0;case"auto":return this.coveoRoot.width()<=(r.Utils.isNullOrUndefined(this.breakpoint)?this.searchInterface.responsiveComponents.getMediumScreenWidth():this.breakpoint);default:return!1}},e.prototype.changeToSmallMode=function(){this.dropdown.close(),this.disableFacetPreservePosition(),a.$$(this.coveoRoot.find("."+h.ResponsiveComponentsManager.DROPDOWN_HEADER_WRAPPER_CSS_CLASS)).append(this.dropdown.dropdownHeader.element.el),p.ResponsiveComponentsUtils.activateSmallFacet(this.coveoRoot)},e.prototype.changeToLargeMode=function(){this.restoreFacetPreservePositionValue(),this.dropdown.cleanUp(),p.ResponsiveComponentsUtils.deactivateSmallFacet(this.coveoRoot)},e.prototype.buildDropdown=function(e){var t=this.buildDropdownContent(),i=this.buildDropdownHeader(),n=e||new d.ResponsiveDropdown(t,i,this.coveoRoot);return this.facetsMobileModeOptions.displayOverlayWhileOpen||n.disablePopupBackground(),this.facetsMobileModeOptions.preventScrolling&&n.enableScrollLocking(this.facetsMobileModeOptions.scrollContainer),n},e.prototype.buildDropdownContent=function(){var t=this,i=a.$$(this.coveoRoot.find(".coveo-facet-column")),n=a.$$("div",{className:"coveo-facet-header-filter-by-container",style:"display: none"}),o=a.$$("div",{className:"coveo-facet-header-filter-by"});return o.text(s.l("Filter by:")),n.append(o.el),i.prepend(n.el),this.facetsMobileModeOptions.isModal?new g.ResponsiveDropdownModalContent("facet",i,s.l("CloseFiltersDropdown"),function(){return t.dropdown.close()}):new f.ResponsiveDropdownContent("facet",i,this.coveoRoot,e.DROPDOWN_MIN_WIDTH,e.DROPDOWN_WIDTH_RATIO)},e.prototype.buildDropdownHeader=function(){var e=a.$$("a"),t=a.$$("p");return t.text(this.dropdownHeaderLabel),e.el.appendChild(t.el),new m.ResponsiveDropdownHeader("facet",e)},e.prototype.initializeBreakpoint=function(e){var t=this.facetsMobileModeOptions.breakpoint;this.breakpoint=r.Utils.isNullOrUndefined(t)?e:t},e.prototype.registerOnCloseHandler=function(){this.dropdown.registerOnCloseHandler(this.dismissFacetSearches,this)},e.prototype.registerQueryEvents=function(){var e=this;this.coveoRoot.on(n.QueryEvents.noResults,function(){return e.handleNoResults()}),this.coveoRoot.on(n.QueryEvents.querySuccess,function(t,i){return e.handleQuerySuccess(i)}),this.coveoRoot.on(n.QueryEvents.queryError,function(){return e.handleQueryError()})},e.prototype.bindDropdownContentEvents=function(){var t=this;this.dropdown.dropdownContent.element.on("scroll",y.debounce(function(){y.each(t.componentsInFacetColumn,function(e){var i=e.facetSearch;i&&i.currentlyDisplayedResults&&!t.isFacetSearchScrolledIntoView(i.search)?e.facetSearch.positionSearchResults(t.dropdown.dropdownContent.element.el):i&&e.facetSearch.currentlyDisplayedResults&&e.facetSearch.positionSearchResults()})},e.DEBOUNCE_SCROLL_WAIT))},e.prototype.bindFacetsMobileModeEvents=function(){var e=this.facetsMobileModeComponent;e&&(this.dropdown.registerOnOpenHandler(function(){return a.$$(e.element).trigger(S.FacetsMobileModeEvents.popupOpened)},e),this.dropdown.registerOnCloseHandler(function(){return a.$$(e.element).trigger(S.FacetsMobileModeEvents.popupClosed)},e))},e.prototype.restoreFacetPreservePositionValue=function(){var e=this;y.each(this.componentsInFacetColumn,function(t,i){t.options&&(t.options.preservePosition=e.preservePositionOriginalValues[i])})},e.prototype.disableFacetPreservePosition=function(){y.each(this.componentsInFacetColumn,function(e){e.options&&(e.options.preservePosition=!1)})},e.prototype.isFacetSearchScrolledIntoView=function(e){var t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom,n=this.dropdown.dropdownContent.element.el.getBoundingClientRect().top,o=this.dropdown.dropdownContent.element.el.getBoundingClientRect().bottom;return n=n>=0?n:0,t>=n&&i<=o},e.prototype.getDropdownHeaderLabel=function(){var t;return v.ComponentsTypes.getAllFacetInstancesFromElement(this.coveoRoot.find(".coveo-facet-column")).forEach(function(e){var i=e.options;!t&&i.dropdownHeaderLabel&&(t=i.dropdownHeaderLabel)}),t||(t=s.l(e.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE)),t},e.prototype.handleNoResults=function(){this.dropdown.dropdownHeader.hide()},e.prototype.handleQueryError=function(){this.dropdown.dropdownHeader.hide()},e.prototype.handleQuerySuccess=function(e){0===e.results.totalCount?this.dropdown.dropdownHeader.hide():this.dropdown.dropdownHeader.show()},e.DEBOUNCE_SCROLL_WAIT=250,e.DROPDOWN_MIN_WIDTH=280,e.DROPDOWN_WIDTH_RATIO=.35,e.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE="Filters",e}();t.ResponsiveFacetColumn=C},213:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(72),o=i(4),s=i(172),a=i(5),r=i(39),l=i(0),c=i(182),u=function(){function e(e){this.facet=e}return e.prototype.prepareForNewQuery=function(){this.lastGroupByRequestIndex=void 0,this.expressionToUseForFacetSearch=void 0,this.constantExpressionToUseForFacetSearch=void 0},e.prototype.computeOurFilterExpression=function(){var e=this,t=new n.ExpressionBuilder,i=this.facet.values.getSelected();i.length>0&&(this.facet.options.useAnd?l.each(i,function(i){t.addFieldExpression(e.facet.options.field,"==",[i.value])}):t.addFieldExpression(this.facet.options.field,"==",l.map(i,function(e){return e.value})));var s=this.facet.values.getExcluded();return s.length>0&&t.addFieldNotEqualExpression(this.facet.options.field,l.map(s,function(e){return e.value})),o.Utils.isNonEmptyString(this.facet.options.additionalFilter)&&t.add(this.facet.options.additionalFilter),t.build()},e.prototype.putGroupByIntoQueryBuilder=function(e){a.Assert.exists(e);var t=this.createGroupByAllowedValues(),i=this.createBasicGroupByRequest(t),n=this.createGroupByQueryOverride(e);if(o.Utils.isNullOrUndefined(n)&&c.QueryBuilderExpression.isEmpty(n)){var s=e.computeCompleteExpressionParts();this.expressionToUseForFacetSearch=null==s.withoutConstant?"":s.withoutConstant,this.basicExpressionToUseForFacetSearch=null==s.basic?"":s.basic,this.advancedExpressionToUseForFacetSearch=s.advanced,this.constantExpressionToUseForFacetSearch=s.constant}else i.queryOverride=n.basic,i.advancedQueryOverride=n.advanced,i.constantQueryOverride=n.constant,this.expressionToUseForFacetSearch=n.withoutConstant,this.basicExpressionToUseForFacetSearch=n.basic,this.advancedExpressionToUseForFacetSearch=n.advanced,this.constantExpressionToUseForFacetSearch=n.constant;this.lastGroupByRequestIndex=e.groupByRequests.length,this.lastGroupByRequest=i,e.groupByRequests.push(i)},e.prototype.search=function(e,t){var i=this;return void 0===t&&(t=e.nbResults),e.completeFacetWithStandardValues=!1,new Promise(function(n,o){var s=function(o){var s=o.length;if(o=i.checkForFacetSearchValuesToRemove(o,e.valueToSearch),r.FacetUtils.needAnotherFacetSearch(o.length,s,t,5))return e.nbResults+=5,i.search(e,o.length);n(o)},a=i.facet.getEndpoint().search(e.getQuery());i.currentSearchPromise=a,a.then(function(t){if(i.currentSearchPromise==a){var n=[];t.groupByResults&&t.groupByResults[0]&&l.each(t.groupByResults[0].values,function(t){t.lookupValue?l.contains(e.alwaysExclude,t.lookupValue.toLowerCase())||n.push(t):l.contains(e.alwaysExclude,t.value.toLowerCase())||n.push(t)}),s(l.first(n,e.nbResults))}else o()}).catch(function(e){o(e)})})},e.prototype.fetchMore=function(e){var t=this,i=new s.FacetSearchParameters(this.facet);return i.alwaysInclude=this.facet.options.allowedValues||l.pluck(this.facet.values.getAll(),"value"),i.nbResults=e,this.facet.getEndpoint().search(i.getQuery()).then(function(e){return t.facet.options.allowedValues&&e&&e.groupByResults&&e.groupByResults[0]&&(e.groupByResults[0].values=t.filterByAllowedValueOption(e.groupByResults[0].values)),e})},e.prototype.searchInFacetToUpdateDelta=function(e){var t=new s.FacetSearchParameters(this.facet),i=t.getQuery();return i.aq=(i.aq?i.aq:"")+" "+this.computeOurFilterExpression(),l.each(e,function(e){e.waitingForDelta=!0}),i.groupBy=[this.createBasicGroupByRequest(l.map(e,function(e){return e.value}))],i.groupBy[0].completeFacetWithStandardValues=!1,this.facet.getEndpoint().search(i)},e.prototype.createGroupByAllowedValues=function(){return void 0!=this.facet.options.allowedValues?this.facet.options.allowedValues:void 0!=this.facet.options.customSort?this.getUnionWithCustomSortLowercase(this.facet.options.customSort,this.getAllowedValuesFromSelected()):l.map(this.getAllowedValuesFromSelected(),function(e){return e.value})},e.prototype.createBasicGroupByRequest=function(e,t){void 0===t&&(t=!0);var i=this.facet.numberOfValues;if(null!=this.facet.options.customSort){var n=this.getUnionWithCustomSortLowercase(this.facet.options.customSort,this.facet.values.getSelected().concat(this.facet.values.getExcluded()));i=Math.max(i,n.length)}var s={field:this.facet.options.field,maximumNumberOfValues:i+(this.facet.options.enableMoreLess?1:0),sortCriteria:this.facet.options.sortCriteria,injectionDepth:this.facet.options.injectionDepth,completeFacetWithStandardValues:void 0==this.facet.options.allowedValues};return this.facet.options.lookupField&&(s.lookupField=this.facet.options.lookupField),null!=e&&(s.allowedValues=e),t&&o.Utils.isNonEmptyString(this.facet.options.computedField)&&(s.computedFields=[{field:this.facet.options.computedField,operation:this.facet.options.computedFieldOperation}]),s},e.prototype.getAllowedValuesFromSelected=function(){var e=[];if(this.facet.options.useAnd||!this.facet.keepDisplayedValuesNextTime){if(0==this.facet.values.getSelected().length)return;e=this.facet.values.getSelected()}else e=this.facet.values.getAll();return e},Object.defineProperty(e.prototype,"additionalFilter",{get:function(){return this.facet.options.additionalFilter?this.facet.options.additionalFilter:""},enumerable:!0,configurable:!0}),e.prototype.getUnionWithCustomSortLowercase=function(e,t){var i=l.map(e,function(e){return e.toLowerCase()}),n=l.chain(t).filter(function(e){return!l.contains(i,e.value.toLowerCase())}).map(function(e){return e.value}).value();return l.compact(e.concat(n))},e.prototype.createGroupByQueryOverride=function(e){var t=e.computeCompleteExpressionParts();return this.queryOverrideIsNeededForMultiSelection()?t=this.processQueryOverrideForMultiSelection(e,t):t.reset(),this.queryOverrideIsNeededForAdditionalFilter()&&(t=this.processQueryOverrideForAdditionalFilter(e,t)),t=this.processQueryOverrideForEmptyValues(e,t),c.QueryBuilderExpression.isEmpty(t)?null:t},e.prototype.queryOverrideIsNeededForMultiSelection=function(){return!this.facet.options.useAnd&&!!this.facet.values.hasSelectedOrExcludedValues()},e.prototype.queryOverrideIsNeededForAdditionalFilter=function(){return o.Utils.isNonEmptyString(this.additionalFilter)},e.prototype.processQueryOverrideForMultiSelection=function(e,t){if(this.facet.values.hasSelectedOrExcludedValues()){var i=this.computeOurFilterExpression();t=e.computeCompleteExpressionPartsExcept(i),c.QueryBuilderExpression.isEmpty(t)&&(t.advanced="@uri")}return t},e.prototype.processQueryOverrideForAdditionalFilter=function(e,t){if(o.Utils.isEmptyString(t.basic)&&(t.basic=e.expression.build()),o.Utils.isEmptyString(t.constant)){var i=e.constantExpression.isEmpty()?"":e.constantExpression.build()+" ";t.constant=""+i+this.additionalFilter}else t.constant=t.constant+" "+this.additionalFilter;return t.advanced||(t.advanced=this.getFilterExpressionWithoutOurFilterExpression(e)),t},e.prototype.getFilterExpressionWithoutOurFilterExpression=function(e){var t=new n.ExpressionBuilder;e.advancedExpression.getParts().forEach(function(e){return t.add(e)});var i=this.computeOurFilterExpression();return t.remove(i),t.build()},e.prototype.processQueryOverrideForEmptyValues=function(e,t){var i=l.chain(t).keys().each(function(e){(o.Utils.isEmptyString(t[e])||o.Utils.isNullOrUndefined(t[e]))&&delete t[e]}).value();return 0==l.keys(i).length&&(t=void 0),t},e.prototype.checkForFacetSearchValuesToRemove=function(e,t){var i=this,n=r.FacetUtils.getRegexToUseForFacetSearch(t,this.facet.options.facetSearchIgnoreAccents);return l.filter(e,function(e){var t=l.isEmpty(i.facet.options.allowedValues)||i.isValueAllowedByAllowedValueOption(e.value),o=i.facet.getValueCaption(e);return t&&n.test(o)})},e.prototype.filterByAllowedValueOption=function(e){var t=this;return l.filter(e,function(e){return t.isValueAllowedByAllowedValueOption(e.value)})},e.prototype.isValueAllowedByAllowedValueOption=function(e){var t=this;return l.some(this.facet.options.allowedValues,function(i){var n=t.replaceWildcardsWithRegexEquivalent(t.escapeMostRegexCharacters(i));return new RegExp("^"+n+"$","gi").test(e)})},e.prototype.escapeMostRegexCharacters=function(e){return e.replace(/[.+^${}()|[\]\\]/g,"\\$&")},e.prototype.replaceWildcardsWithRegexEquivalent=function(e){return e.replace(/\*/g,".*").replace(/\?/g,".")},e}();t.FacetQueryController=u},256:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var s=i(112),a=i(67),r=i(8),l=i(616),c=i(617),u=i(4),h=i(1),p=i(31),d=i(618),f=i(620),m=i(621),y=i(5),v=i(623),g=i(625),b=i(2),S=i(0),C=i(3);i(626);var V=i(12),F=i(16),E=i(82),O=function(e){function t(i,n,o){var s=e.call(this,i,n,o,t.ID)||this;return s.element=i,s.bindings=o,s.shouldReshuffleFacetValuesClientSide=!1,s.correctLevels=[],s.options=r.ComponentOptions.initComponentOptions(i,t,s.options),s.numberOfValuesToShow=s.originalNumberOfValuesToShow=s.options.numberOfValues||5,s.numberOfValues=Math.max(s.options.numberOfValues,1e4),s.options.injectionDepth=Math.max(s.options.injectionDepth,1e4),s.logger.info("Hierarchy facet: Set number of values very high in order to build hierarchy",s.numberOfValues,s),s.logger.info("Hierarchy facet: Set injection depth very high in order to build hierarchy",s.options.injectionDepth),s}return n(t,e),t.prototype.selectValue=function(t,i){void 0===i&&(i=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists([t]);var n=this.getValueFromHierarchy(t);i&&this.selectChilds(n,n.childs),this.flagParentForSelection(n),e.prototype.selectValue.call(this,t)},t.prototype.selectMultipleValues=function(t,i){var n=this;void 0===i&&(i=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists(t),S.each(t,function(e){var t=n.getValueFromHierarchy(e);n.flagParentForSelection(t),i&&S.each(t.childs,function(e){n.selectValue(e.facetValue)})}),e.prototype.selectMultipleValues.call(this,t)},t.prototype.deselectValue=function(t,i){var n=this;void 0===i&&(i=!0),this.ensureDom(),this.ensureValueHierarchyExists([t]);var o=this.getValueFromHierarchy(t);if(i){if(void 0!=o.childs){var s=S.filter(o.childs,function(e){var t=n.getFacetValueFromHierarchy(e.facetValue);return t.selected||t.excluded});o.hasChildSelected=!1,s.length==o.childs.length&&this.deselectChilds(o,o.childs)}}this.deselectParent(o.parent),this.unflagParentForSelection(o),e.prototype.deselectValue.call(this,t)},t.prototype.excludeValue=function(t,i){void 0===i&&(i=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists([t]);var n=this.getValueFromHierarchy(t);i?this.excludeChilds(n.childs):(this.deselectChilds(n,n.childs),this.close(n)),this.flagParentForSelection(n),e.prototype.excludeValue.call(this,t)},t.prototype.unexcludeValue=function(t,i){void 0===i&&(i=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists([t]);var n=this.getValueFromHierarchy(t);i&&this.unexcludeChilds(n.childs),this.unflagParentForSelection(n),e.prototype.unexcludeValue.call(this,t)},t.prototype.deselectMultipleValues=function(t,i){var n=this;void 0===i&&(i=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists(t),S.each(t,function(e){var t=n.getValueFromHierarchy(e);t.hasChildSelected=!1,n.unflagParentForSelection(t),i&&S.each(t.childs,function(e){n.getValueFromHierarchy(e.facetValue).hasChildSelected=!1,n.deselectValue(e.facetValue)})}),e.prototype.deselectMultipleValues.call(this,t)},t.prototype.toggleSelectValue=function(e){this.ensureDom(),this.ensureValueHierarchyExists([e]),0==this.getFacetValueFromHierarchy(e).selected?this.selectValue(e):this.deselectValue(e)},t.prototype.toggleExcludeValue=function(e){this.ensureDom(),this.ensureValueHierarchyExists([e]),0==this.getFacetValueFromHierarchy(e).excluded?this.excludeValue(e):this.unexcludeValue(e)},t.prototype.getValueCaption=function(e){var t=this.getSelf(e),i=t;return u.Utils.exists(this.options.valueCaption)&&("object"==typeof this.options.valueCaption&&(i=this.options.valueCaption[t]||i),"function"==typeof this.options.valueCaption&&(i=this.options.valueCaption.call(this,e))),i},t.prototype.getDisplayedValues=function(){var e=this,t=S.filter(this.values.getAll(),function(t){if(e.getValueFromHierarchy(t)){var i=e.getElementFromFacetValueList(t);return!h.$$(i).hasClass("coveo-inactive")}return!1});return S.pluck(t,"value")},t.prototype.updateSort=function(t){e.prototype.updateSort.call(this,t)},t.prototype.open=function(e){var t;void 0!=(t=S.isString(e)?this.getValueHierarchy(e):e instanceof s.FacetValue?this.getValueHierarchy(e.value):e)&&(h.$$(this.getElementFromFacetValueList(t.facetValue.value)).addClass("coveo-open"),this.showChilds(t.childs),void 0!=t.parent&&this.open(this.getValueHierarchy(t.facetValue.value).parent),this.getValueHierarchy(t.facetValue.value).keepOpened=!0)},t.prototype.close=function(e){var t,i=this;void 0!=(t=S.isString(e)?this.getValueHierarchy(e):e instanceof s.FacetValue?this.getValueHierarchy(e.value):e)&&(h.$$(this.getElementFromFacetValueList(t.facetValue)).removeClass("coveo-open"),this.hideChilds(t.childs),S.each(t.childs,function(e){i.close(i.getValueHierarchy(e.facetValue.value))}),this.getValueHierarchy(t.facetValue.value).keepOpened=!1)},t.prototype.reset=function(){var t=this;S.each(this.getAllValueHierarchy(),function(e){e.hasChildSelected=!1,e.allChildShouldBeSelected=!1}),S.each(this.getAllValueHierarchy(),function(e){t.close(e)}),e.prototype.reset.call(this)},t.prototype.processFacetSearchAllResultsSelected=function(e){this.selectMultipleValues(e),this.triggerNewQuery()},t.prototype.triggerUpdateDeltaQuery=function(t){this.shouldReshuffleFacetValuesClientSide=this.keepDisplayedValuesNextTime,e.prototype.triggerUpdateDeltaQuery.call(this,t)},t.prototype.updateSearchElement=function(t){void 0===t&&(t=!0),e.prototype.updateSearchElement.call(this,!0)},t.prototype.facetValueHasChanged=function(){var e=this;this.updateQueryStateModel(),p.Defer.defer(function(){e.updateAppearanceDependingOnState()})},t.prototype.initFacetQueryController=function(){this.facetQueryController=new c.HierarchicalFacetQueryController(this)},t.prototype.initFacetSearch=function(){this.facetSearch=new f.HierarchicalFacetSearch(this,d.HierarchicalFacetSearchValuesList,this.root),this.element.appendChild(this.facetSearch.build())},t.prototype.handleDeferredQuerySuccess=function(t){this.updateAppearanceDependingOnState(),e.prototype.handleDeferredQuerySuccess.call(this,t)},t.prototype.handlePopulateSearchAlerts=function(e){this.values.hasSelectedOrExcludedValues()&&e.text.push(new m.HierarchicalBreadcrumbValuesList(this,this.values.getSelected().concat(this.values.getExcluded()),this.getAllValueHierarchy()).buildAsString())},t.prototype.handlePopulateBreadcrumb=function(e){if(y.Assert.exists(e),this.values.hasSelectedOrExcludedValues()){var t=new m.HierarchicalBreadcrumbValuesList(this,this.values.getSelected().concat(this.values.getExcluded()),this.getAllValueHierarchy()).build();e.breadcrumbs.push({element:t})}},t.prototype.handleOmniboxWithStaticValue=function(e){var t=this,i=e.completeQueryExpression.regex,n=S.first(S.filter(this.getAllValueHierarchy(),function(e){return i.test(t.getValueCaption(e.facetValue))}),this.options.numberOfValuesInOmnibox),o=S.compact(S.map(n,function(e){var i=t.getFromFacetValueList(e.facetValue);return i?i.facetValue:void 0})),s=new v.OmniboxHierarchicalValuesList(this,o,e).build();e.rows.push({element:s,zIndex:this.omniboxZIndex})},t.prototype.rebuildValueElements=function(){this.shouldReshuffleFacetValuesClientSide=this.shouldReshuffleFacetValuesClientSide||this.keepDisplayedValuesNextTime,this.numberOfValues=Math.max(this.numberOfValues,1e4),this.processHierarchy(),this.setValueListContent(),e.prototype.rebuildValueElements.call(this),this.buildParentChildRelationship(),this.checkForOrphans(),this.checkForNewUnselectedChild(),this.crop(),this.shouldReshuffleFacetValuesClientSide=!1},t.prototype.initFacetValuesList=function(){this.facetValuesList=new l.HierarchicalFacetValuesList(this,g.HierarchicalFacetValueElement),this.element.appendChild(this.facetValuesList.build())},t.prototype.updateMoreLess=function(){var t=this.numberOfValuesToShow<this.topLevelHierarchy.length,i=this.numberOfValuesToShow>this.originalNumberOfValuesToShow;e.prototype.updateMoreLess.call(this,i,t)},t.prototype.handleClickMore=function(){this.numberOfValuesToShow+=this.originalNumberOfValuesToShow,this.numberOfValuesToShow=Math.min(this.numberOfValuesToShow,this.values.size()),this.crop(),this.updateMoreLess()},t.prototype.handleClickLess=function(){this.numberOfValuesToShow=this.originalNumberOfValuesToShow,this.crop(),this.updateMoreLess()},t.prototype.updateNumberOfValues=function(){this.numberOfValues=Math.max(this.numberOfValues,1e4)},t.prototype.ensureValueHierarchyExists=function(e){var t=this;e[0]&&"string"==typeof e[0]&&(e=S.map(e,function(e){return s.FacetValue.createFromValue(e)}));var i=!1;S.each(e,function(e){void 0==t.getValueHierarchy(e.value)&&(i=!0)}),i&&this.processHierarchy(e)},t.prototype.crop=function(){var e=this,t=S.partition(this.topLevelHierarchy,function(e){return e.facetValue.selected||e.facetValue.excluded||e.hasChildSelected}),i=this.numberOfValuesToShow-t[0].length;S.each(S.last(t[1],t[1].length-i),function(t){e.hideFacetValue(t),e.hideChilds(t.childs)}),S.each(S.first(t[1],i),function(t){e.showFacetValue(t)})},t.prototype.placeChildsUnderTheirParent=function(e,t){var i=this,n=e.childs;if(n){var o=this.facetValuesList.sortFacetValues(S.pluck(n,"facetValue")).reverse();S.each(o,function(e){var n=i.getValueFromHierarchy(e);if(n){var o=i.getElementFromFacetValueList(e);h.$$(o).insertAfter(t),n.childs&&0!=n.childs.length&&i.placeChildsUnderTheirParent(n,o)}})}e.keepOpened?(this.open(e),this.showChilds(e.childs)):this.hideChilds(e.childs)},t.prototype.addCssClassToParentAndChilds=function(e,t){var i=this;h.$$(t).addClass("coveo-has-childs"),e.hasChildSelected&&h.$$(t).addClass("coveo-has-childs-selected");var n=h.$$("span",{className:"coveo-hierarchical-facet-expand"},V.SVGIcons.icons.facetExpand),o=h.$$("span",{className:"coveo-hierarchical-facet-collapse"},V.SVGIcons.icons.facetCollapse);F.SVGDom.addClassToSVGInContainer(n.el,"coveo-hierarchical-facet-expand-svg"),F.SVGDom.addClassToSVGInContainer(o.el,"coveo-hierarchical-facet-collapse-svg");var s=h.$$("div",{className:"coveo-has-childs-toggle"},n.el,o.el).el;h.$$(s).on("click",function(){h.$$(t).hasClass("coveo-open")?i.close(e):i.open(e)}),h.$$(t).prepend(s)},t.prototype.buildParentChildRelationship=function(){var e=this,t=document.createDocumentFragment();t.appendChild(this.facetValuesList.valueContainer);var i=S.map(this.facetValuesList.sortFacetValues(),function(t){return e.getValueFromHierarchy(t)});S.each(i,function(t){var i=e.getElementFromFacetValueList(t.facetValue);u.Utils.isNonEmptyArray(t.childs)?(e.placeChildsUnderTheirParent(t,i),e.addCssClassToParentAndChilds(t,i)):h.$$(i).addClass("coveo-no-childs"),i.style.marginLeft=e.options.marginByLevel*(t.level-e.options.levelStart)+"px"}),h.$$(t).insertAfter(this.headerElement)},t.prototype.setValueListContent=function(){var e=this;this.facetValuesList.hierarchyFacetValues=S.map(this.correctLevels,function(t){return e.values.contains(t.facetValue.value)||(t.facetValue.occurrences=0,e.values.add(t.facetValue)),t.facetValue})},t.prototype.createHierarchy=function(e){var t=this,i=S.map(e,function(e){var i=t.getParent(e),n=e.lookupValue||e.value;return{facetValue:e,level:t.getLevel(e),parent:i,self:n}});return this.setInHierarchy(i),S.each(this.getAllValueHierarchy(),function(e){e.facetValue.selected&&t.flagParentForSelection(e)}),i},t.prototype.processHierarchy=function(e){var t=this;void 0===e&&(e=this.values.getAll()),S.each(this.getAllValueHierarchy(),function(e){void 0==t.values.get(e.facetValue.value)&&t.deleteValueHierarchy(t.getLookupOrValue(e.facetValue))}),this.createHierarchy(e)},t.prototype.setInHierarchy=function(e){var t=this;this.correctLevels=S.filter(e,function(e){var i=void 0==t.options.levelStart||e.level>=t.options.levelStart,n=void 0==t.options.levelEnd||e.level<t.options.levelEnd;return i&&n}),S.each(this.correctLevels,function(e){var i=S.map(S.filter(t.correctLevels,function(t){return null!=t.parent&&t.parent.toLowerCase()==e.self.toLowerCase()}),function(e){return{facetValue:e.facetValue,level:e.level,keepOpened:!1,hasChildSelected:!1,allChildShouldBeSelected:!1}}),n=null!=e.parent?S.find(t.correctLevels,function(t){return t.self.toLowerCase()==e.parent.toLowerCase()}):null,o=t.getValueHierarchy(e.facetValue.value);o&&o.childs.length!=i.length&&(o.childs=i);var s;n&&(s=t.getValueHierarchy(n.facetValue.value)),t.setValueHierarchy(e.facetValue.value,{childs:i,parent:void 0==n?void 0:{facetValue:n.facetValue,level:n.level,keepOpened:!!s&&s.keepOpened,hasChildSelected:!!s&&s.hasChildSelected,originalPosition:s?s.originalPosition:void 0,allChildShouldBeSelected:!!s&&s.allChildShouldBeSelected},facetValue:e.facetValue,level:e.level,keepOpened:!!o&&o.keepOpened,hasChildSelected:!!o&&o.hasChildSelected,originalPosition:o?o.originalPosition:void 0,allChildShouldBeSelected:!!o&&o.allChildShouldBeSelected})}),this.topLevelHierarchy=S.chain(this.values.getAll()).filter(function(e){var i=t.getValueFromHierarchy(e);return!!i&&i.level==(t.options.levelStart||0)}).map(function(e){return t.getValueFromHierarchy(e)}).value()},t.prototype.getParent=function(e){var t=this.getLookupOrValue(e).lastIndexOf(this.options.delimitingCharacter);if(-1!=t)return this.getLookupOrValue(e).substring(0,t)},t.prototype.getSelf=function(e){var t=this.getParent(e);if(void 0==t)return this.getLookupOrValue(e);var i=this.getLookupOrValue(e).indexOf(t);return this.getLookupOrValue(e).substring(i+t.length+1)},t.prototype.showFacetValue=function(e){h.$$(this.getElementFromFacetValueList(e.facetValue.value)).removeClass("coveo-inactive")},t.prototype.hideFacetValue=function(e){h.$$(this.getElementFromFacetValueList(e.facetValue.value)).addClass("coveo-inactive")},t.prototype.hideChilds=function(e){var t=this;S.each(e,function(e){t.hideFacetValue(e)})},t.prototype.showChilds=function(e){var t=this;S.each(e,function(e){t.showFacetValue(e)})},t.prototype.selectChilds=function(e,t){this.flagParentForSelection(e),e.allChildShouldBeSelected=!0,this.selectMultipleValues(S.map(t,function(e){return e.facetValue}))},t.prototype.deselectChilds=function(e,t){e.hasChildSelected=!1,e.allChildShouldBeSelected=!1,this.deselectMultipleValues(S.map(t,function(e){return e.facetValue}))},t.prototype.excludeChilds=function(e){this.excludeMultipleValues(S.map(e,function(e){return e.facetValue}))},t.prototype.unexcludeChilds=function(e){this.unexcludeMultipleValues(S.map(e,function(e){return e.facetValue}))},t.prototype.deselectParent=function(e){void 0!=e&&this.deselectValue(e.facetValue,!1)},t.prototype.flagParentForSelection=function(e){for(var t=e.parent,i=e;t;){var n=this.getValueHierarchy(t.facetValue.value);n.hasChildSelected=!0;var o=S.find(n.childs,function(e){return e.facetValue.value.toLowerCase()==i.facetValue.value.toLowerCase()});o&&this.getValueHierarchy(o.facetValue.value).hasChildSelected&&(o.hasChildSelected=!0),t=n.parent,i=n}},t.prototype.unflagParentForSelection=function(e){for(var t=this,i=e.parent;i;){var n=this.getValueHierarchy(i.facetValue.value);0==S.filter(n.childs,function(i){var n=t.getValueHierarchy(i.facetValue.value);if(void 0!=n)return n.facetValue.value!=e.facetValue.value&&(n.facetValue.selected||n.facetValue.excluded||n.hasChildSelected)}).length&&(n.hasChildSelected=!1),n.allChildShouldBeSelected=!1,i=n.parent}},t.prototype.getValueFromHierarchy=function(e){var t=e instanceof s.FacetValue?e.value:e;return this.getValueHierarchy(t)},t.prototype.getFacetValueFromHierarchy=function(e){return this.getValueFromHierarchy(e).facetValue},t.prototype.getLookupOrValue=function(e){return e.lookupValue||e.value},t.prototype.getElementFromFacetValueList=function(e){var t=this.getFromFacetValueList(e);return t?t.renderer.listItem:h.$$("div").el},t.prototype.getFromFacetValueList=function(e){return void 0!=this.getValueFromHierarchy(e)?this.facetValuesList.get(e):void 0},t.prototype.getLevel=function(e){return e.value.split(this.options.delimitingCharacter).length-1},t.prototype.getAllValueHierarchy=function(){return null==this.valueHierarchy&&(this.valueHierarchy={}),this.valueHierarchy},t.prototype.deleteValueHierarchy=function(e){null!=this.valueHierarchy&&delete this.valueHierarchy[e.toLowerCase()]},t.prototype.getValueHierarchy=function(e){if(null!=this.valueHierarchy)return this.valueHierarchy[e.toLowerCase()]},t.prototype.setValueHierarchy=function(e,t){null==this.valueHierarchy&&(this.valueHierarchy={}),this.valueHierarchy[e.toLowerCase()]=t},t.prototype.checkForOrphans=function(){var e=this;S.each(this.valueHierarchy,function(t){e.getLevel(t.facetValue)!=e.options.levelStart&&void 0==e.getValueHierarchy(e.getParent(t.facetValue))&&(e.logger.error("Orphan value found in HierarchicalFacet : "+t.facetValue.value,"Needed : "+e.getParent(t.facetValue)+" but not found"),e.logger.warn("Removing incoherent facet value : "+t.facetValue.value),e.hideFacetValue(t))})},t.prototype.checkForNewUnselectedChild=function(){var e=this;S.each(this.valueHierarchy,function(t){if(t.allChildShouldBeSelected){S.find(t.childs,function(e){return 1!=e.facetValue.selected})&&(e.selectValue(t.facetValue,!0),e.logger.info("Re-executing query with new facet values returned by index"),e.queryController.deferExecuteQuery())}})},t.ID="HierarchicalFacet",t.doExport=function(){C.exportGlobally({HierarchicalFacet:t})},t.options=o({delimitingCharacter:r.ComponentOptions.buildStringOption({defaultValue:"|"}),levelStart:r.ComponentOptions.buildNumberOption({defaultValue:0,min:0}),levelEnd:r.ComponentOptions.buildNumberOption({min:0}),marginByLevel:r.ComponentOptions.buildNumberOption({defaultValue:10,min:0})},E.ResponsiveFacetOptions),t.parent=a.Facet,t}(a.Facet);t.HierarchicalFacet=O,b.Initialization.registerAutoCreateComponent(O)},39:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(22),o=i(21),s=i(113),a=i(32),r=i(4),l=i(1),c=i(0),u=i(6),h=function(){function e(){}return e.getRegexToUseForFacetSearch=function(e,t){return new RegExp(n.StringUtils.stringToRegex(e,t),"i")},e.getDisplayValueFromValueCaption=function(e,t,i){var n=this.tryToGetTranslatedCaption(t,e);return i[e]||n},e.getValuesToUseForSearchInFacet=function(e,t){var i=[e],n=this.getRegexToUseForFacetSearch(e,t.options.facetSearchIgnoreAccents);return t.options.valueCaption?(c.chain(t.options.valueCaption).pairs().filter(function(e){return n.test(e[1])}).each(function(e){i.push(e[0])}),(o.QueryUtils.isStratusAgnosticField(t.options.field,"@objecttype")||o.QueryUtils.isStratusAgnosticField(t.options.field,"@filetype"))&&c.each(s.FileTypes.getFileTypeCaptions(),function(e,o){o in t.options.valueCaption||!n.test(e)||i.push(o)})):o.QueryUtils.isStratusAgnosticField(t.options.field,"@objecttype")||o.QueryUtils.isStratusAgnosticField(t.options.field,"@filetype")?c.each(c.filter(c.pairs(s.FileTypes.getFileTypeCaptions()),function(e){return n.test(e[1])}),function(e){i.push(e[0])}):o.QueryUtils.isStratusAgnosticField(t.options.field,"@month")&&c.each(c.range(1,13),function(e){n.test(a.DateUtils.monthToString(e-1))&&i.push(("0"+e.toString()).substr(-2))}),i},e.buildFacetSearchPattern=function(e){return e=c.map(e,function(e){return r.Utils.escapeRegexCharacter(e)}),e[0]=".*"+e[0]+".*",e.join("|")},e.needAnotherFacetSearch=function(e,t,i,n){return e<t&&e<n&&e>i},e.addNoStateCssClassToFacetValues=function(e,t){if(0!=e.values.getSelected().length){var i=l.$$(t).findAll("li:not(.coveo-selected)");c.each(i,function(e){l.$$(e).addClass("coveo-no-state")})}},e.tryToGetTranslatedCaption=function(t,i){var n;if(o.QueryUtils.isStratusAgnosticField(t.toLowerCase(),"@filetype"))n=s.FileTypes.getFileType(i).caption;else if(o.QueryUtils.isStratusAgnosticField(t.toLowerCase(),"@objecttype"))n=s.FileTypes.getObjectType(i).caption;else if(e.isMonthFieldValue(t,i)){var l=parseInt(i,10);n=a.DateUtils.monthToString(l-1)}else n=u.l(i);return void 0!=n&&r.Utils.isNonEmptyString(n)?n:i},e.isMonthFieldValue=function(e,t){if(!o.QueryUtils.isStratusAgnosticField(e.toLowerCase(),"@month"))return!1;var i=parseInt(t,10);return!isNaN(i)&&!(i<1||i>12)},e}();t.FacetUtils=h},462:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(27),s=i(90),a=i(0),r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defaultTemplate='<td><a class="CoveoResultLink"></a></td>\n                             <td><span class="CoveoExcerpt"></span></td>\n                             <td><span class="CoveoFieldValue" data-field="@date" data-helper="date"></span></td>',t.defaultRoledTemplates={"table-header":'<th style="width: 40%">Link</th>\n                     <th>Excerpt</th>\n                     <th style="width: 20%"\n                         class="CoveoSort coveo-table-header-sort"\n                         data-sort-criteria="date ascending,date descending"\n                         data-display-unselected-icon="false">Date</th>',"table-footer":"<th>Link</th>\n                     <th>Excerpt</th>\n                     <th>Date</th>"},t}return n(t,e),t.prototype.instantiateRoleToString=function(e){var t=a.find(this.templates,function(t){return t.role===e});return t?t.instantiateToString(void 0,{}):this.defaultRoledTemplates[e]},t.prototype.instantiateRoleToElement=function(e){var t=this,i=a.find(this.templates,function(t){return t.role===e});if(i)return i.instantiateToElement(void 0,{});var n=new o.Template(function(){return t.defaultRoledTemplates[e]});return n.layout="table",n.instantiateToElement(void 0)},t.prototype.getFallbackTemplate=function(){var e=this;return new o.Template(function(){return e.defaultTemplate})},t.prototype.hasTemplateWithRole=function(e){return a.find(this.templates,function(t){return t.role===e})},t}(s.TemplateList);t.TableTemplate=r},463:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(27),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.instantiateToString=function(e){return'<div class="coveo-result-frame">\n        <div class="coveo-result-row">\n          <div class="coveo-result-cell" style="width:40px;text-align:center;vertical-align:middle;">\n            <span class="CoveoIcon" data-small="true" data-with-label="false">\n            </span>\n          </div>\n          <div class="coveo-result-cell" style="padding:0 0 3px 5px;vertical-align:middle">\n            <div class="coveo-result-row">\n              <div class="coveo-result-cell" style="font-size:10pt;">\n                <a class="CoveoResultLink" style="display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">\n                </a>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>'},t.prototype.instantiateToElement=function(e){var t=this;return new Promise(function(i,n){var o=document.createElement("div");o.innerHTML=t.instantiateToString(e),i(o)})},t}(o.Template);t.DefaultRecommendationTemplate=s},464:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=s[2&i[0]?"return":i[0]?"throw":"next"])&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[0,a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r};Object.defineProperty(t,"__esModule",{value:!0});var s=i(20),a=i(87),r=i(0),l=i(1),c=i(9),u=function(){function e(e){this.args=e}return e.prototype.buildResults=function(e,t,i){return n(this,void 0,void 0,function(){var n,s,l=this;return o(this,function(o){return n=[],s=r.map(e.results,function(e,o){return l.buildResult(e,t,i).then(function(e){return null!=e&&n.push({elem:e,idx:o}),a.ResultList.resultCurrentlyBeingRendered=null,e})}),[2,Promise.all(s).then(function(){return r.pluck(r.sortBy(n,"idx"),"elem")})]})})},e.prototype.buildResult=function(e,t,i){return n(this,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:return s.Assert.exists(e),s.QueryUtils.setStateObjectOnQueryResult(this.args.queryStateModel.get(),e),s.QueryUtils.setSearchInterfaceObjectOnQueryResult(this.args.searchInterface,e),a.ResultList.resultCurrentlyBeingRendered=e,[4,this.createHtmlElement(e,t)];case 1:return n=o.sent(),null!=n&&s.Component.bindResultToElement(n,e),i.push(e),[4,this.autoCreateComponentsInsideResult(n,e).initResult];case 2:return o.sent(),this.verifyChildren(n),[2,n]}})})},e.prototype.autoCreateComponentsInsideResult=function(e,t){return s.Assert.exists(e),s.Initialization.automaticallyCreateComponentsInsideResult(e,t)},e.prototype.createHtmlElement=function(e,t){return this.args.resultTemplate.instantiateToElement(e,{wrapInDiv:!0,checkCondition:!0,currentLayout:t,responsiveComponents:this.args.searchInterface.responsiveComponents})},e.prototype.verifyChildren=function(e){l.$$(e).find(".CoveoResultLink")||new c.Logger(e).warn('Result does not contain a "CoveoResultLink" component, please verify the result template',this.args.resultTemplate)},e}();t.TemplateToHtml=u},465:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(31),o=i(0),s=i(1),a=function(){function e(e){this.container=e,this.hiddenElements=[],this.enable()}return Object.defineProperty(e.prototype,"focusableElements",{get:function(){return o.sortBy(this.container.querySelectorAll("[tabindex]"),function(e){return e.tabIndex})},enumerable:!0,configurable:!0}),e.prototype.disable=function(){document.removeEventListener("focusin",this.focusInEvent),document.removeEventListener("focusout",this.focusOutEvent),this.showHiddenElements(),this.enabled=!1},e.prototype.enable=function(){var e=this;document.addEventListener("focusin",this.focusInEvent=function(t){return e.onFocusIn(t)}),document.addEventListener("focusout",this.focusOutEvent=function(t){return e.onFocusOut(t)}),this.hideAllExcept(this.container),this.enabled=!0},e.prototype.showHiddenElements=function(){for(;this.hiddenElements.length;)this.hiddenElements.pop().removeAttribute("aria-hidden")},e.prototype.hideElement=function(e){e.getAttribute("aria-hidden")||(this.hiddenElements.push(e),e.setAttribute("aria-hidden",""+!0))},e.prototype.hideSiblings=function(e){var t=this,i=e.parentElement;i&&o.without(s.$$(i).children(),e).forEach(function(e){t.hideElement(e)})},e.prototype.hideAllExcept=function(e){this.hideSiblings(e);var t=e.parentElement;t&&t!==document.body&&this.hideAllExcept(t)},e.prototype.getFocusableSibling=function(e,t){void 0===t&&(t=!1);var i=this.focusableElements,n=i.indexOf(e);return-1===n?null:i[(n+(t?-1:1)+i.length)%i.length]},e.prototype.focusSibling=function(e,t){void 0===t&&(t=!1);var i=this.getFocusableSibling(e,t);i&&i.focus()},e.prototype.focusFirstElement=function(){var e=this.focusableElements;e.length&&e[0].focus()},e.prototype.elementIsBefore=function(e,t){return!!t&&e.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_PRECEDING},e.prototype.onLosingFocus=function(e,t){var i=this;n.Defer.defer(function(){i.enabled&&(i.enabled=!1,e&&i.focusIsAllowed(e)?i.focusSibling(e,i.elementIsBefore(e,t)):i.focusFirstElement(),i.enabled=!0)})},e.prototype.focusIsAllowed=function(e){return this.container.contains(e)},e.prototype.elementIsInPage=function(e){return e&&e!==document.body.parentElement},e.prototype.onFocusIn=function(e){if(this.enabled){var t=e.relatedTarget;if(!this.elementIsInPage(t)){var i=e.target;this.elementIsInPage(i)&&(this.focusIsAllowed(i)||this.onLosingFocus(null,i))}}},e.prototype.onFocusOut=function(e){if(this.enabled){var t=e.relatedTarget;this.elementIsInPage(t)&&(t&&this.focusIsAllowed(t)||this.onLosingFocus(e.target,t))}},e}();t.FocusTrap=a},466:function(e,t,i){"use strict";function n(){var e,t=O.Component.getComponentRef("ResultList");if(t&&(e=t.resultCurrentlyBeingRendered),!e){var i=O.Component.getComponentRef("Quickview");i&&(e=i.resultCurrentlyBeingRendered)}return e}function o(){var e=n();if(e)return e.termsToHighlight}function s(){var e=n();if(e)return e.phrasesToHighlight}function a(e,t){return d.Utils.isNonEmptyArray(E.keys(e))||d.Utils.isNonEmptyArray(E.keys(t))}var r=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var l=i(115),c=i(68),u=i(32),h=i(130),p=i(179),d=i(4),f=i(22),m=i(70),y=i(178),v=i(21),g=i(24),b=i(1),S=i(50),C=i(114),V=i(39),F=i(23),E=i(0),O=i(7),w=i(66),A=function(){function e(){}return e.exportAllHelpersGlobally=function(e){E.each(l.TemplateHelpers.getHelpers(),function(t,i){void 0==e[i]&&(e[i]=t)})},e}();t.CoreHelpers=A,l.TemplateHelpers.registerFieldHelper("javascriptEncode",function(e){return d.Utils.exists(e)?f.StringUtils.javascriptEncode(e):void 0});var x=function(e,t){var i=c.StringAndHoles.shortenString(e,t.length,"...");return d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(i.value,t.highlights,i.holes,t.cssClass||"highlight"):i.value};l.TemplateHelpers.registerTemplateHelper("shorten",function(e,t,i,n){return x(e,{length:t,highlights:i,cssClass:n})}),l.TemplateHelpers.registerTemplateHelper("shortenv2",function(e,t){return x(e,t)});var R=function(e,t){var i=c.StringAndHoles.shortenPath(e,t.length);return d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(i.value,t.highlights,i.holes,t.cssClass||"highlight"):i.value};l.TemplateHelpers.registerTemplateHelper("shortenPath",function(e,t,i,n){return R(e,{length:t,highlights:i,cssClass:n})}),l.TemplateHelpers.registerFieldHelper("shortenPathv2",function(e,t){return R(e,t)});var $=function(e,t){var i=c.StringAndHoles.shortenUri(e,t.length);return d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(i.value,t.highlights,i.holes,t.cssClass||"highlight"):i.value};l.TemplateHelpers.registerTemplateHelper("shortenUri",function(e,t,i,n){return $(e,{length:t,highlights:i,cssClass:n})}),l.TemplateHelpers.registerTemplateHelper("shortenUriv2",function(e,t){return $(e,t)});var T=function(e,t){return d.Utils.exists(e)?d.Utils.exists(t.highlights)?c.HighlightUtils.highlightString(e,t.highlights,null,t.cssClass||"highlight"):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlight",function(e,t,i){return T(e,{highlights:t,cssClass:i})}),l.TemplateHelpers.registerTemplateHelper("highlightv2",function(e,t){return T(e,t)});var I=function(e,t){return d.Utils.exists(e)&&d.Utils.exists(t.termsToHighlight)&&d.Utils.exists(t.phrasesToHighlight)?a(t.termsToHighlight,t.phrasesToHighlight)?C.StreamHighlightUtils.highlightStreamText(e,t.termsToHighlight,t.phrasesToHighlight,t.opts):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlightStreamText",function(e,t,i,n){return void 0===t&&(t=o()),void 0===i&&(i=s()),I(e,{termsToHighlight:t,phrasesToHighlight:i,opts:n})}),l.TemplateHelpers.registerTemplateHelper("highlightStreamTextv2",function(e,t){var i=r({termsToHighlight:o(),phrasesToHighlight:s()},t);return I(e,i)});var D=function(e,t){return d.Utils.exists(e)&&d.Utils.exists(t.termsToHighlight)&&d.Utils.exists(t.phrasesToHighlight)?a(t.termsToHighlight,t.phrasesToHighlight)?C.StreamHighlightUtils.highlightStreamHTML(e,t.termsToHighlight,t.phrasesToHighlight,t.opts):e:void 0};l.TemplateHelpers.registerTemplateHelper("highlightStreamHTML",function(e,t,i,n){return void 0===t&&(t=o()),void 0===i&&(i=s()),D(e,{termsToHighlight:t,phrasesToHighlight:i,opts:n})}),l.TemplateHelpers.registerTemplateHelper("highlightStreamHTMLv2",function(e,t){var i=r({termsToHighlight:o(),phrasesToHighlight:s()},t);return D(e,i)}),l.TemplateHelpers.registerFieldHelper("number",function(e,t){if(d.Utils.exists(e)){var i=Number(e),n=E.isString(t)?t:t&&t.format;return n?f.StringUtils.htmlEncode(F.format(i,n)):f.StringUtils.htmlEncode(i.toString())}}),l.TemplateHelpers.registerFieldHelper("date",function(e,t){return u.DateUtils.dateToString(u.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("time",function(e,t){return u.DateUtils.timeToString(u.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("dateTime",function(e,t){return u.DateUtils.dateTimeToString(u.DateUtils.convertFromJsonDateIfNeeded(e),t)}),l.TemplateHelpers.registerFieldHelper("emailDateTime",function(e,t){var i={};i.includeTimeIfThisWeek=!0;var n=E.extend(t,i);return e?u.DateUtils.dateTimeToString(u.DateUtils.convertFromJsonDateIfNeeded(e),n):void 0}),l.TemplateHelpers.registerFieldHelper("currency",function(e,t){return h.CurrencyUtils.currencyToString(e,t)}),l.TemplateHelpers.registerFieldHelper("timeSpan",function(e,t){return void 0===t&&(t={isMilliseconds:!1}),new m.TimeSpan(e,t.isMilliseconds).getHHMMSS()}),l.TemplateHelpers.registerFieldHelper("email",function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var n,o,s,a;if(E.isObject(t[0])?(n=t[0].companyDomain,o=t[0].me,s=t[0].lengthLimit,a=t[0].truncateName):(n=t[0],o=t[1],s=t[2],a=t[3]),void 0==s&&(s=2),void 0==a&&(a=!1),E.isString(e)){var r=y.EmailUtils.splitSemicolonSeparatedListOfEmailAddresses(e);return y.EmailUtils.emailAddressesToHyperlinks(r,n,o,s,a)}return E.isArray(e)?y.EmailUtils.emailAddressesToHyperlinks(e,n,o,s,a):void 0}),l.TemplateHelpers.registerTemplateHelper("excessEmailToggle",function(e){b.$$(e).removeClass("coveo-active"),b.$$(e).hasClass("coveo-emails-excess-collapsed")?E.each(b.$$(e).siblings(".coveo-emails-excess-expanded"),function(e){b.$$(e).addClass("coveo-active")}):b.$$(e).hasClass("coveo-hide-expanded")&&(b.$$(e.parentElement).addClass("coveo-inactive"),E.each(b.$$(e.parentElement).siblings(".coveo-emails-excess-collapsed"),function(e){b.$$(e).addClass("coveo-active")}))}),l.TemplateHelpers.registerFieldHelper("anchor",function(e,t){return p.AnchorUtils.buildAnchor(e,t)}),l.TemplateHelpers.registerFieldHelper("image",function(e,t,i){return void 0===i&&(i=n()),t&&t.srcTemplate?p.ImageUtils.buildImage(f.StringUtils.buildStringTemplateFromResult(t.srcTemplate,i),{alt:t.alt,height:t.height,width:t.width}):p.ImageUtils.buildImage(e,t)}),l.TemplateHelpers.registerTemplateHelper("thumbnail",function(e,t,i){if(void 0===e&&(e=n()),void 0===t&&(t="default"),v.QueryUtils.hasThumbnail(e))return p.ImageUtils.buildImageFromResult(e,S.SearchEndpoint.endpoints[t],i)}),l.TemplateHelpers.registerTemplateHelper("fromFileTypeToIcon",function(e,t){void 0===e&&(e=n()),void 0===t&&(t={});var i=O.Component.getComponentRef("Icon");if(i)return i.createIcon(e,t).outerHTML}),l.TemplateHelpers.registerTemplateHelper("attrEncode",function(e){return(""+e).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/'/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}),l.TemplateHelpers.registerTemplateHelper("loadTemplates",function(e,t){void 0===t&&(t=!0);var i,o="",s=n(),a=!1,r=e;return E.each(e,function(e,t,n){"default"==e&&(i=t)}),void 0!=i&&(r=E.omit(e,i)),E.each(r,function(e,i,n){a&&t||(a=a||e,o+=l.TemplateHelpers.getHelper("loadTemplate")(i,e,s))}),a||void 0==i||(o+=l.TemplateHelpers.getHelper("loadTemplate")(i,!0,s)),o});var L=["B","KB","MB","GB","TB","PB","EB"];l.TemplateHelpers.registerFieldHelper("size",function(e,t){for(var i=parseInt(e,10),n=null!=t&&null!=t.precision?t.precision:2,o=null!=t&&null!=t.base?t.base:0;i>1024&&o+1<L.length;)i/=1024,o++;return(i=Math.floor(i*Math.pow(10,n))/Math.pow(10,n))+" "+L[o]}),l.TemplateHelpers.registerFieldHelper("translatedCaption",function(e){return V.FacetUtils.tryToGetTranslatedCaption("@filetype",e)}),l.TemplateHelpers.registerTemplateHelper("loadTemplate",function(e,t,i){return void 0===t&&(t=!0),d.Utils.isNullOrUndefined(i)&&(i=n()),t?w.TemplateCache.getTemplate(e).instantiateToString(i,{checkCondition:!1}):""}),l.TemplateHelpers.registerTemplateHelper("encodeCarriageReturn",function(e){return d.Utils.isNullOrUndefined(e)?void 0:f.StringUtils.encodeCarriageReturn(e)}),l.TemplateHelpers.registerTemplateHelper("isMobileDevice",function(){return g.DeviceUtils.isMobileDevice()?g.DeviceUtils.getDeviceName():null})},467:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.Legacy="legacy",e.Wildcards="wildcards",e.Regex="regex",e.EditDistance="editdistance",e.Phonetic="phonetic"}(t.AllowedValuesPatternType||(t.AllowedValuesPatternType={}))},468:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(469),o=i(4),s=i(10),a=i(1),r=i(25),l=function(){function e(e,t,i,n){this.facet=e,this.facetValue=t,this.onSelect=i,this.onExclude=n}return e.prototype.build=function(){return this.renderer=new n.ValueElementRenderer(this.facet,this.facetValue).build(),this.bindEvent({displayNextTime:!0,pinFacet:this.facet.options.preservePosition}),this},e.prototype.bindEvent=function(e){o.Utils.isNullOrUndefined(e.omniboxObject)?this.isOmnibox=!1:this.isOmnibox=!0,this.handleEventForCheckboxChange(e),this.facetValue.excluded?this.handleEventForExcludedValueElement(e):this.handleEventForValueElement(e)},e.prototype.select=function(){this.facetValue.selected=!0,this.facetValue.excluded=!1,this.renderer.setCssClassOnListValueElement()},e.prototype.unselect=function(){this.facetValue.selected=!1,this.facetValue.excluded=!1,this.renderer.setCssClassOnListValueElement()},e.prototype.exclude=function(){this.facetValue.selected=!1,this.facetValue.excluded=!0,this.renderer.setCssClassOnListValueElement()},e.prototype.unexclude=function(){this.facetValue.selected=!1,this.facetValue.excluded=!1,this.renderer.setCssClassOnListValueElement()},e.prototype.toggleExcludeWithUA=function(){var e,t=this;e=this.facetValue.excluded?this.isOmnibox?s.analyticsActionCauseList.omniboxFacetUnexclude:s.analyticsActionCauseList.facetUnexclude:this.isOmnibox?s.analyticsActionCauseList.omniboxFacetExclude:s.analyticsActionCauseList.facetExclude,this.facet.toggleExcludeValue(this.facetValue),this.onExclude?this.facet.triggerNewQuery(function(){return t.onExclude(t,e)}):this.facet.triggerNewQuery(function(){return t.facet.usageAnalytics.logSearchEvent(e,t.getAnalyticsFacetMeta())})},e.prototype.handleSelectValue=function(e){var t=this;this.facet.keepDisplayedValuesNextTime=e.displayNextTime&&!this.facet.options.useAnd;var i;this.facetValue.excluded?(i=this.isOmnibox?s.analyticsActionCauseList.omniboxFacetUnexclude:s.analyticsActionCauseList.facetUnexclude,this.facet.unexcludeValue(this.facetValue)):(i=this.facetValue.selected?this.isOmnibox?s.analyticsActionCauseList.omniboxFacetDeselect:s.analyticsActionCauseList.facetDeselect:this.isOmnibox?s.analyticsActionCauseList.omniboxFacetSelect:s.analyticsActionCauseList.facetSelect,this.facet.toggleSelectValue(this.facetValue)),this.onSelect?this.facet.triggerNewQuery(function(){return t.onSelect(t,i)}):this.facet.triggerNewQuery(function(){return t.facet.usageAnalytics.logSearchEvent(i,t.getAnalyticsFacetMeta())})},e.prototype.handleExcludeClick=function(e){this.facet.keepDisplayedValuesNextTime=e.displayNextTime&&!this.facet.options.useAnd,this.toggleExcludeWithUA()},e.prototype.handleSelectEventForExcludedValueElement=function(e){var t=this,i=function(){return e.pinFacet&&t.facet.pinFacetPosition(),e.omniboxObject&&t.omniboxCloseEvent(e.omniboxObject),t.handleSelectValue(e),t.tryDismissSearchResults(),!1};a.$$(this.renderer.label).on("click",function(e){e.stopPropagation(),i()}),a.$$(this.renderer.stylishCheckbox).on("keydown",r.KeyboardUtils.keypressAction([r.KEYBOARD.SPACEBAR,r.KEYBOARD.ENTER],i))},e.prototype.handleExcludeEventForValueElement=function(e){var t=this,i=function(i){e.omniboxObject&&t.omniboxCloseEvent(e.omniboxObject),t.handleExcludeClick(e),t.tryDismissSearchResults(),i.stopPropagation(),i.preventDefault()};a.$$(this.renderer.excludeIcon).on("click",i),a.$$(this.renderer.excludeIcon).on("keydown",r.KeyboardUtils.keypressAction([r.KEYBOARD.SPACEBAR,r.KEYBOARD.ENTER],i))},e.prototype.handleSelectEventForValueElement=function(e){var t=this,i=function(i){e.pinFacet&&t.facet.pinFacetPosition(),t.tryDismissSearchResults(),a.$$(t.renderer.checkbox).trigger("change"),i.preventDefault()};a.$$(this.renderer.label).on("click",i),a.$$(this.renderer.stylishCheckbox).on("keydown",r.KeyboardUtils.keypressAction([r.KEYBOARD.SPACEBAR,r.KEYBOARD.ENTER],i))},e.prototype.handleEventForExcludedValueElement=function(e){this.handleSelectEventForExcludedValueElement(e),this.handleExcludeEventForValueElement(e)},e.prototype.handleEventForValueElement=function(e){this.handleSelectEventForValueElement(e),this.handleExcludeEventForValueElement(e)},e.prototype.handleEventForCheckboxChange=function(e){var t=this;a.$$(this.renderer.checkbox).on("change",function(){e.omniboxObject&&t.omniboxCloseEvent(e.omniboxObject),t.handleSelectValue(e)})},e.prototype.omniboxCloseEvent=function(e){e.closeOmnibox(),e.clear()},e.prototype.tryDismissSearchResults=function(){this.facet&&this.facet.facetSearch&&this.facet.facetSearch.dismissSearchResults&&this.facet.facetSearch.dismissSearchResults()},e.prototype.getAnalyticsFacetMeta=function(){return{facetId:this.facet.options.id,facetField:this.facet.options.field.toString(),facetValue:this.facetValue.value,facetTitle:this.facet.options.title}},e}();t.ValueElement=l},469:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i(4),s=i(6),a=i(7),r=i(0),l=i(12),c=i(16),u=function(){function e(e,t){this.facet=e,this.facetValue=t}return e.prototype.withNo=function(e){return r.isArray(e)?r.each(e,function(e){e&&n.$$(e).detach()}):e&&n.$$(e).detach(),this},e.prototype.build=function(){return this.buildListItem(),this.initAndAppendLabel(),this.initAndAppendExcludeIcon(),this.setCssClassOnListValueElement(),this.addAccessibilityAttributesToTargetElement(),this},e.prototype.setCssClassOnListValueElement=function(){n.$$(this.listItem).toggleClass("coveo-selected",this.facetValue.selected),n.$$(this.listItem).toggleClass("coveo-excluded",this.facetValue.excluded)},Object.defineProperty(e.prototype,"accessibleElement",{get:function(){return this.stylishCheckbox},enumerable:!0,configurable:!0}),e.prototype.buildExcludeIcon=function(){var e=this.facetValue.excluded,t=n.$$("div",{ariaLabel:s.l("ExcludeValueWithResultCount",this.caption,s.l("ResultCount",this.count,parseInt(this.count,10))),className:"coveo-facet-value-exclude",tabindex:0,role:"button",ariaPressed:e.toString()}).el;return this.addFocusAndBlurEventListeners(t),t.innerHTML=e?l.SVGIcons.icons.plus:l.SVGIcons.icons.checkboxHookExclusionMore,c.SVGDom.addClassToSVGInContainer(t,e?"coveo-facet-value-unexclude-svg":"coveo-facet-value-exclude-svg"),c.SVGDom.addAttributesToSVGInContainer(t,{"aria-hidden":"true"}),t},e.prototype.buildValueComputedField=function(){var e=this.facetValue.getFormattedComputedField(this.facet.options.computedFieldFormat);if(o.Utils.isNonEmptyString(e)){var t=n.$$("span",{className:"coveo-facet-value-computed-field"}).el;return n.$$(t).text(e),t}},e.prototype.buildValueCheckbox=function(){var e=n.$$("input",{type:"checkbox",ariaHidden:!0,ariaLabel:this.ariaLabel}).el;return this.facetValue.selected?e.setAttribute("checked","checked"):e.removeAttribute("checked"),this.facetValue.excluded?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled"),a.Component.pointElementsToDummyForm(e),e},e.prototype.buildValueStylishCheckbox=function(){var e=n.$$("div",{className:"coveo-facet-value-checkbox",tabindex:0}).el;return e.innerHTML=l.SVGIcons.icons.checkboxHookExclusionMore,c.SVGDom.addClassToSVGInContainer(e,"coveo-facet-value-checkbox-svg"),this.addFocusAndBlurEventListeners(e),e},e.prototype.buildValueIcon=function(){var e=this.getValueIcon();return o.Utils.exists(e)?n.$$("img",{className:"coveo-facet-value-icon coveo-icon",src:this.getValueIcon()}).el:this.buildValueIconFromSprite()},e.prototype.getValueIcon=function(){return o.Utils.exists(this.facet.options.valueIcon)?this.facet.options.valueIcon(this.facetValue):void 0},e.prototype.buildValueIconFromSprite=function(){return n.$$("div",{className:"coveo-facet-value-icon coveo-icon "+this.facet.options.field.substr(1)+" "+this.facetValue.value}).el},e.prototype.buildValueCaption=function(){var e=n.$$("span",{className:"coveo-facet-value-caption",title:this.caption,"data-original-value":this.facetValue.value}).el;return n.$$(e).text(this.caption),e},e.prototype.buildValueCount=function(){if(o.Utils.isNonEmptyString(this.count)){var e=n.$$("span",{className:"coveo-facet-value-count"}).el;return n.$$(e).text(this.count),e}},Object.defineProperty(e.prototype,"caption",{get:function(){return this.facet.getValueCaption(this.facetValue)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this.facetValue.getFormattedCount()},enumerable:!0,configurable:!0}),e.prototype.addFocusAndBlurEventListeners=function(e){var t=this;n.$$(e).on("focus",function(){return n.$$(t.listItem).addClass("coveo-focused")}),n.$$(e).on("blur",function(){return n.$$(t.listItem).removeClass("coveo-focused")})},e.prototype.buildListItem=function(){this.listItem=n.$$("li",{className:"coveo-facet-value coveo-facet-selectable",ariaLabel:this.ariaLabel}).el,n.$$(this.listItem).canHandleEvent("touchstart")||n.$$(this.listItem).addClass("coveo-with-hover"),this.listItem.setAttribute("data-value",this.facetValue.value)},e.prototype.initAndAppendLabel=function(){this.label=n.$$("label",{className:"coveo-facet-value-label",role:"group"}).el,this.tryToInitAndAppendComputedField(),this.initAndAppendFacetValueLabelWrapper(),this.listItem.appendChild(this.label)},e.prototype.initAndAppendExcludeIcon=function(){this.excludeIcon=this.buildExcludeIcon(),this.attachExcludeIconEventHandlers(),this.listItem.appendChild(this.excludeIcon)},e.prototype.attachExcludeIconEventHandlers=function(){var e=this;n.$$(this.excludeIcon).on("mouseover",function(){n.$$(e.listItem).addClass("coveo-facet-value-will-exclude")}),n.$$(this.excludeIcon).on("mouseout",function(){n.$$(e.listItem).removeClass("coveo-facet-value-will-exclude")})},e.prototype.tryToInitAndAppendComputedField=function(){o.Utils.exists(this.facetValue.computedField)&&(this.computedField=this.buildValueComputedField(),this.computedField&&(this.label.appendChild(this.computedField),n.$$(this.label).addClass("coveo-with-computed-field")))},e.prototype.initAndAppendFacetValueLabelWrapper=function(){this.facetValueLabelWrapper=n.$$("div",{className:"coveo-facet-value-label-wrapper"}).el,this.initAndAppendCheckbox(),this.initAndAppendStylishCheckbox(),this.initAndAppendValueCaption(),this.initAndAppendValueCount(),this.label.appendChild(this.facetValueLabelWrapper)},e.prototype.initAndAppendCheckbox=function(){this.checkbox=this.buildValueCheckbox(),this.facetValueLabelWrapper.appendChild(this.checkbox)},e.prototype.initAndAppendStylishCheckbox=function(){this.stylishCheckbox=this.buildValueStylishCheckbox(),this.facetValueLabelWrapper.appendChild(this.stylishCheckbox)},e.prototype.initAndAppendValueCount=function(){this.valueCount=this.buildValueCount(),this.valueCount&&this.facetValueLabelWrapper.appendChild(this.valueCount)},e.prototype.initAndAppendValueCaption=function(){this.valueCaption=this.buildValueCaption(),this.facetValueLabelWrapper.appendChild(this.valueCaption)},e.prototype.addAccessibilityAttributesToTargetElement=function(){var e=this.accessibleElement;e.setAttribute("aria-label",this.ariaLabel),e.setAttribute("role","button"),e.setAttribute("aria-pressed",this.ariaPressed)},Object.defineProperty(e.prototype,"ariaLabel",{get:function(){var e=s.l("ResultCount",this.count,parseInt(this.count,10));return""+s.l("IncludeValueWithResultCount",this.caption,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ariaPressed",{get:function(){return this.facetValue.excluded?"mixed":this.facetValue.selected?"true":"false"},enumerable:!0,configurable:!0}),e}();t.ValueElementRenderer=u},470:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(22),o=i(0),s=function(){function e(e,t){this.facet=e,this.facetSort=t}return e.prototype.reorderValues=function(e){if(this.facetSort&&this.facetSort.activeSort){if(this.usingCustomSort)return this.reorderValuesWithCustomOrder(e);if(this.usingAlphabeticalSort)return this.reorderValuesWithCustomCaption(e)}return e},e.prototype.reorderValuesIfUsingCustomSort=function(e){return this.usingCustomSort?this.reorderValuesWithCustomOrder(e):e},e.prototype.reorderValuesIfUsingAlphabeticalSort=function(e){return this.usingAlphabeticalSort?this.reorderValuesWithCustomCaption(e):e},Object.defineProperty(e.prototype,"usingCustomSort",{get:function(){return"custom"==this.facetSort.activeSort.name&&void 0!=this.facet.options.customSort},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"usingAlphabeticalSort",{get:function(){return-1!=this.facetSort.activeSort.name.indexOf("alpha")},enumerable:!0,configurable:!0}),e.prototype.reorderValuesWithCustomOrder=function(e){var t=o.map(this.facet.options.customSort,function(e){return e.toLowerCase()}),i=o.map(e,function(e,i){var s=o.findIndex(t,function(t){return n.StringUtils.equalsCaseInsensitive(t,e.value)||null!=e.lookupValue&&n.StringUtils.equalsCaseInsensitive(t,e.lookupValue)});return-1==s&&(s=i+t.length),{facetValue:e,index:s}}),s=o.sortBy(i,"index");return s="ascending"==this.facetSort.customSortDirection?s:s.reverse(),o.pluck(s,"facetValue")},e.prototype.reorderValuesWithCustomCaption=function(e){var t=this,i=e.sort(function(e,i){return t.facet.getValueCaption(e).localeCompare(t.facet.getValueCaption(i),String.locale,{sensitivity:"base"})});return-1!=this.facetSort.activeSort.name.indexOf("descending")&&(i=i.reverse()),i},e}();t.FacetValuesOrder=s},471:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i(12),s=i(16),a=i(7),r=i(6),l=i(133),c=i(539),u=i(0),h=i(540),p=i(25),d=function(){function e(e){this.facetSearch=e,this.searchBarIsAnimating=!1,this.triggeredScroll=!1,this.facetSearchId=u.uniqueId("coveo-facet-search-results"),this.facetValueNotFoundId=u.uniqueId("coveo-facet-value-not-found"),this.facetSearchUserInputHandler=new c.FacetSearchUserInputHandler(this.facetSearch),this.initSearchResults()}return e.prototype.build=function(e){var t=this;return this.search=document.createElement("div"),n.$$(this.search).addClass("coveo-facet-search"),this.magnifier=this.buildMagnifierIcon(),this.search.appendChild(this.magnifier),this.wait=this.buildWaitIcon(),this.search.appendChild(this.wait),this.hideFacetSearchWaitingAnimation(),this.clear=n.$$("div",{className:"coveo-facet-search-clear",title:r.l("Clear",r.l("Search"))},o.SVGIcons.icons.checkboxHookExclusionMore).el,s.SVGDom.addClassToSVGInContainer(this.clear,"coveo-facet-search-clear-svg"),this.clear.style.display="none",this.search.appendChild(this.clear),this.combobox=this.buildCombobox(),this.search.appendChild(this.combobox),this.input=this.buildInputElement(),a.Component.pointElementsToDummyForm(this.input),this.combobox.appendChild(this.input),n.$$(this.input).on("keyup",function(e){t.facetSearchUserInputHandler.handleKeyboardEvent(e)}),n.$$(this.clear).on("click",function(t){e&&e()}),n.$$(this.input).on("focus",function(e){t.handleFacetSearchFocus()}),this.detectSearchBarAnimation(),this.initSearchDropdownNavigator(),this.search},e.prototype.initSearchResults=function(){var e=this;this.searchResults=n.$$("ul",{id:this.facetSearchId,className:"coveo-facet-search-results",role:"listbox"}).el,n.$$(this.searchResults).on("scroll",function(){return e.handleScrollEvent()}),n.$$(this.searchResults).on("keyup",function(t){t.which===p.KEYBOARD.ESCAPE&&e.facetSearch.dismissSearchResults()}),n.$$(this.searchResults).hide()},e.prototype.initSearchDropdownNavigator=function(){var e=this,t={input:this.input,searchResults:this.searchResults,setScrollTrigger:function(t){return e.triggeredScroll=t}};this.searchDropdownNavigator=h.SearchDropdownNavigatorFactory(this.facetSearch,t)},e.prototype.buildCombobox=function(){return n.$$("div",{className:"coveo-facet-search-middle",ariaHaspopup:"listbox",ariaExpanded:"true"}).el},e.prototype.showFacetSearchWaitingAnimation=function(){this.magnifier&&n.$$(this.magnifier).hide(),n.$$(this.wait).show()},e.prototype.getValueInInputForFacetSearch=function(){return this.input.value.trim()},e.prototype.hideFacetSearchWaitingAnimation=function(){n.$$(this.magnifier).show(),n.$$(this.wait).hide()},e.prototype.detectSearchBarAnimation=function(){var e=this;l.EventsUtils.addPrefixedEvent(this.search,"AnimationStart",function(t){"grow"==t.animationName&&(e.searchBarIsAnimating=!0)}),l.EventsUtils.addPrefixedEvent(this.search,"AnimationEnd",function(t){"grow"==t.animationName&&(e.searchBarIsAnimating=!1)})},e.prototype.positionSearchResults=function(){var e=this;if(null!=this.searchResults){n.$$(this.searchResults).insertAfter(this.search),n.$$(this.searchResults).show(),"none"==n.$$(this.searchResults).css("display")&&(this.searchResults.style.display="");("none"==n.$$(this.search).css("display")||this.searchBarIsAnimating)&&("none"==n.$$(this.searchResults).css("display")&&(this.searchResults.style.display=""),l.EventsUtils.addPrefixedEvent(this.search,"AnimationEnd",function(){l.EventsUtils.removePrefixedEvent(e.search,"AnimationEnd",e)}))}this.addAriaAttributes()},e.prototype.setAsCurrentResult=function(e){this.searchDropdownNavigator.setAsCurrentResult(e)},Object.defineProperty(e.prototype,"currentResult",{get:function(){return this.searchDropdownNavigator.currentResult},enumerable:!0,configurable:!0}),e.prototype.moveCurrentResultDown=function(){this.searchDropdownNavigator.focusNextElement()},e.prototype.moveCurrentResultUp=function(){this.searchDropdownNavigator.focusPreviousElement()},e.prototype.highlightCurrentQueryInSearchResults=function(e){this.facetSearch.getCaptions().forEach(function(t){t.innerHTML=n.$$(t).text().replace(e,'<span class="coveo-highlight">$1</span>')})},e.prototype.appendToSearchResults=function(e){this.searchResults.appendChild(e),this.setupFacetSearchResultsEvents(e)},e.prototype.emptyAndShowNoResults=function(){n.$$(this.searchResults).empty(),this.searchResults.appendChild(n.$$("li",{id:this.facetValueNotFoundId,className:"coveo-facet-value-not-found",role:"option",ariaSelected:"true",tabindex:0},r.l("NoValuesFound")).el),this.input.setAttribute("aria-activedescendant",this.facetValueNotFoundId)},e.prototype.updateAriaLiveWithResults=function(e,t,i){var n=""===e?r.l("ShowingResults",t,e,t):r.l("ShowingResultsWithQuery",t,e,t);i&&(n=n+" ("+r.l("MoreValuesAvailable")+")"),this.facetSearch.updateAriaLive(n)},e.prototype.focus=function(){this.input.focus(),this.handleFacetSearchFocus()},e.prototype.handleFacetSearchFocus=function(){null==this.facetSearch.currentlyDisplayedResults&&(this.facetSearch.displayNewValues(),this.addAriaAttributes())},e.prototype.setupFacetSearchResultsEvents=function(e){var t=this;n.$$(e).on("mousemove",function(){t.setAsCurrentResult(n.$$(e))});var i=!1,o=!1;n.$$(e).on("mousedown",function(){return o=!1}),n.$$(e).on("mousemove",function(){return o=!0}),n.$$(e).on("touchmove",function(){return i=!0}),n.$$(e).on("mouseup touchend",function(){i||o||setTimeout(function(){t.facetSearch.dismissSearchResults()},0),i=!1,o=!1})},e.prototype.hideSearchResultsElement=function(){this.removeAriaAttributes(),n.$$(this.searchResults).hide(),n.$$(this.searchResults).remove()},e.prototype.clearSearchInput=function(){this.input&&(this.input.value="")},e.prototype.buildMagnifierIcon=function(){var e=document.createElement("div");return e.innerHTML=o.SVGIcons.icons.search,n.$$(e).addClass("coveo-facet-search-magnifier"),s.SVGDom.addClassToSVGInContainer(e,"coveo-facet-search-magnifier-svg"),this.search.appendChild(e),e},e.prototype.buildWaitIcon=function(){var e=document.createElement("div");return e.innerHTML=o.SVGIcons.icons.loading,n.$$(e).addClass("coveo-facet-search-wait-animation"),s.SVGDom.addClassToSVGInContainer(e,"coveo-facet-search-wait-animation-svg"),e},e.prototype.buildInputElement=function(){return n.$$("input",{className:"coveo-facet-search-input",type:"text",autocapitalize:"off",autocorrect:"off",ariaLabel:r.l("SearchFacetResults",this.facetSearch.facetTitle),ariaHaspopup:"true",ariaAutocomplete:"list"}).el},e.prototype.handleScrollEvent=function(){this.triggeredScroll?this.triggeredScroll=!1:this.facetSearchUserInputHandler.handleFacetSearchResultsScroll()},e.prototype.addAriaAttributes=function(){this.input&&this.combobox&&(this.combobox.setAttribute("role","combobox"),this.combobox.setAttribute("aria-owns",this.facetSearchId),this.input.setAttribute("aria-controls",this.facetSearchId),this.input.setAttribute("aria-expanded","true"),this.facetSearch.setExpandedFacetSearchAccessibilityAttributes(this.searchResults))},e.prototype.removeAriaAttributes=function(){this.input&&this.combobox&&(this.combobox.removeAttribute("role"),this.combobox.removeAttribute("aria-owns"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-activedescendant"),this.input.setAttribute("aria-expanded","false"),this.facetSearch.setCollapsedFacetSearchAccessibilityAttributes())},e}();t.FacetSearchElement=d},472:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),s=function(){function e(e){this.config=e}return e.prototype.setAsCurrentResult=function(e){this.currentResult&&this.currentResult.removeClass("coveo-facet-search-current-result"),this.currentResult=e,e.addClass("coveo-facet-search-current-result"),this.updateSelectedOption(e)},e.prototype.focusNextElement=function(){this.moveCurrentResultDown()},e.prototype.focusPreviousElement=function(){this.moveCurrentResultUp()},e.prototype.moveCurrentResultDown=function(){var e=this.currentResult.el.nextElementSibling;e||(e=n.first(this.searchResults.children)),this.setAsCurrentResult(o.$$(e)),this.highlightAndShowCurrentResultWithKeyboard()},e.prototype.moveCurrentResultUp=function(){var e=this.currentResult.el.previousElementSibling;e||(e=n.last(this.searchResults.children)),this.setAsCurrentResult(o.$$(e)),this.highlightAndShowCurrentResultWithKeyboard()},e.prototype.highlightAndShowCurrentResultWithKeyboard=function(){this.currentResult.addClass("coveo-facet-search-current-result"),this.config.setScrollTrigger(!0),this.searchResults.scrollTop=this.currentResult.el.offsetTop},Object.defineProperty(e.prototype,"searchResults",{get:function(){return this.config.searchResults},enumerable:!0,configurable:!0}),e.prototype.updateSelectedOption=function(e){this.config.input.setAttribute("aria-activedescendant",e.getAttribute("id"));var t=o.$$(this.searchResults).find('[aria-selected^="true"]');t&&t.setAttribute("aria-selected","false"),e.setAttribute("aria-selected","true")},e}();t.DefaultSearchDropdownNavigator=s},473:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(544),o=i(0),s=function(){function e(e,t,i,n){this.element=e,this.categoryFacetTemplates=t,this.categoryValue=i,this.categoryFacet=n,this.children=[]}return e.prototype.clearChildren=function(){this.element.removeClass("coveo-active-category-facet-parent"),this.children.forEach(function(e){e.clear()}),this.children=[]},e.prototype.renderChildren=function(e){var t=this;o.each(e,function(e){t.renderValue(e,!0).makeSelectable()})},e.prototype.renderAsParent=function(e){return this.renderValue(e,!1)},e.prototype.renderValue=function(e,t){var i=this.categoryValue.path.concat([e.value]),o={value:e.value,count:e.numberOfResults,path:i},s=new n.CategoryValue(this.categoryValue.listRoot,o,this.categoryFacetTemplates,this.categoryFacet);return s.render(t),this.children.push(s),s},e}();t.CategoryChildrenValueRenderer=s},474:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(93);i(553);var s=i(0),a=i(17),r=i(13),l=i(6),c=i(15),u=i(1),h=i(25),p=i(55),d=i(16),f=i(12),m=i(4),y=i(10),v=i(475),g=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.sorts=t,n.facet=i,n.customSortDirectionChange=!1,n.onDocumentClick=function(){return n.close()},n.enabledSortsIgnoreRenderBecauseOfPairs=[],n.filterDuplicateForRendering(),n}return n(t,e),Object.defineProperty(t.prototype,"isExpanded",{get:function(){return this.settingsButton&&this.settingsButton.getAttribute("aria-expanded")===""+!0},set:function(e){this.settingsButton.setAttribute("aria-expanded",""+e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstFocusablePopupElement",{get:function(){return s.find(u.$$(this.settingsPopup).findAll("[tabindex]"),function(e){return e.tabIndex>=0})},enumerable:!0,configurable:!0}),t.prototype.build=function(){var e=this;this.buildSettingsButton(),this.buildSettingsPopup(),m.Utils.isNonEmptyArray(this.enabledSorts)&&(this.sortSection=this.buildSortSection(),this.enabledSortsAllowDirection()&&(this.directionSection=this.buildDirectionSection())),this.facet.options.enableSettingsFacetState&&(this.saveStateSection=this.buildSaveStateSection(),this.clearStateSection=this.buildClearStateSection()),this.facet.options.enableCollapse&&(this.hideSection=this.buildHideSection(),this.showSection=this.buildShowSection());var t=function(){e.appendIfNotUndefined(e.saveStateSection),e.appendIfNotUndefined(e.clearStateSection),e.appendIfNotUndefined(e.hideSection),e.appendIfNotUndefined(e.showSection)};return this.addOnDocumentClickHandler(),this.addOnNukeHandler(),m.Utils.isNonEmptyArray(this.enabledSorts)?(this.settingsPopup.appendChild(this.sortSection.element),s.each(this.directionSection,function(t){e.appendIfNotUndefined(t)}),t()):t(),this.settingsButton},t.prototype.loadSavedState=function(){if(this.facetStateLocalStorage){var e=this.facetStateLocalStorage.load(),t=this.facet.queryStateModel.get(this.includedStateAttribute),i=this.facet.queryStateModel.get(this.excludedStateAttribute),n=this.facet.queryStateModel.get(this.operatorStateAttribute);if(!m.Utils.isNullOrUndefined(e)&&m.Utils.isEmptyArray(t)&&m.Utils.isEmptyArray(i)&&!m.Utils.isNonEmptyString(n)){var o={};o[this.includedStateAttribute]=e.included,o[this.excludedStateAttribute]=e.excluded,o[this.operatorStateAttribute]=e.operator,this.facet.queryStateModel.setMultiple(o),this.loadedFromSettings=o}}else this.facet.logger.info("Facet state local storage not enabled : See Facet.options.enableSettingsFacetState")},t.prototype.saveState=function(){this.facetStateLocalStorage?this.facetStateLocalStorage.save({included:this.facet.queryStateModel.get(this.includedStateAttribute),excluded:this.facet.queryStateModel.get(this.excludedStateAttribute),operator:this.facet.queryStateModel.get(this.operatorStateAttribute)}):this.facet.logger.info("Facet state local storage not enabled : See Facet.options.enableSettingsFacetState")},t.prototype.close=function(){this.isExpanded&&(this.isExpanded=!1,u.$$(this.settingsPopup).detach())},t.prototype.open=function(){var e=this;u.$$(this.settingsPopup).insertAfter(this.settingsButton),new o.default(this.settingsButton,this.settingsPopup),this.isExpanded=!0,this.hideSection&&this.showSection&&(u.$$(this.hideSection).toggle(!u.$$(this.facet.element).hasClass("coveo-facet-collapsed")),u.$$(this.showSection).toggle(u.$$(this.facet.element).hasClass("coveo-facet-collapsed"))),this.facet.options.enableSettingsFacetState&&u.$$(this.clearStateSection).toggle(!m.Utils.isNullOrUndefined(this.facetStateLocalStorage.load())),s.each(this.enabledSorts,function(t,i){e.activeSort.name==t.name.toLowerCase()?e.selectItem(e.getSortItem(t.name)):e.unselectItem(e.getSortItem(t.name))});var t=this.firstFocusablePopupElement;t&&t.focus()},t.prototype.getSortItem=function(e){return s.find(this.sortSection.sortItems,function(t){return u.$$(t).getAttribute("data-sort-name").toLowerCase()==e.replace("ascending|descending","").toLowerCase()})},Object.defineProperty(t.prototype,"button",{get:function(){return this.settingsButton},enumerable:!0,configurable:!0}),t.prototype.buildSettingsButton=function(){var e=this;this.settingsButton=u.$$("div",{className:"coveo-facet-header-settings","aria-haspopup":"true"}).el,this.settingsButton.innerHTML=f.SVGIcons.icons.more,d.SVGDom.addClassToSVGInContainer(this.settingsButton,"coveo-facet-settings-more-svg"),this.hideElementOnMouseEnterLeave(this.settingsButton),this.isExpanded=!1,(new c.AccessibleButton).withElement(this.settingsButton).withLabel(l.l("Settings")).withClickAction(function(t){return e.handleSettingsButtonClick(t)}).withEnterKeyboardAction(function(t){return e.handleSettingsButtonClick(t)}).build()},t.prototype.hideElementOnMouseEnterLeave=function(e){var t=this,i=function(){return t.closeTimeout=window.setTimeout(function(){return t.close()},300)},n=function(){return clearTimeout(t.closeTimeout)};u.$$(e).on("mouseleave",i),u.$$(e).on("mouseenter",n),u.$$(e).on("keyup",h.KeyboardUtils.keypressAction(h.KEYBOARD.ESCAPE,function(){return t.handleKeyboardClose()}))},t.prototype.handleKeyboardClose=function(){this.close(),this.settingsButton.focus()},t.prototype.buildSettingsPopup=function(){var e=this;this.settingsPopup=u.$$("div",{className:"coveo-facet-settings-popup"}).el,this.hideElementOnMouseEnterLeave(this.settingsPopup),u.$$(this.settingsPopup).on("focusout",function(t){t.relatedTarget&&e.settingsPopup.contains(t.relatedTarget)||e.close()})},t.prototype.buildSortSection=function(){var e=this.buildSection("coveo-facet-settings-section-sort"),t=this.buildIcon("coveo-facet-settings-section-sort-svg",f.SVGIcons.icons.sort),i=this.buildItems(),n=document.createElement("div");u.$$(n).addClass("coveo-facet-settings-section-sort-title"),u.$$(n).text(l.l("SortBy")+" :"),i.appendChild(n);var o=this.buildSortSectionItems();return s.each(o,function(e){i.appendChild(e)}),e.appendChild(t),e.appendChild(i),{element:e,sortItems:o}},t.prototype.buildSortSectionItems=function(){var e=this,t=s.map(this.enabledSorts,function(t){if(!s.contains(e.enabledSortsIgnoreRenderBecauseOfPairs,t)){var i=e.buildItem(l.l(t.label),t.description);return u.$$(i).setAttribute("data-sort-name",t.name.toLowerCase().replace("ascending|descending","")),(new c.AccessibleButton).withElement(i).withSelectAction(function(i){return e.handleClickSortButton(i,t)}).withLabel(t.label).build(),i}});return t=s.compact(t)},t.prototype.closePopupAndUpdateSort=function(){this.close(),"custom"!=this.activeSort.name?this.facet.updateSort(this.activeSort.name):(this.facet.updateSort("nosort"),this.customSortDirectionChange&&(this.customSortDirectionChange=!1,this.facet.queryController.executeQuery()))},t.prototype.enabledSortsAllowDirection=function(){var e=this,t=s.filter(this.enabledSorts,function(e){return e.directionToggle});return s.filter(t,function(t){return void 0!=s.findWhere(e.enabledSorts,{name:t.relatedSort})}).length>0},t.prototype.buildDirectionSection=function(){var e=this,t=this.buildAscendingOrDescendingSection("Ascending"),i=this.buildIcon("coveo-facet-settings-section-direction-ascending-svg",f.SVGIcons.icons.ascending),n=this.buildIcon("coveo-facet-settings-section-direction-descending-svg",f.SVGIcons.icons.descending),o=this.buildItems(),s=this.buildAscendingOrDescending("Ascending");o.appendChild(s),t.appendChild(i),t.appendChild(o),(new c.AccessibleButton).withElement(s).withoutLabelOrTitle().withSelectAction(function(){return e.handleDirectionClick(s,"ascending")}).build(),this.unselectSection(t);var a=this.buildAscendingOrDescendingSection("Descending"),r=this.buildItems(),l=this.buildAscendingOrDescending("Descending");return r.appendChild(l),a.appendChild(n),a.appendChild(r),(new c.AccessibleButton).withElement(l).withoutLabelOrTitle().withSelectAction(function(){return e.handleDirectionClick(l,"descending")}).build(),this.unselectSection(a),this.activeSort.directionToggle?this.selectItem(this.getItems(t)[0]):(u.$$(t).addClass("coveo-facet-settings-disabled"),u.$$(a).addClass("coveo-facet-settings-disabled")),[t,a]},t.prototype.buildSaveStateSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-save-state"),i=this.buildIcon("coveo-facet-settings-section-save-state-svg",f.SVGIcons.icons.dropdownMore),n=this.buildItems();this.facetStateLocalStorage=new p.LocalStorageUtils("facet-state-"+this.facet.options.id),this.includedStateAttribute=r.QueryStateModel.getFacetId(this.facet.options.id),this.excludedStateAttribute=r.QueryStateModel.getFacetId(this.facet.options.id,!1),this.operatorStateAttribute=r.QueryStateModel.getFacetOperator(this.facet.options.id);var o=document.createElement("div");return u.$$(o).addClass("coveo-facet-settings-item"),o.setAttribute("title",l.l("SaveFacetState")),u.$$(o).text(l.l("SaveFacetState")),n.appendChild(o),t.appendChild(i),t.appendChild(n),(new c.AccessibleButton).withElement(t).withSelectAction(function(){return e.handleSaveStateClick()}).withoutLabelOrTitle().build(),t},t.prototype.buildClearStateSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-clear-state"),i=this.buildIcon("coveo-facet-settings-section-clear-state-svg",f.SVGIcons.icons.dropdownLess),n=this.buildItems(),o=this.buildItem(l.l("ClearFacetState"));return n.appendChild(o),t.appendChild(i),t.appendChild(n),(new c.AccessibleButton).withElement(t).withSelectAction(function(){return e.handleClearStateClick()}).withoutLabelOrTitle().build(),t},t.prototype.buildHideSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-hide"),i=this.buildIcon("coveo-facet-settings-section-hide-svg",f.SVGIcons.icons.facetCollapse),n=this.buildItems(),o=this.buildItem(l.l("Collapse"));return n.appendChild(o),t.appendChild(i),t.appendChild(n),(new c.AccessibleButton).withElement(t).withSelectAction(function(){e.facet.facetHeader.collapseFacet(),e.close()}).withLabel(l.l("CollapseFacet",this.facet.options.title)).build(),t},t.prototype.buildShowSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-show"),i=this.buildIcon("coveo-facet-settings-section-show-svg",f.SVGIcons.icons.facetExpand),n=this.buildItems(),o=this.buildItem(l.l("Expand"));return n.appendChild(o),t.appendChild(i),t.appendChild(n),(new c.AccessibleButton).withElement(t).withSelectAction(function(){e.facet.facetHeader.expandFacet(),e.close()}).withLabel(l.l("ExpandFacet",this.facet.options.title)).build(),t},t.prototype.buildIcon=function(e,t){if(e&&t){var i=u.$$("div",{className:"coveo-icon-container"},t);return d.SVGDom.addClassToSVGInContainer(i.el,e),i.el}return u.$$("div",{className:"coveo-icon"}).el},t.prototype.buildAscendingOrDescending=function(e){var t=this.buildItem(l.l(e));return t.setAttribute("aria-disabled","true"),t.setAttribute("data-direction",e.toLowerCase()),t},t.prototype.buildAscendingOrDescendingSection=function(e){return this.buildSection("coveo-facet-settings-section-direction-"+e.toLowerCase())},t.prototype.buildItem=function(e,t){return void 0===t&&(t=e),u.$$("div",{className:"coveo-facet-settings-item",title:t},s.escape(e)).el},t.prototype.buildItems=function(){var e=document.createElement("div");return u.$$(e).addClass("coveo-facet-settings-items"),e},t.prototype.buildSection=function(e){var t=document.createElement("div");return u.$$(t).addClass(["coveo-facet-settings-section",e]),t},t.prototype.handleSettingsButtonClick=function(e){e.stopPropagation(),m.Utils.isNullOrUndefined(this.settingsPopup.parentElement)?this.open():this.close()},t.prototype.handleClickSortButton=function(e,i){this.activeSort!=i&&this.activeSort.relatedSort!=i.name&&(this.activeSort=i,i.directionToggle&&s.contains(this.enabledSorts,t.availableSorts[this.activeSort.relatedSort])?this.activateDirectionSection():this.disableDirectionSection(),this.unselectSection(this.sortSection.element),this.selectItem(e.target),this.closePopupAndUpdateSort())},t.prototype.handleDirectionClick=function(e,i){var n=this;"false"===e.getAttribute("aria-disabled")&&-1===this.activeSort.name.indexOf(i)&&(this.activeSort=t.availableSorts[this.activeSort.relatedSort],s.each(this.directionSection,function(e){n.unselectSection(e)}),this.selectItem(e),"custom"==this.activeSort.name&&this.customSortDirection!=i&&(this.customSortDirection=i,this.customSortDirectionChange=!0),this.closePopupAndUpdateSort())},t.prototype.handleSaveStateClick=function(){this.saveState(),this.close()},t.prototype.handleClearStateClick=function(){var e=this;this.facetStateLocalStorage.remove(),this.facet.reset(),this.close(),this.facet.triggerNewQuery(function(){return e.facet.usageAnalytics.logSearchEvent(y.analyticsActionCauseList.facetClearAll,{facetId:e.facet.options.id,facetField:e.facet.options.field.toString(),facetTitle:e.facet.options.title})})},t.prototype.addOnNukeHandler=function(){var e=this;u.$$(this.facet.root).on(a.InitializationEvents.nuke,function(){return e.handleNuke()})},t.prototype.addOnDocumentClickHandler=function(){var e=this;document.addEventListener("click",function(){return e.onDocumentClick()})},t.prototype.getCurrentDirectionItem=function(e){var t=this;void 0===e&&(e=this.directionSection);var i;return s.each(e,function(e){i||(i=s.find(t.getItems(e),function(e){return-1!=t.activeSort.name.indexOf(e.getAttribute("data-direction"))}))}),i||(i=e[0]),i},t.prototype.activateDirectionSection=function(){var e=this;s.each(this.directionSection,function(t){u.$$(t).removeClass("coveo-facet-settings-disabled"),u.$$(t).find(".coveo-facet-settings-item").setAttribute("aria-disabled","false"),e.unselectSection(t)}),this.selectItem(this.getCurrentDirectionItem())},t.prototype.disableDirectionSection=function(){var e=this;s.each(this.directionSection,function(t){u.$$(t).addClass("coveo-facet-settings-disabled"),u.$$(t).find(".coveo-facet-settings-item").setAttribute("aria-disabled","true"),e.unselectSection(t)})},t.prototype.getItems=function(e){return u.$$(e).findAll(".coveo-facet-settings-item")},t.prototype.unselectSection=function(e){var t=this;s.each(this.getItems(e),function(e){return t.unselectItem(e)})},t.prototype.selectItem=function(e){e&&(u.$$(e).addClass("coveo-selected"),e.setAttribute("aria-pressed","true"))},t.prototype.unselectItem=function(e){e&&(u.$$(e).removeClass("coveo-selected"),e.setAttribute("aria-pressed","false"))},t.prototype.filterDuplicateForRendering=function(){var e=this;s.each(this.enabledSorts,function(t,i){if(null!=t.relatedSort)for(var n=i+1;n<e.enabledSorts.length;n++)if(e.enabledSorts[n].name==t.relatedSort){e.enabledSortsIgnoreRenderBecauseOfPairs.push(e.enabledSorts[n]);break}})},t.prototype.appendIfNotUndefined=function(e){m.Utils.isNullOrUndefined(e)||this.settingsPopup.appendChild(e)},t.prototype.handleNuke=function(){document.removeEventListener("click",this.onDocumentClick)},t}(v.FacetSort);t.FacetSettings=g},475:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(6),o=i(474),s=i(4),a=i(0),r=function(){function e(e,t){var i=this;this.facet=t,this.enabledSorts=[],this.customSortDirection="ascending",a.each(e,function(e){var t=o.FacetSettings.availableSorts[e.toLowerCase()];void 0!=t&&i.enabledSorts.push(t)}),this.removeEnabledSortsBasedOnFacetType(),s.Utils.isNonEmptyArray(this.enabledSorts)&&(void 0!=this.facet.options.sortCriteria&&(this.activeSort=a.find(this.enabledSorts,function(e){return e.name==i.facet.options.sortCriteria})),this.activeSort||(this.activeSort=this.enabledSorts[0]))}return e.prototype.removeEnabledSortsBasedOnFacetType=function(){if(Coveo.FacetRange&&this.facet instanceof Coveo.FacetRange){this.facet.options.slider&&(this.enabledSorts=[])}},e.availableSorts={score:{label:n.l("Score"),directionToggle:!1,description:n.l("ScoreDescription"),name:"score"},occurrences:{label:n.l("Occurrences"),directionToggle:!1,description:n.l("OccurrencesDescription"),name:"occurrences"},alphaascending:{label:n.l("Label"),directionToggle:!0,description:n.l("LabelDescription"),name:"alphaascending",relatedSort:"alphadescending"},alphadescending:{label:n.l("Label"),directionToggle:!0,description:n.l("LabelDescription"),name:"alphadescending",relatedSort:"alphaascending"},computedfieldascending:{label:n.l("Value"),directionToggle:!0,description:n.l("ValueDescription"),name:"computedfieldascending",relatedSort:"computedfielddescending"},computedfielddescending:{label:n.l("Value"),directionToggle:!0,description:n.l("ValueDescription"),name:"computedfielddescending",relatedSort:"computedfieldascending"},chisquare:{label:n.l("RelativeFrequency"),directionToggle:!1,description:n.l("RelativeFrequencyDescription"),name:"chisquare"},nosort:{label:n.l("Nosort"),directionToggle:!1,description:n.l("NosortDescription"),name:"nosort"},custom:{label:n.l("Custom"),directionToggle:!0,description:n.l("CustomDescription"),name:"custom",relatedSort:"custom"}},e}();t.FacetSort=r},476:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i(6),s=i(10);i(533);var a=i(12),r=i(16),l=i(15),c=function(){function e(e){this.options=e,this.element=document.createElement("div"),n.$$(this.element).addClass("coveo-facet-header")}return e.prototype.build=function(){var e=n.$$("div",{className:"coveo-facet-header-title-section"});void 0!=this.options.icon&&(this.iconElement=this.buildIcon(),e.append(this.iconElement)),e.append(this.buildTitle()),this.waitElement=this.buildWaitAnimation(),e.append(this.waitElement),this.element.appendChild(e.el);var t=n.$$("div",{className:"coveo-facet-header-settings-section"});return this.eraserElement=this.buildEraser(),t.append(this.eraserElement),this.options.facet&&(this.operatorElement=this.buildOperatorToggle(),t.append(this.operatorElement),n.$$(this.operatorElement).toggle(this.options.facet.options.enableTogglingOperator)),this.options.settingsKlass?(this.sort=this.settings=new this.options.settingsKlass(this.options.availableSorts,this.options.facet),t.append(this.settings.build())):this.options.sortKlass&&(this.sort=new this.options.sortKlass(this.options.availableSorts,this.options.facet)),this.element.appendChild(t.el),this.element},e.prototype.switchToAnd=function(){this.options.facet&&(this.options.facet.options.useAnd=!0,this.rebuildOperatorToggle(),this.updateOperatorQueryStateModel())},e.prototype.switchToOr=function(){this.options.facet&&(this.options.facet.options.useAnd=!1,this.rebuildOperatorToggle(),this.updateOperatorQueryStateModel())},e.prototype.collapseFacet=function(){this.collapseElement&&this.expandElement&&(n.$$(this.collapseElement).hide(),n.$$(this.expandElement).show()),n.$$(this.options.facetElement).addClass("coveo-facet-collapsed")},e.prototype.expandFacet=function(){this.collapseElement&&this.expandElement&&(n.$$(this.expandElement).hide(),n.$$(this.collapseElement).show()),n.$$(this.options.facetElement).removeClass("coveo-facet-collapsed")},e.prototype.updateOperatorQueryStateModel=function(){if(this.options.facet&&this.options.facet.options.enableTogglingOperator){var e="";0==this.options.facet.getSelectedValues().length&&0==this.options.facet.getExcludedValues().length||(e=this.options.facet.options.useAnd?"and":"or"),this.options.facet.queryStateModel.set(this.options.facet.operatorAttributeId,e)}},e.prototype.rebuildOperatorToggle=function(){var e=this.buildOperatorToggle();this.operatorElement&&n.$$(this.operatorElement).replaceWith(e),this.operatorElement=e},e.prototype.buildIcon=function(){var e;return e=this.options.icon?"coveo-icon-custom "+this.options.icon:"coveo-icon "+this.options.field.substr(1),this.iconElement=document.createElement("div"),n.$$(this.iconElement).addClass(e),this.iconElement},e.prototype.buildWaitAnimation=function(){return this.waitElement=n.$$("div",{className:"coveo-facet-header-wait-animation"},a.SVGIcons.icons.loading).el,r.SVGDom.addClassToSVGInContainer(this.waitElement,"coveo-facet-header-wait-animation-svg"),this.waitElement.style.visibility="hidden",this.waitElement},e.prototype.buildOperatorToggle=function(){var e=this,t=o.l("SwitchTo",this.options.facet.options.useAnd?o.l("Or"):o.l("And")),i=n.$$("span",{className:"coveo-"+(this.options.facet.options.useAnd?"and":"or")},a.SVGIcons.icons.orAnd);r.SVGDom.addClassToSVGInContainer(i.el,"coveo-or-and-svg");var s=n.$$("div",{className:"coveo-facet-header-operator",title:t});return s.append(i.el),(new l.AccessibleButton).withElement(s).withLabel(t).withSelectAction(function(){return e.handleOperatorClick()}).build(),s.el},e.prototype.handleOperatorClick=function(){var e=this;if(this.options.facet.options.useAnd?this.options.facet.switchToOr():this.options.facet.switchToAnd(),0!=this.options.facet.getSelectedValues().length){var t=this.options.facet.options.useAnd?"AND":"OR",i=this.options.facet.options.useAnd?"OR":"AND";this.options.facet.triggerNewQuery(function(){return e.options.facet.usageAnalytics.logSearchEvent(s.analyticsActionCauseList.facetToggle,{facetId:e.options.facet.options.id,facetField:e.options.field.toString(),facetOperatorBefore:i,facetOperatorAfter:t,facetTitle:e.options.title})})}},e.prototype.buildTitle=function(){var e=n.$$("div",{className:"coveo-facet-header-title"});return e.text(this.options.title),e.setAttribute("role","heading"),e.setAttribute("aria-level","2"),e.setAttribute("aria-label",o.l("FacetTitle",this.options.title)+"."),e.el},e.prototype.buildEraser=function(){var e=this,t=n.$$("div",{className:"coveo-facet-header-eraser"},a.SVGIcons.icons.mainClear);return r.SVGDom.addClassToSVGInContainer(t.el,"coveo-facet-header-eraser-svg"),(new l.AccessibleButton).withElement(t.el).withLabel(o.l("Clear",this.options.title)).withClickAction(function(){return e.onEraserClick()}).withEnterKeyboardAction(function(){return e.onEraserClick()}).build(),t.el},e.prototype.onEraserClick=function(){var e=this.options.facet||this.options.facetSlider;e.reset(),e.usageAnalytics.logSearchEvent(s.analyticsActionCauseList.facetClearAll,{facetId:e.options.id,facetField:e.options.field.toString(),facetTitle:e.options.title}),e.queryController.executeQuery()},e}();t.FacetHeader=c},477:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i(537);var n=i(0),o=i(5),s=i(15),a=i(1),r=i(12),l=i(10),c=i(6),u=function(){function e(e,t){this.facet=e,this.facetValue=t}return e.prototype.build=function(){o.Assert.exists(this.facetValue);var e=this.buildElements(),t=e.container,i=e.caption,n=e.clear,s=e.listContainer;return t.append(i.el),t.append(n.el),s.append(t.el),s},e.prototype.getBreadcrumbTooltip=function(){var e=[this.facet.getValueCaption(this.facetValue),this.facetValue.getFormattedCount(),this.facetValue.getFormattedComputedField(this.facet.options.computedFieldFormat)];return n.compact(e).join(" ")},e.prototype.buildElements=function(){return{container:this.buildContainer(),clear:this.buildClear(),caption:this.buildCaption(),listContainer:this.buildListContainer()}},e.prototype.buildContainer=function(){var e=this,t=a.$$("div",{className:"coveo-facet-breadcrumb-value"});t.toggleClass("coveo-selected",this.facetValue.selected),t.toggleClass("coveo-excluded",this.facetValue.excluded);var i=this.facetValue.excluded?"Unexclude":"RemoveFilterOn",n=c.l(i,this.facet.getValueCaption(this.facetValue));return(new s.AccessibleButton).withElement(t).withLabel(n).withSelectAction(function(){return e.selectAction()}).build(),t},e.prototype.buildListContainer=function(){return a.$$("li",{className:"coveo-facet-breadcrumb-value-list-item"})},e.prototype.buildClear=function(){return a.$$("span",{className:"coveo-facet-breadcrumb-clear"},r.SVGIcons.icons.mainClear)},e.prototype.buildCaption=function(){var e=a.$$("span",{className:"coveo-facet-breadcrumb-caption"});return e.text(this.facet.getValueCaption(this.facetValue)),e},e.prototype.selectAction=function(){var e=this;this.facetValue.excluded?this.facet.unexcludeValue(this.facetValue.value):this.facet.deselectValue(this.facetValue.value),this.facet.triggerNewQuery(function(){return e.facet.usageAnalytics.logSearchEvent(l.analyticsActionCauseList.breadcrumbFacet,{facetId:e.facet.options.id,facetField:e.facet.options.field.toString(),facetValue:e.facetValue.value,facetTitle:e.facet.options.title})}),this.focusOnContainer()},e.prototype.focusOnContainer=function(){var e=n.first(this.facet.searchInterface.getComponents("Breadcrumb"));e&&e.element.focus()},e}();t.BreadcrumbValueElement=u},478:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(23),o=i(0),s=i(5),a=i(6),r=i(1),l=i(15),c=function(){function e(e,t,i){this.facet=e,this.facetValues=t,this.breadcrumbValueElementKlass=i,this.setExpandedAndCollapsed(),this.elem=r.$$("div",{className:"coveo-facet-breadcrumb"}).el;var n=r.$$("span");n.addClass("coveo-facet-breadcrumb-title"),n.text(this.facet.options.title+":"),this.elem.appendChild(n.el),this.valueContainer=r.$$("ul",{className:"coveo-facet-breadcrumb-values"}).el,this.elem.appendChild(this.valueContainer)}return e.prototype.build=function(){return this.buildExpanded(),0!=this.collapsed.length&&this.buildCollapsed(),this.elem},e.prototype.buildAsString=function(){return this.build(),this.elem?this.facet.options.title+": "+o.map(r.$$(this.elem).findAll(".coveo-facet-breadcrumb-value"),function(e){return r.$$(e).text()}).join(", "):""},e.prototype.buildExpanded=function(){var e=this;o.each(this.expanded,function(t,i){var n=new e.breadcrumbValueElementKlass(e.facet,t).build();e.valueContainer.appendChild(n.el)})},e.prototype.buildCollapsed=function(){var e=this,t=o.filter(this.collapsed,function(e){return e.selected}).length,i=o.filter(this.collapsed,function(e){return e.excluded}).length;s.Assert.check(t+i==this.collapsed.length);var c=r.$$("li",{className:"coveo-facet-breadcrumb-value-list-item"}),u=r.$$("div",{className:"coveo-facet-breadcrumb-value"}),h=r.$$("span",{className:"coveo-facet-breadcrumb-multi-count"});h.text(a.l("NMore",n.format(t+i,"n0"))),u.append(h.el);var p=o.map(this.collapsed,function(t){return new e.breadcrumbValueElementKlass(e.facet,t)}),d=o.map(p,function(e){return e.getBreadcrumbTooltip()});(new l.AccessibleButton).withElement(u).withTitle(d.join("\n")).withSelectAction(function(){var e=[];o.each(p,function(t){e.push(t.build().el)}),o.each(e,function(e){r.$$(e).insertBefore(u.el)}),u.detach()}).build(),c.append(u.el),this.valueContainer.appendChild(c.el)},e.prototype.setExpandedAndCollapsed=function(){this.facetValues.length>this.facet.options.numberOfValuesInBreadcrumb?(this.collapsed=o.rest(this.facetValues,this.facet.options.numberOfValuesInBreadcrumb),this.expanded=o.first(this.facetValues,this.facet.options.numberOfValuesInBreadcrumb)):(this.collapsed=[],this.expanded=this.facetValues)},e}();t.BreadcrumbValueList=c},479:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(67),o=i(1),s=i(4),a=i(17),r=i(172),l=i(10),c=i(6),u=i(5),h=i(112),p=i(22),d=i(127),f=i(26),m=i(19),y=i(126),v=i(470);i(538);var g=i(0),b=i(471),S=function(){function e(e,t,i){var s=this;this.facet=e,this.facetSearchValuesListKlass=t,this.root=i,this.moreValuesToFetch=!0,this.lastSearchWasEmpty=!0,this.facetSearchElement=new b.FacetSearchElement(this),this.onResize=g.debounce(function(){s.facet instanceof n.Facet&&s.facet.searchInterface instanceof m.SearchInterface&&s.shouldPositionSearchResults()&&s.positionSearchResults()},250),this.onDocumentClick=function(e){s.handleClickElsewhere(e)},window.addEventListener("resize",this.onResize),document.addEventListener("click",function(e){return s.onDocumentClick(e)}),o.$$(e.root).on(a.InitializationEvents.nuke,function(){return s.handleNuke()})}return Object.defineProperty(e.prototype,"facetType",{get:function(){return n.Facet.ID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"facetTitle",{get:function(){return this.facet.options.title||this.facet.options.field.toString()},enumerable:!0,configurable:!0}),e.prototype.build=function(){return this.buildBaseSearch()},e.prototype.positionSearchResults=function(){this.facetSearchElement.positionSearchResults()},e.prototype.fetchMoreValues=function(){this.triggerNewFacetSearch(this.buildParamsForFetchingMore())},e.prototype.dismissSearchResults=function(){this.cancelAnyPendingSearchOperation(),this.facet.unfadeInactiveValuesInMainList(),o.$$(this.searchResults).empty(),this.moreValuesToFetch=!0,o.$$(this.search).removeClass("coveo-facet-search-no-results"),o.$$(this.facet.element).removeClass("coveo-facet-searching"),this.facetSearchElement.hideSearchResultsElement(),this.input.value="",o.$$(this.clear).hide(),this.currentlyDisplayedResults=void 0},e.prototype.triggerNewFacetSearch=function(e){var t=this;this.cancelAnyPendingSearchOperation(),this.facetSearchElement.showFacetSearchWaitingAnimation(),this.facet.logger.info("Triggering new facet search"),this.facetSearchPromise=this.facet.facetQueryController.search(e),this.facetSearchPromise&&this.facetSearchPromise.then(function(i){t.facet.usageAnalytics.logCustomEvent(l.analyticsActionCauseList.facetSearch,{facetId:t.facet.options.id,facetField:t.facet.options.field.toString(),facetTitle:t.facet.options.title},t.facet.root),t.facet.logger.debug("Received field values",i),t.processNewFacetSearchResults(i,e),t.facetSearchElement.hideFacetSearchWaitingAnimation(),t.facetSearchPromise=void 0}).catch(function(e){return s.Utils.exists(e)&&(t.facet.logger.error("Error while retrieving facet values",e),t.facetSearchElement.hideFacetSearchWaitingAnimation()),t.facetSearchPromise=void 0,null})},e.prototype.focus=function(){this.facetSearchElement.focus()},Object.defineProperty(e.prototype,"searchResults",{get:function(){return this.facetSearchElement.searchResults},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"searchBarIsAnimating",{get:function(){return this.facetSearchElement.searchBarIsAnimating},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return this.facetSearchElement.search},enumerable:!0,configurable:!0}),e.prototype.setExpandedFacetSearchAccessibilityAttributes=function(e){this.facet.setExpandedFacetSearchAccessibilityAttributes(e)},e.prototype.setCollapsedFacetSearchAccessibilityAttributes=function(){this.facet.setCollapsedFacetSearchAccessibilityAttributes()},e.prototype.keyboardEventDefaultHandler=function(){this.moreValuesToFetch=!0,this.highlightCurrentQueryWithinSearchResults(),this.inputIsEmpty()?this.lastSearchWasEmpty||(this.currentlyDisplayedResults=void 0,o.$$(this.searchResults).empty(),this.lastSearchWasEmpty=!0,this.displayNewValues(this.buildParamsForFetchingMore())):(this.lastSearchWasEmpty=!1,this.displayNewValues(this.buildParamsForNormalSearch()))},e.prototype.keyboardNavigationEnterPressed=function(e){e.shiftKey?this.triggerNewFacetSearch(this.buildParamsForNormalSearch()):"none"!=this.searchResults.style.display?(this.performActionOnCurrentSearchResult(),this.dismissSearchResults()):o.$$(this.search).is(".coveo-facet-search-no-results")&&this.selectAllValuesMatchingSearch()},e.prototype.keyboardNavigationDeletePressed=function(e){e.shiftKey&&(this.performExcludeActionOnCurrentSearchResult(),this.dismissSearchResults(),this.input.value="")},e.prototype.displayNewValues=function(e){var t=this;void 0===e&&(e=this.buildParamsForExcludingCurrentlyDisplayedValues()),this.cancelAnyPendingSearchOperation(),this.facetSearchTimeout=window.setTimeout(function(){t.triggerNewFacetSearch(e)},this.facet.options.facetSearchDelay)},e.prototype.getCaptions=function(){return o.$$(this.searchResults).findAll(".coveo-facet-value-caption")},e.prototype.getValueInInputForFacetSearch=function(){return this.facetSearchElement.getValueInInputForFacetSearch()},e.prototype.updateAriaLive=function(e){this.facet.searchInterface.ariaLive.updateText(e)},Object.defineProperty(e.prototype,"input",{get:function(){return this.facetSearchElement.input},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clear",{get:function(){return this.facetSearchElement.clear},enumerable:!0,configurable:!0}),e.prototype.shouldPositionSearchResults=function(){return!y.ResponsiveComponentsUtils.isSmallFacetActivated(o.$$(this.root))&&o.$$(this.facet.element).hasClass("coveo-facet-searching")},e.prototype.buildBaseSearch=function(){var e=this;return this.facetSearchElement.build(function(){return e.handleFacetSearchClear()}),o.$$(this.facetSearchElement.input).on("keyup",function(){return e.showOrHideClearElement()}),this.search},e.prototype.handleNuke=function(){window.removeEventListener("resize",this.onResize),document.removeEventListener("click",this.onDocumentClick)},e.prototype.handleClickElsewhere=function(e){this.currentlyDisplayedResults&&this.search!=e.target&&this.searchResults!=e.target&&this.input!=e.target&&this.dismissSearchResults()},e.prototype.handleFacetSearchClear=function(){this.input.value="",o.$$(this.clear).hide(),this.dismissSearchResults()},e.prototype.showOrHideClearElement=function(){this.inputIsEmpty()?(o.$$(this.clear).hide(),o.$$(this.search).removeClass("coveo-facet-search-no-results")):o.$$(this.clear).show()},e.prototype.cancelAnyPendingSearchOperation=function(){s.Utils.exists(this.facetSearchTimeout)&&(clearTimeout(this.facetSearchTimeout),this.facetSearchTimeout=void 0),s.Utils.exists(this.facetSearchPromise)&&(Promise.reject(this.facetSearchPromise).catch(function(){}),this.facetSearchPromise=void 0),this.facetSearchElement.hideFacetSearchWaitingAnimation()},e.prototype.inputIsEmpty=function(){return""==this.input.value.trim()},e.prototype.processNewFacetSearchResults=function(e,t){u.Assert.exists(e),e=new v.FacetValuesOrder(this.facet,this.facet.facetSort).reorderValues(e),e.length>0?(o.$$(this.search).removeClass("coveo-facet-search-no-results"),this.facet.fadeInactiveValuesInMainList(this.facet.options.facetSearchDelay),this.rebuildSearchResults(e,t),t.fetchMore||this.showSearchResultsElement(),this.highlightCurrentQueryWithinSearchResults(),this.makeFirstSearchResultTheCurrentOne(),this.facetSearchElement.updateAriaLiveWithResults(this.input.value,this.currentlyDisplayedResults.length,this.moreValuesToFetch)):t.fetchMore?this.moreValuesToFetch=!1:(o.$$(this.search).addClass("coveo-facet-search-no-results"),this.showSearchResultsElement(),this.facetSearchElement.emptyAndShowNoResults())},e.prototype.rebuildSearchResults=function(e,t){var i=this;u.Assert.exists(e),t.fetchMore||o.$$(this.searchResults).empty(),s.Utils.isNonEmptyString(t.valueToSearch)&&this.appendSelectAllResultsButton();var n=g.map(e,function(e){return h.FacetValue.create(e)});g.each(new this.facetSearchValuesListKlass(this.facet,d.FacetValueElement).build(n),function(e){i.facetSearchElement.appendToSearchResults(e)}),this.currentlyDisplayedResults?this.currentlyDisplayedResults=this.currentlyDisplayedResults.concat(g.pluck(n,"value")):this.currentlyDisplayedResults=g.pluck(n,"value"),g.each(o.$$(this.searchResults).findAll(".coveo-facet-selectable"),function(e,t){o.$$(e).setAttribute("id","coveo-facet-search-"+i.facet.options.id+"-suggestion-"+t),o.$$(e).setAttribute("role","option"),o.$$(e).setAttribute("aria-selected","false"),o.$$(e).addClass("coveo-facet-search-selectable")})},e.prototype.appendSelectAllResultsButton=function(){var e=this,t=document.createElement("li");o.$$(t).addClass(["coveo-facet-selectable","coveo-facet-search-selectable","coveo-facet-search-select-all"]),o.$$(t).text(c.l("SelectAll")),o.$$(t).on("click",function(){return e.selectAllValuesMatchingSearch()}),this.facetSearchElement.appendToSearchResults(t)},e.prototype.buildParamsForNormalSearch=function(){var e=new r.FacetSearchParameters(this.facet);return e.setValueToSearch(this.getValueInInputForFacetSearch()),e.fetchMore=!1,e},e.prototype.buildParamsForFetchingMore=function(){var e=this.buildParamsForExcludingCurrentlyDisplayedValues();return e.fetchMore=!0,e},e.prototype.buildParamsForExcludingCurrentlyDisplayedValues=function(){var e=new r.FacetSearchParameters(this.facet);return e.excludeCurrentlyDisplayedValuesInSearch(this.searchResults),e.setValueToSearch(this.getValueInInputForFacetSearch()),e},e.prototype.showSearchResultsElement=function(){this.positionSearchResults()},e.prototype.highlightCurrentQueryWithinSearchResults=function(){var e=this.getValueInInputForFacetSearch(),t=new RegExp("("+p.StringUtils.wildcardsToRegex(e,this.facet.options.facetSearchIgnoreAccents)+")","ig");this.facetSearchElement.highlightCurrentQueryInSearchResults(t)},e.prototype.makeFirstSearchResultTheCurrentOne=function(){this.facetSearchElement.setAsCurrentResult(o.$$(this.getSelectables()[0]))},e.prototype.getSelectables=function(e){return void 0===e&&(e=this.searchResults),o.$$(e).findAll(".coveo-facet-selectable")},e.prototype.performActionOnCurrentSearchResult=function(){var e=o.$$(this.searchResults).find(".coveo-facet-search-current-result");if(u.Assert.check(void 0!=e),o.$$(e).hasClass("coveo-facet-value-will-exclude"))return void o.$$(e).find(".coveo-facet-value-exclude").click();var t=o.$$(e).find('input[type="checkbox"]');t?(t.checked=!0,o.$$(t).trigger("change")):e.click()},e.prototype.performExcludeActionOnCurrentSearchResult=function(){var e=o.$$(this.searchResults).find(".coveo-facet-search-current-result");u.Assert.check(null!=e);var t=o.$$(e).find(".coveo-facet-value-caption");this.facet.facetValuesList.get(o.$$(t).text()).toggleExcludeWithUA()},e.prototype.selectAllValuesMatchingSearch=function(){var e=this;this.facet.showWaitingAnimation();var t=new r.FacetSearchParameters(this.facet);t.nbResults=1e3,t.setValueToSearch(this.getValueInInputForFacetSearch()),this.facet.facetQueryController.search(t).then(function(t){e.dismissSearchResults(),f.ModalBox.close(!0);var i=g.map(t,function(t){var i=e.facet.values.get(t.value);return s.Utils.exists(i)||(i=h.FacetValue.create(t)),i.selected=!0,i.excluded=!1,i});e.facet.processFacetSearchAllResultsSelected(i)}),this.dismissSearchResults()},e}();t.FacetSearch=S},480:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(){function e(e,t){this.facet=e,this.facetValueElementKlass=t}return e.prototype.build=function(e){var t=this,i=n.map(e,function(e){return n.find(t.facet.values.getAll(),function(t){return t.value==e.value})||e});return n.map(i,function(e){var i=new t.facetValueElementKlass(t.facet,e,t.facet.keepDisplayedValuesNextTime).build();return i.renderer.excludeIcon.setAttribute("aria-hidden","true"),i.renderer.label.setAttribute("aria-hidden","true"),i.renderer.listItem})},e}();t.FacetSearchValuesList=o},481:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(127),o=i(1),s=i(112),a=i(4),r=i(39),l=i(0),c=function(){function e(e,t){this.facet=e,this.facetValueElementKlass=t,this.valueList={},this.currentlyDisplayed=[]}return e.prototype.build=function(){return this.valueContainer=document.createElement("ul"),o.$$(this.valueContainer).addClass("coveo-facet-values"),this.valueContainer},e.prototype.getAllCurrentlyDisplayed=function(){return this.currentlyDisplayed},e.prototype.getAll=function(){return l.toArray(this.valueList)},e.prototype.getAllFacetValue=function(){return l.map(this.getAll(),function(e){return e.facetValue})},e.prototype.get=function(e){var t;return e instanceof s.FacetValue?t=e.value:(e=a.Utils.anyTypeToString(e),t=e),this.ensureFacetValueIsInList(e),this.valueList[t.toLowerCase()]},e.prototype.select=function(e){var t=this.get(e);return t.select(),t},e.prototype.unselect=function(e){var t=this.get(e);return t.unselect(),t},e.prototype.exclude=function(e){var t=this.get(e);return t.exclude(),t},e.prototype.unExclude=function(e){var t=this.get(e);return t.unexclude(),t},e.prototype.toggleSelect=function(e){var t=this.get(e);return t.facetValue.selected?t.unselect():t.select(),t},e.prototype.toggleExclude=function(e){var t=this.get(e);return t.facetValue.excluded?t.unexclude():t.exclude(),t},e.prototype.rebuild=function(e){var t=this;o.$$(this.valueContainer).empty(),this.currentlyDisplayed=[];var i=this.getValuesToBuildWith(),n=e,s=document.createDocumentFragment();l.each(i,function(e,i,o){if(t.facetValueShouldBeRemoved(e))t.facet.values.remove(e.value),n+=1;else if(i<n){var a=new t.facetValueElementKlass(t.facet,e,!0);t.valueList[e.value.toLowerCase()]=a;var r=a.build().renderer.listItem;s.appendChild(r),t.currentlyDisplayed.push(a)}}),this.valueContainer.appendChild(s),r.FacetUtils.addNoStateCssClassToFacetValues(this.facet,this.valueContainer)},e.prototype.getValuesToBuildWith=function(){return this.facet.values.getAll()},e.prototype.facetValueShouldBeRemoved=function(e){return!(0!=e.occurrences||0!=e.delta&&void 0!=e.delta||e.selected||e.excluded||this.facet.keepDisplayedValuesNextTime)},e.prototype.ensureFacetValueIsInList=function(e){var t;e instanceof s.FacetValue?null==(t=this.facet.values.get(e.value))&&(this.facet.values.add(e),t=e):null==(t=this.facet.values.get(e))&&(t=s.FacetValue.createFromValue(e),this.facet.values.add(t));var i=t.value.toLowerCase(),o=this.valueList[i];void 0==o?(o=this.valueList[i]=new n.FacetValueElement(this.facet,t,!0),o.build()):o.facetValue=t},e}();t.FacetValuesList=c},482:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(468),s=function(e){function t(t,i,n,o,s){var a=e.call(this,t,i,o,s)||this;return a.facet=t,a.facetValue=i,a.eventArg=n,a}return n(t,e),t.prototype.bindEvent=function(){e.prototype.bindEvent.call(this,{displayNextTime:!1,pinFacet:!1,omniboxObject:this.eventArg})},t}(o.ValueElement);t.OmniboxValueElement=s},483:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),s=i(4),a=i(39),r=function(){function e(e,t,i,n){this.facet=e,this.facetValues=t,this.omniboxObject=i,this.omniboxValueElementKlass=n}return e.prototype.build=function(){var e=this,t=[];return n.each(this.facetValues,function(i){t.push(e.buildOmniboxForOneRow(i,e.omniboxObject))}),this.buildFinalOmniboxElement(t)},e.prototype.buildOmniboxForOneRow=function(e,t){var i=this,n=function(e,t){return i.logAnalyticsEvent(e,t)},s=function(e,t){return i.logAnalyticsEvent(e,t)},a=new this.omniboxValueElementKlass(this.facet,e,t,n,s),r=a.build().renderer.listItem,l=t.completeQueryExpression.regex,c=t.completeQueryExpression.word;o.$$(r).find(".coveo-facet-value-caption").innerHTML=this.highlightOmniboxMatch(this.facet.getValueCaption(e),l,c);var u=o.$$("ul",{className:"coveo-omnibox-selectable coveo-facet-value coveo-omnibox-facet-value"}).el;return u.appendChild(r),o.$$(u).on("keyboardSelect",function(){var e=o.$$(r).find("input[type=checkbox]");o.$$(e).trigger("change")}),u["no-text-suggestion"]=!0,u},e.prototype.buildFinalOmniboxElement=function(e){var t=this.buildOmniboxHeader();if(!s.Utils.isEmptyArray(e)){var i=o.$$("div",{className:"coveo-omnibox-facet-value"}).el;return i.appendChild(t),n.each(e,function(e){i.appendChild(e)}),a.FacetUtils.addNoStateCssClassToFacetValues(this.facet,i),i}},e.prototype.buildOmniboxHeader=function(){var e=this.facet.options.title,t=o.$$("div",{className:"coveo-omnibox-facet-header"}).el;return o.$$(t).text(e),t},e.prototype.highlightOmniboxMatch=function(e,t,i){var n=e.search(t),o=n+i.length;return e.slice(0,n)+'<span class="coveo-highlight">'+e.slice(n,o)+"</span>"+e.slice(o)},e.prototype.logAnalyticsEvent=function(e,t){var i=n.pluck(this.facetValues,"value");e.facet.usageAnalytics.logSearchEvent(t,{query:this.omniboxObject.completeQueryExpression.word,facetId:e.facet.options.id,facetField:e.facet.options.field.toString(),facetTitle:e.facet.options.title,facetValue:e.facetValue.value,suggestions:i.join(";"),suggestionRanking:n.indexOf(i,e.facetValue.value)})},e}();t.OmniboxValuesList=r},522:function(e,t){},523:function(e,t){},524:function(e,t){},525:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(60),o=i(19),s=i(87),a=i(1),r=i(7),l=i(9),c=function(){function e(e,t,i,n){this.coveoRoot=e,this.ID=t,this.searchInterface=r.Component.get(this.coveoRoot.el,o.SearchInterface,!1),this.currentMode="large"}return e.init=function(t,i,o){if(!a.$$(t).find("."+r.Component.computeCssClassName(s.ResultList))){return void new l.Logger("ResponsiveDefaultResultTemplate").trace("No ResultLayout component found : Cannot instantiate ResponsiveResultLayout")}n.ResponsiveComponentsManager.register(e,a.$$(t),s.ResultList.ID,i,o)},e.prototype.registerComponent=function(e){return e instanceof s.ResultList&&(this.resultList=e,!0)},e.prototype.handleResizeEvent=function(){var e=this,t=this.resultList.queryController.getLastResults();this.needSmallMode()?(a.$$(this.resultList.options.resultsContainer).addClass("coveo-card-layout-container"),a.$$(this.resultList.options.resultsContainer).removeClass("coveo-list-layout-container"),"small"!=this.currentMode&&(t&&this.resultList.buildResults(t).then(function(t){e.resultList.renderResults(t)}),this.currentMode="small")):(a.$$(this.resultList.options.resultsContainer).removeClass("coveo-card-layout-container"),a.$$(this.resultList.options.resultsContainer).addClass("coveo-list-layout-container"),"large"!=this.currentMode&&(t&&this.resultList.buildResults(t).then(function(t){e.resultList.renderResults(t)}),this.currentMode="large"))},e.prototype.needSmallMode=function(){return this.coveoRoot.width()<=this.searchInterface.responsiveComponents.getSmallScreenWidth()},e}();t.ResponsiveDefaultResultTemplate=c},526:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=function(){function e(e,t){this.searchInterface=t,this.resultContainerElement=n.$$(e)}return e.prototype.empty=function(){this.searchInterface.detachComponentsInside(this.resultContainerElement.el),n.$$(this.resultContainerElement).empty()},e.prototype.addClass=function(e){this.resultContainerElement.addClass(e)},e.prototype.isEmpty=function(){return this.resultContainerElement.isEmpty()},e.prototype.hideChildren=function(){this.resultContainerElement.children().forEach(function(e){return n.$$(e).hide()})},e.prototype.getResultElements=function(){return this.resultContainerElement.findAll(".CoveoResult")},Object.defineProperty(e.prototype,"el",{get:function(){return this.resultContainerElement.el},enumerable:!0,configurable:!0}),e.resultCurrentlyBeingRendered=null,e}();t.ResultContainer=o},527:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(211),s=i(1),a=i(0),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getEndFragment=function(e){var t=this;return new Promise(function(i){if(!a.isEmpty(e)){if(t.resultListOptions.enableInfiniteScroll){var n=s.$$(t.resultListOptions.resultsContainer).findAll(".coveo-card-layout-padding");a.each(n,function(e){return s.$$(e).remove()})}var o=document.createDocumentFragment();a.times(3,function(){return o.appendChild(s.$$("div",{className:"coveo-card-layout coveo-card-layout-padding"}).el)}),i(o)}i(null)})},t}(o.ResultListRenderer);t.ResultListCardRenderer=r},528:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=s[2&i[0]?"return":i[0]?"throw":"next"])&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[0,a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r};Object.defineProperty(t,"__esModule",{value:!0});var a=i(211),r=i(462),l=i(1),c=i(0),u=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.resultListOptions=t,n.autoCreateComponentsFn=i,n.shouldDisplayHeader=!0,n.shouldDisplayFooter=!1,n.resultListOptions.resultTemplate instanceof r.TableTemplate&&(n.resultListOptions.resultTemplate.hasTemplateWithRole("table-footer")&&(n.shouldDisplayFooter=!0),0===n.resultListOptions.resultTemplate.templates.length||n.resultListOptions.resultTemplate.hasTemplateWithRole("table-header")||(n.shouldDisplayHeader=!1)),n}return n(t,e),t.prototype.getStartFragment=function(e,t){if(!t&&!c.isEmpty(e)&&this.shouldDisplayHeader)return this.renderRoledTemplate("table-header")},t.prototype.getEndFragment=function(e,t){if(!t&&!c.isEmpty(e)&&this.shouldDisplayFooter)return this.renderRoledTemplate("table-footer")},t.prototype.renderRoledTemplate=function(e){return o(this,void 0,void 0,function(){var t,i;return s(this,function(n){switch(n.label){case 0:return[4,this.resultListOptions.resultTemplate.instantiateRoleToElement(e)];case 1:return t=n.sent(),l.$$(t).addClass("coveo-result-list-"+e),this.autoCreateComponentsFn(t,void 0),i=document.createDocumentFragment(),i.appendChild(t),[2,i]}})})},t}(a.ResultListRenderer);t.ResultListTableRenderer=u},529:function(e,t){},530:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(88),o=i(20),s=i(12),a=i(465),r=function(){function e(e,t,i,n){this.componentName=e,this.element=t,this.closeButtonLabel=i,this.close=n,this.className="coveo-"+this.componentName+"-dropdown-modal-content"}return Object.defineProperty(e.prototype,"hidden",{set:function(e){this.element.toggleClass("coveo-hidden",e)},enumerable:!0,configurable:!0}),e.prototype.positionDropdown=function(){this.element.el.classList.add(this.className,n.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME),this.element.setAttribute("role","group"),this.element.setAttribute("aria-label",o.l("FiltersDropdown")),this.hidden=!1,this.ensureCloseButton(),this.ensureFocusTrap()},e.prototype.hideDropdown=function(){this.element.el.classList.remove(this.className,n.ResponsiveDropdownContent.DEFAULT_CSS_CLASS_NAME),this.element.setAttribute("role",null),this.element.setAttribute("aria-label",null),this.hidden=!0,this.removeCloseButton(),this.removeFocusTrap()},e.prototype.cleanUp=function(){this.hidden=!1},e.prototype.ensureCloseButton=function(){var e=this;this.closeButton||(this.closeButton=o.$$("button",{className:"coveo-facet-modal-close-button",ariaLabel:this.closeButtonLabel},s.SVGIcons.icons.mainClear),this.closeButton.on("click",function(){return e.close()}),this.element.prepend(this.closeButton.el))},e.prototype.ensureFocusTrap=function(){this.focusTrap||(this.focusTrap=new a.FocusTrap(this.element.el))},e.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},e.prototype.removeFocusTrap=function(){this.focusTrap&&(this.focusTrap.disable(),this.focusTrap=null)},e}();t.ResponsiveDropdownModalContent=r},531:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.popupOpened="popupOpened",e.popupClosed="popupClosed",e}();t.FacetsMobileModeEvents=n},533:function(e,t){},535:function(e,t){},536:function(e,t){},537:function(e,t){},538:function(e,t){},539:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(25),o=function(){function e(e){this.facetSearch=e}return e.prototype.handleKeyboardEvent=function(e){switch(e.which){case n.KEYBOARD.ENTER:this.facetSearch.keyboardNavigationEnterPressed(e);break;case n.KEYBOARD.DELETE:this.facetSearch.keyboardNavigationDeletePressed&&this.facetSearch.keyboardNavigationDeletePressed(e);break;case n.KEYBOARD.ESCAPE:this.facetSearch.dismissSearchResults();break;case n.KEYBOARD.DOWN_ARROW:this.facetSearch.facetSearchElement.moveCurrentResultDown();break;case n.KEYBOARD.UP_ARROW:this.facetSearch.facetSearchElement.moveCurrentResultUp();break;default:this.facetSearch.keyboardEventDefaultHandler()}},e.prototype.handleFacetSearchResultsScroll=function(){if(!this.facetSearch.facetSearchPromise&&""==this.facetSearch.facetSearchElement.getValueInInputForFacetSearch()&&this.facetSearch.moreValuesToFetch){var e=this.facetSearch.facetSearchElement.searchResults.clientHeight;this.facetSearch.facetSearchElement.searchResults.scrollHeight-(this.facetSearch.facetSearchElement.searchResults.scrollTop+e)<e/2&&this.facetSearch.fetchMoreValues()}},e}();t.FacetSearchUserInputHandler=o},540:function(e,t,i){"use strict";function n(e,t){switch(e.facetType){case l.Facet.ID:return new a.FacetSearchDropdownNavigator(o({},t,{facetSearch:e}));case r.CategoryFacet.ID:default:return new s.DefaultSearchDropdownNavigator(t)}}var o=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(t,"__esModule",{value:!0});var s=i(472),a=i(541),r=i(89),l=i(67);t.SearchDropdownNavigatorFactory=n},541:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(472),o=i(1),s=function(){function e(e){this.config=e,this.defaultDropdownNavigator=new n.DefaultSearchDropdownNavigator(e)}return e.prototype.setAsCurrentResult=function(e){this.defaultDropdownNavigator.setAsCurrentResult(e)},Object.defineProperty(e.prototype,"currentResult",{get:function(){return this.defaultDropdownNavigator.currentResult},enumerable:!0,configurable:!0}),e.prototype.focusNextElement=function(){if(this.toggleCanExcludeCurrentResult(),this.willExcludeCurrentResult)return void this.announceCurrentResultCanBeExcluded();this.defaultDropdownNavigator.moveCurrentResultDown()},e.prototype.focusPreviousElement=function(){if(this.willExcludeCurrentResult)return void this.toggleCanExcludeCurrentResult();this.moveResultUp(),this.toggleCanExcludeCurrentResult()},e.prototype.moveResultUp=function(){if(this.willExcludeCurrentResult)return void this.toggleCanExcludeCurrentResult();this.defaultDropdownNavigator.moveCurrentResultUp(),this.toggleCanExcludeCurrentResult()},Object.defineProperty(e.prototype,"isCurrentResultNotAFacetValue",{get:function(){return this.currentResult.hasClass("coveo-facet-search-select-all")||this.currentResult.hasClass("coveo-facet-value-not-found")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"willExcludeCurrentResult",{get:function(){return this.currentResult.hasClass("coveo-facet-value-will-exclude")},enumerable:!0,configurable:!0}),e.prototype.toggleCanExcludeCurrentResult=function(){this.isCurrentResultNotAFacetValue||this.currentResult.toggleClass("coveo-facet-value-will-exclude",!this.willExcludeCurrentResult)},e.prototype.announceCurrentResultCanBeExcluded=function(){if(!this.isCurrentResultNotAFacetValue){var e=o.$$(this.currentResult).find(".coveo-facet-value-exclude");this.config.facetSearch.updateAriaLive(e.getAttribute("aria-label"))}},e}();t.FacetSearchDropdownNavigator=s},542:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i(12),s=i(16),a=i(0),r=i(6),l=i(23),c=function(){function e(){this.listRoot=n.$$("ul",{className:"coveo-category-facet-values"}),this.collapseArrow=n.$$("span",{className:"coveo-category-facet-collapse-children"},o.SVGIcons.icons.arrowDown),s.SVGDom.addClassToSVGInContainer(this.collapseArrow.el,"coveo-category-facet-collapse-children-svg")}return e.prototype.buildListRoot=function(){return this.listRoot.clone(!0)},e.prototype.buildListElement=function(e){var t=n.$$("div",{},this.createListElement(e));return n.$$(t.el.firstChild)},e.prototype.buildAllCategoriesButton=function(){var e=n.$$("span",{className:"coveo-category-facet-all-categories-caption"},r.l("AllCategories"));return n.$$("li",{className:"coveo-category-facet-value coveo-category-facet-all-categories"},this.buildCollapseArrow(),e)},e.prototype.buildEllipsis=function(){var e=n.$$("span",{className:"coveo-category-facet-ellipsis-caption"},"[ ... ]");return n.$$("li",{className:"coveo-category-facet-ellipsis"},e)},e.prototype.buildCollapseArrow=function(){return this.collapseArrow.clone(!0)},e.prototype.getFormattedCount=function(e){return l.format(e,"n0")},e.prototype.createListElement=function(e){return'<li class="coveo-category-facet-value">\n        <label class="coveo-category-facet-value-label">\n          <span title="'+a.escape(e.value)+'" class="coveo-category-facet-value-caption">'+a.escape(e.value)+'</span>\n          <span class="coveo-category-facet-value-count">'+this.getFormattedCount(e.count)+"</span>\n        </label>\n      </li>"},e}();t.CategoryFacetTemplates=c},543:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(473),o=function(){function e(e,t,i){this.element=e,this.path=[],this.categoryChildrenValueRenderer=new n.CategoryChildrenValueRenderer(e,t,this,i),this.listRoot=t.buildListRoot(),this.appendListRoot()}return e.prototype.renderChildren=function(e){this.appendListRoot(),this.categoryChildrenValueRenderer.renderChildren(e)},e.prototype.renderAsParent=function(e){return this.appendListRoot(),this.categoryChildrenValueRenderer.renderAsParent(e)},Object.defineProperty(e.prototype,"children",{get:function(){return this.categoryChildrenValueRenderer.children},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.listRoot.detach(),this.listRoot.empty(),this.categoryChildrenValueRenderer.clearChildren()},e.prototype.appendListRoot=function(){this.element.append(this.listRoot.el)},e}();t.CategoryValueRoot=o},544:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i(473),s=i(10),a=i(15),r=i(6),l=function(){function e(e,t,i,n){this.listRoot=e,this.categoryValueDescriptor=t,this.categoryFacetTemplates=i,this.categoryFacet=n,this.isActive=!1,this.element=this.categoryFacetTemplates.buildListElement({value:this.captionedValueDescriptorValue,count:this.categoryValueDescriptor.count}),this.collapseArrow=this.categoryFacetTemplates.buildCollapseArrow(),this.categoryChildrenValueRenderer=new o.CategoryChildrenValueRenderer(this.element,i,this,this.categoryFacet),this.path=this.categoryValueDescriptor.path}return e.prototype.render=function(e){this.pastMaximumDepth()&&this.element.addClass("coveo-category-facet-last-value"),e?this.element.addClass("coveo-category-facet-child-value"):this.element.addClass("coveo-category-facet-parent-value"),this.listRoot.append(this.element.el)},e.prototype.getDescriptor=function(){return{value:this.categoryValueDescriptor.value,count:this.categoryValueDescriptor.count,path:this.path}},e.prototype.clear=function(){this.element.detach(),this.categoryChildrenValueRenderer.clearChildren()},e.prototype.renderChildren=function(e){this.isActive=!0,this.element.addClass("coveo-active-category-facet-parent"),this.categoryChildrenValueRenderer.renderChildren(e)},e.prototype.renderAsParent=function(e){return this.categoryChildrenValueRenderer.renderAsParent(e)},Object.defineProperty(e.prototype,"children",{get:function(){return this.categoryChildrenValueRenderer.children},enumerable:!0,configurable:!0}),e.prototype.makeSelectable=function(){var e=this,t=n.$$(this.element.find(".coveo-category-facet-value-label"));t.addClass("coveo-selectable");var i=this.categoryValueDescriptor.count,o=r.l("ResultCount",i.toString(),i),s=r.l("IncludeValueWithResultCount",this.captionedValueDescriptorValue,o);return(new a.AccessibleButton).withElement(t).withSelectAction(function(){return e.onSelect()}).withLabel(s).build(),this},e.prototype.showCollapseArrow=function(){if(!this.collapseArrow.el.parentElement){var e=this.element.find("label");n.$$(e).prepend(this.collapseArrow.el)}return this},Object.defineProperty(e.prototype,"captionedValueDescriptorValue",{get:function(){var e=this.categoryValueDescriptor.value;return this.categoryFacet.getCaption(e)},enumerable:!0,configurable:!0}),e.prototype.onSelect=function(){this.pastMaximumDepth()||(this.categoryFacet.logAnalyticsEvent(s.analyticsActionCauseList.categoryFacetSelect,this.path),this.categoryFacet.scrollToTop(),this.categoryFacet.changeActivePath(this.path),this.categoryFacet.executeQuery())},e.prototype.pastMaximumDepth=function(){return this.path.length-this.categoryFacet.options.basePath.length>=this.categoryFacet.options.maximumDepth},e}();t.CategoryValue=l},545:function(e,t,i){"use strict";var n=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=s[2&i[0]?"return":i[0]?"throw":"next"])&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[0,a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r};Object.defineProperty(t,"__esModule",{value:!0});var a=i(467),r=i(4),l=function(){function e(e){this.categoryFacet=e}return e.prototype.putCategoryFacetInQueryBuilder=function(e,t,i){var n=e.categoryFacets.length;return this.addQueryFilter(e,t),this.addCategoryFacetRequest(e,t,i),n},e.prototype.searchFacetValues=function(e,t){return o(this,void 0,void 0,function(){var i,o,r,l;return s(this,function(s){switch(s.label){case 0:return i=n({},this.categoryFacet.queryController.getLastQuery()),o={allowedValues:[this.getAllowedValuesPattern(e)],allowedValuesPatternType:a.AllowedValuesPatternType.Wildcards,maximumNumberOfValues:t,field:this.categoryFacet.options.field,sortCriteria:"occurrences",injectionDepth:this.categoryFacet.options.injectionDepth},i.groupBy=[o],i.categoryFacets.splice(this.categoryFacet.positionInQuery,1),[4,this.categoryFacet.queryController.getEndpoint().search(i)];case 1:return r=s.sent(),l=function(e,t){return e.numberOfResults==t.numberOfResults?e.value.length-t.value.length:t.numberOfResults-e.numberOfResults},[2,r.groupByResults[0].values.sort(l)]}})})},e.prototype.addDebugGroupBy=function(e,t){e.groupByRequests.push({field:this.categoryFacet.options.field,allowedValues:[".*"+r.Utils.escapeRegexCharacter(t)+".*"],allowedValuesPatternType:a.AllowedValuesPatternType.Regex})},e.prototype.shouldAddFilterToQuery=function(e){return 0!=e.length&&!r.Utils.arrayEqual(e,this.categoryFacet.options.basePath)},e.prototype.addQueryFilter=function(e,t){this.shouldAddFilterToQuery(t)&&e.advancedExpression.addFieldExpression(this.categoryFacet.options.field,"==",[t.join(this.categoryFacet.options.delimitingCharacter)])},e.prototype.addCategoryFacetRequest=function(e,t,i){var n={field:this.categoryFacet.options.field,path:t,injectionDepth:this.categoryFacet.options.injectionDepth,maximumNumberOfValues:i,delimitingCharacter:this.categoryFacet.options.delimitingCharacter};e.categoryFacets.push(n)},e.prototype.getAllowedValuesPattern=function(e){var t=this.categoryFacet.options.basePath,i=this.categoryFacet.options.delimitingCharacter;return r.Utils.isNonEmptyArray(t)?""+t.join(i)+i+"*"+e+"*":"*"+e+"*"},e}();t.CategoryFacetQueryController=l},546:function(e,t){},547:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=s[2&i[0]?"return":i[0]?"throw":"next"])&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[0,a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r};Object.defineProperty(t,"__esModule",{value:!0});var s=i(89),a=i(471),r=i(0),l=i(1),c=i(16),u=i(12),h=i(6);i(548);var p=i(22),d=i(10),f=i(15),m=i(23),y=function(){function e(e,t){void 0===t&&(t=!0);var i=this;this.categoryFacet=e,this.displayButton=t,this.moreValuesToFetch=!0,this.facetSearchElement=new a.FacetSearchElement(this),this.displayNewValues=r.debounce(this.getDisplayNewValuesFunction(),this.categoryFacet.options.facetSearchDelay),this.categoryFacet.root.addEventListener("click",function(e){return i.handleClickElsewhere(e)}),this.numberOfValuesToFetch=this.categoryFacet.options.numberOfResultsInFacetSearch}return Object.defineProperty(e.prototype,"facetType",{get:function(){return s.CategoryFacet.ID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"facetTitle",{get:function(){return this.categoryFacet.options.title||this.categoryFacet.options.field.toString()},enumerable:!0,configurable:!0}),e.prototype.setExpandedFacetSearchAccessibilityAttributes=function(e){this.container.setAttribute("aria-expanded","true")},e.prototype.setCollapsedFacetSearchAccessibilityAttributes=function(){this.container.setAttribute("aria-expanded","false")},e.prototype.build=function(){return this.container=l.$$("div",{className:"coveo-category-facet-search-container",role:"button"}),this.container.toggleClass("coveo-category-facet-search-without-button",!this.displayButton),this.displayButton&&this.buildButton(),this.container.append(this.facetSearchElement.build()),l.$$(this.facetSearchElement.search).toggleClass("without-animation",!this.displayButton),this.container},e.prototype.buildButton=function(){var e=this;(new f.AccessibleButton).withElement(this.container).withSelectAction(function(){l.$$(e.categoryFacet.element).addClass("coveo-category-facet-searching"),e.focus()}).withLabel(h.l("SearchFacetResults",this.facetTitle)).build(),this.buildfacetSearchPlaceholder()},e.prototype.focus=function(){this.facetSearchElement.focus()},e.prototype.clear=function(){this.dismissSearchResults(),this.container&&this.container.detach()},e.prototype.dismissSearchResults=function(){this.removeNoResultsCssClasses(),l.$$(this.categoryFacet.element).removeClass("coveo-category-facet-searching"),l.$$(this.facetSearchElement.searchResults).empty(),this.facetSearchElement.clearSearchInput(),this.facetSearchElement.hideSearchResultsElement(),this.currentlyDisplayedResults=null,this.numberOfValuesToFetch=this.categoryFacet.options.numberOfResultsInFacetSearch,this.moreValuesToFetch=!0},e.prototype.keyboardEventDefaultHandler=function(){this.moreValuesToFetch=!0,this.displayNewValues()},e.prototype.keyboardNavigationEnterPressed=function(){this.selectCurrentResult()},e.prototype.fetchMoreValues=function(){this.numberOfValuesToFetch+=this.categoryFacet.options.numberOfResultsInFacetSearch,this.displayNewValues()},e.prototype.getCaptions=function(){var e=l.$$(this.facetSearchElement.searchResults);return e.findAll(".coveo-category-facet-search-value-caption").concat(e.findAll(".coveo-category-facet-search-path-parents")).concat(e.findAll(".coveo-category-facet-search-path-last-value"))},e.prototype.updateAriaLive=function(e){this.categoryFacet.searchInterface.ariaLive.updateText(e)},e.prototype.selectCurrentResult=function(){if(this.facetSearchElement.currentResult){var e=this.facetSearchElement.currentResult.el.dataset.path,t=this.categoryFacet.options.delimitingCharacter,i=e.split(t);this.categoryFacet.changeActivePath(i),this.categoryFacet.logAnalyticsEvent(d.analyticsActionCauseList.categoryFacetSelect,i),this.categoryFacet.executeQuery(),this.categoryFacet.scrollToTop()}},e.prototype.handleClickElsewhere=function(e){var t=l.$$(e.target).closest(".coveo-category-facet-search-container"),i=this.container&&t===this.container.el;t&&i||this.dismissSearchResults()},e.prototype.buildfacetSearchPlaceholder=function(){var e=l.$$("div",{className:"coveo-category-facet-search-placeholder"}),t=l.$$("div",{className:"coveo-category-facet-search-icon"},u.SVGIcons.icons.checkboxHookExclusionMore);c.SVGDom.addClassToSVGInContainer(t.el,"coveo-category-facet-search-icon-svg");var i=l.$$("span",{className:"coveo-category-facet-search-label"},h.l("Search"));e.append(t.el),e.append(i.el),this.container.append(e.el)},e.prototype.getDisplayNewValuesFunction=function(){var e=this;return function(){return n(e,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:return this.facetSearchElement.showFacetSearchWaitingAnimation(),this.categoryFacet.logger.info("Triggering new Category Facet search"),[4,this.categoryFacet.categoryFacetQueryController.searchFacetValues(this.facetSearchElement.input.value,this.numberOfValuesToFetch)];case 1:return e=t.sent(),(this.logAnalyticsEvent(),e.length<this.numberOfValuesToFetch&&(this.moreValuesToFetch=!1),0==e.length)?(this.noFacetSearchResults(),[2]):(this.removeNoResultsCssClasses(),this.setFacetSearchResults(e),this.shouldPositionSearchResults&&this.facetSearchElement.positionSearchResults(),this.facetSearchElement.hideFacetSearchWaitingAnimation(),[2])}})})}},e.prototype.setFacetSearchResults=function(e){l.$$(this.facetSearchElement.searchResults).empty(),this.currentlyDisplayedResults=r.pluck(e,"value");for(var t=0;t<e.length;t++){var i=this.buildFacetSearchValue(e[t],t);0==t&&this.facetSearchElement.setAsCurrentResult(i),this.facetSearchElement.appendToSearchResults(i.el)}this.highlightCurrentQueryWithinSearchResults(),this.facetSearchElement.updateAriaLiveWithResults(this.facetSearchElement.input.value,this.currentlyDisplayedResults.length,this.moreValuesToFetch)},e.prototype.getFormattedCount=function(e){return m.format(e,"n0")},e.prototype.buildFacetSearchValue=function(e,t){var i=this,n=e.value.split(this.categoryFacet.options.delimitingCharacter),o=0!=n.slice(0,-1).length?n.slice(0,-1).join("/")+"/":"",s=l.$$("span",{className:"coveo-category-facet-search-value-caption"},r.last(n)),a=l.$$("span",{className:"coveo-category-facet-search-value-number"},this.getFormattedCount(e.numberOfResults)),c=l.$$("span",{className:"coveo-category-facet-search-path-parents"},o),u=l.$$("span",{className:"coveo-category-facet-search-path"},c),p=l.$$("div",{className:"coveo-category-facet-search-first-row"},s,a),m=l.$$("div",{className:"coveo-category-facet-search-second-row"},u),y=l.$$("li",{id:"coveo-category-facet-search-suggestion-"+t,role:"option",ariaSelected:"false",className:"coveo-category-facet-search-value",title:n},p,m);y.el.dataset.path=e.value;var v=h.l("ResultCount",this.getFormattedCount(e.numberOfResults),e.numberOfResults),g=h.l("IncludeValueWithResultCount",r.last(n),v);return(new f.AccessibleButton).withElement(y).withSelectAction(function(){i.categoryFacet.changeActivePath(n),i.categoryFacet.scrollToTop(),i.categoryFacet.logAnalyticsEvent(d.analyticsActionCauseList.categoryFacetSelect,n),i.categoryFacet.executeQuery()}).withLabel(g).build(),y},e.prototype.noFacetSearchResults=function(){this.facetSearchElement.hideFacetSearchWaitingAnimation(),this.facetSearchElement.emptyAndShowNoResults(),l.$$(this.facetSearchElement.search).addClass("coveo-facet-search-no-results"),l.$$(this.categoryFacet.element).addClass("coveo-no-results")},e.prototype.removeNoResultsCssClasses=function(){this.facetSearchElement.search&&l.$$(this.facetSearchElement.search).removeClass("coveo-facet-search-no-results"),l.$$(this.categoryFacet.element).removeClass("coveo-no-results")},e.prototype.highlightCurrentQueryWithinSearchResults=function(){var e=new RegExp("("+p.StringUtils.stringToRegex(this.facetSearchElement.input.value,!0)+")","ig");this.facetSearchElement.highlightCurrentQueryInSearchResults(e)},e.prototype.logAnalyticsEvent=function(){this.categoryFacet.usageAnalytics.logCustomEvent(d.analyticsActionCauseList.categoryFacetSearch,{categoryFacetId:this.categoryFacet.options.id,categoryFacetField:this.categoryFacet.options.field.toString(),categoryFacetTitle:this.categoryFacet.options.title},this.categoryFacet.root)},Object.defineProperty(e.prototype,"shouldPositionSearchResults",{get:function(){var e=this.facetSearchElement.searchResults;return e&&!e.parentElement},enumerable:!0,configurable:!0}),e}();t.CategoryFacetSearch=y},548:function(e,t){},549:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),o=i(12),s=i(15),a=i(6),r=i(0),l=function(){function e(e,t,i){this.categoryFacet=e,this.onClickHandler=t,this.categoryValueDescriptor=i}return e.prototype.build=function(){var e=this,t=n.$$("span",{className:"coveo-facet-breadcrumb-clear"},o.SVGIcons.icons.mainClear),i=r.without.apply(void 0,[this.categoryValueDescriptor.path].concat(this.categoryFacet.options.basePath)),l=i.map(function(t){return e.categoryFacet.getCaption(t)}).join("/"),c=n.$$("span",{className:"coveo-category-facet-breadcrumb-title"},this.categoryFacet.options.title+":"),u=n.$$("span",{className:"coveo-category-facet-breadcrumb-values"},l,t);return(new s.AccessibleButton).withElement(u).withLabel(a.l("RemoveFilterOn",l)).withSelectAction(this.onClickHandler).build(),n.$$("span",{className:"coveo-category-facet-breadcrumb"},c,u).el},e}();t.CategoryFacetBreadcrumb=l},550:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(89),o=i(11),s=i(0),a=i(9),r=(function(){function e(){}}(),function(){function e(e){var t=this;this.categoryFacet=e,this.categoryFacet.bind.onRootElement(o.QueryEvents.buildingQuery,function(e){return t.handleBuildingQuery(e)}),this.categoryFacet.bind.onRootElement(o.QueryEvents.querySuccess,function(e){t.handleQuerySuccess(e)})}return e.prototype.handleBuildingQuery=function(e){var t=e.queryBuilder.groupByRequests.length;if(0==this.categoryFacet.activePath.length)this.positionInQuery={start:t,end:t+1},this.addGroupByForEmptyPath(e.queryBuilder);else{var i=this.categoryFacet.activePath;this.positionInQuery={start:t,end:t+i.length},this.addGroupByForEachPathElement(e.queryBuilder,i)}},e.prototype.handleQuerySuccess=function(t){var i=this;t.results.groupByResults.slice(this.positionInQuery.start,this.positionInQuery.end).forEach(function(t){return e.analyzeResults(t,i.categoryFacet.options.delimitingCharacter)})},e.prototype.addGroupByForEmptyPath=function(e){e.groupByRequests.push({field:this.categoryFacet.options.field,injectionDepth:this.categoryFacet.options.injectionDepth})},e.prototype.addGroupByForEachPathElement=function(e,t){var i=this;t.forEach(function(t){i.categoryFacet.categoryFacetQueryController.addDebugGroupBy(e,t)})},e.analyzeResults=function(e,t){var i=this,n=new Map,o=[],a=this.buildPathsFromGroupByValues(e.values,t);return a=s.sortBy(a,function(e){return e.length}),a.forEach(function(e){if(1==e.length)i.addFirstNodeToTree(n,e);else{for(var s=!0,a=e.slice(0,-1),r=n,l=0,c=a;l<c.length;l++){var u=c[l];if(!(r=r.get(u))){i.processOrphan(o,e,t),s=!1;break}}s&&i.addValidNodeToTree(r,e)}}),o},e.buildPathsFromGroupByValues=function(e,t){return s.chain(e).pluck("value").map(function(e){return e.split(t)}).sortBy(function(e){return e.length}).value()},e.addFirstNodeToTree=function(e,t){e.set(t[0],new Map)},e.addValidNodeToTree=function(e,t){e.set(t.slice(-1)[0],new Map)},e.processOrphan=function(e,t,i){var n=t.join(i);e.push(n),this.logger.error("Value "+n+" has no parent.")},e.logger=new a.Logger(n.CategoryFacet),e}());t.CategoryFacetDebug=r},551:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(89),o=i(1),s=i(6),a=i(12),r=i(16),l=i(15),c=function(){function e(e){this.options=e,this.element=document.createElement("div"),o.$$(this.element).addClass("coveo-facet-header")}return e.prototype.build=function(){var e=this.buildWaitAnimation(),t=o.$$("div",{className:"coveo-category-facet-title",role:"heading","aria-level":"2","aria-label":s.l("FacetTitle",this.options.title)+"."},this.options.title);this.element=o.$$("div",{className:"coveo-category-facet-header"},t).el,o.$$(this.element).append(e);var i=this.buildEraser();return o.$$(this.element).append(i),this.element},e.prototype.buildWaitAnimation=function(){var e=o.$$("div",{className:n.CategoryFacet.WAIT_ELEMENT_CLASS},a.SVGIcons.icons.loading).el;return r.SVGDom.addClassToSVGInContainer(e,"coveo-category-facet-header-wait-animation-svg"),e.style.visibility="hidden",e},e.prototype.buildEraser=function(){var e=this,t=o.$$("div",{className:"coveo-category-facet-header-eraser coveo-facet-header-eraser"},a.SVGIcons.icons.mainClear).el;r.SVGDom.addClassToSVGInContainer(t,"coveo-facet-header-eraser-svg");var i=function(){e.options.categoryFacet.reset(),e.options.categoryFacet.scrollToTop()};return(new l.AccessibleButton).withElement(t).withLabel(s.l("Clear",this.options.title)).withClickAction(i).withEnterKeyboardAction(i).build(),t},e}();t.CategoryFacetHeader=c},552:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(){function e(){this.seenValues=[]}return e.prototype.getValueForLastPartInPath=function(e){for(var t,i={value:"",numberOfResults:0},n=0,o=e;n<o.length;n++){var s=o[n],a=t?t.children:this.seenValues,r=this.findNodeWithValue(a,s);if(!r)return i;t=r}return t?t.result:i},e.prototype.storeNewValues=function(e){for(var t=this,i=this.seenValues,n=0,o=e.parentValues;n<o.length;n++){var s=o[n];if(!this.findNodeWithValue(i,s.value)){var a={result:s,children:[]};i.push(a)}i=this.findNodeWithValue(i,s.value).children}e.values.filter(function(e){return!t.findNodeWithValue(i,e.value)}).forEach(function(e){return i.push({result:e,children:[]})})},e.prototype.findNodeWithValue=function(e,t){return n.find(e,function(e){return e.result.value===t})},e}();t.CategoryFacetValuesTree=o},553:function(e,t){},554:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=i(4),s=i(112),a=i(0),r=function(){function e(e){o.Utils.exists(e)?this.values=a.map(e.values,function(e){return s.FacetValue.createFromGroupByValue(e)}):this.values=[]}return e.prototype.add=function(e){n.Assert.exists(e),n.Assert.check(!this.contains(e.value)),this.values.push(e)},e.prototype.remove=function(e){n.Assert.isNonEmptyString(e),e=e,this.values=a.filter(this.values,function(t){return t.value!=e})},e.prototype.size=function(){return this.values.length},e.prototype.isEmpty=function(){return 0==this.values.length},e.prototype.at=function(e){return n.Assert.isLargerOrEqualsThan(0,e),n.Assert.isSmallerThan(this.values.length,e),this.values[e]},e.prototype.get=function(e){return a.find(this.values,function(t){return t.value.toLowerCase()==e.toLowerCase()})},e.prototype.contains=function(e){return o.Utils.exists(this.get(e))},e.prototype.getAll=function(){return this.values},e.prototype.getSelected=function(){return a.filter(this.values,function(e){return e.selected})},e.prototype.getExcluded=function(){return a.filter(this.values,function(e){return e.excluded})},e.prototype.hasSelectedOrExcludedValues=function(){return 0!=this.getSelected().length||0!=this.getExcluded().length},e.prototype.hasSelectedAndExcludedValues=function(){return 0!=this.getSelected().length&&0!=this.getExcluded().length},e.prototype.hasOnlyExcludedValues=function(){return 0==this.getSelected().length&&0!=this.getExcluded().length},e.prototype.hasOnlySelectedValues=function(){return 0!=this.getSelected().length&&0==this.getExcluded().length},e.prototype.reset=function(){a.each(this.values,function(e){return e.reset()})},e.prototype.importActiveValuesFromOtherList=function(e){var t=this;n.Assert.exists(e),a.each(e.getSelected(),function(e){var i=t.get(e.value);o.Utils.exists(i)?i.selected=!0:t.values.push(e.cloneWithZeroOccurrences())}),a.each(e.getExcluded(),function(e){var i=t.get(e.value);if(o.Utils.exists(i))i.excluded=!0;else if(0!=e.occurrences){var n=e.occurrences,s=e.cloneWithZeroOccurrences();s.occurrences=n,t.values.push(s)}else t.values.push(e.cloneWithZeroOccurrences())})},e.prototype.updateCountsFromNewValues=function(e){n.Assert.exists(e),this.values=a.map(this.values,function(t){var i=e.get(t.value);return o.Utils.exists(i)?(t.updateCountsFromNewValue(i),t):null==t.occurrences?t.cloneWithZeroOccurrences():t})},e.prototype.updateDeltaWithFilteredFacetValues=function(e,t){var i=this;n.Assert.exists(e),a.each(this.values,function(n){var s=e.get(n.value);n.waitingForDelta=!1,o.Utils.exists(s)?n.occurrences-s.occurrences>0?i.hasOnlyExcludedValues()?(n.delta=null,n.occurrences=s.occurrences):n.delta=n.occurrences-s.occurrences:n.delta=null:n.selected||n.excluded||(t&&0==e.values.length?(n.delta=null,n.occurrences=0):n.delta=n.occurrences)})},e.prototype.mergeWithUnfilteredFacetValues=function(e){var t=this;n.Assert.exists(e);var i=[];a.each(e.values,function(e){var n=t.get(e.value);o.Utils.exists(n)?n.occurrences==e.occurrences?i.push(n):i.push(e.cloneWithDelta(e.occurrences,e.occurrences-n.occurrences)):i.push(e.cloneWithDelta(e.occurrences,e.occurrences))});var s=0;a.each(this.values,function(t){var n=e.get(t.value);if(o.Utils.exists(n)){for(var a=0;a<i.length;a++)if(i[a].value==t.value){s=a+1;break}}else(t.selected||t.excluded)&&(i.splice(s,0,t),s++)}),this.values=i},e.prototype.sort=function(e){var t=e.facetValuesOrder,i=e.numberOfValues;this.values=t.reorderValuesIfUsingAlphabeticalSort(this.values),this.sortValuesDependingOnStatus(i),this.values=t.reorderValuesIfUsingCustomSort(this.values)},e.prototype.sortValuesDependingOnStatus=function(e){this.values=a.sortBy(this.values,function(e){return e.selected?1:e.excluded?3:2}),this.ensureExcludedValuesAreDisplayed(e)},e.prototype.ensureExcludedValuesAreDisplayed=function(e){if(null!=e&&e<this.values.length){var t=this.getExcluded().length,i=this.values.splice(this.values.length-t,t);(n=this.values).splice.apply(n,[e-t,0].concat(i))}var n},e}();t.FacetValues=r},616:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(481),s=i(0),a=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.facet=t,n.facetValueElementKlass=i,n}return n(t,e),t.prototype.sortFacetValues=function(e){var t=this;if(void 0===e&&(e=this.hierarchyFacetValues),!this.facet.shouldReshuffleFacetValuesClientSide){var i=s.map(e,function(e,t){return{hierarchy:e,idx:t}});if(0!=this.facet.options.levelStart&&this.facet.options.sortCriteria&&-1!=this.facet.options.sortCriteria.toLowerCase().indexOf("alpha")){var n=-1!=this.facet.options.sortCriteria.toLowerCase().indexOf("descending");i=i.sort(function(e,i){var o=null!=s.find(t.facet.topLevelHierarchy,function(t){return t.facetValue.value.toLowerCase()==e.hierarchy.value.toLowerCase()}),a=null!=s.find(t.facet.topLevelHierarchy,function(t){return t.facetValue.value.toLowerCase()==e.hierarchy.value.toLowerCase()});if(o&&a){var r=t.facet.getValueCaption(e.hierarchy),l=t.facet.getValueCaption(i.hierarchy),c=r.localeCompare(l);return n?-1*c:c}return e.idx-i.idx})}return i=i.sort(function(e,i){if(e.hierarchy.selected===i.hierarchy.selected){var n=t.facet.getValueFromHierarchy(e.hierarchy),o=t.facet.getValueFromHierarchy(i.hierarchy);return n.hasChildSelected===o.hasChildSelected?e.idx-i.idx:n.hasChildSelected?-1:1}return e.hierarchy.selected?-1:1}),s.pluck(i,"hierarchy")}return e},t.prototype.getValuesToBuildWith=function(){return this.facet.shouldReshuffleFacetValuesClientSide?this.hierarchyFacetValues:this.sortFacetValues()},t}(o.FacetValuesList);t.HierarchicalFacetValuesList=a},617:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(213),s=i(39),a=i(0),r=function(e){function t(t){var i=e.call(this,t)||this;return i.facet=t,i}return n(t,e),t.prototype.search=function(e,t){var i=this;void 0===t&&(t=e.nbResults);var n=s.FacetUtils.getRegexToUseForFacetSearch(this.facet.facetSearch.getValueInInputForFacetSearch(),this.facet.options.facetSearchIgnoreAccents);return new Promise(function(t){var o=a.chain(i.facet.getAllValueHierarchy()).toArray().filter(function(t){return null!=i.facet.getValueCaption(t.facetValue).match(n)&&!a.contains(a.map(e.alwaysExclude,function(e){return e.toLowerCase()}),t.facetValue.value.toLowerCase())}).first(i.facet.options.numberOfValuesInFacetSearch).value();t(a.map(o,function(e){return e.facetValue}))})},t.prototype.getAllowedValuesFromSelected=function(){return[]},t}(o.FacetQueryController);t.HierarchicalFacetQueryController=r},618:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(480),s=i(619),a=function(e){function t(t){var i=e.call(this,t,s.HierarchicalFacetSearchValueElement)||this;return i.facet=t,i}return n(t,e),t}(o.FacetSearchValuesList);t.HierarchicalFacetSearchValuesList=a},619:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(127),s=function(e){function t(t,i,n){var o=e.call(this,t,i,n)||this;return o.facet=t,o.facetValue=i,o.keepDisplayedValueNextTime=n,o}return n(t,e),t.prototype._handleSelectValue=function(t){this.facet.open(this.facetValue),e.prototype.handleSelectValue.call(this,t)},t.prototype._handleExcludeClick=function(t){this.facet.open(this.facetValue),e.prototype.handleExcludeClick.call(this,t)},t}(o.FacetValueElement);t.HierarchicalFacetSearchValueElement=s},620:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(479),s=i(172),a=i(112),r=i(4),l=i(26),c=i(0),u=function(e){function t(t,i,n){var o=e.call(this,t,i,n)||this;return o.facet=t,o.facetSearchValuesListKlass=i,o}return n(t,e),t.prototype.buildParamsForExcludingCurrentlyDisplayedValues=function(){var t=e.prototype.buildParamsForExcludingCurrentlyDisplayedValues.call(this);return t.alwaysExclude=this.facet.getDisplayedValues(),this.facet.facetSearch.currentlyDisplayedResults&&(t.alwaysExclude=t.alwaysExclude.concat(this.facet.facetSearch.currentlyDisplayedResults)),t},t.prototype.selectAllValuesMatchingSearch=function(){var e=this;this.facet.showWaitingAnimation();var t=new s.FacetSearchParameters(this.facet);t.nbResults=this.facet.numberOfValues,t.alwaysInclude=this.facet.getDisplayedValues(),t.setValueToSearch(this.getValueInInputForFacetSearch()),this.facet.facetQueryController.search(t).then(function(t){e.dismissSearchResults(),l.ModalBox.close(!0);var i=e.getFacetValues(t);e.facet.processFacetSearchAllResultsSelected(i)}),this.dismissSearchResults()},t.prototype.getFacetValues=function(e){var t=this,i=[];return c.each(e,function(e){var n=t.facet.getValueFromHierarchy(e.value);i.push(t.createFacetValuesFromHierarchy(n))}),c.flatten(i)},t.prototype.createFacetValuesFromHierarchy=function(e){var t=this,i=[],n=e.facetValue.value,o=this.facet.values.get(n);r.Utils.exists(o)||(o=a.FacetValue.create(n)),o.selected=!0,o.excluded=!1,i.push(o);var s=e.childs;return c.each(s,function(e){var n=t.facet.getValueFromHierarchy(e.facetValue.value);i.push(t.createFacetValuesFromHierarchy(n))}),i},t}(o.FacetSearch);t.HierarchicalFacetSearch=u},621:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(478),s=i(622),a=i(1),r=i(0),l=function(e){function t(t,i,n){var o=e.call(this,t,i,s.HierarchicalBreadcrumbValueElement)||this;return o.facet=t,o.facetValues=i,o.valueHierarchy=n,o}return n(t,e),t.prototype.buildAsString=function(){if(this.build(),this.elem){return this.facet.options.title+": "+r.map(a.$$(this.elem).findAll(".coveo-facet-breadcrumb-value"),function(e){return r.each(a.$$(e).findAll(".coveo-hierarchical-breadcrumb-separator"),function(e){a.$$(e).text("▸")}),a.$$(e).text()}).join(", ")}return""},t}(o.BreadcrumbValueList);t.HierarchicalBreadcrumbValuesList=l},622:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(477),s=i(0),a=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.facet=t,n.facetValue=i,n}return n(t,e),t.prototype.build=function(){var t=e.prototype.build.call(this);t.addClass("coveo-hierarchical-facet-value");var i=t.find(".coveo-facet-breadcrumb-caption"),n=this.facetValue.value.split(this.facet.options.delimitingCharacter);return n=s.map(n,function(e){return s.escape(e)}),i.innerHTML=n.join("<span class='coveo-hierarchical-breadcrumb-separator'></span>"),t},t}(o.BreadcrumbValueElement);t.HierarchicalBreadcrumbValueElement=a},623:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(483),s=i(624),a=function(e){function t(t,i,n){var o=e.call(this,t,i,n,s.OmniboxHierarchicalValueElement)||this;return o.facet=t,o.facetValues=i,o.omniboxObject=n,o}return n(t,e),t}(o.OmniboxValuesList);t.OmniboxHierarchicalValuesList=a},624:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(482),s=function(e){function t(t,i,n){var o=e.call(this,t,i,n)||this;return o.facet=t,o.facetValue=i,o.eventArg=n,o}return n(t,e),t.prototype._handleSelectValue=function(t){this.facet.open(this.facetValue),e.prototype.handleSelectValue.call(this,t)},t.prototype._handleExcludeClick=function(t){this.facet.open(this.facetValue),e.prototype.handleExcludeClick.call(this,t)},t}(o.OmniboxValueElement);t.OmniboxHierarchicalValueElement=s},625:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=i(127),s=function(e){function t(t,i,n){var o=e.call(this,t,i,n)||this;return o.facet=t,o.facetValue=i,o.keepDisplayedValueNextTime=n,o}return n(t,e),t}(o.FacetValueElement);t.HierarchicalFacetValueElement=s},626:function(e,t){},67:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};Object.defineProperty(t,"__esModule",{value:!0}),i(535),i(536);var s=i(0),a=i(213),r=i(34),l=i(33),c=i(11),u=i(83),h=i(3),p=i(5),d=i(31),f=i(18),m=i(13),y=i(6),v=i(15),g=i(45),b=i(173),S=i(24),C=i(1),V=i(16),F=i(12),E=i(4),O=i(10),w=i(7),A=i(8),x=i(2),R=i(82),$=i(174),T=i(477),I=i(478),D=i(476),L=i(479),P=i(172),_=i(480),N=i(474),M=i(475),B=i(39),H=i(127),U=i(112),k=i(554),Q=i(481),j=i(470),W=i(482),q=i(483),G=i(469),K=function(e){function t(i,n,o,a){void 0===a&&(a=t.ID);var r=e.call(this,i,a,o)||this;return r.element=i,r.options=n,r.keepDisplayedValuesNextTime=!1,r.values=new k.FacetValues,r.currentPage=0,r.firstQuery=!0,r.isFieldValueCompatible=!0,r.canFetchMore=!0,r.showingWaitAnimation=!1,r.listenToQueryStateChange=!0,r.options=A.ComponentOptions.initComponentOptions(i,t,n),null!=r.options.valueCaption&&(r.options.availableSorts=s.filter(r.options.availableSorts,function(e){return!/^alpha.*$/.test(e)}),r.logger.warn("Because the "+r.options.field+" facet is using value captions, alphabetical sorts are disabled.")),$.ResponsiveFacets.init(r.root,r,r.options),r.omniboxZIndex=t.omniboxIndex,t.omniboxIndex--,r.checkForComputedFieldAndSort(),r.checkForValueCaptionType(),r.checkForCustomSort(),r.initDependsOnManager(),r.initFacetQueryController(),r.initQueryEvents(),r.initQueryStateEvents(),r.initComponentStateEvents(),r.initOmniboxEvents(),r.initBreadCrumbEvents(),r.initSearchAlertEvents(),r.updateNumberOfValues(),r.bind.oneRootElement(c.QueryEvents.querySuccess,function(){r.firstQuery=!1}),r}return n(t,e),t.prototype.setExpandedFacetSearchAccessibilityAttributes=function(e){if(this.searchContainer){p.Assert.exists(e);this.searchContainer.accessibleElement.setAttribute("aria-expanded",(!0).toString())}},t.prototype.setCollapsedFacetSearchAccessibilityAttributes=function(){this.searchContainer&&this.searchContainer.accessibleElement.setAttribute("aria-expanded",(!1).toString())},t.prototype.isCurrentlyDisplayed=function(){return!!C.$$(this.element).isVisible()&&(!!C.$$(this.element).hasClass("coveo-active")||!C.$$(this.element).hasClass("coveo-facet-empty"))},t.prototype.createDom=function(){var e=this;if(this.initBottomAndTopSpacer(),this.buildFacetContent(),this.updateAppearanceDependingOnState(),this.facetSettings&&this.options.enableSettingsFacetState){var t=s.once(function(){e.facetSettings.loadSavedState.apply(e.facetSettings)});this.bind.onRootElement(c.QueryEvents.newQuery,t)}},t.prototype.selectValue=function(e){p.Assert.exists(e),this.ensureDom(),this.logger.info("Selecting facet value",this.facetValuesList.select(e)),this.facetValueHasChanged()},t.prototype.selectMultipleValues=function(e){var t=this;p.Assert.exists(e),this.ensureDom(),s.each(e,function(e){t.logger.info("Selecting facet value",t.facetValuesList.select(e))}),this.facetValueHasChanged()},t.prototype.deselectValue=function(e){p.Assert.exists(e),this.ensureDom(),this.logger.info("Deselecting facet value",this.facetValuesList.unselect(e)),this.facetValueHasChanged()},t.prototype.deselectMultipleValues=function(e){var t=this;p.Assert.exists(e),this.ensureDom(),s.each(e,function(e){t.logger.info("Deselecting facet value",t.facetValuesList.unselect(e))}),this.facetValueHasChanged()},t.prototype.excludeValue=function(e){p.Assert.exists(e),this.ensureDom(),this.logger.info("Excluding facet value",this.facetValuesList.exclude(e)),this.facetValueHasChanged()},t.prototype.excludeMultipleValues=function(e){var t=this;p.Assert.exists(e),this.ensureDom(),s.each(e,function(e){t.logger.info("Excluding facet value",t.facetValuesList.exclude(e))}),this.facetValueHasChanged()},t.prototype.unexcludeValue=function(e){p.Assert.exists(e),this.ensureDom(),this.logger.info("Unexcluding facet value",this.facetValuesList.unExclude(e)),this.facetValueHasChanged()},t.prototype.unexcludeMultipleValues=function(e){var t=this;p.Assert.exists(e),this.ensureDom(),s.each(e,function(e){t.logger.info("Unexcluding facet value",t.facetValuesList.unExclude(e))}),this.facetValueHasChanged()},t.prototype.toggleSelectValue=function(e){p.Assert.exists(e),this.ensureDom(),this.logger.info("Toggle select facet value",this.facetValuesList.toggleSelect(e)),this.facetValueHasChanged()},t.prototype.toggleExcludeValue=function(e){p.Assert.exists(e),this.ensureDom(),this.logger.info("Toggle exclude facet value",this.facetValuesList.toggleExclude(e)),this.facetValueHasChanged()},t.prototype.getDisplayedValues=function(){return s.pluck(this.getDisplayedFacetValues(),"value")},t.prototype.getDisplayedFacetValues=function(){this.ensureDom();var e=this.facetValuesList.getAllCurrentlyDisplayed();return s.map(e,function(e){return e.facetValue})},t.prototype.getSelectedValues=function(){return this.ensureDom(),s.map(this.values.getSelected(),function(e){return e.value})},t.prototype.hasSelectedValue=function(e){var t=this.values.get(e);return t&&t.selected},t.prototype.getExcludedValues=function(){return this.ensureDom(),s.map(this.values.getExcluded(),function(e){return e.value})},t.prototype.reset=function(){this.ensureDom(),this.values.reset(),this.rebuildValueElements(),this.updateAppearanceDependingOnState(),this.updateQueryStateModel()},t.prototype.switchToAnd=function(){this.ensureDom(),this.logger.info("Switching to AND"),this.facetHeader.switchToAnd()},t.prototype.switchToOr=function(){this.ensureDom(),this.logger.info("Switching to OR"),this.facetHeader.switchToOr()},t.prototype.getEndpoint=function(){return this.queryController.getEndpoint()},t.prototype.updateSort=function(e){this.ensureDom(),this.options.sortCriteria!=e&&(this.options.sortCriteria=e,this.usageAnalytics.logCustomEvent(O.analyticsActionCauseList.facetUpdateSort,{criteria:e,facetId:this.options.id,facetField:this.options.field.toString(),facetTitle:this.options.title},this.element),this.triggerNewQuery())},t.prototype.unfadeInactiveValuesInMainList=function(){C.$$(this.element).removeClass("coveo-facet-fade")},t.prototype.fadeInactiveValuesInMainList=function(e){C.$$(this.element).addClass("coveo-facet-fade")},t.prototype.showWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation||(C.$$(this.headerElement).find(".coveo-facet-header-wait-animation").style.visibility="visible",this.showingWaitAnimation=!0)},t.prototype.hideWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation&&(C.$$(this.headerElement).find(".coveo-facet-header-wait-animation").style.visibility="hidden",this.showingWaitAnimation=!1)},t.prototype.processFacetSearchAllResultsSelected=function(e){var t=this,i=[];s.each(e,function(e){t.ensureFacetValueIsInList(e),i.push(e.value)});var n=this.values.getSelected().concat(this.values.getExcluded());this.numberOfValues=n.length+s.difference(n,e).length,this.numberOfValues=Math.max(this.numberOfValues,this.options.numberOfValues),this.updateQueryStateModel(),this.triggerNewQuery(function(){return t.usageAnalytics.logSearchEvent(O.analyticsActionCauseList.facetSelectAll,{facetId:t.options.id,facetField:t.options.field.toString(),facetTitle:t.options.title})})},t.prototype.pinFacetPosition=function(){this.options.preservePosition&&(this.pinnedViewportPosition=this.element.getBoundingClientRect().top)},t.prototype.getValueCaption=function(e){p.Assert.exists(e);var t="string"==typeof e?e:e.lookupValue||e.value,i=B.FacetUtils.tryToGetTranslatedCaption(this.options.field,t);if(E.Utils.exists(this.options.valueCaption)&&("object"==typeof this.options.valueCaption&&(i=this.options.valueCaption[t]||i),"function"==typeof this.options.valueCaption)){var n=e instanceof U.FacetValue?e:U.FacetValue.create(e),o=this.facetValuesList.get(n).facetValue;i=this.options.valueCaption.call(this,o)}return i},t.prototype.getCaptionForStringValue=function(e){return p.Assert.exists(e),this.getValueCaption(e)},t.prototype.showMore=function(){this.currentPage=Math.floor((this.numberOfValues-this.options.numberOfValues)/this.options.pageSize)+1,this.updateNumberOfValues(),this.nbAvailableValues>=this.numberOfValues||!this.canFetchMore?this.rebuildValueElements():this.triggerMoreQuery()},t.prototype.showLess=function(){C.$$(this.lessElement).removeClass("coveo-active"),this.currentPage=0,this.updateNumberOfValues(),C.$$(this.moreElement).addClass("coveo-active"),this.values.sortValuesDependingOnStatus(this.numberOfValues),this.rebuildValueElements(),this.logAnalyticsFacetShowMoreLess(O.analyticsActionCauseList.facetShowLess)},t.prototype.collapse=function(){this.ensureDom(),this.facetHeader&&this.facetHeader.collapseFacet()},t.prototype.expand=function(){this.ensureDom(),this.facetHeader&&this.facetHeader.expandFacet()},t.prototype.triggerNewQuery=function(e){e?this.queryController.executeQuery({beforeExecuteQuery:e}):this.queryController.executeQuery({ignoreWarningSearchEvent:!0}),this.showWaitingAnimation()},t.prototype.handleDeferredQuerySuccess=function(e){p.Assert.exists(e),this.unfadeInactiveValuesInMainList(),this.hideWaitingAnimation();var t=e.results.groupByResults[this.facetQueryController.lastGroupByRequestIndex];this.facetQueryController.lastGroupByResult=t,t||(this.keepDisplayedValuesNextTime=!1),1==this.values.getAll().length&&(this.keepDisplayedValuesNextTime=!1),this.processNewGroupByResults(t)},t.prototype.handleQueryError=function(){this.updateValues(new k.FacetValues),this.updateAppearanceDependingOnState(),this.hideWaitingAnimation()},t.prototype.handlePopulateBreadcrumb=function(e){if(p.Assert.exists(e),this.values.hasSelectedOrExcludedValues()){var t=new I.BreadcrumbValueList(this,this.values.getSelected().concat(this.values.getExcluded()),T.BreadcrumbValueElement).build();e.breadcrumbs.push({element:t})}},t.prototype.handlePopulateSearchAlerts=function(e){if(this.values.hasSelectedOrExcludedValues()){var t=this.values.getExcluded(),i=this.values.getSelected();s.isEmpty(t)||e.text.push({value:new I.BreadcrumbValueList(this,t,T.BreadcrumbValueElement).buildAsString(),lineThrough:!0}),s.isEmpty(i)||e.text.push({value:new I.BreadcrumbValueList(this,i,T.BreadcrumbValueElement).buildAsString(),lineThrough:!1})}},t.prototype.initFacetQueryController=function(){this.facetQueryController=new a.FacetQueryController(this)},t.prototype.initFacetValuesList=function(){this.facetValuesList=new Q.FacetValuesList(this,H.FacetValueElement),this.element.appendChild(this.facetValuesList.build())},t.prototype.initFacetSearch=function(){this.facetSearch=new L.FacetSearch(this,_.FacetSearchValuesList,this.root),this.element.appendChild(this.facetSearch.build())},t.prototype.facetValueHasChanged=function(){var e=this;this.updateQueryStateModel(),this.rebuildValueElements(),d.Defer.defer(function(){e.updateAppearanceDependingOnState()})},t.prototype.updateAppearanceDependingOnState=function(){C.$$(this.element).toggleClass("coveo-active",this.values.hasSelectedOrExcludedValues()),C.$$(this.element).toggleClass("coveo-facet-empty",!this.isAnyValueCurrentlyDisplayed()),C.$$(this.facetHeader.eraserElement).toggleClass("coveo-facet-header-eraser-visible",this.values.hasSelectedOrExcludedValues())},t.prototype.initQueryEvents=function(){var e=this;this.bind.onRootElement(c.QueryEvents.duringQuery,function(){return e.handleDuringQuery()}),this.bind.onRootElement(c.QueryEvents.buildingQuery,function(t){return e.handleBuildingQuery(t)}),this.bind.onRootElement(c.QueryEvents.doneBuildingQuery,function(t){return e.handleDoneBuildingQuery(t)}),this.bind.onRootElement(c.QueryEvents.deferredQuerySuccess,function(t){return e.handleDeferredQuerySuccess(t)}),this.bind.onRootElement(c.QueryEvents.queryError,function(){return e.handleQueryError()})},t.prototype.initQueryStateEvents=function(){var e=this;this.includedAttributeId=m.QueryStateModel.getFacetId(this.options.id),this.excludedAttributeId=m.QueryStateModel.getFacetId(this.options.id,!1),this.operatorAttributeId=m.QueryStateModel.getFacetOperator(this.options.id),this.lookupValueAttributeId=m.QueryStateModel.getFacetLookupValue(this.options.id),this.queryStateModel.registerNewAttribute(this.includedAttributeId,[]),this.queryStateModel.registerNewAttribute(this.excludedAttributeId,[]),this.queryStateModel.registerNewAttribute(this.operatorAttributeId,""),this.queryStateModel.registerNewAttribute(this.lookupValueAttributeId,{}),this.bind.onQueryState(f.MODEL_EVENTS.CHANGE,void 0,function(t){return e.handleQueryStateChanged(t)})},t.prototype.initComponentStateEvents=function(){this.componentStateId=m.QueryStateModel.getFacetId(this.options.id),this.componentStateModel.registerComponent(this.componentStateId,this)},t.prototype.initOmniboxEvents=function(){var e=this;this.options.includeInOmnibox&&this.bind.onRootElement(l.OmniboxEvents.populateOmnibox,function(t){return e.handlePopulateOmnibox(t)})},t.prototype.initBreadCrumbEvents=function(){var e=this;this.options.includeInBreadcrumb&&(this.bind.onRootElement(r.BreadcrumbEvents.populateBreadcrumb,function(t){return e.handlePopulateBreadcrumb(t)}),this.bind.onRootElement(r.BreadcrumbEvents.clearBreadcrumb,function(t){return e.handleClearBreadcrumb()}))},t.prototype.initSearchAlertEvents=function(){var e=this;this.bind.onRootElement(u.SearchAlertsEvents.searchAlertsPopulateMessage,function(t){return e.handlePopulateSearchAlerts(t)})},t.prototype.handleOmniboxWithStaticValue=function(e){var t=this,i=new RegExp("^"+e.completeQueryExpression.regex.source,"i"),n=s.first(s.filter(this.getDisplayedValues(),function(e){var n=t.getValueCaption(t.facetValuesList.get(e).facetValue);return i.test(n)}),this.options.numberOfValuesInOmnibox),o=s.map(n,function(e){return t.facetValuesList.get(e).facetValue}),a=new q.OmniboxValuesList(this,o,e,W.OmniboxValueElement).build();e.rows.push({element:a,zIndex:this.omniboxZIndex})},t.prototype.processNewGroupByResults=function(e){this.logger.trace("Displaying group by results",e),void 0!=e&&void 0!=e.values&&(this.nbAvailableValues=e.values.length);var t=new k.FacetValues(e);this.updateValues(t),this.canFetchMore=this.numberOfValues<this.nbAvailableValues,this.values.hasSelectedOrExcludedValues()&&!this.options.useAnd&&this.options.isMultiValueField?this.triggerUpdateDeltaQuery(s.filter(this.values.getAll(),function(e){return!e.selected&&!e.excluded})):this.values.getSelected().length>0&&!this.options.useAnd&&this.values.updateDeltaWithFilteredFacetValues(new k.FacetValues,this.options.isMultiValueField),this.values.hasSelectedOrExcludedValues()&&!this.options.useAnd&&this.options.isMultiValueField||(this.rebuildValueElements(),this.updateAppearanceDependingOnState(),this.ensurePinnedFacetHasntMoved()),this.keepDisplayedValuesNextTime=!1},t.prototype.updateQueryStateModel=function(){this.listenToQueryStateChange=!1,this.updateExcludedQueryStateModel(),this.updateIncludedQueryStateModel(),this.facetHeader.updateOperatorQueryStateModel(),this.updateLookupValueQueryStateModel(),this.listenToQueryStateChange=!0},t.prototype.rebuildValueElements=function(){this.updateNumberOfValues(),this.facetValuesList.rebuild(this.numberOfValues),this.shouldRenderMoreLess()?(this.updateMoreLess(),this.shouldRenderFacetSearch()&&this.updateSearchElement(this.nbAvailableValues>this.numberOfValues)):this.shouldRenderFacetSearch()&&this.updateSearchElement()},t.prototype.updateSearchElement=function(e){var t=this;if(void 0===e&&(e=!0),e){var i=new G.ValueElementRenderer(this,U.FacetValue.create(y.l("Search")));this.searchContainer=i.build().withNo([i.excludeIcon,i.icon]),C.$$(this.searchContainer.listItem).addClass("coveo-facet-search-button"),(new v.AccessibleButton).withElement(this.searchContainer.accessibleElement).withLabel(y.l("SearchFacetResults",this.options.title)).withEnterKeyboardAction(function(e){return t.toggleSearchMenu(e)}).build(),this.setCollapsedFacetSearchAccessibilityAttributes(),S.DeviceUtils.isMobileDevice()&&C.$$(this.searchContainer.label).on("click",function(e){return t.toggleSearchMenu(e)}),C.$$(this.searchContainer.checkbox).on("change",function(){C.$$(t.element).addClass("coveo-facet-searching"),t.facetSearch.focus()}),this.facetValuesList.valueContainer.appendChild(this.searchContainer.listItem)}},t.prototype.updateMoreLess=function(e,t){void 0===e&&(e=this.getMinimumNumberOfValuesToDisplay()<this.numberOfValues),void 0===t&&(t=this.nbAvailableValues>this.numberOfValues),e?C.$$(this.lessElement).addClass("coveo-active"):C.$$(this.lessElement).removeClass("coveo-active"),t?C.$$(this.moreElement).addClass("coveo-active"):C.$$(this.moreElement).removeClass("coveo-active"),e||t?C.$$(this.footerElement).removeClass("coveo-facet-empty"):C.$$(this.footerElement).addClass("coveo-facet-empty")},t.prototype.handleClickMore=function(){this.showMore()},t.prototype.handleClickLess=function(){this.showLess()},t.prototype.toggleSearchMenu=function(e){var t=this.searchContainer;t.checkbox.getAttribute("checked")?t.checkbox.removeAttribute("checked"):t.checkbox.setAttribute("checked","checked"),C.$$(t.checkbox).trigger("change"),e.stopPropagation(),e.preventDefault()},t.prototype.checkForComputedFieldAndSort=function(){-1!=this.options.sortCriteria.toLowerCase().indexOf("computedfield")&&E.Utils.isNullOrUndefined(this.options.computedField)&&this.logger.warn("Sort criteria is specified as ComputedField, but the facet uses no computed field. Facet will always be empty !",this)},t.prototype.checkForValueCaptionType=function(){this.options.valueCaption&&"function"==typeof this.options.valueCaption&&(this.options.enableFacetSearch=!1,this.options.includeInOmnibox=!1,this.logger.warn("Using a function as valueCaption is now deprecated. Use a json key value pair instead. Facet search and omnibox has been disabled for this facet",this))},t.prototype.checkForCustomSort=function(){void 0==this.options.customSort||s.contains(this.options.availableSorts,"custom")||this.options.availableSorts.unshift("custom"),"custom"==this.options.availableSorts[0]&&(this.options.sortCriteria="nosort")},t.prototype.initDependsOnManager=function(){var e=this,t={reset:function(){return e.reset()},ref:this};this.dependsOnManager=new b.DependsOnManager(t)},t.prototype.dependsOnUpdateParentDisplayValue=function(){var e=this;if(this.options.dependsOn){var i=g.ComponentsTypes.getAllFacetInstancesFromElement(this.root).filter(function(i){return i instanceof t&&i.options.id===e.options.dependsOn});if(!i.length)return void this.logger.warn('Unable to find a Facet with the id or field "'+this.options.dependsOn+'".',"The master facet values can't be updated.");if(i.length>1)return void this.logger.warn('Multiple facets with id "'+this.options.dependsOn+'" found.',"A given facet may only depend on a single other facet.","Ensure that each facet in your search interface has a unique id.","The master facet cannot be updated.",i);i[0].keepDisplayedValuesNextTime=!1}},t.prototype.initBottomAndTopSpacer=function(){var e=this,t=C.$$(this.options.paddingContainer).find(".coveo-bottomSpace"),i=C.$$(this.options.paddingContainer).find(".coveo-topSpace");this.options.preservePosition&&(C.$$(this.options.paddingContainer).on("mouseleave",function(){return e.unpinFacetPosition()}),this.pinnedTopSpace=i,this.pinnedBottomSpace=t,this.pinnedTopSpace||(this.pinnedTopSpace=document.createElement("div"),C.$$(this.pinnedTopSpace).addClass("coveo-topSpace"),C.$$(this.pinnedTopSpace).insertBefore(this.options.paddingContainer.firstChild)),this.pinnedBottomSpace||(this.pinnedBottomSpace=document.createElement("div"),C.$$(this.pinnedBottomSpace).addClass("coveo-bottomSpace"),this.options.paddingContainer.appendChild(this.pinnedBottomSpace)))},t.prototype.updateIncludedQueryStateModel=function(){var e={included:this.getSelectedValues(),title:this.includedAttributeId};this.queryStateModel.set(this.includedAttributeId,e.included)},t.prototype.updateExcludedQueryStateModel=function(){var e={title:this.excludedAttributeId,excluded:this.getExcludedValues()};this.queryStateModel.set(this.excludedAttributeId,e.excluded)},t.prototype.updateLookupValueQueryStateModel=function(){if(this.options.lookupField){var e={};s.each(this.values.getSelected().concat(this.values.getExcluded()),function(t){e[t.value]=t.lookupValue}),this.queryStateModel.set(this.lookupValueAttributeId,e)}},t.prototype.handleQueryStateChangedOperator=function(e){"and"==e?this.switchToAnd():"or"==e&&this.switchToOr()},t.prototype.handleQueryStateChangedIncluded=function(e){var t=s.difference(this.getSelectedValues(),e);E.Utils.isNonEmptyArray(t)&&this.deselectMultipleValues(t),E.Utils.arrayEqual(this.getSelectedValues(),e,!1)||this.selectMultipleValues(e)},t.prototype.handleQueryStateChangedExcluded=function(e){var t=s.difference(this.getExcludedValues(),e);E.Utils.isNonEmptyArray(t)&&this.unexcludeMultipleValues(t),E.Utils.arrayEqual(this.getExcludedValues(),e,!1)||this.excludeMultipleValues(e)},t.prototype.handleLookupvalueChanged=function(e){var t=this;s.each(e,function(e,i){t.facetValuesList.get(decodeURIComponent(i)).facetValue.lookupValue=decodeURIComponent(e)})},t.prototype.handleQueryStateChanged=function(e){p.Assert.exists(e),this.ensureDom(),this.dependsOnUpdateParentDisplayValue();var t=function(e){return e&&(e=s.map(e,function(e){return e.trim()})),e},i=e.attributes,n=t(i[this.includedAttributeId]),o=t(i[this.excludedAttributeId]),a=i[this.operatorAttributeId],r=i[this.lookupValueAttributeId];this.listenToQueryStateChange&&(E.Utils.isNullOrEmptyString(a)||this.handleQueryStateChangedOperator(a),E.Utils.isNullOrUndefined(n)||this.handleQueryStateChangedIncluded(n),E.Utils.isNullOrUndefined(o)||this.handleQueryStateChangedExcluded(o),E.Utils.isNullOrUndefined(r)||this.handleLookupvalueChanged(r))},t.prototype.handlePopulateOmnibox=function(e){p.Assert.exists(e),p.Assert.exists(e.completeQueryExpression),this.queryController.ensureCreatedQueryBuilder(),this.canFetchMore?this.handleOmniboxWithSearchInFacet(e):this.handleOmniboxWithStaticValue(e)},t.prototype.handleOmniboxWithSearchInFacet=function(e){var t=this,i=new RegExp("^"+e.completeQueryExpression.regex.source,"i"),n=new Promise(function(n,o){var a=new P.FacetSearchParameters(t);a.setValueToSearch(e.completeQueryExpression.word),a.nbResults=t.options.numberOfValuesInOmnibox,t.facetQueryController.search(a).then(function(o){var a=s.map(s.filter(o,function(e){return i.test(e.lookupValue)}),function(e){return t.values.get(e.lookupValue)||U.FacetValue.create(e)}),r=new q.OmniboxValuesList(t,a,e,W.OmniboxValueElement).build();n({element:r,zIndex:t.omniboxZIndex})}).catch(function(){n({element:void 0})})});e.rows.push({deferred:n})},t.prototype.handleDuringQuery=function(){this.ensureDom(),this.keepDisplayedValuesNextTime||this.fadeInactiveValuesInMainList(this.options.facetSearchDelay)},t.prototype.handleBuildingQuery=function(e){if(p.Assert.exists(e),p.Assert.exists(e.queryBuilder),this.facetQueryController.prepareForNewQuery(),this.values.hasSelectedOrExcludedValues()){var t=this.facetQueryController.computeOurFilterExpression();this.logger.trace("Putting filter in query",t),e.queryBuilder.advancedExpression.add(t)}},t.prototype.handleDoneBuildingQuery=function(e){p.Assert.exists(e),p.Assert.exists(e.queryBuilder);var t=e.queryBuilder;this.facetQueryController.putGroupByIntoQueryBuilder(t)},t.prototype.handleClearBreadcrumb=function(){this.reset()},t.prototype.updateValues=function(e){p.Assert.exists(e),this.keepDisplayedValuesNextTime?this.values.updateCountsFromNewValues(e):this.values=this.consolidateAndSortNewFacetValues(e),this.updateNumberOfValues()},t.prototype.consolidateAndSortNewFacetValues=function(e){return e.importActiveValuesFromOtherList(this.values),e.sort(this.optionsToSortFacetValues),e},Object.defineProperty(t.prototype,"optionsToSortFacetValues",{get:function(){return{facetValuesOrder:this.facetValuesOrder,numberOfValues:this.numberOfValues}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"facetValuesOrder",{get:function(){return new j.FacetValuesOrder(this,this.facetSort)},enumerable:!0,configurable:!0}),t.prototype.ensureFacetValueIsInList=function(e){p.Assert.exists(e),this.values.contains(e.value)||this.values.add(e)},t.prototype.isAnyValueCurrentlyDisplayed=function(){return!this.values.isEmpty()},t.prototype.buildFacetContent=function(){this.headerElement=this.buildHeader(),this.element.appendChild(this.headerElement),this.initFacetValuesList(),this.shouldRenderFacetSearch()&&this.initFacetSearch(),this.shouldRenderMoreLess()&&(this.moreElement=this.buildMore(),this.lessElement=this.buildLess()),this.footerElement=this.buildFooter(),this.element.appendChild(this.footerElement),this.lessElement&&this.moreElement&&(this.footerElement.appendChild(this.lessElement),this.footerElement.appendChild(this.moreElement))},t.prototype.buildHeader=function(){var e=this.options.headerIcon;this.options.headerIcon==this.options.field&&(e=void 0),this.facetHeader=new D.FacetHeader({facetElement:this.element,title:this.options.title,icon:e,field:this.options.field,enableClearElement:!0,enableCollapseElement:this.options.enableCollapse,facet:this,settingsKlass:this.options.enableSettings?N.FacetSettings:void 0,sortKlass:M.FacetSort,availableSorts:this.options.availableSorts});var t=this.facetHeader.build();return this.facetSettings=this.facetHeader.settings,this.facetSort=this.facetHeader.sort,t},t.prototype.unpinFacetPosition=function(){this.shouldFacetUnpin()&&this.options.preservePosition&&(C.$$(this.pinnedTopSpace).addClass("coveo-with-animation"),C.$$(this.pinnedBottomSpace).addClass("coveo-with-animation"),this.pinnedTopSpace.style.height="0px",this.pinnedBottomSpace.style.height="0px"),this.unpinnedViewportPosition=void 0,this.pinnedViewportPosition=void 0},t.prototype.isFacetPinned=function(){return E.Utils.exists(this.pinnedViewportPosition)},t.prototype.shouldFacetUnpin=function(){return E.Utils.exists(this.unpinnedViewportPosition)},t.prototype.ensurePinnedFacetHasntMoved=function(){if(this.isFacetPinned()){p.Assert.exists(this.pinnedViewportPosition),C.$$(this.pinnedTopSpace).removeClass("coveo-with-animation"),C.$$(this.pinnedBottomSpace).removeClass("coveo-with-animation"),this.pinnedTopSpace.style.height="0px",this.pinnedBottomSpace.style.height="0px";var e=this.options.scrollContainer==document.body?window:this.options.scrollContainer,t=this.element.getBoundingClientRect().top,i=t-this.pinnedViewportPosition;!function(){e instanceof Window?window.scrollTo(0,new C.Win(e).scrollY()+i):e.scrollTop=e.scrollTop+i}(),t=this.element.getBoundingClientRect().top,i=t-this.pinnedViewportPosition,i<0&&(this.pinnedTopSpace.style.height=-1*i+"px"),this.unpinnedViewportPosition=this.pinnedViewportPosition,this.pinnedViewportPosition=null}},t.prototype.buildFooter=function(){return C.$$("div",{className:"coveo-facet-footer"}).el},t.prototype.buildMore=function(){var e=this,t=C.$$("span",{className:"coveo-facet-more-icon"},F.SVGIcons.icons.arrowDown).el;V.SVGDom.addClassToSVGInContainer(t,"coveo-facet-more-icon-svg");var i=C.$$("div",{className:"coveo-facet-more",tabindex:0},t).el;return(new v.AccessibleButton).withElement(i).withLabel(y.l("ShowMoreFacetResults",this.options.title)).withSelectAction(function(){return e.handleClickMore()}).build(),i},t.prototype.buildLess=function(){var e=this,t=C.$$("span",{className:"coveo-facet-less-icon"},F.SVGIcons.icons.arrowUp).el;V.SVGDom.addClassToSVGInContainer(t,"coveo-facet-less-icon-svg");var i=C.$$("div",{className:"coveo-facet-less",tabindex:0},t).el;return(new v.AccessibleButton).withElement(i).withLabel(y.l("ShowLessFacetResults",this.options.title)).withSelectAction(function(){return e.handleClickLess()}).build(),i},t.prototype.triggerMoreQuery=function(){var e=this;this.logger.info("Triggering new facet more query"),this.showWaitingAnimation(),this.facetQueryController.fetchMore(this.numberOfValues+1).then(function(t){e.logAnalyticsFacetShowMoreLess(O.analyticsActionCauseList.facetShowMore);var i=new k.FacetValues(t.groupByResults[0]);e.values=e.consolidateAndSortNewFacetValues(i),e.nbAvailableValues=e.values.size(),e.updateNumberOfValues(),e.canFetchMore=e.numberOfValues<e.nbAvailableValues,e.values.hasSelectedOrExcludedValues()&&!e.options.useAnd&&e.options.isMultiValueField?e.triggerUpdateDeltaQuery(s.filter(e.values.getAll(),function(e){return!e.selected&&!e.excluded})):e.values.hasSelectedOrExcludedValues()&&!e.options.useAnd?(e.values.updateDeltaWithFilteredFacetValues(new k.FacetValues,e.options.isMultiValueField),e.hideWaitingAnimation()):e.hideWaitingAnimation(),e.rebuildValueElements()}).catch(function(){return e.hideWaitingAnimation()})},t.prototype.triggerUpdateDeltaQuery=function(e){var t=this;this.showWaitingAnimation(),this.facetQueryController.searchInFacetToUpdateDelta(e).then(function(e){var i=new k.FacetValues;s.each(e.groupByResults,function(e){s.each(e.values,function(e){i.contains(e.value)||i.add(U.FacetValue.createFromGroupByValue(e))})}),t.values.updateDeltaWithFilteredFacetValues(i,t.options.isMultiValueField),t.cleanupDeltaValuesForMultiValueField(),t.rebuildValueElements(),t.hideWaitingAnimation()})},t.prototype.updateNumberOfValues=function(){this.keepDisplayedValuesNextTime||(this.currentPage<=0?(this.currentPage=0,this.numberOfValues=0):this.numberOfValues=this.options.numberOfValues+this.currentPage*this.options.pageSize,this.numberOfValues=Math.max(this.numberOfValues,this.getMinimumNumberOfValuesToDisplay()))},t.prototype.getMinimumNumberOfValuesToDisplay=function(){var e=this.values.getExcluded().length+this.values.getSelected().length;if(null!=this.options.customSort&&null!=this.facetSort&&this.options.customSort.length>0){var t=-1;new j.FacetValuesOrder(this,this.facetSort).reorderValues(this.values.getAll()).forEach(function(e,i){e.selected&&(t=i)}),e=t+1}return Math.max(e,this.options.numberOfValues)},t.prototype.cleanupDeltaValuesForMultiValueField=function(){var e=this;this.options.isMultiValueField&&(s.each(this.values.getAll(),function(t){0!=t.occurrences||t.selected||t.excluded||e.values.remove(t.value)}),this.nbAvailableValues=this.values.getAll().length)},t.prototype.shouldRenderFacetSearch=function(){return this.options.enableFacetSearch},t.prototype.shouldRenderMoreLess=function(){return this.options.enableMoreLess},t.prototype.debugInfo=function(){var e={};return e[this.constructor.ID]={component:this,groupByRequest:this.facetQueryController.lastGroupByRequest,groupByResult:this.facetQueryController.lastGroupByResult},e},t.prototype.logAnalyticsFacetShowMoreLess=function(e){this.usageAnalytics.logCustomEvent(e,{facetId:this.options.id,facetField:this.options.field.toString(),facetTitle:this.options.title},this.element)},t.ID="Facet",t.omniboxIndex=50,t.doExport=function(){h.exportGlobally({Facet:t,FacetHeader:D.FacetHeader,FacetSearchValuesList:_.FacetSearchValuesList,FacetSettings:N.FacetSettings,FacetSort:M.FacetSort,FacetUtils:B.FacetUtils,FacetValueElement:H.FacetValueElement,FacetValue:U.FacetValue})},t.options=o({title:A.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return y.l("NoTitle")},section:"CommonOptions",priority:10}),field:A.ComponentOptions.buildFieldOption({required:!0,groupByField:!0,section:"CommonOptions"}),headerIcon:A.ComponentOptions.buildStringOption({deprecated:"This option is exposed for legacy reasons, and the recommendation is to not use this option."}),id:A.ComponentOptions.buildStringOption({postProcessing:function(e,t){if(e){var i=e.replace(/[^a-zA-Z0-9-@$_.+!*'(),,]+/g,"");return E.Utils.isNullOrEmptyString(i)?t.field:i}return t.field}}),isMultiValueField:A.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"CommonOptions"}),lookupField:A.ComponentOptions.buildFieldOption({deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),enableSettings:A.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"Sorting",priority:9}),enableSettingsFacetState:A.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableSettings"}),availableSorts:A.ComponentOptions.buildListOption({defaultValue:["occurrences","score","alphaascending","alphadescending"],section:"Sorting",depend:"enableSettings",values:["occurrences","score","alphaascending","alphadescending","computedfieldascending","computedfielddescending","chisquare","nosort"]}),sortCriteria:A.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||(t.availableSorts.length>0?t.availableSorts[0]:"occurrences")},section:"Sorting"}),customSort:A.ComponentOptions.buildListOption({section:"Sorting"}),numberOfValues:A.ComponentOptions.buildNumberOption({defaultValue:5,min:0,section:"CommonOptions"}),injectionDepth:A.ComponentOptions.buildNumberOption({defaultValue:1e3,min:0}),showIcon:A.ComponentOptions.buildBooleanOption({defaultValue:!1,deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),useAnd:A.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"Filtering"}),enableTogglingOperator:A.ComponentOptions.buildBooleanOption({defaultValue:!1,alias:"allowTogglingOperator"}),enableFacetSearch:A.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"FacetSearch",priority:8}),facetSearchDelay:A.ComponentOptions.buildNumberOption({defaultValue:100,min:0,depend:"enableFacetSearch"}),facetSearchIgnoreAccents:A.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableFacetSearch"}),numberOfValuesInFacetSearch:A.ComponentOptions.buildNumberOption({defaultValue:15,min:1,section:"FacetSearch"}),useWildcardsInFacetSearch:A.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"FacetSearch"}),includeInBreadcrumb:A.ComponentOptions.buildBooleanOption({defaultValue:!0}),numberOfValuesInBreadcrumb:A.ComponentOptions.buildNumberOption({defaultFunction:function(){return S.DeviceUtils.isMobileDevice()?3:5},min:0,depend:"includeInBreadcrumb"}),includeInOmnibox:A.ComponentOptions.buildBooleanOption({defaultValue:!1,deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),numberOfValuesInOmnibox:A.ComponentOptions.buildNumberOption({defaultFunction:function(){return S.DeviceUtils.isMobileDevice()?3:5},min:0,depend:"includeInOmnibox",deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),computedField:A.ComponentOptions.buildFieldOption({priority:7}),computedFieldOperation:A.ComponentOptions.buildStringOption({defaultValue:"sum",section:"ComputedField"}),computedFieldFormat:A.ComponentOptions.buildStringOption({defaultValue:"c0",section:"ComputedField"}),computedFieldCaption:A.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return y.l("ComputedField")},section:"ComputedField"}),preservePosition:A.ComponentOptions.buildBooleanOption({defaultValue:!0}),paddingContainer:A.ComponentOptions.buildSelectorOption({defaultFunction:function(e){var t=C.$$(e).parent("coveo-facet-column");return null!=t?t:e.parentElement}}),scrollContainer:A.ComponentOptions.buildSelectorOption({defaultFunction:function(e){return document.body}}),enableMoreLess:A.ComponentOptions.buildBooleanOption({defaultValue:!0}),pageSize:A.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableMoreLess"}),enableCollapse:A.ComponentOptions.buildBooleanOption({defaultValue:!0,depend:"enableSettings"}),allowedValues:A.ComponentOptions.buildListOption(),additionalFilter:A.ComponentOptions.buildQueryExpressionOption(),dependsOn:A.ComponentOptions.buildStringOption(),dependsOnCondition:A.ComponentOptions.buildCustomOption(function(){return null},{depend:"dependsOn",section:"CommonOptions"}),valueCaption:A.ComponentOptions.buildJsonOption()},R.ResponsiveFacetOptions),t}(w.Component);t.Facet=K,x.Initialization.registerAutoCreateComponent(K),K.doExport()},82:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(8);t.ResponsiveFacetOptions={enableResponsiveMode:n.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"ResponsiveOptions"}),responsiveBreakpoint:n.ComponentOptions.buildNumberOption({deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option. Instead, use `SearchInterface.options.responsiveMediumBreakpoint` options exposed on the `SearchInterface`."}),dropdownHeaderLabel:n.ComponentOptions.buildLocalizedStringOption({section:"ResponsiveOptions"})}},87:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=s[2&i[0]?"return":i[0]?"throw":"next"])&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[0,a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r};Object.defineProperty(t,"__esModule",{value:!0}),i(522),i(523),i(524);var a=i(0),r=i(11),l=i(129),c=i(29),u=i(3),h=i(5),p=i(31),d=i(18),f=i(13),m=i(24),y=i(1),v=i(91),g=i(4),b=i(10),S=i(7),C=i(8),V=i(2),F=i(177),E=i(61),O=i(525),w=i(466),A=i(463),x=i(116),R=i(462),$=i(66),T=i(90),I=i(526),D=i(527),L=i(211),P=i(528),_=i(111),N=i(464);w.CoreHelpers.exportAllHelpersGlobally(window.Coveo);var M=function(e){function t(i,n,o,s){void 0===s&&(s=t.ID);var a=e.call(this,i,s,o)||this;return a.element=i,a.options=n,a.bindings=o,a.currentlyDisplayedResults=[],a.reachedTheEndOfResults=!1,a.disableLayoutChange=!1,a.successiveScrollCount=0,a.options=C.ComponentOptions.initComponentOptions(i,t,n),h.Assert.exists(i),h.Assert.exists(a.options),h.Assert.exists(a.options.resultTemplate),h.Assert.exists(a.options.infiniteScrollContainer),a.showOrHideElementsDependingOnState(!1,!1),a.bind.onRootElement(r.QueryEvents.newQuery,function(e){return a.handleNewQuery()}),a.bind.onRootElement(r.QueryEvents.buildingQuery,function(e){return a.handleBuildingQuery(e)}),a.bind.onRootElement(r.QueryEvents.querySuccess,function(e){return a.handleQuerySuccess(e)}),a.bind.onRootElement(r.QueryEvents.duringQuery,function(e){return a.handleDuringQuery()}),a.bind.onRootElement(r.QueryEvents.queryError,function(e){return a.handleQueryError()}),y.$$(a.root).on(c.ResultListEvents.changeLayout,function(e,t){return a.handleChangeLayout(t)}),a.options.enableInfiniteScroll&&(a.handlePageChanged(),a.bind.on(a.options.infiniteScrollContainer,"scroll",function(e){a.successiveScrollCount=0,a.handleScrollOfResultList()})),a.bind.onQueryState(d.MODEL_EVENTS.CHANGE_ONE,f.QUERY_STATE_ATTRIBUTES.FIRST,function(){return a.handlePageChanged()}),a.resultContainer=a.initResultContainer(),h.Assert.exists(a.options.resultsContainer),a.initWaitAnimationContainer(),h.Assert.exists(a.options.waitAnimationContainer),a.setupTemplatesVersusLayouts(),y.$$(a.root).on(l.ResultLayoutEvents.populateResultLayout,function(e,t){return t.layouts.push(a.options.layout)}),a.setupRenderer(),a.makeElementFocusable(),a.ensureHasId(),a}return n(t,e),t.getDefaultTemplate=function(e){var i=t.loadTemplatesFromCache();if(null!=i)return i;var n=S.Component.get(e);return Coveo.Recommendation&&n.searchInterface instanceof Coveo.Recommendation?new A.DefaultRecommendationTemplate:new x.DefaultResultTemplate},t.loadTemplatesFromCache=function(){var e=$.TemplateCache.getResultListTemplateNames();return e.length>0?new T.TemplateList(a.compact(a.map(e,function(e){return $.TemplateCache.getTemplate(e)}))):null},t.prototype.getAutoSelectedFieldsToInclude=function(){return a.chain(this.options.resultTemplate.getFields()).concat(this.getMinimalFieldsToInclude()).compact().unique().value()},t.prototype.setupTemplatesVersusLayouts=function(){var e=this,t="coveo-"+this.options.layout+"-layout-container";this.resultContainer.addClass(t),"table"===this.options.layout&&(this.options.resultTemplate=new R.TableTemplate(this.options.resultTemplate.templates||[])),this.options.resultTemplate instanceof T.TemplateList?a.each(this.options.resultTemplate.templates,function(t){t.layout||(t.layout=e.options.layout)}):this.options.resultTemplate instanceof x.DefaultResultTemplate&&"list"==this.options.layout&&O.ResponsiveDefaultResultTemplate.init(this.root,this,{})},t.prototype.renderResults=function(e,t){var i=this;return void 0===t&&(t=!1),t||this.resultContainer.empty(),this.renderer.renderResults(e,t,this.triggerNewResultDisplayed.bind(this)).then(function(){return i.triggerNewResultsDisplayed()})},t.prototype.buildResults=function(e){var t=this.options.layout;return this.templateToHtml.buildResults(e,t,this.currentlyDisplayedResults)},t.prototype.buildResult=function(e){var t=this.options.layout;return this.templateToHtml.buildResult(e,t,this.currentlyDisplayedResults)},t.prototype.displayMoreResults=function(e){return h.Assert.isLargerOrEqualsThan(1,e),this.isCurrentlyFetchingMoreResults()?void this.logger.warn("Ignoring request to display more results since we're already doing so"):this.hasPotentiallyMoreResultsToDisplay()?(this.options.enableInfiniteScrollWaitingAnimation&&this.showWaitingAnimationForInfiniteScrolling(),this.fetchAndRenderMoreResults(e)):void this.logger.warn("Ignoring request to display more results since we know there aren't more to display")},Object.defineProperty(t.prototype,"templateToHtml",{get:function(){var e={resultTemplate:this.options.resultTemplate,searchInterface:this.searchInterface,queryStateModel:this.queryStateModel};return new N.TemplateToHtml(e)},enumerable:!0,configurable:!0}),t.prototype.getDisplayedResults=function(){return this.currentlyDisplayedResults},t.prototype.getDisplayedResultsElements=function(){return this.resultContainer.getResultElements()},t.prototype.enable=function(){var t=this;e.prototype.enable.call(this),this.disableLayoutChange=!1,a.each(this.resultLayoutSelectors,function(e){e.enableLayouts([t.options.layout])}),y.$$(this.element).removeClass("coveo-hidden")},t.prototype.disable=function(){var t=this;e.prototype.disable.call(this);var i=a.map(this.otherResultLists,function(e){return e.options.layout});a.contains(i,this.options.layout)||this.disableLayoutChange||a.each(this.resultLayoutSelectors,function(e){e.disableLayouts([t.options.layout])}),this.disableLayoutChange=!1,y.$$(this.element).addClass("coveo-hidden")},t.prototype.autoCreateComponentsInsideResult=function(e,t){return this.templateToHtml.autoCreateComponentsInsideResult(e,t)},t.prototype.triggerNewResultDisplayed=function(e,t){var i={result:e,item:t};y.$$(this.element).trigger(c.ResultListEvents.newResultDisplayed,i)},t.prototype.triggerNewResultsDisplayed=function(){var e={isInfiniteScrollEnabled:this.options.enableInfiniteScroll};y.$$(this.element).trigger(c.ResultListEvents.newResultsDisplayed,e)},t.prototype.fetchAndRenderMoreResults=function(e){return o(this,void 0,void 0,function(){var t,i;return s(this,function(n){switch(n.label){case 0:this.fetchingMoreResults=this.queryController.fetchMore(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.fetchingMoreResults];case 2:return t=n.sent(),h.Assert.exists(t),this.usageAnalytics.logCustomEvent(b.analyticsActionCauseList.pagerScrolling,{},this.element),this.reachedTheEndOfResults=e>t.results.length,this.renderNewResults(t),this.resetStateAfterFetchingMoreResults(),[2,t];case 3:return i=n.sent(),this.resetStateAfterFetchingMoreResults(),[2,Promise.reject(i)];case 4:return[2]}})})},t.prototype.renderNewResults=function(e){return o(this,void 0,void 0,function(){var t,i;return s(this,function(n){switch(n.label){case 0:return[4,this.buildResults(e)];case 1:return t=n.sent(),this.renderResults(t,!0),(i=this.currentlyDisplayedResults).push.apply(i,e.results),this.triggerNewResultsDisplayed(),[2]}})})},t.prototype.resetStateAfterFetchingMoreResults=function(){var e=this;this.hideWaitingAnimationForInfiniteScrolling(),this.fetchingMoreResults=void 0,p.Defer.defer(function(){e.successiveScrollCount++,e.successiveScrollCount<=t.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS?e.handleScrollOfResultList():e.logger.info("Result list has triggered 5 consecutive queries to try and fill up the scrolling container, but it is still unable to do so.\n          Try explicitly setting the 'data-infinite-scroll-container-selector' option on the result list. See: https://coveo.github.io/search-ui/components/resultlist.html#options.infinitescrollcontainer")})},t.prototype.handleDuringQuery=function(){this.logger.trace("Emptying the result container"),this.cancelFetchingMoreResultsIfNeeded(),this.showWaitingAnimation(),this.showOrHideElementsDependingOnState(!1,!1)},t.prototype.handleQueryError=function(){this.hideWaitingAnimation(),this.resultContainer.empty(),this.currentlyDisplayedResults=[],this.reachedTheEndOfResults=!0},t.prototype.handleQuerySuccess=function(e){var i=this;h.Assert.exists(e),h.Assert.exists(e.results);var n=e.results;this.logger.trace("Received query results from new query",n),this.hideWaitingAnimation(),t.resultCurrentlyBeingRendered=void 0,this.reachedTheEndOfResults=e.query.numberOfResults>e.results.results.length,this.currentlyDisplayedResults=[],this.buildResults(e.results).then(function(t){return o(i,void 0,void 0,function(){return s(this,function(i){switch(i.label){case 0:return[4,this.renderResults(t)];case 1:return i.sent(),this.showOrHideElementsDependingOnState(!0,0!=this.currentlyDisplayedResults.length),m.DeviceUtils.isMobileDevice()&&void 0!=this.options.mobileScrollContainer&&(this.options.mobileScrollContainer.scrollTop=0),this.options.enableInfiniteScroll&&n.results.length==e.queryBuilder.numberOfResults&&(this.scrollToTopIfEnabled(),this.handleScrollOfResultList()),[2]}})})})},t.prototype.handleScrollOfResultList=function(){!this.isCurrentlyFetchingMoreResults()&&this.options.enableInfiniteScroll&&this.isScrollingOfResultListAlmostAtTheBottom()&&this.hasPotentiallyMoreResultsToDisplay()&&this.displayMoreResults(this.options.infiniteScrollPageSize)},t.prototype.handlePageChanged=function(){var e=this;this.bind.onRootElement(r.QueryEvents.deferredQuerySuccess,function(){setTimeout(function(){e.scrollToTopIfEnabled()},0)})},t.prototype.scrollToTopIfEnabled=function(){this.options.enableScrollToTop&&_.ResultListUtils.scrollToTop(this.root)},t.prototype.handleNewQuery=function(){y.$$(this.element).removeClass("coveo-hidden"),t.resultCurrentlyBeingRendered=void 0},Object.defineProperty(t.prototype,"otherResultLists",{get:function(){var e=this.searchInterface.getComponents(t.ID);return a.without(e,this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"resultLayoutSelectors",{get:function(){return this.searchInterface.getComponents("ResultLayoutSelector")},enumerable:!0,configurable:!0}),t.prototype.handleBuildingQuery=function(e){if(null!=this.options.fieldsToInclude&&e.queryBuilder.addFieldsToInclude(a.map(this.options.fieldsToInclude,function(e){return e.substr(1)})),this.options.autoSelectFieldsToInclude){var t=a.flatten(a.map(this.otherResultLists,function(e){return e.getAutoSelectedFieldsToInclude()}));e.queryBuilder.addRequiredFields(a.unique(t.concat(this.getAutoSelectedFieldsToInclude()))),e.queryBuilder.includeRequiredFields=!0}},t.prototype.handleChangeLayout=function(e){var t=this;e.layout===this.options.layout?(this.disableLayoutChange=!1,this.enable(),this.options.resultTemplate.layout=this.options.layout,e.results&&(this.resultContainer.isEmpty()&&new F.InitializationPlaceholder(this.root).withVisibleRootElement().withPlaceholderForResultList(),p.Defer.defer(function(){return o(t,void 0,void 0,function(){var t;return s(this,function(i){switch(i.label){case 0:return[4,this.buildResults(e.results)];case 1:return t=i.sent(),this.renderResults(t),this.showOrHideElementsDependingOnState(!0,0!==this.currentlyDisplayedResults.length),[2]}})})}))):(this.disableLayoutChange=!0,this.disable(),this.resultContainer.empty())},t.prototype.isCurrentlyFetchingMoreResults=function(){return g.Utils.exists(this.fetchingMoreResults)},t.prototype.getMinimalFieldsToInclude=function(){return["author","language","urihash","objecttype","collection","source","language","permanentid"]},t.prototype.isScrollingOfResultListAlmostAtTheBottom=function(){var e;try{e=this.options.infiniteScrollContainer instanceof Window}catch(t){e=!1}return e?this.isScrollAtBottomForWindowElement():this.isScrollAtBottomForHtmlElement()},t.prototype.isScrollAtBottomForWindowElement=function(){var e=new y.Win(window),t=e.height(),i=e.scrollY();return new y.Doc(document).height()-(t+i)<t/2},t.prototype.isScrollAtBottomForHtmlElement=function(){var e=this.options.infiniteScrollContainer,t=e.clientHeight;return e.scrollHeight-(e.scrollTop+t)<t/2},t.prototype.hasPotentiallyMoreResultsToDisplay=function(){return this.currentlyDisplayedResults.length>0&&!this.reachedTheEndOfResults},t.prototype.cancelFetchingMoreResultsIfNeeded=function(){this.isCurrentlyFetchingMoreResults()&&(this.logger.trace("Cancelling fetching more results"),Promise.reject(this.fetchingMoreResults),this.fetchingMoreResults=void 0)},t.prototype.showOrHideElementsDependingOnState=function(e,t){var i=y.$$(this.element).findAll(".coveo-show-if-query"),n=y.$$(this.element).findAll(".coveo-show-if-no-query"),o=y.$$(this.element).findAll(".coveo-show-if-results"),s=y.$$(this.element).findAll(".coveo-show-if-no-results");a.each(i,function(t){y.$$(t).toggle(e)}),a.each(n,function(t){y.$$(t).toggle(!e)}),a.each(o,function(i){y.$$(i).toggle(e&&t)}),a.each(s,function(i){y.$$(i).toggle(e&&!t)})},Object.defineProperty(t.prototype,"waitAnimation",{get:function(){return this.options.waitAnimation.toLowerCase()},enumerable:!0,configurable:!0}),t.prototype.showWaitingAnimation=function(){switch(this.waitAnimation){case"fade":y.$$(this.options.waitAnimationContainer).addClass("coveo-fade-out");break;case"spinner":this.resultContainer.hideChildren(),void 0==y.$$(this.options.waitAnimationContainer).find(".coveo-wait-animation")&&this.options.waitAnimationContainer.appendChild(v.DomUtils.getBasicLoadingAnimation())}},t.prototype.hideWaitingAnimation=function(){switch(this.waitAnimation){case"fade":y.$$(this.options.waitAnimationContainer).removeClass("coveo-fade-out");break;case"spinner":var e=y.$$(this.options.waitAnimationContainer).find(".coveo-loading-spinner");e&&y.$$(e).detach()}},t.prototype.showWaitingAnimationForInfiniteScrolling=function(){var e=v.DomUtils.getLoadingSpinner();if("card"==this.options.layout&&this.options.enableInfiniteScroll){var t=y.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner-container");a.each(t,function(e){return y.$$(e).remove()});var i=y.$$("div",{className:"coveo-loading-spinner-container"});i.append(e),this.options.waitAnimationContainer.appendChild(i.el)}else this.options.waitAnimationContainer.appendChild(v.DomUtils.getLoadingSpinner())},t.prototype.hideWaitingAnimationForInfiniteScrolling=function(){var e=y.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner"),t=y.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner-container");a.each(e,function(e){return y.$$(e).remove()}),a.each(t,function(e){return y.$$(e).remove()})},t.prototype.initResultContainer=function(){if(!this.options.resultsContainer){var e="table"===this.options.layout?"table":"div";this.options.resultsContainer=y.$$(e,{className:"coveo-result-list-container"}).el,this.initResultContainerAddToDom()}return new I.ResultContainer(this.options.resultsContainer,this.searchInterface)},t.prototype.initResultContainerAddToDom=function(){this.element.appendChild(this.options.resultsContainer)},t.prototype.initWaitAnimationContainer=function(){this.options.waitAnimationContainer||(this.options.waitAnimationContainer=this.resultContainer.el)},t.prototype.setupRenderer=function(){var e={options:this.searchInterface.options.originalOptionsObject,bindings:this.bindings},t=function(t){return V.Initialization.automaticallyCreateComponentsInside(t,e)};switch(this.options.layout){case"card":this.renderer=new D.ResultListCardRenderer(this.options,t);break;case"table":this.renderer=new P.ResultListTableRenderer(this.options,t);break;case"list":default:this.renderer=new L.ResultListRenderer(this.options,t)}},t.prototype.makeElementFocusable=function(){y.$$(this.element).setAttribute("tabindex","-1")},t.prototype.ensureHasId=function(){""===this.element.id&&(this.element.id=a.uniqueId("coveo-result-list"))},t.ID="ResultList",t.doExport=function(){u.exportGlobally({ResultList:t})},t.options={resultsContainer:C.ComponentOptions.buildChildHtmlElementOption({alias:"resultContainerSelector"}),resultTemplate:E.TemplateComponentOptions.buildTemplateOption({defaultFunction:t.getDefaultTemplate}),waitAnimation:C.ComponentOptions.buildStringOption({defaultValue:"none"}),waitAnimationContainer:C.ComponentOptions.buildChildHtmlElementOption({postProcessing:function(e,t){return e||t.resultsContainer}}),enableInfiniteScroll:C.ComponentOptions.buildBooleanOption({defaultValue:!1}),infiniteScrollPageSize:C.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableInfiniteScroll"}),infiniteScrollContainer:C.ComponentOptions.buildChildHtmlElementOption({depend:"enableInfiniteScroll",defaultFunction:function(e){return C.ComponentOptions.findParentScrolling(e)}}),enableInfiniteScrollWaitingAnimation:C.ComponentOptions.buildBooleanOption({depend:"enableInfiniteScroll",defaultValue:!0}),mobileScrollContainer:C.ComponentOptions.buildSelectorOption({defaultFunction:function(){return document.querySelector(".coveo-results-column")}}),autoSelectFieldsToInclude:C.ComponentOptions.buildBooleanOption({defaultValue:!1}),fieldsToInclude:C.ComponentOptions.buildFieldsOption({includeInResults:!0}),layout:C.ComponentOptions.buildStringOption({defaultValue:"list",required:!0}),enableScrollToTop:C.ComponentOptions.buildBooleanOption({defaultValue:!0,depend:"enableInfiniteScroll"})},t.resultCurrentlyBeingRendered=null,t.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS=5,t}(S.Component);t.ResultList=M,V.Initialization.registerAutoCreateComponent(M)},89:function(e,t,i){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},s=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?o(e.value):new i(function(t){t(e.value)}).then(a,r)}l((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){function i(e){return function(t){return n([e,t])}}function n(i){if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=s[2&i[0]?"return":i[0]?"throw":"next"])&&!(a=a.call(s,i[1])).done)return a;switch(s=0,a&&(i=[0,a.value]),i[0]){case 0:case 1:a=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,s=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(a=l.trys,!(a=a.length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){l.label=i[1];break}if(6===i[0]&&l.label<a[1]){l.label=a[1],a=i;break}if(a&&l.label<a[2]){l.label=a[2],l.ops.push(i);break}a[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],s=0}finally{o=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var o,s,a,r,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r};Object.defineProperty(t,"__esModule",{value:!0});var r=i(7),l=i(6),c=i(8),u=i(1),h=i(2),p=i(3),d=i(542),f=i(543),m=i(545),y=i(16),v=i(12),g=i(13);i(546);var b=i(18),S=i(4),C=i(0),V=i(5),F=i(11),E=i(547),O=i(34),w=i(549),A=i(10),x=i(550),R=i(46),$=i(174),T=i(82),I=i(551),D=i(15),L=i(173),P=i(111),_=i(552),N=function(e){function t(i,n,o){var s=e.call(this,i,"CategoryFacet",o)||this;return s.element=i,s.options=n,s.listenToQueryStateChange=!0,s.moreValuesToFetch=!0,s.showingWaitAnimation=!1,s.numberOfChildValuesCurrentlyDisplayed=0,s.options=c.ComponentOptions.initComponentOptions(i,t,n),s.categoryFacetQueryController=new m.CategoryFacetQueryController(s),s.categoryFacetTemplates=new d.CategoryFacetTemplates,s.categoryValueRoot=new f.CategoryValueRoot(u.$$(s.element),s.categoryFacetTemplates,s),s.categoryValueRoot.path=s.activePath,s.currentPage=0,s.numberOfValues=s.options.numberOfValues,s.categoryFacetValuesTree=new _.CategoryFacetValuesTree,s.tryToInitFacetSearch(),s.options.debug&&new x.CategoryFacetDebug(s),$.ResponsiveFacets.init(s.root,s,s.options),s.initDependsOnManager(),s.bind.onRootElement(F.QueryEvents.buildingQuery,function(e){return s.handleBuildingQuery(e)}),s.bind.onRootElement(F.QueryEvents.querySuccess,function(e){return s.handleQuerySuccess(e)}),s.bind.onRootElement(F.QueryEvents.duringQuery,function(){return s.addFading()}),s.bind.onRootElement(F.QueryEvents.deferredQuerySuccess,function(){return s.handleDeferredQuerySuccess()}),s.bind.onRootElement(O.BreadcrumbEvents.populateBreadcrumb,function(e){return s.handlePopulateBreadCrumb(e)}),s.bind.onRootElement(O.BreadcrumbEvents.clearBreadcrumb,function(){return s.handleClearBreadcrumb()}),s.buildFacetHeader(),s.initQueryStateEvents(),s}return n(t,e),t.prototype.isCurrentlyDisplayed=function(){return u.$$(this.element).isVisible()},Object.defineProperty(t.prototype,"activePath",{get:function(){return this.queryStateModel.get(this.queryStateAttribute)||this.options.basePath},set:function(e){this.listenToQueryStateChange=!1,this.queryStateModel.set(this.queryStateAttribute,e),this.listenToQueryStateChange=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryStateAttribute",{get:function(){return g.QueryStateModel.getFacetId(this.options.id)},enumerable:!0,configurable:!0}),t.prototype.handleBuildingQuery=function(e){this.positionInQuery=this.categoryFacetQueryController.putCategoryFacetInQueryBuilder(e.queryBuilder,this.activePath,this.numberOfValues+1)},t.prototype.scrollToTop=function(){P.ResultListUtils.scrollToTop(this.root)},t.prototype.tryToInitFacetSearch=function(){if(!this.isFacetSearchAvailable)return this.logDisabledFacetSearchWarning();this.categoryFacetSearch=new E.CategoryFacetSearch(this,this.options.displaySearchButton)},t.prototype.logDisabledFacetSearchWarning=function(){if(!this.isEnableFacetSearchFalsy){var e=this.getOptionAttributeName("valueCaption"),t=this.getOptionAttributeName("enableFacetSearch"),i=this.options.field;this.logger.warn("The search box is disabled on the "+i+" CategoryFacet. To hide this warning,\n    either remove the "+e+" option or set the "+t+' option to "false".')}},t.prototype.getOptionAttributeName=function(e){return c.ComponentOptions.attrNameFromName(e)},Object.defineProperty(t.prototype,"isFacetSearchAvailable",{get:function(){return!this.areValueCaptionsSpecified&&!this.isEnableFacetSearchFalsy},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"areValueCaptionsSpecified",{get:function(){var e=this.options.valueCaption;return 0!==C.keys(e).length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEnableFacetSearchFalsy",{get:function(){return!this.options.enableFacetSearch},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCategoryEmpty",{get:function(){return!this.categoryValueRoot.children.length},enumerable:!0,configurable:!0}),t.prototype.updateAppearance=function(){if(this.disabled||this.isCategoryEmpty)return this.hide();this.show()},t.prototype.handleQuerySuccess=function(e){if(S.Utils.isNullOrUndefined(e.results.categoryFacets))return this.notImplementedError();if(!S.Utils.isNullOrUndefined(e.results.categoryFacets[this.positionInQuery])){var t=e.query.categoryFacets[this.positionInQuery].maximumNumberOfValues,i=e.results.categoryFacets[this.positionInQuery];if(this.moreValuesToFetch=t==i.values.length,this.clear(),i.notImplemented)return this.notImplementedError();if(i.values.length||i.parentValues.length){if(this.renderValues(i,t),this.isFacetSearchAvailable){var n=this.categoryFacetSearch.build();this.options.displaySearchOnTop?u.$$(n).insertBefore(this.categoryValueRoot.listRoot.el):u.$$(n).insertAfter(this.categoryValueRoot.listRoot.el)}this.moreLessContainer=u.$$("div",{className:"coveo-category-facet-more-less-container"}),u.$$(this.element).append(this.moreLessContainer.el),this.options.enableMoreLess&&this.renderMoreLess(),this.isPristine()||u.$$(this.element).addClass("coveo-category-facet-non-empty-path")}}},t.prototype.changeActivePath=function(e){this.activePath=e},t.prototype.executeQuery=function(){return s(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:this.showWaitingAnimation(),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,this.queryController.executeQuery()];case 2:return e.sent(),[3,4];case 3:return this.hideWaitingAnimation(),[7];case 4:return[2]}})})},t.prototype.reload=function(){this.changeActivePath(this.activePath),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetReload),this.executeQuery()},t.prototype.getVisibleParentValues=function(){return this.getVisibleParentCategoryValues().map(function(e){return e.getDescriptor()})},t.prototype.getVisibleParentCategoryValues=function(){if(0==this.categoryValueRoot.children.length||0==this.categoryValueRoot.children[0].children.length)return[];for(var e=this.categoryValueRoot.children[0],t=[e];0!=e.children.length&&!S.Utils.arrayEqual(e.path,this.activePath);)e=e.children[0],t.push(e);return t},t.prototype.showMore=function(){this.moreValuesToFetch&&(this.currentPage++,this.numberOfValues=this.options.numberOfValues+this.currentPage*this.options.pageSize,this.reload(),this.logAnalyticsFacetShowMoreLess(A.analyticsActionCauseList.facetShowMore))},t.prototype.showLess=function(){this.currentPage>0&&(this.currentPage--,this.numberOfValues=this.options.numberOfValues+this.currentPage*this.options.pageSize,this.reload(),this.logAnalyticsFacetShowMoreLess(A.analyticsActionCauseList.facetShowLess))},t.prototype.getAvailableValues=function(){return this.activeCategoryValue?this.activeCategoryValue.children.map(function(e){return{value:e.categoryValueDescriptor.value,count:e.categoryValueDescriptor.count,path:e.path}}):[]},t.prototype.selectValue=function(e){V.Assert.check(C.contains(C.pluck(this.getAvailableValues(),"value"),e),"Failed while trying to select a value that is not available.");var t=this.activePath.slice(0);t.push(e),this.changeActivePath(t),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetSelect),this.executeQuery()},t.prototype.deselectCurrentValue=function(){if(0!=this.activePath.length){var e=this.activePath.slice(0);e.pop(),this.changeActivePath(e),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetSelect),this.executeQuery()}},t.prototype.resetPath=function(){this.changeActivePath(this.options.basePath)},t.prototype.reset=function(){this.resetPath(),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetClear),this.executeQuery()},t.prototype.hide=function(){u.$$(this.element).addClass("coveo-hidden")},t.prototype.show=function(){u.$$(this.element).removeClass("coveo-hidden")},t.prototype.enable=function(){e.prototype.enable.call(this),this.updateAppearance()},t.prototype.disable=function(){e.prototype.disable.call(this),this.updateAppearance()},t.prototype.debugValue=function(e){return s(this,void 0,void 0,function(){var t,i;return a(this,function(n){switch(n.label){case 0:return t=new R.QueryBuilder,this.categoryFacetQueryController.addDebugGroupBy(t,e),[4,this.queryController.getEndpoint().search(t.build())];case 1:return i=n.sent(),x.CategoryFacetDebug.analyzeResults(i.groupByResults[0],this.options.delimitingCharacter),[2]}})})},t.prototype.getCaption=function(e){var t=this.options.valueCaption,i=t[e];return i||e},t.prototype.showWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation||(u.$$(this.headerElement).find(".coveo-category-facet-header-wait-animation").style.visibility="visible",this.showingWaitAnimation=!0)},t.prototype.hideWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation&&(u.$$(this.headerElement).find(".coveo-category-facet-header-wait-animation").style.visibility="hidden",this.showingWaitAnimation=!1)},t.prototype.logAnalyticsEvent=function(e,t){void 0===t&&(t=this.activePath),this.usageAnalytics.logSearchEvent(e,{categoryFacetId:this.options.id,categoryFacetField:this.options.field.toString(),categoryFacetPath:t,categoryFacetTitle:this.options.title})},t.prototype.getEndpoint=function(){return this.queryController.getEndpoint()},Object.defineProperty(t.prototype,"children",{get:function(){return this.categoryValueRoot.children},enumerable:!0,configurable:!0}),t.prototype.renderValues=function(e,i){this.categoryFacetValuesTree.storeNewValues(e);var n,o=this.sortParentValues(e.parentValues),s=this.categoryValueRoot,a=!1,r=Math.floor(t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING/2),l=Math.ceil(t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING/2);o=this.hideBasePathInParentValues(o),this.shouldTruncate(o)&&(n=this.findPathOfLastTruncatedParentValue(o,l),a=!0,o=C.first(o,r).concat(C.last(o,l))),this.isPristine()||this.addAllCategoriesButton();for(var c=0;c<o.length;c++){s=s.renderAsParent(o[c]);c==o.length-1||s.makeSelectable().showCollapseArrow(),a&&(c==r-1&&this.addEllipsis(),c==r&&(s.path=n.concat([o[c].value])))}var u=this.moreValuesToFetch?e.values.slice(0,i-1):e.values.slice(0,i);this.numberOfChildValuesCurrentlyDisplayed=u.length,s.renderChildren(u),this.activeCategoryValue=s},t.prototype.hideBasePathInParentValues=function(e){return S.Utils.arrayEqual(C.first(this.activePath,this.options.basePath.length),this.options.basePath)&&(e=C.last(e,e.length-this.options.basePath.length)),e},t.prototype.shouldTruncate=function(e){return e.length>t.MAXIMUM_NUMBER_OF_VALUES_BEFORE_TRUNCATING},t.prototype.addEllipsis=function(){this.categoryValueRoot.listRoot.append(this.categoryFacetTemplates.buildEllipsis().el)},t.prototype.findPathOfLastTruncatedParentValue=function(e,t){var i=e.length-t-1;return C.reduce(C.first(e,i+1),function(e,t){return e.concat([t.value])},[])},t.prototype.addAllCategoriesButton=function(){var e=this,t=this.categoryFacetTemplates.buildAllCategoriesButton();(new D.AccessibleButton).withLabel(l.l("AllCategories")).withElement(t).withSelectAction(function(){e.reset(),e.scrollToTop()}).build(),this.categoryValueRoot.listRoot.append(t.el)},t.prototype.isPristine=function(){return S.Utils.arrayEqual(this.activePath,this.options.basePath)},t.prototype.buildFacetHeader=function(){var e=new I.CategoryFacetHeader({categoryFacet:this,title:this.options.title});this.headerElement=e.build(),u.$$(this.element).prepend(this.headerElement)},t.prototype.handleQueryStateChanged=function(e){if(this.listenToQueryStateChange){var t=e.attributes[this.queryStateAttribute];!S.Utils.isNullOrUndefined(t)&&C.isArray(t)&&0!=t.length&&(this.activePath=t)}},t.prototype.initQueryStateEvents=function(){var e=this;this.queryStateModel.registerNewAttribute(this.queryStateAttribute,this.options.basePath),this.bind.onQueryState(b.MODEL_EVENTS.CHANGE,void 0,function(t){return e.handleQueryStateChanged(t)})},t.prototype.initDependsOnManager=function(){var e=this,t={reset:function(){return e.dependsOnReset()},ref:this};this.dependsOnManager=new L.DependsOnManager(t)},t.prototype.dependsOnReset=function(){this.changeActivePath(this.options.basePath),this.clear()},t.prototype.addFading=function(){u.$$(this.element).addClass("coveo-category-facet-values-fade")},t.prototype.handleDeferredQuerySuccess=function(){this.updateAppearance(),this.removeFading()},t.prototype.removeFading=function(){u.$$(this.element).removeClass("coveo-category-facet-values-fade")},t.prototype.notImplementedError=function(){this.logger.error("Category Facets are not supported by your current search endpoint. Disabling this component."),this.disable()},t.prototype.sortParentValues=function(e){if(this.activePath.length!=e.length)return this.logger.warn("Inconsistent CategoryFacet results: Number of parent values results does not equal length of active path"),e;for(var t=[],i=this,n=0,o=this.activePath;n<o.length;n++){var s=o[n],a=function(n){var o=C.find(e,function(e){return e.value.toLowerCase()==n.toLowerCase()});if(!o)return i.logger.warn("Inconsistent CategoryFacet results: path not consistent with parent values results"),{value:e};t.push(o)}(s);if("object"==typeof a)return a.value}return t},t.prototype.renderMoreLess=function(){this.numberOfChildValuesCurrentlyDisplayed>this.options.numberOfValues&&this.moreLessContainer.append(this.buildLessButton()),this.moreValuesToFetch&&this.moreLessContainer.append(this.buildMoreButton())},t.prototype.clear=function(){this.categoryValueRoot.clear(),this.isFacetSearchAvailable&&this.categoryFacetSearch.clear(),this.moreLessContainer&&this.moreLessContainer.detach(),u.$$(this.element).removeClass("coveo-category-facet-non-empty-path")},t.prototype.buildMoreButton=function(){var e=this,t=u.$$("span",{className:"coveo-facet-more-icon"},v.SVGIcons.icons.arrowDown).el;y.SVGDom.addClassToSVGInContainer(t,"coveo-facet-more-icon-svg");var i=u.$$("div",{className:"coveo-category-facet-more"},t);return(new D.AccessibleButton).withElement(i).withSelectAction(function(){return e.showMore()}).withLabel(l.l("ShowMoreFacetResults",this.options.title)).build(),i.el},t.prototype.buildLessButton=function(){var e=this,t=u.$$("span",{className:"coveo-facet-less-icon"},v.SVGIcons.icons.arrowUp).el;y.SVGDom.addClassToSVGInContainer(t,"coveo-facet-less-icon-svg");var i=u.$$("div",{className:"coveo-category-facet-less"},t);return(new D.AccessibleButton).withElement(i).withSelectAction(function(){return e.showLess()}).withLabel(l.l("ShowLessFacetResults",this.options.title)).build(),i.el},t.prototype.handlePopulateBreadCrumb=function(e){var t=this;if(!this.isPristine()){var i=this.categoryFacetValuesTree.getValueForLastPartInPath(this.activePath),n={path:this.activePath,count:i.numberOfResults,value:i.value},o=function(){t.logAnalyticsEvent(A.analyticsActionCauseList.breadcrumbFacet),t.reset()},s=new w.CategoryFacetBreadcrumb(this,o,n);e.breadcrumbs.push({element:s.build()})}},t.prototype.handleClearBreadcrumb=function(){this.changeActivePath(this.options.basePath)},t.prototype.logAnalyticsFacetShowMoreLess=function(e){this.usageAnalytics.logCustomEvent(e,{facetId:this.options.id,facetField:this.options.field.toString(),facetTitle:this.options.title},this.element)},t.doExport=function(){p.exportGlobally({CategoryFacet:t})},t.ID="CategoryFacet",t.options=o({field:c.ComponentOptions.buildFieldOption({required:!0}),title:c.ComponentOptions.buildLocalizedStringOption({localizedString:function(){return l.l("NoTitle")}}),numberOfValues:c.ComponentOptions.buildNumberOption({defaultValue:5,min:0,section:"CommonOptions"}),enableFacetSearch:c.ComponentOptions.buildBooleanOption({defaultValue:!0}),id:c.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||t.field}}),injectionDepth:c.ComponentOptions.buildNumberOption({defaultValue:1e3,min:0}),numberOfResultsInFacetSearch:c.ComponentOptions.buildNumberOption({defaultValue:15,min:1}),facetSearchDelay:c.ComponentOptions.buildNumberOption({defaultValue:100,min:0}),enableMoreLess:c.ComponentOptions.buildBooleanOption({defaultValue:!0}),pageSize:c.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableMoreLess"}),delimitingCharacter:c.ComponentOptions.buildStringOption({defaultValue:"|"}),basePath:c.ComponentOptions.buildListOption({defaultValue:[]}),maximumDepth:c.ComponentOptions.buildNumberOption({min:1,defaultValue:Number.MAX_VALUE}),debug:c.ComponentOptions.buildBooleanOption({defaultValue:!1}),valueCaption:c.ComponentOptions.buildJsonOption({defaultValue:{}}),dependsOn:c.ComponentOptions.buildStringOption(),dependsOnCondition:c.ComponentOptions.buildCustomOption(function(){return null},{depend:"dependsOn",section:"CommonOptions"}),displaySearchOnTop:c.ComponentOptions.buildBooleanOption({defaultValue:!1}),displaySearchButton:c.ComponentOptions.buildBooleanOption({defaultValue:!0})},T.ResponsiveFacetOptions),t.MAXIMUM_NUMBER_OF_VALUES_BEFORE_TRUNCATING=15,t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING=10,t.WAIT_ELEMENT_CLASS="coveo-category-facet-header-wait-animation",t}(r.Component);t.CategoryFacet=N,h.Initialization.registerAutoCreateComponent(N),N.doExport()}});
  //# sourceMappingURL=HierarchicalFacet.min__45edc409d97327d59af1.js.map