!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Coveo__temporary",[],t):"object"==typeof exports?exports.Coveo__temporary=t():e.Coveo__temporary=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n=window.webpackJsonpCoveo__temporary;window.webpackJsonpCoveo__temporary=function(t,i,r){for(var s,a,u=0,l=[];u=0&&t<=A};v.each=v.forEach=function(e,t,n){t=C(t,n);var i,o;if(R(e))for(i=0,o=e.length;i0?0:s-1;for(o||(i=t[r?r[a]:a],a+=e);a>=0&&a=3;return t(e,C(n,o,4),i,r)}};v.reduce=v.foldl=v.inject=M(1),v.reduceRight=v.foldr=M(-1),v.find=v.detect=function(e,t,n){var i=R(e)?v.findIndex:v.findKey,o=i(e,t,n);if(void 0!==o&&-1!==o)return e[o]},v.filter=v.select=function(e,t,n){var i=[];return t=S(t,n),v.each(e,function(e,n,o){t(e,n,o)&&i.push(e)}),i},v.reject=function(e,t,n){return v.filter(e,v.negate(S(t)),n)},v.every=v.all=function(e,t,n){t=S(t,n);for(var i=!R(e)&&v.keys(e),o=(i||e).length,r=0;r=0},v.invoke=w(function(e,t,n){var i,o;return v.isFunction(t)?o=t:v.isArray(t)&&(i=t.slice(0,-1),t=t[t.length-1]),v.map(e,function(e){var r=o;if(!r){if(i&&i.length&&(e=O(e,i)),null==e)return;r=e[t]}return null==r?r:r.apply(e,n)})}),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,n){var i,o,r=-1/0,s=-1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=R(e)?e:v.values(e);for(var a=0,u=e.length;ar&&(r=i)}else t=S(t,n),v.each(e,function(e,n,i){((o=t(e,n,i))>s||o===-1/0&&r===-1/0)&&(r=e,s=o)});return r},v.min=function(e,t,n){var i,o,r=1/0,s=1/0;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e){e=R(e)?e:v.values(e);for(var a=0,u=e.length;ai||void 0===n)return 1;if(n0?0:o-1;r>=0&&r0?s=r>=0?r:Math.max(r+a,s):a=r>=0?Math.min(r+1,a):r+a+1;else if(n&&r&&a)return r=n(i,o),i[r]===o?r:-1;if(o!==o)return r=t(p.call(i,s,a),v.isNaN),r>=0?r+s:-1;for(r=e>0?s:a-1;r>=0&&rt?(i&&(clearTimeout(i),i=null),a=l,s=e.apply(o,r),i||(o=r=null)):i||!1===n.trailing||(i=setTimeout(u,c)),s};return l.cancel=function(){clearTimeout(i),a=0,i=o=r=null},l},v.debounce=function(e,t,n){var i,o,r=function(t,n){i=null,n&&(o=e.apply(t,n))},s=w(function(s){if(i&&clearTimeout(i),n){var a=!i;i=setTimeout(r,t),a&&(o=e.apply(this,s))}else i=v.delay(r,t,this,s);return o});return s.cancel=function(){clearTimeout(i),i=null},s},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},v.once=v.partial(v.before,2),v.restArguments=w;var k=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],V=function(e,t){var n=L.length,i=e.constructor,o=v.isFunction(i)&&i.prototype||u,r="constructor";for(E(e,r)&&!v.contains(t,r)&&t.push(r);n--;)(r=L[n])in e&&e[r]!==o[r]&&!v.contains(t,r)&&t.push(r)};v.keys=function(e){if(!v.isObject(e))return[];if(m)return m(e);var t=[];for(var n in e)E(e,n)&&t.push(n);return k&&V(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[];var t=[];for(var n in e)t.push(n);return k&&V(e,t),t},v.values=function(e){for(var t=v.keys(e),n=t.length,i=Array(n),o=0;o1&&(i=C(i,t[1])),t=v.allKeys(e)):(i=Q,t=$(t,!1,!1),e=Object(e));for(var o=0,r=t.length;o1&&(n=t[1])):(t=v.map($(t,!1,!1),String),i=function(e,n){return!v.contains(t,n)}),v.pick(e,i,n)}),v.defaults=B(v.allKeys,!0),v.create=function(e,t){var n=x(e);return t&&v.extendOwn(n,t),n},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var n=v.keys(t),i=n.length;if(null==e)return!i;for(var o=Object(e),r=0;r":">",'"':""","'":"'","`":"`"},z=v.invert(q),W=function(e){var t=function(t){return e[t]},n="(?:"+v.keys(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}};v.escape=W(q),v.unescape=W(z),v.result=function(e,t,n){v.isArray(t)||(t=[t]);var i=t.length;if(!i)return v.isFunction(n)?n.call(e):n;for(var o=0;o/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Y=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},J=/\\|'|\r|\n|\u2028|\u2029/g,X=function(e){return"\\"+K[e]};v.template=function(e,t,n){!t&&n&&(t=n),t=v.defaults({},t,v.templateSettings);var i=RegExp([(t.escape||Y).source,(t.interpolate||Y).source,(t.evaluate||Y).source].join("|")+"|$","g"),o=0,r="__p+='";e.replace(i,function(t,n,i,s,a){return r+=e.slice(o,a).replace(J,X),o=a+t.length,n?r+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?r+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(r+="';\n"+s+"\n__p+='"),t}),r+="';\n",t.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";var s;try{s=new Function(t.variable||"obj","_",r)}catch(e){throw e.source=r,e}var a=function(e){return s.call(this,e,v)};return a.source="function("+(t.variable||"obj")+"){\n"+r+"}",a},v.chain=function(e){var t=v(e);return t._chain=!0,t};var Z=function(e,t){return e._chain?v(t).chain():t};v.mixin=function(e){return v.each(v.functions(e),function(t){var n=v[t]=e[t];v.prototype[t]=function(){var e=[this._wrapped];return c.apply(e,arguments),Z(this,n.apply(v,e))}}),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=a[e];v.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],Z(this,n)}}),v.each(["concat","join","slice"],function(e){var t=a[e];v.prototype[e]=function(){return Z(this,t.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},i=[],void 0!==(o=function(){return v}.apply(t,i))&&(n.exports=o)}()}).call(t,n(63),n(107)(e))},function(e,t,n){"use strict";function i(){for(var e=[],t=0;t0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0?c(e,n.defer):Promise.resolve()};e.performInitFunctionsOption(n,u.InitializationEvents.beforeInitialization),f.$$(t).trigger(u.InitializationEvents.beforeInitialization);var d=function(){return o(s,void 0,void 0,function(){var i,o,s;return r(this,function(r){switch(r.label){case 0:return[4,e.initExternalComponents(t,n)];case 1:return i=r.sent(),e.performInitFunctionsOption(n,u.InitializationEvents.afterComponentsInitialization),[4,p(u.InitializationEvents.afterComponentsInitialization)];case 2:return r.sent(),f.$$(t).trigger(u.InitializationEvents.restoreHistoryState),e.performInitFunctionsOption(n,u.InitializationEvents.afterInitialization),[4,p(u.InitializationEvents.afterInitialization)];case 3:return r.sent(),o=b.Component.get(t,C.SearchInterface),e.shouldExecuteFirstQueryAutomatically(o)&&(e.logFirstQueryCause(o),s=!0,Coveo.Recommendation&&(s=!(o instanceof Coveo.Recommendation)),b.Component.get(t,a.QueryController).executeQuery({logInActionsHistory:s,isFirstQuery:!0})),[2,i]}})})},h=i(t,n);return h.isLazyInit?h.initResult.then(d).then(function(){return{elem:t}}):d().then(function(){return{elem:t}})},e.initSearchInterface=function(t,n){void 0===n&&(n={}),n=e.resolveDefaultOptions(t,n);var i=new C.SearchInterface(t,n.SearchInterface,n.Analytics);i.options.originalOptionsObject=n;var o={options:n,bindings:i.getBindings()};return e.automaticallyCreateComponentsInside(t,o,["Recommendation"])},e.initStandaloneSearchInterface=function(t,n){void 0===n&&(n={}),n=e.resolveDefaultOptions(t,n),n.Querybox||(n.Querybox={}),n.Omnibox||(n.Omnibox={}),n.Searchbox||(n.Searchbox={}),n.Querybox.triggerQueryOnClear&&n.Omnibox.triggerQueryOnClear&&n.Searchbox.triggerOnQueryClear||(n.Querybox.triggerQueryOnClear=!1,n.Omnibox.triggerQueryOnClear=!1,n.Searchbox.triggerQueryOnClear=!1);var i=new C.StandaloneSearchInterface(t,n.StandaloneSearchInterface,n.Analytics);i.options.originalOptionsObject=n;var o={options:n,bindings:i.getBindings()};return e.automaticallyCreateComponentsInside(t,o)},e.initRecommendationInterface=function(t,n){void 0===n&&(n={}),n=e.resolveDefaultOptions(t,n);var i=s.extend({},n.SearchInterface,n.Recommendation);i.mainSearchInterface&&(i.firstLoadingAnimation=f.$$("span").el);var o=new window.Coveo.Recommendation(t,i,n.Analytics);o.options.originalOptionsObject=n;var r={options:n,bindings:o.getBindings()};return e.automaticallyCreateComponentsInside(t,r)},e.automaticallyCreateComponentsInsideResult=function(t,n,o){void 0===o&&(o={});var r=i({initOptions:o},n.searchInterface.options.originalOptionsObject),s=i({},n.searchInterface.getBindings(),{resultElement:t}),a={options:r,bindings:s,result:n};return e.automaticallyCreateComponentsInside(t,a)},e.automaticallyCreateComponentsInside=function(e,t,n){var i=this;void 0===n&&(n=[]),l.Assert.exists(e);var o,r=S.InitializationHelper.findDOMElementsToIgnore(e,n),a=S.InitializationHelper.findDOMElementsToInitialize(e,r),u=s.chain(a).map(function(e){var n=i.componentsFactory(e.htmlElements,e.componentClassId,t);return o=n.isLazyInit,n.factory}).map(function(e){var t=e();return t?Promise.all(t).then(function(){return!0}):Promise.resolve(!0)}).value();return{initResult:Promise.all(u).then(function(){return!0}).catch(function(e){return i.logger.error(e),i.logger.warn("Skipping initialization of previous component in error ... "),!0}),isLazyInit:o}},e.registerNamedMethod=function(t,n){l.Assert.isNonEmptyString(t),l.Assert.doesNotExists(E.eagerlyLoadedComponents[t]),l.Assert.doesNotExists(e.namedMethods[t]),l.Assert.exists(n),e.namedMethods[t]=n},e.isNamedMethodRegistered=function(t){return g.Utils.exists(e.namedMethods[t])},e.monkeyPatchComponentMethod=function(e,t,n){l.Assert.isNonEmptyString(e),l.Assert.exists(n);var i;if(e.indexOf(".")>0){var o=e.split(".");l.Assert.check(2==o.length,"Invalid method name, correct syntax is CoveoComponent.methodName."),i=o[0],e=o[1]}var r=b.Component.get(t,i);l.Assert.exists(r),l.Assert.exists(r[e]);var s="__"+e;g.Utils.exists(r[s])||(r[s]=r[e]),r[e]=n},e.initBoxInterface=function(t,n,i,o){void 0===n&&(n={}),void 0===i&&(i="Standard"),void 0===o&&(o=!0),n=e.resolveDefaultOptions(t,n);var r="Box";"Standard"!=i&&(r+="For"+i);var s=b.Component.getComponentRef(r);if(s){new c.Logger(t).info("Initializing box of type "+r);var a=o?s.getInjection:function(){},u=new s(t,n[r],n.Analytics,a,n);u.options.originalOptionsObject=n;var p={options:n,bindings:u.getBindings()};return e.automaticallyCreateComponentsInside(t,p)}return{initResult:new Promise(function(e,n){new c.Logger(t).error("Trying to initialize box of type : "+r+" but not found in code (not compiled)!"),l.Assert.fail("Cannot initialize unknown type of box"),n(!1)}),isLazyInit:!1}},e.dispatchNamedMethodCall=function(t,n,i){l.Assert.isNonEmptyString(t),l.Assert.exists(n);var o=e.namedMethods[t];return l.Assert.exists(o),e.logger.trace("Dispatching named method call of "+t,n,i),0!=i.length?o.apply(null,[n].concat(i)):o.apply(null,[n])},e.dispatchNamedMethodCallOrComponentCreation=function(t,n,i){return l.Assert.isNonEmptyString(t),l.Assert.exists(n),e.isNamedMethodRegistered(t)?e.dispatchNamedMethodCall(t,n,i):e.isThereASingleComponentBoundToThisElement(n)?e.dispatchMethodCallOnBoundComponent(t,n,i):void l.Assert.fail("No method or component named "+t+" are registered.")},e.isSearchFromLink=function(e){return g.Utils.isNonEmptyString(e.getBindings().queryStateModel.get("q"))},e.isThereASingleComponentBoundToThisElement=function(e){return l.Assert.exists(e),g.Utils.exists(b.Component.get(e,null,!0))},e.isThereANonSearchInterfaceComponentBoundToThisElement=function(t){return!!f.$$(t).hasClass("CoveoRecommendation")||e.isThereASingleComponentBoundToThisElement(t)&&!w.get(t,C.SearchInterface,!0)&&!f.$$(t).hasClass("CoveoRecommendation")},e.dispatchMethodCallOnBoundComponent=function(e,t,n){l.Assert.isNonEmptyString(e),l.Assert.exists(t);var i=b.Component.get(t);l.Assert.exists(i);var o=i[e];if(g.Utils.exists(o))return o.apply(i,n);l.Assert.fail("No method named "+e+" exist on component "+i.type)},e.logFirstQueryCause=function(t){var n=m.HashUtils.getValue("firstQueryCause",m.HashUtils.getHash());if(null!=n){var i=m.HashUtils.getValue("firstQueryMeta",m.HashUtils.getHash())||{};t.usageAnalytics.logSearchEvent(v.analyticsActionCauseList[n],i)}else e.isSearchFromLink(t)?t.usageAnalytics.logSearchEvent(v.analyticsActionCauseList.searchFromLink,{}):t.usageAnalytics.logSearchEvent(v.analyticsActionCauseList.interfaceLoad,{})},e.performInitFunctionsOption=function(t,n){g.Utils.exists(t)&&e.performFunctions(t[n])},e.performFunctions=function(e){g.Utils.exists(e)&&s.each(e,function(e){"function"==typeof e&&e()})},e.initExternalComponents=function(t,n){var i=this;if(n&&n.externalComponents){var o=b.Component.get(t,C.SearchInterface),r=b.Component.get(t,h.QueryStateModel),u=b.Component.get(t,d.ComponentStateModel),c=b.Component.get(t,a.QueryController),f=b.Component.get(t,p.ComponentOptionsModel),m=o.usageAnalytics;l.Assert.exists(o),l.Assert.exists(r),l.Assert.exists(c),l.Assert.exists(u),l.Assert.exists(m);var v={options:n,bindings:{searchInterface:o,queryStateModel:r,queryController:c,usageAnalytics:m,componentStateModel:u,componentOptionsModel:f,root:t}},S=s.map(n.externalComponents,function(t){var n=t;return g.Utils.isHtmlElement(n)?e.automaticallyCreateComponentsInside(n,v).initResult:y.JQueryUtils.isInstanceOfJQuery(n)?e.automaticallyCreateComponentsInside(n.get(0),v).initResult:void 0});return Promise.all(S).then(function(e){return s.first(e)}).catch(function(e){return i.logger.error(e),!1})}return Promise.resolve(!1)},e.shouldExecuteFirstQueryAutomatically=function(e){var t=e.options;return!t||!1!==t.autoTriggerQuery&&(!0===t.allowQueriesWithoutKeywords||""!=w.state(e.element).get("q"))},e.logger=new c.Logger("Initialization"),e.registeredComponents=[],e.componentAliases={},e.namedMethods={},e.fieldsNeededForQuery=[],e.fieldsNeededForQueryByComponent={},e}();t.Initialization=x;var _=function(){function e(){}return e.getLazyRegisteredComponent=function(t){return e.lazyLoadedComponents[t]()},e.getLazyRegisteredModule=function(t){return e.lazyLoadedModule[t]()},e.registerLazyComponent=function(t,n,i){null==e.lazyLoadedComponents[t]?(l.Assert.exists(n),s.contains(x.registeredComponents,t)||x.registeredComponents.push(t),e.lazyLoadedComponents[t]=n,i&&(x.componentAliases[t]=i)):this.logger.warn("Component being registered twice",t)},e.buildErrorCallback=function(t,n){return function(i){e.logger.warn("Cannot load chunk for "+t+". You may need to add the coveo-script class on the script tag that includes the Coveo framework. More details here https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues\n "+i),n(function(){})}},e.registerLazyModule=function(t,n){null==e.lazyLoadedModule[t]?(l.Assert.exists(n),e.lazyLoadedModule[t]=n):this.logger.warn("Module being registered twice",t)},e.componentsFactory=function(t,n,i){return{factory:function(){var o=[];return s.each(t,function(t){if(null==b.Component.get(t,n)){var r=void 0;if(g.Utils.exists(i.options)){var a=i.options[n],u=i.options[t.id],l=i.options.initOptions?i.options.initOptions[n]:{};r=g.Utils.extendDeep(u,l),r=g.Utils.extendDeep(a,r)}var c=s.extend({},i,{options:r});o.push(e.createComponentOfThisClassOnElement(n,t,c))}}),o},isLazyInit:!0}},e.createComponentOfThisClassOnElement=function(t,n,i){return l.Assert.isNonEmptyString(t),l.Assert.exists(n),x.isThereANonSearchInterfaceComponentBoundToThisElement(n)?null:e.getLazyRegisteredComponent(t).then(function(o){if(l.Assert.exists(o),x.isThereANonSearchInterfaceComponentBoundToThisElement(n))return null;var r,a={},u={};return void 0!=i&&(s.each(i.bindings,function(e,t){a[t]=e}),u=i.options,r=i.result),e.logger.trace("Creating component of class "+t,n,u),new o(n,u,a,r)})},e.logger=new c.Logger("LazyInitialization"),e.lazyLoadedComponents={},e.lazyLoadedModule={},e}();t.LazyInitialization=_;var E=function(){function e(){}return e.componentsFactory=function(t,n,i){return{factory:function(){s.each(t,function(t){if(null==b.Component.get(t,n)){var o=void 0;if(g.Utils.exists(i.options)){var r=i.options[n],a=i.options[t.id],u=i.options.initOptions?i.options.initOptions[n]:{};o=g.Utils.extendDeep(a,u),o=g.Utils.extendDeep(r,o)}var l=s.extend({},i,{options:o});e.createComponentOfThisClassOnElement(n,t,l)}})},isLazyInit:!1}},e.createComponentOfThisClassOnElement=function(t,n,i){l.Assert.isNonEmptyString(t),l.Assert.exists(n);var o,r=x.getRegisteredComponent(t),a={},u={};return void 0!=i&&(s.each(i.bindings,function(e,t){a[t]=e}),u=i.options,o=i.result),x.isThereANonSearchInterfaceComponentBoundToThisElement(n)?null:(e.logger.trace("Creating component of class "+t,n,u),null==r?(_.getLazyRegisteredComponent(t).then(function(i){e.logger.warn("Component of class "+t+' was not found in "Eager" mode. Using lazy mode as a fallback.'),new i(n,u,a,o)}).catch(function(){e.logger.error("Component of class "+t+' was not found in "Eager" mode nor "Lazy" mode. It will not be initialized properly...')}),null):new r(n,u,a,o))},e.logger=new c.Logger("EagerInitialization"),e.eagerlyLoadedComponents={},e}();t.EagerInitialization=E},function(e,t,n){"use strict";function i(e){void 0==window.Coveo&&(window.Coveo={}),s.each(s.keys(e),function(t){null==window.Coveo[t]&&(window.Coveo[t]=e[t])})}function o(e,t){e.doExport?e.doExport():new a.Logger(this).error("Component "+e+" has no export function !"),u.Initialization.registerAutoCreateComponent(e),t(e)}function r(e,t){e.doExport&&e.doExport(),t(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),a=n(11),u=n(2);t.exportGlobally=i,t.lazyExport=o,t.lazyExportModule=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=/^@[a-zA-Z0-9_\.]+$/,r=function(){function e(){}return e.isUndefined=function(e){return void 0===e},e.isNull=function(e){return null===e},e.isNullOrUndefined=function(t){return e.isUndefined(t)||e.isNull(t)},e.exists=function(t){return!e.isNullOrUndefined(t)},e.toNotNullString=function(e){return i.isString(e)?e:""},e.anyTypeToString=function(e){return e?e.toString():""},e.isNullOrEmptyString=function(t){return e.isNullOrUndefined(t)||!e.isNonEmptyString(t)},e.isNonEmptyString=function(e){return i.isString(e)&&""!==e},e.isEmptyString=function(t){return!e.isNonEmptyString(t)},e.stringStartsWith=function(e,t){return e.slice(0,t.length)==t},e.isNonEmptyArray=function(e){return i.isArray(e)&&e.length>0},e.isEmptyArray=function(t){return!e.isNonEmptyArray(t)},e.isHtmlElement=function(e){return void 0!=window.HTMLElement?e instanceof HTMLElement:e&&e.nodeType&&1==e.nodeType},e.parseIntIfNotUndefined=function(t){return e.isNonEmptyString(t)?parseInt(t,10):void 0},e.parseFloatIfNotUndefined=function(t){return HTMLDocument,e.isNonEmptyString(t)?parseFloat(t):void 0},e.round=function(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)},e.parseBooleanIfNotUndefined=function(t){if(e.isNonEmptyString(t))switch(t.toLowerCase()){case"true":case"1":case"yes":return!0;case"false":case"0":case"no":return!1;default:return}},e.trim=function(e){return null==e?null:e.replace(/^\s+|\s+$/g,"")},e.encodeHTMLEntities=function(e){for(var t=[],n=e.length-1;n>=0;n--)/^[a-z0-9]/i.test(e[n])?t.unshift(e[n]):t.unshift(["&#",e.charCodeAt(n),";"].join(""));return t.join("")},e.decodeHTMLEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(t)})},e.safeEncodeURIComponent=function(e){return i.isString(e)?encodeURIComponent(e.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])/g,"").split("").reverse().join("").replace(/[\uDC00-\uDFFF](?![\uD800-\uDBFF])/g,"").split("").reverse().join("")):encodeURIComponent(e)},e.arrayEqual=function(e,t,n){if(void 0===n&&(n=!0),n)return i.isEqual(e,t);var o=[e,t];return i.all(o,function(e){return e.length==o[0].length&&0==i.difference(e,o[0]).length})},e.objectEqual=function(e,t){return i.isEqual(e,t)},e.isCoveoField=function(e){return o.test(e)},e.escapeRegexCharacter=function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},e.getCaseInsensitiveProperty=function(e,t){var n=e[t];if(null==n){var o=t.toLowerCase();if(null==(n=e[o])){var r=i.find(i.keys(e),function(e){return e.toLowerCase()==o});null!=r&&(n=e[r])}}return n},e.getFirstAvailableFieldValue=function(t,n){for(var i=0;i1;)if(o=e.getCaseInsensitiveProperty(o,i.pop()),e.isUndefined(o))return;var r=e.getCaseInsensitiveProperty(o,i[0]);return null==r&&(r=e.getCaseInsensitiveProperty(t,n)),r}},e.throttle=function(e,t,n,i,o){void 0===n&&(n={});var r,s=null,a=0,u=function(){a=!1===n.leading?0:(new Date).getTime(),s=null,r=e.apply(i,o)};return function(){var l=(new Date).getTime();a||!1!==n.leading||(a=l);var c=t-(l-a);return i=this,o=arguments,c<=0?(clearTimeout(s),s=null,a=l,r=e.apply(i,o)):s||!1===n.trailing||(s=window.setTimeout(u,c)),r}},e.extendDeep=function(t,n){t||(t={});var o=i.isArray(n),r=o&&[]||{};return o?(t=t||[],r=r.concat(t),i.each(n,function(n,o,s){void 0===t[o]?r[o]=n:"object"!=typeof n||i.isElement(n)?-1===t.indexOf(n)&&r.push(n):r[o]=e.extendDeep(t[o],n)})):(t&&"object"==typeof t&&!i.isElement(t)&&i.each(i.keys(t),function(e){r[e]=t[e]}),i.each(i.keys(n),function(i){"object"==typeof n[i]&&n[i]&&t[i]?r[i]=e.extendDeep(t[i],n[i]):r[i]=n[i]})),r},e.getQueryStringValue=function(e,t){return void 0===t&&(t=window.location.search),t.replace(new RegExp("^(?:.*[&\\?]"+e.replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1")},e.isValidUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(e)},e.debounce=function(e,t){var n,i;return function(){for(var o=this,r=[],s=0;s0&&(e=e.concat(n)),e},e.differenceBetweenObjects=function(e,t){var n={},i=function(e,t){for(var i in e)e[i]!==t[i]&&null==n[i]&&(n[i]=e[i])};return i(e,t),i(t,e),n},e}();t.Utils=r},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(11),r=n(4),s=n(0),a=function(){function e(){}return e.fail=function(t){e.failureHandler(t)},e.check=function(t,n){t||e.fail(n)},e.isUndefined=function(t){e.check(r.Utils.isUndefined(t),"Value should be undefined.")},e.isNotUndefined=function(t){e.check(!r.Utils.isUndefined(t),"Value should not be undefined.")},e.isNull=function(t){e.check(r.Utils.isNull(t),"Value should be null.")},e.isNotNull=function(t){e.check(!r.Utils.isNull(t),"Value should not be null.")},e.exists=function(t){e.check(!r.Utils.isNullOrUndefined(t),"Value should not be null or undefined")},e.doesNotExists=function(t){e.check(r.Utils.isNullOrUndefined(t),"Value should be null or undefined")},e.isString=function(t){e.check(s.isString(t),"Value should be a string.")},e.stringStartsWith=function(t,n){e.isNonEmptyString(t),e.isNonEmptyString(n),e.check(0==t.indexOf(n),"Value should start with "+n)},e.isNonEmptyString=function(t){e.check(r.Utils.isNonEmptyString(t),"Value should be a non-empty string.")},e.isNumber=function(t){e.check(s.isNumber(t),"Value should be a number.")},e.isLargerThan=function(t,n){e.check(n>t,"Value "+n+" should be larger than "+t)},e.isLargerOrEqualsThan=function(t,n){e.check(n>=t,"Value "+n+" should be larger or equal than "+t)},e.isSmallerThan=function(t,n){e.check(nr&&(new s.Logger(t).info("Value for option "+n+" is less than the possible minimum (Value is "+r+", minimum is "+i.min+"). It has been forced to its minimum value.",i),r=i.min),null!=i.max&&i.max1){var o=t[0],r=t[1],i=u.extend({customAttribute:!0},t[2]);return a.Assert.isNonEmptyString(o),e.set(o,r,i)}}var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n-1&&n.splice(i,1)},t.prototype.getBindings=function(){return{root:this.root,queryStateModel:this.queryStateModel,queryController:this.queryController,searchInterface:this,componentStateModel:this.componentStateModel,componentOptionsModel:this.componentOptionsModel,usageAnalytics:this.usageAnalytics}},t.prototype.getQueryContext=function(){var e,t=this.queryController.getLastQuery();if(t.context)e=t.context;else{var n=this.getComponents("PipelineContext");if(n&&!a.isEmpty(n)){var i=a.chain(n).map(function(e){return e.getContext()}).reduce(function(e,t){return o({},e,t)},{}).value();a.isEmpty(i)||(e=i)}}return e},t.prototype.getComponents=function(e){return null==this.attachedComponents&&(this.attachedComponents={}),e in this.attachedComponents||(this.attachedComponents[e]=[]),this.attachedComponents[e]},t.prototype.detachComponentsInside=function(e){var t=this;a.each(this.attachedComponents,function(n,i){n.filter(function(t){return e!=t.element&&e.contains(t.element)}).forEach(function(e){return t.detachComponent(i,e)})})},t.prototype.initializeAnalytics=function(){var e=A.BaseComponent.getComponentRef("Analytics");return e?e.create(this.element,this.analyticsOptions,this.getBindings()):new O.NoopAnalyticsClient},t.prototype.setupHistoryManager=function(e,t){var n=this;return this.options.enableHistory?this.options.useLocalStorageForHistory?void(this.historyManager=new l.LocalStorageHistoryController(e,t,this.queryStateModel,this.queryController)):void(this.historyManager=new u.HistoryController(e,t,this.queryStateModel,this.queryController,this.usageAnalytics)):(this.historyManager=new c.NoopHistoryController,void w.$$(this.element).on(d.InitializationEvents.restoreHistoryState,function(){return n.queryStateModel.setMultiple(o({},n.queryStateModel.defaultAttributes))}))},t.prototype.setupQueryMode=function(){this.options.allowQueriesWithoutKeywords?this.initializeEmptyQueryAllowed():this.initializeEmptyQueryNotAllowed()},t.prototype.setupMobileFastclick=function(e){(0,r.attach)(e)},t.prototype.setupEventsHandlers=function(){var e=this,t=this.queryStateModel.getEventName(b.Model.eventTypes.preprocess);w.$$(this.element).on(t,function(t,n){return e.handlePreprocessQueryStateModel(n)}),w.$$(this.element).on(h.QueryEvents.buildingQuery,function(t,n){return e.handleBuildingQuery(n)}),w.$$(this.element).on(h.QueryEvents.querySuccess,function(t,n){return e.handleQuerySuccess(n)}),w.$$(this.element).on(h.QueryEvents.queryError,function(t,n){return e.handleQueryError(n)}),w.$$(this.element).on(d.InitializationEvents.afterComponentsInitialization,function(){return e.handleAfterComponentsInitialization()});var n=this.queryStateModel.getEventName(b.Model.eventTypes.changeOne+C.QueryStateModel.attributesEnum.debug);w.$$(this.element).on(n,function(t,n){return e.handleDebugModeChange(n)}),this.queryStateModel.registerNewAttribute(C.QueryStateModel.attributesEnum.fv,{});var i=this.queryStateModel.getEventName(b.Model.eventTypes.changeOne+C.QueryStateModel.attributesEnum.quickview);w.$$(this.element).on(i,function(t,n){return e.handleQuickviewChanged(n)})},t.prototype.setupDebugInfo=function(){var e=this;this.options.enableDebugInfo&&setTimeout(function(){return new I.Debug(e.element,e.getBindings())})},t.prototype.setupResponsiveComponents=function(){this.responsiveComponents=new F.ResponsiveComponents,this.responsiveComponents.setMediumScreenWidth(this.options.responsiveMediumBreakpoint),this.responsiveComponents.setSmallScreenWidth(this.options.responsiveSmallBreakpoint),this.responsiveComponents.setResponsiveMode(this.options.responsiveMode)},t.prototype.handleDebugModeChange=function(e){var t=this;e.value&&!this.relevanceInspector&&this.options.enableDebugInfo&&n.e(0).then(function(){var e=n(172),i=e.RelevanceInspector,o=w.$$("btn");w.$$(t.element).prepend(o.el),t.relevanceInspector=new i(o.el,t.getBindings())}.bind(null,n)).catch(null)},t.prototype.handlePreprocessQueryStateModel=function(e){var t=this.queryStateModel.get(C.QueryStateModel.attributesEnum.tg),n=this.queryStateModel.get(C.QueryStateModel.attributesEnum.t),i=t,o=n;e&&void 0!==e.tg&&(e.tg=this.getTabGroupId(e.tg),i!=e.tg&&(e.t=e.t||C.QueryStateModel.defaultAttributes.t,e.sort=e.sort||C.QueryStateModel.defaultAttributes.sort,i=e.tg)),e&&void 0!==e.t&&(e.t=this.getTabId(i,e.t),o!=e.t&&(e.sort=e.sort||C.QueryStateModel.defaultAttributes.sort,o=e.t)),e&&void 0!==e.sort&&(e.sort=this.getSort(o,e.sort)),e&&void 0!==e.quickview&&(e.quickview=this.getQuickview(e.quickview)),!e||!e.fv||this instanceof k||this.facetValueStateHandler.handleFacetValueState(e)},t.prototype.getTabGroupId=function(e){var t=A.BaseComponent.getComponentRef("TabGroup");if(t){var n=this.getComponents(t.ID);if(e!=C.QueryStateModel.defaultAttributes.tg&&a.any(n,function(t){return!t.disabled&&e==t.options.id}))return e;if(n.length>0)return n[0].options.id}return C.QueryStateModel.defaultAttributes.tg},t.prototype.getTabId=function(e,t){var n=A.BaseComponent.getComponentRef("Tab"),i=A.BaseComponent.getComponentRef("TabGroup");if(n){var o=this.getComponents(n.ID);if(i&&e!=C.QueryStateModel.defaultAttributes.tg){var r=this.getComponents(i.ID),s=a.find(r,function(t){return e==t.options.id});if(t!=C.QueryStateModel.defaultAttributes.t&&a.any(o,function(e){return t==e.options.id&&s.isElementIncludedInTabGroup(e.element)}))return t;var u=a.find(o,function(e){return s.isElementIncludedInTabGroup(e.element)});return null!=u?u.options.id:C.QueryStateModel.defaultAttributes.t}if(t!=C.QueryStateModel.defaultAttributes.t&&a.any(o,function(e){return t==e.options.id}))return t;if(o.length>0)return o[0].options.id}return C.QueryStateModel.defaultAttributes.t},t.prototype.getSort=function(e,t){var n=A.BaseComponent.getComponentRef("Sort");if(n){var i=this.getComponents(n.ID),o=A.BaseComponent.getComponentRef("Tab");if(o&&e!=C.QueryStateModel.defaultAttributes.t){var r=this.getComponents(o.ID),s=a.find(r,function(t){return e==t.options.id}),u=s.options.sort;if(t!=C.QueryStateModel.defaultAttributes.sort&&a.any(i,function(e){return s.isElementIncludedInTab(e.element)&&e.match(t)}))return t;if(null!=u)return u.toString();var l=a.find(i,function(e){return s.isElementIncludedInTab(e.element)});return null!=l?l.options.sortCriteria[0].toString():C.QueryStateModel.defaultAttributes.sort}if(t!=C.QueryStateModel.defaultAttributes.sort&&a.any(i,function(e){return e.match(t)}))return t;if(i.length>0)return i[0].options.sortCriteria[0].toString()}return C.QueryStateModel.defaultAttributes.sort},t.prototype.getQuickview=function(e){var t=A.BaseComponent.getComponentRef("Quickview");if(t){var n=this.getComponents(t.ID);if(a.any(n,function(t){return t.getHashId()==e}))return e}return C.QueryStateModel.defaultAttributes.quickview},t.prototype.handleQuickviewChanged=function(e){var t=A.BaseComponent.getComponentRef("Quickview");if(t){var n=this.getComponents(t.ID);if(""!=e.value){var i=a.partition(n,function(t){return t.getHashId()==e.value});0!=i[0].length&&(a.first(i[0]).open(),a.each(a.tail(i[0]),function(e){return e.close()})),a.each(i[1],function(e){return e.close()})}else a.each(n,function(e){e.close()})}},t.prototype.handleBuildingQuery=function(e){this.options.enableDuplicateFiltering&&(e.queryBuilder.enableDuplicateFiltering=!0),_.Utils.isNullOrUndefined(this.options.pipeline)||(e.queryBuilder.pipeline=this.options.pipeline),_.Utils.isNullOrUndefined(this.options.maximumAge)||(e.queryBuilder.maximumAge=this.options.maximumAge),_.Utils.isNullOrUndefined(this.options.resultsPerPage)||(e.queryBuilder.numberOfResults=this.options.resultsPerPage),_.Utils.isNullOrUndefined(this.options.excerptLength)||(e.queryBuilder.excerptLength=this.options.excerptLength),_.Utils.isNonEmptyString(this.options.expression)&&e.queryBuilder.constantExpression.add(this.options.expression),_.Utils.isNonEmptyString(this.options.filterField)&&(e.queryBuilder.filterField=this.options.filterField),_.Utils.isNonEmptyString(this.options.timezone)&&(e.queryBuilder.timezone=this.options.timezone),e.queryBuilder.enableCollaborativeRating=this.options.enableCollaborativeRating,e.queryBuilder.enableDuplicateFiltering=this.options.enableDuplicateFiltering,e.queryBuilder.allowQueriesWithoutKeywords=this.options.allowQueriesWithoutKeywords;var t=this.queryController.getEndpoint();null!=t&&t.options&&this.queryStateModel.get(C.QueryStateModel.attributesEnum.debug)&&(e.queryBuilder.maximumAge=0,e.queryBuilder.enableDebug=!0,e.queryBuilder.fieldsToExclude=["allmetadatavalues"],e.queryBuilder.fieldsToInclude=null)},t.prototype.handleQuerySuccess=function(e){var t=0==e.results.results.length;this.toggleSectionState("coveo-no-results",t),this.handlePossiblyModifiedNumberOfResultsInQueryPipeline(e);var n=w.$$(this.element).find(".coveo-results-header");n&&w.$$(n).removeClass("coveo-query-error")},t.prototype.handlePossiblyModifiedNumberOfResultsInQueryPipeline=function(e){if(e&&e.query&&e.results){var t=e.query.numberOfResults,n=e.results.results.length,i=e.results.totalCountFiltered-e.query.firstResult===n,o=!i&&e.results.totalCountFiltered>n;t!=n&&o?(this.isResultsPerPageModifiedByPipeline=!0,this.queryPipelineConfigurationForResultsPerPage=n):(this.isResultsPerPageModifiedByPipeline=!1,this.queryPipelineConfigurationForResultsPerPage=null)}},t.prototype.handleQueryError=function(e){this.toggleSectionState("coveo-no-results");var t=w.$$(this.element).find(".coveo-results-header");t&&w.$$(t).addClass("coveo-query-error")},t.prototype.handleAfterComponentsInitialization=function(){var e=this;a.each(this.attachedComponents,function(t){t.forEach(function(t){$.FacetColumnAutoLayoutAdjustment.isAutoLayoutAdjustable(t)&&$.FacetColumnAutoLayoutAdjustment.initializeAutoLayoutAdjustment(e.element,t)})})},t.prototype.toggleSectionState=function(e,t){var n=this;void 0===t&&(t=!0);var i=w.$$(this.element).find(".coveo-facet-column"),o=w.$$(this.element).find(".coveo-results-column"),r=w.$$(this.element).find(".coveo-results-header"),s=w.$$(this.element).findAll(".coveo-facet-search-results"),u=w.$$(this.element).find(".coveo-recommendation-main-section");i&&w.$$(i).toggleClass(e,t&&!this.queryStateModel.atLeastOneFacetIsActive()),o&&w.$$(o).toggleClass(e,t&&!this.queryStateModel.atLeastOneFacetIsActive()),r&&w.$$(r).toggleClass(e,t&&!this.queryStateModel.atLeastOneFacetIsActive()),u&&w.$$(u).toggleClass(e,t),s&&s.length>0&&a.each(s,function(i){w.$$(i).toggleClass(e,t&&!n.queryStateModel.atLeastOneFacetIsActive())})},t.prototype.initializeEmptyQueryAllowed=function(){new R.InitializationPlaceholder(this.element).withFullInitializationStyling().withAllPlaceholders()},t.prototype.initializeEmptyQueryNotAllowed=function(){var e=this,t=new R.InitializationPlaceholder(this.element).withEventToRemovePlaceholder(h.QueryEvents.newQuery).withFullInitializationStyling().withHiddenRootElement().withPlaceholderForFacets().withPlaceholderForResultList();w.$$(this.root).on(d.InitializationEvents.restoreHistoryState,function(){t.withVisibleRootElement(),""==e.queryStateModel.get("q")&&t.withWaitingForFirstQueryMode()}),w.$$(this.element).on(h.QueryEvents.doneBuildingQuery,function(t,n){if(!n.queryBuilder.containsEndUserKeywords()){var i=e.queryController.getLastQuery().q;_.Utils.isNonEmptyString(i)?(e.queryStateModel.set(C.QUERY_STATE_ATTRIBUTES.Q,i),n.queryBuilder.expression.add(i)):(e.logger.info("Query cancelled by the Search Interface","Configuration does not allow empty query",e,e.options),n.cancel=!0,e.queryStateModel.reset(),new R.InitializationPlaceholder(e.element).withEventToRemovePlaceholder(h.QueryEvents.newQuery).withFullInitializationStyling().withVisibleRootElement().withPlaceholderForFacets().withPlaceholderForResultList().withWaitingForFirstQueryMode())}})},t.ID="SearchInterface",t.options={enableHistory:T.ComponentOptions.buildBooleanOption({defaultValue:!1}),enableAutomaticResponsiveMode:T.ComponentOptions.buildBooleanOption({defaultValue:!0}),useLocalStorageForHistory:T.ComponentOptions.buildBooleanOption({defaultValue:!1}),resultsPerPage:T.ComponentOptions.buildNumberOption({defaultValue:10,min:0}),excerptLength:T.ComponentOptions.buildNumberOption({defaultValue:200,min:0}),expression:T.ComponentOptions.buildQueryExpressionOption({defaultValue:""}),filterField:T.ComponentOptions.buildFieldOption({defaultValue:""}),hideUntilFirstQuery:T.ComponentOptions.buildBooleanOption({deprecated:"Exposed for legacy reasons. The loading animation is now composed of placeholders, and this option is obsolete."}),firstLoadingAnimation:T.ComponentOptions.buildChildHtmlElementOption({deprecated:"Exposed for legacy reasons. The loading animation is now composed of placeholder, and this options is obsolete."}),autoTriggerQuery:T.ComponentOptions.buildBooleanOption({defaultValue:!0}),allowQueriesWithoutKeywords:T.ComponentOptions.buildBooleanOption({defaultValue:!0}),endpoint:T.ComponentOptions.buildCustomOption(function(e){return null!=e&&e in S.SearchEndpoint.endpoints?S.SearchEndpoint.endpoints[e]:null},{defaultFunction:function(){return S.SearchEndpoint.endpoints.default}}),timezone:T.ComponentOptions.buildStringOption({defaultFunction:function(){return s.determine().name()}}),enableDebugInfo:T.ComponentOptions.buildBooleanOption({defaultValue:!0}),enableCollaborativeRating:T.ComponentOptions.buildBooleanOption({defaultValue:!1}),enableDuplicateFiltering:T.ComponentOptions.buildBooleanOption({defaultValue:!1}),pipeline:T.ComponentOptions.buildStringOption(),maximumAge:T.ComponentOptions.buildNumberOption(),searchPageUri:T.ComponentOptions.buildStringOption(),responsiveMediumBreakpoint:T.ComponentOptions.buildNumberOption({defaultValue:F.MEDIUM_SCREEN_WIDTH,depend:"enableAutomaticResponsiveMode"}),responsiveSmallBreakpoint:T.ComponentOptions.buildNumberOption({defaultValue:F.SMALL_SCREEN_WIDTH,depend:"enableAutomaticResponsiveMode"}),responsiveMode:T.ComponentOptions.buildCustomOption(function(e){return"auto"===e||"small"===e||"medium"===e||"large"===e?e:(console.warn(e+" is not a proper value for responsiveMode, auto has been used instead."),"auto")},{defaultValue:"auto"})},t.SMALL_INTERFACE_CLASS_NAME="coveo-small-search-interface",t}(M.RootComponent);t.SearchInterface=N;var k=function(e){function t(n,i,o,r){void 0===r&&(r=window);var s=e.call(this,n,T.ComponentOptions.initComponentOptions(n,t,i),o,r)||this;return s.element=n,s.options=i,s.analyticsOptions=o,s._window=r,w.$$(s.root).on(h.QueryEvents.newQuery,function(e,t){return s.handleRedirect(e,t)}),s}return i(t,e),t.prototype.handleRedirect=function(e,t){if(!1!==t.shouldRedirectStandaloneSearchbox){var n={searchPageUri:this.options.searchPageUri,cancel:!1};w.$$(this.root).trigger(f.StandaloneSearchInterfaceEvents.beforeRedirect,n),n.cancel||(t.cancel=!0,this.searchboxIsEmpty()&&!this.options.redirectIfEmpty||this.redirectToSearchPage(n.searchPageUri))}},t.prototype.redirectToSearchPage=function(e){var t=this,n=this.queryStateModel.getAttributes(),i=this.usageAnalytics.getCurrentEventCause();null!=i&&(i==E.analyticsActionCauseList.searchboxSubmit.name&&(i=E.analyticsActionCauseList.searchFromLink.name),n.firstQueryCause=i);var o=this.usageAnalytics.getCurrentEventMeta();null==o||a.isEmpty(o)||(n.firstQueryMeta=o);var r=document.createElement("a");r.href=e,r.href=r.href;var s=0==r.pathname.indexOf("/")?r.pathname:"/"+r.pathname,u=r.hash?r.hash+"&":"#";setTimeout(function(){t._window.location.href=r.protocol+"//"+r.host+s+r.search+u+x.HashUtils.encodeValues(n)},0)},t.prototype.searchboxIsEmpty=function(){return _.Utils.isEmptyString(this.queryStateModel.get(C.QueryStateModel.attributesEnum.q))},t.ID="StandaloneSearchInterface",t.options={redirectIfEmpty:T.ComponentOptions.buildBooleanOption({defaultValue:!0})},t}(N);t.StandaloneSearchInterface=k},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=n(1),r=n(296),s=n(0),a=function(){function e(){}return e.javascriptEncode=function(e){return i.Assert.isString(e),e=e.replace(/\\/g,"\\\\"),e=e.replace(/'/g,"\\'"),e=e.replace(/"/g,'\\"')},e.htmlEncode=function(e){i.Assert.isString(e);var t=o.$$("div");return t.text(e),t.el.innerHTML},e.splice=function(e,t,n,i){return e.slice(0,t)+i+e.slice(t+Math.abs(n))},e.removeMiddle=function(t,n,i){if(t.length")},e.equalsCaseInsensitive=function(e,t){return e.toLowerCase()==t.toLowerCase()},e.match=function(e,t){for(var n,i=[];null!==(n=t.exec(e));)i.push(n);return i},e.hashCode=function(e){for(var t=0,n=e.length,i=0;i0){var t=e.functions[0];return e.functions=i.rest(e.functions),t(),e.functions.length>0}return!1},e.functions=[],e}();t.Defer=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(4),r=n(0);!function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.TAB=9]="TAB",e[e.ENTER=13]="ENTER",e[e.SHIFT=16]="SHIFT",e[e.CTRL=17]="CTRL",e[e.ALT=18]="ALT",e[e.ESCAPE=27]="ESCAPE",e[e.SPACEBAR=32]="SPACEBAR",e[e.PAGE_UP=33]="PAGE_UP",e[e.PAGE_DOWN=34]="PAGE_DOWN",e[e.HOME=36]="HOME",e[e.LEFT_ARROW=37]="LEFT_ARROW",e[e.UP_ARROW=38]="UP_ARROW",e[e.RIGHT_ARROW=39]="RIGHT_ARROW",e[e.DOWN_ARROW=40]="DOWN_ARROW",e[e.INSERT=45]="INSERT",e[e.DELETE=46]="DELETE"}(i=t.KEYBOARD||(t.KEYBOARD={}));var s=function(){function e(){}return e.keysEqual=function(e,t){return o.Utils.isNullOrUndefined(e.keyCode)?!o.Utils.isNullOrUndefined(e.which)&&e.which==t:e.keyCode==t},e.isAllowedKeyForOmnibox=function(t){var n=t.keyCode;return e.isNumberKeyPushed(n)||32==n||13==n||e.isLetterKeyPushed(n)||n>95&&n<112||n>185&&n<193||n>218&&n<223||n==i.BACKSPACE||n==i.DELETE||e.isArrowKeyPushed(n)},e.isAllowedKeyForSearchAsYouType=function(t){return e.isAllowedKeyForOmnibox(t)&&!e.isArrowKeyPushed(t.keyCode)},e.isDeleteOrBackspace=function(t){return e.keysEqual(t,i.BACKSPACE)||e.keysEqual(t,i.DELETE)},e.isArrowKeyPushed=function(e){return e==i.LEFT_ARROW||e==i.UP_ARROW||e==i.RIGHT_ARROW||e==i.DOWN_ARROW},e.isNumberKeyPushed=function(e){return e>47&&e<58},e.isLetterKeyPushed=function(e){return e>64&&e<91},e.keypressAction=function(e,t){return function(n){for(var i=[],o=1;oo.valueOf()?s.l("NextDay",i.format("dddd")):i.valueOf()=0?(r>=A?10:r>=T?5:r>=R?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(r>=A?10:r>=T?5:r>=R?2:1)}function s(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),r=i/o;return r>=A?o*=10:r>=T?o*=5:r>=R&&(o*=2),tt?1:e>=t?0:NaN},l=function(e){return 1===e.length&&(e=i(e)),{left:function(t,n,i,o){for(null==i&&(i=0),null==o&&(o=t.length);i>>1;e(t[r],n)<0?i=r+1:o=r}return i},right:function(t,n,i,o){for(null==i&&(i=0),null==o&&(o=t.length);i>>1;e(t[r],n)>0?o=r:i=r+1}return i}}},c=l(u),p=c.right,d=c.left,h=p,f=function(e,t){null==t&&(t=o);for(var n=0,i=e.length-1,r=e[0],s=new Array(i<0?0:i);ne?1:t>=e?0:NaN},g=function(e){return null===e?NaN:+e},v=function(e,t){var n,i,o=e.length,r=0,s=-1,a=0,u=0;if(null==t)for(;++s1)return u/(r-1)},b=function(e,t){var n=v(e,t);return n?Math.sqrt(n):n},C=function(e,t){var n,i,o,r=e.length,s=-1;if(null==t){for(;++s=n)for(i=o=n;++sn&&(i=n),o=n)for(i=o=n;++sn&&(i=n),o0)return[e];if((i=t0)for(e=Math.ceil(e/a),t=Math.floor(t/a),s=new Array(o=Math.ceil(t-e+1));++up;)d.pop(),--f;var m,y=new Array(f+1);for(o=0;o<=f;++o)m=y[o]=[],m.x0=o>0?d[o-1]:c,m.x1=o=1)return+n(e[i-1],i-1,e);var i,o=(i-1)*t,r=Math.floor(o),s=+n(e[r],r,e);return s+(+n(e[r+1],r+1,e)-s)*(o-r)}},D=function(e,t,n){return e=x.call(e,g).sort(u),Math.ceil((n-t)/(2*($(e,.75)-$(e,.25))*Math.pow(e.length,-1/3)))},P=function(e,t,n){return Math.ceil((n-t)/(3.5*b(e)*Math.pow(e.length,-1/3)))},N=function(e,t){var n,i,o=e.length,r=-1;if(null==t){for(;++r=n)for(i=n;++ri&&(i=n)}else for(;++r=n)for(i=n;++ri&&(i=n);return i},k=function(e,t){var n,i=e.length,o=i,r=-1,s=0;if(null==t)for(;++r=0;)for(i=e[o],t=i.length;--t>=0;)n[--s]=i[t];return n},B=function(e,t){var n,i,o=e.length,r=-1;if(null==t){for(;++r=n)for(i=n;++rn&&(i=n)}else for(;++r=n)for(i=n;++rn&&(i=n);return i},Q=function(e,t){for(var n=t.length,i=new Array(n);n--;)i[n]=e[t[n]];return i},U=function(e,t){if(n=e.length){var n,i,o=0,r=0,s=e[r];for(null==t&&(t=u);++o=n.length&&(o=void 0,r=!1)}return s},e.getValueDependingOnType=function(t,n){var i,o=e.getValueType(t,n);if("object"==o)i=e.decodeObject(n);else if("array"==o)i=e.decodeArray(n);else try{i=decodeURIComponent(n)}catch(i){new s.Logger(e).warn("Error while decoding a value from the URL as a standard value",i,t,n)}return i},e.getValueType=function(t,n){return"q"==t?"other":e.isObject(n)?"object":e.startsOrEndsWithSquareBracket(n)?"array":"other"},e.startsWithLeftSquareBracket=function(t){return e.DELIMITER.arrayStartRegExp.test(t)},e.startsWithEncodedLeftSquareBracket=function(t){return 0==t.indexOf(o.Utils.safeEncodeURIComponent(e.DELIMITER.arrayStart))},e.endsWithRightSquareBracket=function(t){return e.DELIMITER.arrayEndRegExp.test(t)},e.endsWithEncodedRightSquareBracket=function(t){var n=o.Utils.safeEncodeURIComponent(e.DELIMITER.arrayEnd);return t.indexOf(n)==t.length-n.length},e.isObjectStartNotEncoded=function(t){return t.substr(0,1)==e.DELIMITER.objectStart},e.isObjectStartEncoded=function(t){return 0==t.indexOf(o.Utils.safeEncodeURIComponent(e.DELIMITER.objectStart))},e.isObjectEndNotEncoded=function(t){return t.substr(t.length-1)==e.DELIMITER.objectEnd},e.isObjectEndEncoded=function(t){return t.indexOf(o.Utils.safeEncodeURIComponent(e.DELIMITER.objectEnd))==t.length-o.Utils.safeEncodeURIComponent(e.DELIMITER.objectEnd).length},e.isObject=function(t){var n=e.isObjectStartNotEncoded(t)||e.isObjectStartEncoded(t),i=e.isObjectEndNotEncoded(t)||e.isObjectEndEncoded(t);return n&&i},e.startsOrEndsWithSquareBracket=function(t){var n=e.startsWithLeftSquareBracket(t)||e.startsWithEncodedLeftSquareBracket(t),i=e.endsWithRightSquareBracket(t)||e.endsWithEncodedRightSquareBracket(t);return n||i},e.encodeArray=function(t){var n=r.map(t,function(e){return o.Utils.safeEncodeURIComponent(e)});return e.DELIMITER.arrayStart+n.join(",")+e.DELIMITER.arrayEnd},e.encodeObject=function(t){var n=this,i=r.map(t,function(e,t,i){return'"'+o.Utils.safeEncodeURIComponent(t)+'":'+n.encodeValue(e)});return e.DELIMITER.objectStart+i.join(" , ")+e.DELIMITER.objectEnd},e.encodeValue=function(t){return r.isArray(t)?e.encodeArray(t):r.isObject(t)?JSON.stringify(t):r.isNumber(t)||r.isBoolean(t)?o.Utils.safeEncodeURIComponent(t.toString()):'"'+o.Utils.safeEncodeURIComponent(t)+'"'},e.decodeObject=function(t){e.isObjectStartEncoded(t)&&e.isObjectEndEncoded(t)&&(t=t.replace(/encodeURIComponent(HashUtils.Delimiter.objectStart)/,e.DELIMITER.objectStart),t=t.replace(o.Utils.safeEncodeURIComponent(e.DELIMITER.objectEnd),e.DELIMITER.objectEnd));try{var n=/(\[.*\])/.exec(t);n&&(t=t.replace(/(\[.*\])/,"["+this.decodeArray(n[1]).map(function(e){return'"'+e+'"'}).join(",")+"]"));var i=decodeURIComponent(t);return JSON.parse(i)}catch(n){return new s.Logger(e).warn("Error while decoding a value from the URL as an object",n,t),{}}},e.decodeArray=function(t){var n=e.removeSquareBrackets(t),i=n.split(",");return r.chain(i).map(function(n){try{return decodeURIComponent(n)}catch(i){return new s.Logger(e).warn("Error while decoding a value from the URL as an array",i,n,t),null}}).compact().value()},e.removeSquareBrackets=function(t){return e.startsWithEncodedLeftSquareBracket(t)&&(t=t.replace(o.Utils.safeEncodeURIComponent(e.DELIMITER.arrayStart),"")),e.endsWithEncodedRightSquareBracket(t)&&(t=t.replace(o.Utils.safeEncodeURIComponent(e.DELIMITER.arrayEnd),"")),e.startsWithLeftSquareBracket(t)&&(t=t.replace(e.DELIMITER.arrayStart,"")),e.endsWithRightSquareBracket(t)&&(t=t.replace(e.DELIMITER.arrayEnd,"")),t},e.DELIMITER={objectStart:"{",objectEnd:"}",arrayStart:"[",arrayEnd:"]",arrayStartRegExp:/^\[/,arrayEndRegExp:/\]$/},e}();t.HashUtils=a},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(158),r=n(157),s=n(0),a=function(){function e(e,t,n){var i=this;this.expression=t,this.input=n,s.isString(e)?this.value=e:s.isArray(e)&&(this.subResults=e,s.forEach(this.subResults,function(e){e.parent=i}))}return e.prototype.isSuccess=function(){return null!=this.value||null!=this.subResults&&s.all(this.subResults,function(e){return e.isSuccess()})},e.prototype.path=function(e){var t=null!=this.parent&&this.parent!=e?this.parent.path(e):[];return t.push(this),t},e.prototype.findParent=function(e){for(var t=this,n=s.isString(e)?function(t){return e==t.expression.id}:e;null!=t&&!n(t);)t=t.parent;return t},e.prototype.find=function(e){var t=s.isString(e)?function(t){return e==t.expression.id}:e;if(t(this))return this;if(this.subResults)for(var n=0;nthis.getLength())return[];if(null!=t){if(s.isString(t)){if(t==this.expression.id)return[this]}else if(t(this))return[this]}else{if(null!=(null==this.value&&null==this.subResults?this.input:this.value))return[this]}if(null!=this.subResults){for(var n=[],i=0;i0?s.last(e).input:"";return"Expected "+s.map(e,function(e){return e.getHumanReadable()}).join(" or ")+" but "+(t.length>0?JSON.stringify(t[0]):"end of input")+" found."},e.prototype.before=function(){if(null==this.parent)return"";var e=s.indexOf(this.parent.subResults,this);return this.parent.before()+s.chain(this.parent.subResults).first(e).map(function(e){return e.toString()}).join("").value()},e.prototype.after=function(){if(null==this.parent)return"";var e=s.indexOf(this.parent.subResults,this);return s.chain(this.parent.subResults).last(this.parent.subResults.length-e-1).map(function(e){return e.toString()}).join("").value()+this.parent.after()},e.prototype.getLength=function(){return null!=this.value?this.value.length:null!=this.subResults?s.reduce(this.subResults,function(e,t){return e+t.getLength()},0):this.input.length},e.prototype.toHtmlElement=function(){var e=document.createElement("span"),t=null!=this.expression?this.expression.id:null;return null!=t&&e.setAttribute("data-id",t),e.setAttribute("data-success",this.isSuccess().toString()),null!=this.value?(e.appendChild(document.createTextNode(this.value)),e.setAttribute("data-value",this.value)):null!=this.subResults?s.each(this.subResults,function(t){e.appendChild(t.toHtmlElement())}):(e.appendChild(document.createTextNode(this.input)),e.setAttribute("data-input",this.input),e.className="magic-box-error"+(this.input.length>0?"":" magic-box-error-empty")),e.result=this,e},e.prototype.clean=function(t){if(null!=t||!this.isSuccess()){t=t||s.last(this.getBestExpect()).path(this);var n=s.first(t);if(null!=n){var i=s.indexOf(this.subResults,n),o=-1==i?[]:s.map(s.first(this.subResults,i),function(e){return e.clean()});return o.push(n.clean(s.rest(t))),new e(o,this.expression,this.input)}return new e(null,this.expression,this.input)}return null!=this.value?new e(this.value,this.expression,this.input):null!=this.subResults?new e(s.map(this.subResults,function(e){return e.clean()}),this.expression,this.input):void 0},e.prototype.clone=function(){return null!=this.value?new e(this.value,this.expression,this.input):null!=this.subResults?new e(s.map(this.subResults,function(e){return e.clone()}),this.expression,this.input):new e(null,this.expression,this.input)},e.prototype.toString=function(){return null!=this.value?this.value:null!=this.subResults?s.map(this.subResults,function(e){return e.toString()}).join(""):this.input},e.prototype.getHumanReadable=function(){return this.expression instanceof r.ExpressionConstant?JSON.stringify(this.expression.value):this.expression.id},e}();t.Result=a;var u=function(e){function t(t){var n=e.call(this,[t],o.ExpressionEndOfInput,t.input)||this,i=new a(null,o.ExpressionEndOfInput,t.input.substr(t.getLength()));return i.parent=n,n.subResults.push(i),n}return i(t,e),t}(a);t.EndOfInputResult=u},function(e,t,n){"use strict";function i(e,t,n,i,o){var r=e*e,s=r*e;return((1-3*e+3*r-s)*t+(4-6*r+3*s)*n+(1+3*e+3*r-3*s)*i+s*o)/6}function o(e,t){return function(n){return e+n*t}}function r(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function s(e,t){var n=t-e;return n?o(e,n>180||n<-180?n-360*Math.round(n/360):n):R(isNaN(e)?t:e)}function a(e){return 1==(e=+e)?u:function(t,n){return n-t?r(t,n,e):R(isNaN(t)?n:t)}}function u(e,t){var n=t-e;return n?o(e,n):R(isNaN(e)?t:e)}function l(e){return function(t){var n,i,o=t.length,r=new Array(o),s=new Array(o),a=new Array(o);for(n=0;n180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(o(n)+"rotate(",null,i)-2,x:P(e,t)})):t&&n.push(o(n)+"rotate("+t+i)}function a(e,t,n,r){e!==t?r.push({i:n.push(o(n)+"skewX(",null,i)-2,x:P(e,t)}):t&&n.push(o(n)+"skewX("+t+i)}function u(e,t,n,i,r,s){if(e!==n||t!==i){var a=r.push(o(r)+"scale(",null,",",null,")");s.push({i:a-4,x:P(e,n)},{i:a-2,x:P(t,i)})}else 1===n&&1===i||r.push(o(r)+"scale("+n+","+i+")")}return function(t,n){var i=[],o=[];return t=e(t),n=e(n),r(t.translateX,t.translateY,n.translateX,n.translateY,i,o),s(t.rotate,n.rotate,i,o),a(t.skewX,n.skewX,i,o),u(t.scaleX,t.scaleY,n.scaleX,n.scaleY,i,o),t=n=null,function(e){for(var t,n=-1,r=o.length;++n=1?(n=1,t-1):Math.floor(n*t),r=e[o],s=e[o+1],a=o>0?e[o-1]:2*r-s,u=or&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:P(n,i)})),r=L.lastIndex;return rthis.getSmallScreenWidth(),"Cannot set medium screen width ("+e+") smaller or equal to the current small screen width ("+this.getSmallScreenWidth()+")"),this.mediumScreenWidth=e},e.prototype.setResponsiveMode=function(e){this.responsiveMode=e},e.prototype.getSmallScreenWidth=function(){return"small"===this.responsiveMode?Number.POSITIVE_INFINITY:"auto"!==this.responsiveMode?0:null==this.smallScreenWidth?t.SMALL_SCREEN_WIDTH:this.smallScreenWidth},e.prototype.getMediumScreenWidth=function(){return"medium"===this.responsiveMode?Number.POSITIVE_INFINITY:"auto"!==this.responsiveMode?0:null==this.mediumScreenWidth?t.MEDIUM_SCREEN_WIDTH:this.mediumScreenWidth},e.prototype.getResponsiveMode=function(){return this.responsiveMode},e.prototype.isSmallScreenWidth=function(){return null!=this.windoh.clientWidth?this.windoh.clientWidth<=this.getSmallScreenWidth():document.body.clientWidth<=this.getSmallScreenWidth()},e.prototype.isMediumScreenWidth=function(){return!this.isSmallScreenWidth()&&(null!=this.windoh.clientWidth?this.windoh.clientWidth<=this.getMediumScreenWidth():document.body.clientWidth<=this.getMediumScreenWidth())},e.prototype.isLargeScreenWidth=function(){return!this.isSmallScreenWidth()&&!this.isMediumScreenWidth()},e}();t.ResponsiveComponents=o},function(e,t,n){"use strict";function i(e,t,n){return{originalMethod:n.value,nbParams:e[t].prototype.constructor.length}}function o(){return{url:"",queryString:[],requestData:{},method:"",responseType:"",errorsAsSuccess:!1}}function r(e){return function(t,n,r){var s=i(t,n,r),a=s.originalMethod,u=s.nbParams;return r.value=function(){for(var t=[],n=0;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},g=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},v=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]n},e.addNoStateCssClassToFacetValues=function(e,t){if(0!=e.values.getSelected().length){var n=u.$$(t).findAll("li:not(.coveo-selected)");l.each(n,function(e){u.$$(e).addClass("coveo-no-state")})}},e.tryToGetTranslatedCaption=function(e,t){var n;if(o.QueryUtils.isStratusAgnosticField(e.toLowerCase(),"@filetype"))n=r.FileTypes.getFileType(t).caption;else if(o.QueryUtils.isStratusAgnosticField(e.toLowerCase(),"@objecttype"))n=r.FileTypes.getObjectType(t).caption;else if(o.QueryUtils.isStratusAgnosticField(e.toLowerCase(),"@month")&&"Search"!=t)try{var i=parseInt(t);n=s.DateUtils.monthToString(i-1)}catch(e){}else n=c.l(t);return void 0!=n&&a.Utils.isNonEmptyString(n)?n:t},e}();t.FacetUtils=p},function(e,t,n){"use strict";function i(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function o(){}function r(e){var t;return e=(e+"").trim().toLowerCase(),(t=$.exec(e))?(t=parseInt(t[1],16),new c(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1)):(t=D.exec(e))?s(parseInt(t[1],16)):(t=P.exec(e))?new c(t[1],t[2],t[3],1):(t=N.exec(e))?new c(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=k.exec(e))?a(t[1],t[2],t[3],t[4]):(t=L.exec(e))?a(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=V.exec(e))?p(t[1],t[2]/100,t[3]/100,1):(t=B.exec(e))?p(t[1],t[2]/100,t[3]/100,t[4]):Q.hasOwnProperty(e)?s(Q[e]):"transparent"===e?new c(NaN,NaN,NaN,0):null}function s(e){return new c(e>>16&255,e>>8&255,255&e,1)}function a(e,t,n,i){return i<=0&&(e=t=n=NaN),new c(e,t,n,i)}function u(e){return e instanceof o||(e=r(e)),e?(e=e.rgb(),new c(e.r,e.g,e.b,e.opacity)):new c}function l(e,t,n,i){return 1===arguments.length?u(e):new c(e,t,n,null==i?1:i)}function c(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function p(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new f(e,t,n,i)}function d(e){if(e instanceof f)return new f(e.h,e.s,e.l,e.opacity);if(e instanceof o||(e=r(e)),!e)return new f;if(e instanceof f)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,s=Math.min(t,n,i),a=Math.max(t,n,i),u=NaN,l=a-s,c=(a+s)/2;return l?(u=t===a?(n-i)/l+6*(n0&&c<1?0:u,new f(u,l,c,e.opacity)}function h(e,t,n,i){return 1===arguments.length?d(e):new f(e,t,n,null==i?1:i)}function f(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function m(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function y(e){if(e instanceof v)return new v(e.l,e.a,e.b,e.opacity);if(e instanceof E){var t=e.h*U;return new v(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof c||(e=u(e));var n=w(e.r),i=w(e.g),o=w(e.b),r=b((.4124564*n+.3575761*i+.1804375*o)/H),s=b((.2126729*n+.7151522*i+.072175*o)/q);return new v(116*s-16,500*(r-s),200*(s-b((.0193339*n+.119192*i+.9503041*o)/z)),e.opacity)}function g(e,t,n,i){return 1===arguments.length?y(e):new v(e,t,n,null==i?1:i)}function v(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function b(e){return e>K?Math.pow(e,1/3):e/Y+W}function C(e){return e>G?e*e*e:Y*(e-W)}function S(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function w(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function x(e){if(e instanceof E)return new E(e.h,e.c,e.l,e.opacity);e instanceof v||(e=y(e));var t=Math.atan2(e.b,e.a)*j;return new E(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function _(e,t,n,i){return 1===arguments.length?x(e):new E(e,t,n,null==i?1:i)}function E(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function O(e){if(e instanceof T)return new T(e.h,e.s,e.l,e.opacity);e instanceof c||(e=u(e));var t=e.r/255,n=e.g/255,i=e.b/255,o=(oe*i+ne*t-ie*n)/(oe+ne-ie),r=i-o,s=(te*(n-o)-Z*r)/ee,a=Math.sqrt(s*s+r*r)/(te*o*(1-o)),l=a?Math.atan2(s,r)*j-120:NaN;return new T(l<0?l+360:l,a,o,e.opacity)}function A(e,t,n,i){return 1===arguments.length?O(e):new T(e,t,n,null==i?1:i)}function T(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}var R=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e},M="\\s*([+-]?\\d+)\\s*",I="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$=/^#([0-9a-f]{3})$/,D=/^#([0-9a-f]{6})$/,P=new RegExp("^rgb\\("+[M,M,M]+"\\)$"),N=new RegExp("^rgb\\("+[F,F,F]+"\\)$"),k=new RegExp("^rgba\\("+[M,M,M,I]+"\\)$"),L=new RegExp("^rgba\\("+[F,F,F,I]+"\\)$"),V=new RegExp("^hsl\\("+[I,F,F]+"\\)$"),B=new RegExp("^hsla\\("+[I,F,F,I]+"\\)$"),Q={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};R(o,r,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),R(c,l,i(o,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new c(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new c(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(1===e?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),R(f,h,i(o,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new f(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new f(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new c(m(e>=240?e-240:e+120,o,i),m(e,o,i),m(e<120?e+240:e-120,o,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var U=Math.PI/180,j=180/Math.PI,H=.95047,q=1,z=1.08883,W=4/29,G=6/29,Y=3*G*G,K=G*G*G;R(v,g,i(o,{brighter:function(e){return new v(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new v(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return e=q*C(e),t=H*C(t),n=z*C(n),new c(S(3.2404542*t-1.5371385*e-.4985314*n),S(-.969266*t+1.8760108*e+.041556*n),S(.0556434*t-.2040259*e+1.0572252*n),this.opacity)}})),R(E,_,i(o,{brighter:function(e){return new E(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new E(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return y(this).rgb()}}));var J=-.14861,X=1.78277,Z=-.29227,ee=-.90649,te=1.97294,ne=te*ee,ie=te*X,oe=X*Z-ee*J;R(T,A,i(o,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new T(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new T(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*U,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),o=Math.sin(e);return new c(255*(t+n*(J*i+X*o)),255*(t+n*(Z*i+ee*o)),255*(t+n*(te*i)),this.opacity)}})),n.d(t,"a",function(){return r}),n.d(t,"f",function(){return l}),n.d(t,"d",function(){return h}),n.d(t,"e",function(){return g}),n.d(t,"c",function(){return _}),n.d(t,"b",function(){return A})},function(e,t,n){"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),window.Promise instanceof Function||n(228);var o=n(150);t._=o.underscoreInstance,i(n(231)),i(n(54)),i(n(249)),i(n(103)),i(n(250)),i(n(147)),i(n(252)),i(n(308)),i(n(86))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(7),r=n(1),s=n(29),a=function(){function e(e,t){void 0===e&&(e=function(e){}),this.onChange=e,this.name=t,this.lastQueryText="",this.buildContent()}return e.doExport=function(){i.exportGlobally({TextInput:e})},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return r.$$(this.element).find("input").value},e.prototype.setValue=function(e){var t=this.getValue();r.$$(this.element).find("input").value=e,t!=e&&this.onChange(this)},e.prototype.reset=function(){var e=this.getValue();r.$$(this.element).find("input").value="",""!=e&&this.onChange(this)},e.prototype.build=function(){return this.element},e.prototype.getInput=function(){return r.$$(this.element).find("input")},e.prototype.buildContent=function(){var e=this,t=r.$$("div",{className:"coveo-input"}),n=r.$$("input",{type:"text","aria-label":this.name?o.l(this.name):""});if(n.on(["keydown","blur"],function(t){"blur"!=t.type&&t.keyCode!=s.KEYBOARD.ENTER||e.triggerChange()}),n.el.required=!0,t.append(n.el),this.name){var i=r.$$("label");i.text(this.name),t.append(i.el)}this.element=t.el},e.prototype.triggerChange=function(){this.lastQueryText!=this.getInput().value&&(this.onChange(this),this.lastQueryText=this.getInput().value)},e}();t.TextInput=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(5),r=n(0),s=function(){function e(){}return e.replace=function(t,n,o){var r=new e;if(i.Utils.isNullOrEmptyString(t))return r;var s=t.lastIndexOf(n);if(-1==s)return r.value=t,r;for(var a=[];s>=0;){var u={begin:s,size:n.length,replacementSize:o.length};a.push(u),t=t.slice(0,s)+o+t.slice(s+n.length),s=t.lastIndexOf(n)}return r.holes=a,r.value=t,r},e.shortenPath=function(t,n){var o=new e,r=t;if(i.Utils.isNullOrEmptyString(r)||r.length<=n)return o.value=r,o;var s=[],a=-1;if(-1!==(a=i.Utils.stringStartsWith(r,"\\\\")?r.indexOf("\\",a+2):r.indexOf("\\"))){for(var u=0,l=r.indexOf("\\",a+1);-1!==l&&r.length-u+e.SHORTEN_END.length>n;)u=l-a-1,l=r.indexOf("\\",l+1);if(u>0){r=r.slice(0,a+1)+e.SHORTEN_END+r.slice(u);var c={begin:a+1,size:u-e.SHORTEN_END.length,replacementSize:e.SHORTEN_END.length};s.push(c)}}if(r.length>n){var p=r.length-n+e.SHORTEN_END.length,d=r.length-p;r=r.slice(0,d)+e.SHORTEN_END;var c={begin:d,size:p,replacementSize:e.SHORTEN_END.length};s.push(c)}return o.holes=s,o.value=r,o},e.shortenString=function(t,n,o){void 0===n&&(n=200);var r=t;o=i.Utils.toNotNullString(o);var s=new e;if(i.Utils.isNullOrEmptyString(r)||n<=o.length)return s.value=r,s;if(r.length<=n)return s.value=r,s;var a=r;if(n-=o.length,a=a.slice(0,n)," "!==r.charAt(a.length)){var u=a.lastIndexOf(" ");-1!==u&&a.length-un;)a=u-s-1,u=t.indexOf("/",u+1);if(a>0){t=t.slice(0,s+1)+e.SHORTEN_END+t.slice(s+1+a);var l={begin:s+1,size:a,replacementSize:e.SHORTEN_END.length};r.push(l)}}if(t.length>n){var c=t.length-n+e.SHORTEN_END.length,p=t.length-c;t=t.slice(0,p)+e.SHORTEN_END;var l={begin:p,size:c,replacementSize:e.SHORTEN_END.length};r.push(l)}return o.holes=r,o.value=t,o},e.SHORTEN_END="...",e.WORD_SHORTER=10,e}();t.StringAndHoles=s;var a=function(){function e(){}return e.highlightString=function(e,t,n,s){if(o.Assert.isNotUndefined(t),o.Assert.isNotNull(t),o.Assert.isNonEmptyString(s),i.Utils.isNullOrEmptyString(e))return e;for(var a=e.length,u="",l=0,c=0;c=g&&h=g&&h=g&&d=v)d=g+y.replacementSize,h-=y.size-y.replacementSize;else if(d=v)h-=y.size-y.replacementSize;else if(d>=v){var b=y.size-y.replacementSize;d-=b,h-=b}}}if(f||d===h)continue}if(h>a)break;u+=r.escape(e.slice(l,d)),u+='",l=h}return l!=a&&(u+=r.escape(e.slice(l))),u},e}();t.HighlightUtils=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(7),r=n(0),s=n(3),a=function(){function e(e,t,n,i){void 0===e&&(e=function(e){}),void 0===n&&(n=o.l),this.onChange=e,this.listOfValues=t,this.getDisplayValue=n,this.label=i,this.optionsElement=[],this.buildContent(),this.select(0,!1),this.bindEvents()}return e.doExport=function(){s.exportGlobally({Dropdown:e})},e.prototype.reset=function(){this.select(0,!1)},e.prototype.setId=function(e){i.$$(this.element).setAttribute("id",e)},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return this.selectElement.value},e.prototype.select=function(e,t){void 0===t&&(t=!0),this.selectOption(this.optionsElement[e],t)},e.prototype.build=function(){return this.element},e.prototype.setValue=function(e){var t=this;r.each(this.optionsElement,function(n){i.$$(n).getAttribute("data-value")==e&&t.selectOption(n)})},e.prototype.selectOption=function(e,t){void 0===t&&(t=!0),this.selectElement.value=e.value,t&&this.onChange(this)},e.prototype.buildContent=function(){var e=this;this.selectElement=i.$$("select",{className:"coveo-dropdown"}).el,this.label&&this.selectElement.setAttribute("aria-label",o.l(this.label));var t=this.buildOptions();r.each(t,function(t){i.$$(e.selectElement).append(t)}),this.element=this.selectElement},e.prototype.buildOptions=function(){var e=this,t=[];return r.each(this.listOfValues,function(n){t.push(e.buildOption(n))}),t},e.prototype.buildOption=function(e){var t=i.$$("option");return t.setAttribute("data-value",e),t.setAttribute("value",e),t.text(this.getDisplayValue(e)),this.optionsElement.push(t.el),t.el},e.prototype.bindEvents=function(){var e=this;i.$$(this.selectElement).on("change",function(){return e.onChange(e)})},e}();t.Dropdown=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(56),o=n(73),r=n(46),s=n(77),a=n(8),u=n(5),l=n(4),c=n(0),p=function(){function e(){}return e.buildTemplateOption=function(t){return a.ComponentOptions.buildOption(a.ComponentOptionsType.TEMPLATE,e.loadTemplateOption,t)},e.loadTemplateOption=function(t,n,i,o){void 0===o&&(o=document);var r,s=i.selectorAttr||a.ComponentOptions.attrNameFromName(n,i)+"-selector",u=t.getAttribute(s)||a.ComponentOptions.getAttributeFromAlias(t,i);if(null!=u){var l=o.querySelector(u);null!=l&&(r=e.createResultTemplateFromElement(l))}if(null==r){var c=i.idAttr||a.ComponentOptions.attrNameFromName(n,i)+"-id",p=t.getAttribute(c)||a.ComponentOptions.getAttributeFromAlias(t,i);null!=p&&(r=e.loadResultTemplateFromId(p))}if(null==r){var d=i.childSelector;null==d&&(d="."+n.replace(/([A-Z])/g,"-$1").toLowerCase()),r=e.loadChildrenResultTemplateFromSelector(t,d)}return r},e.createResultTemplateFromElement=function(e){u.Assert.exists(e);var t=e.getAttribute("type"),n="You must specify the type of template. Valid values are: "+r.UnderscoreTemplate.mimeTypes.toString()+" "+s.HtmlTemplate.mimeTypes.toString();return u.Assert.check(l.Utils.isNonEmptyString(t),n),-1!=c.indexOf(r.UnderscoreTemplate.mimeTypes,t.toLowerCase())?r.UnderscoreTemplate.create(e):-1!=c.indexOf(s.HtmlTemplate.mimeTypes,t.toLowerCase())?new s.HtmlTemplate(e):void u.Assert.fail("Cannot guess template type from attribute: "+t+". Valid values are "+n)},e.loadResultTemplateFromId=function(e){return l.Utils.isNonEmptyString(e)?i.TemplateCache.getTemplate(e):null},e.loadChildrenResultTemplateFromSelector=function(t,n){var i=a.ComponentOptions.loadChildrenHtmlElementFromSelector(t,n);return i.length>0?new o.TemplateList(c.compact(i.map(function(t){return e.createResultTemplateFromElement(t)}))):null},e}();t.TemplateComponentOptions=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5);t.Assert=i.Assert;var o=n(28);t.Defer=o.Defer;var r=n(115);t.L10N=r.L10N;var s=n(11);t.Logger=s.Logger;var a=n(60);t.Options=a.Options;var u=n(7);t.l=u.l,n(11).Logger.disable()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=n(20),r=n(0),s=function(){function e(){this.parts=[],this.wrapParts=!0}return e.prototype.add=function(e){i.Assert.isNonEmptyString(e),this.parts.push(e)},e.prototype.fromExpressionBuilder=function(e){this.parts=this.parts.concat(e.parts)},e.prototype.addFieldExpression=function(e,t,n){i.Assert.isNonEmptyString(e),i.Assert.stringStartsWith(e,"@"),i.Assert.isNonEmptyString(t),i.Assert.isLargerOrEqualsThan(1,n.length),this.add(o.QueryUtils.buildFieldExpression(e,t,n))},e.prototype.addFieldNotEqualExpression=function(e,t){i.Assert.isNonEmptyString(e),i.Assert.stringStartsWith(e,"@"),i.Assert.isLargerOrEqualsThan(1,t.length),this.add(o.QueryUtils.buildFieldNotEqualExpression(e,t))},e.prototype.remove=function(e){i.Assert.isNonEmptyString(e),-1!=r.indexOf(this.parts,e)&&this.parts.splice(r.indexOf(this.parts,e),1)},e.prototype.isEmpty=function(){return 0==this.parts.length},e.prototype.build=function(e){return void 0===e&&(e=" "),0==this.parts.length?void 0:1==this.parts.length?this.parts[0]:this.wrapParts?"("+this.parts.join(")"+e+"(")+")":this.parts.join(e)},e.prototype.getParts=function(){return this.parts},e.merge=function(){for(var t=[],n=0;n1){var s=r.map(i,function(e){return e.build()});o.add("("+s.join(") OR (")+")")}return o},e}();t.ExpressionBuilder=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(21),o=n(5),r=n(46),s=n(77),a=n(0),u=function(){function e(){}return e.registerTemplate=function(t,n,r,s,u){void 0===r&&(r=!0),void 0===s&&(s=!1),void 0===u&&(u=!1),o.Assert.isNonEmptyString(t),o.Assert.exists(n),n instanceof i.Template||(n=new i.Template(n)),null==n.name&&(n.name=t),e.templates[t]=n,r&&!a.contains(e.templateNames,t)&&e.templateNames.push(t),u&&!a.contains(e.resultListTemplateNames,t)&&e.resultListTemplateNames.push(t),s&&(e.defaultTemplates[t]=n)},e.unregisterTemplate=function(t){o.Assert.isNonEmptyString(t),void 0!=e.templates[t]&&delete e.templates[t],void 0!=e.defaultTemplates[t]&&delete e.defaultTemplates[t]},e.getTemplate=function(t){return e.templates[t]||e.scanAndRegisterTemplates(),o.Assert.exists(e.templates[t]),e.templates[t]},e.getTemplates=function(){return e.templates},e.getTemplateNames=function(){return e.templateNames},e.getResultListTemplateNames=function(){return e.resultListTemplateNames},e.getDefaultTemplates=function(){return a.keys(e.defaultTemplates)},e.getDefaultTemplate=function(t){return o.Assert.exists(e.defaultTemplates[t]),e.defaultTemplates[t]},e.scanAndRegisterTemplates=function(){r.UnderscoreTemplate.isLibraryAvailable()&&e.scanAndRegisterUnderscoreTemplates(),e.scanAndRegisterHtmlTemplates()},e.scanAndRegisterUnderscoreTemplates=function(){a.each(r.UnderscoreTemplate.mimeTypes,function(t){for(var n=document.querySelectorAll("script[id][type='"+t+"']"),i=n.length,o=new Array(i);i--;)o[i]=n.item(i);a.each(o,function(t){var n=new r.UnderscoreTemplate(t);e.registerTemplate(t.getAttribute("id"),n)})})},e.scanAndRegisterHtmlTemplates=function(){a.each(s.HtmlTemplate.mimeTypes,function(t){for(var n=document.querySelectorAll("script[id][type='"+t+"']"),i=n.length,o=new Array(i);i--;)o[i]=n.item(i);a.each(o,function(t){var n=new s.HtmlTemplate(t);e.registerTemplate(t.getAttribute("id"),n)})})},e.templates={},e.templateNames=[],e.resultListTemplateNames=[],e.defaultTemplates={},e}();t.TemplateCache=u,document.addEventListener("DOMContentLoaded",function(){u.scanAndRegisterTemplates()})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=function(){function e(e,t){void 0===t&&(t=!0),this.milliseconds=t?e:1e3*e}return e.prototype.getMilliseconds=function(){return this.milliseconds},e.prototype.getSeconds=function(){return this.getMilliseconds()/1e3},e.prototype.getMinutes=function(){return this.getSeconds()/60},e.prototype.getHours=function(){return this.getMinutes()/60},e.prototype.getDays=function(){return this.getHours()/24},e.prototype.getWeeks=function(){return this.getDays()/7},e.prototype.getHHMMSS=function(){var e,t,n,i=Math.floor(this.getHours()),o=Math.floor(this.getMinutes())%60,r=Math.floor(this.getSeconds())%60;return e=0==i?"":i<10?"0"+i.toString():i.toString(),t=o<10?"0"+o.toString():o.toString(),n=r<10?"0"+r.toString():r.toString(),(""!=e?e+":":"")+t+":"+n},e.fromDates=function(t,n){return i.Assert.exists(t),i.Assert.exists(n),new e(n.valueOf()-t.valueOf())},e}();t.TimeSpan=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(301);var i=n(3),o=n(1),r=function(){function e(e,t){void 0===e&&(e=function(e){}),this.onChange=e,this.label=t,this.buildContent()}return e.prototype.toggle=function(){this.checkbox.checked=!this.isSelected(),o.$$(this.checkbox).trigger("change")},e.prototype.getElement=function(){return this.element},e.prototype.build=function(){return this.element},e.prototype.getValue=function(){return this.label},e.prototype.reset=function(){var e=this.isSelected();this.checkbox.checked=!1,e&&o.$$(this.checkbox).trigger("change")},e.prototype.select=function(e){void 0===e&&(e=!0);var t=this.isSelected();this.checkbox.checked=!0,!t&&e&&o.$$(this.checkbox).trigger("change")},e.prototype.isSelected=function(){return this.checkbox.checked},e.prototype.getLabel=function(){return this.element},e.prototype.buildContent=function(){var e=this,t=o.$$("label",{className:"coveo-checkbox-label"});this.checkbox=o.$$("input",{type:"checkbox", 'title':"open results in new window",className:"coveo-checkbox",value:this.label}).el;var n=o.$$("button",{type:"button",className:"coveo-checkbox-button","aria-label":this.label}),i=o.$$("span",{className:"coveo-checkbox-span-label"});i.text(this.label),t.append(this.checkbox),t.append(n.el),t.append(i.el),n.on("click",function(t){t.preventDefault(),e.toggle()}),o.$$(this.checkbox).on("change",function(){return e.onChange(e)}),this.element=t.el},e.doExport=function(){i.exportGlobally({Checkbox:e})},e}();t.Checkbox=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.getJQuery=function(){return!!(window&&window.Coveo&&window.Coveo.$)&&window.Coveo.$},e.isInstanceOfJQuery=function(e){var t=this.getJQuery();return!!t&&e instanceof t},e.isInstanceOfJqueryEvent=function(e){var t=this.getJQuery();return!!t&&e instanceof t.Event},e}();t.JQueryUtils=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(0),r=function(){function e(){}return e.prototype.merge=function(e){return o.extend({},this,e)},e.prototype.mergeDeep=function(e){return o.extend({},i.Utils.extendDeep(this,e))},e}();t.Options=r},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),r=function(e){function t(n){return e.call(this,n,t.ID,{})||this}return i(t,e),t.prototype.registerComponent=function(e,t){void 0==this.attributes[e]?this.attributes[e]=[t]:this.attributes[e].push(t)},t.ID="ComponentState",t}(o.Model);t.ComponentStateModel=r},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(372),n(373);var o=n(0),r=n(160),s=n(37),a=n(31),u=n(10),l=n(64),c=n(3),p=n(5),d=n(28),h=n(15),f=n(12),m=n(7),y=n(22),g=n(1),v=n(14),b=n(13),C=n(4),S=n(9),w=n(6),x=n(8),_=n(2),E=n(374),O=n(332),A=n(333),T=n(330),R=n(334),M=n(125),I=n(335),F=n(326),$=n(327),D=n(47),P=n(92),N=n(91),k=n(336),L=n(155),V=n(337),B=n(338),Q=n(325),U=n(378),j=n(17),H=function(e){function t(n,i,r,s){void 0===s&&(s=t.ID);var a=e.call(this,n,s,r)||this;return a.element=n,a.options=i,a.keepDisplayedValuesNextTime=!1,a.values=new N.FacetValues,a.currentPage=0,a.firstQuery=!0,a.canFetchMore=!0,a.showingWaitAnimation=!1,a.listenToQueryStateChange=!0,a.options=x.ComponentOptions.initComponentOptions(n,t,i),null!=a.options.valueCaption&&(a.options.availableSorts=o.filter(a.options.availableSorts,function(e){return!/^alpha.*$/.test(e)}),a.logger.warn("Because the "+a.options.field+" facet is using value captions, alphabetical sorts are disabled.")),E.ResponsiveFacets.init(a.root,a,a.options),a.omniboxZIndex=t.omniboxIndex,t.omniboxIndex--,a.checkForComputedFieldAndSort(),a.checkForValueCaptionType(),a.checkForCustomSort(),a.initDependentFacetManager(),a.initFacetQueryController(),a.initQueryEvents(),a.initQueryStateEvents(),a.initComponentStateEvents(),a.initOmniboxEvents(),a.initBreadCrumbEvents(),a.initSearchAlertEvents(),a.updateNumberOfValues(),a.bind.oneRootElement(u.QueryEvents.querySuccess,function(){a.firstQuery=!1}),a}return i(t,e),t.prototype.isCurrentlyDisplayed=function(){return!!g.$$(this.element).isVisible()&&(!!g.$$(this.element).hasClass("coveo-active")||!g.$$(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=o.once(function(){e.facetSettings.loadSavedState.apply(e.facetSettings)});this.bind.onRootElement(u.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(),o.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(),o.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(),o.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(),o.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 o.pluck(this.getDisplayedFacetValues(),"value")},t.prototype.getDisplayedFacetValues=function(){this.ensureDom();var e=this.facetValuesList.getAllCurrentlyDisplayed();return o.map(e,function(e){return e.facetValue})},t.prototype.getSelectedValues=function(){return this.ensureDom(),o.map(this.values.getSelected(),function(e){return e.value})},t.prototype.getExcludedValues=function(){return this.ensureDom(),o.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(S.analyticsActionCauseList.facetUpdateSort,{criteria:e,facetId:this.options.id,facetTitle:this.options.title},this.element),this.triggerNewQuery())},t.prototype.unfadeInactiveValuesInMainList=function(){g.$$(this.element).removeClass("coveo-facet-fade")},t.prototype.fadeInactiveValuesInMainList=function(e){g.$$(this.element).addClass("coveo-facet-fade")},t.prototype.showWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation||(g.$$(this.headerElement).find(".coveo-facet-header-wait-animation").style.visibility="visible",this.showingWaitAnimation=!0)},t.prototype.hideWaitingAnimation=function(){this.ensureDom(),this.showingWaitAnimation&&(g.$$(this.headerElement).find(".coveo-facet-header-wait-animation").style.visibility="hidden",this.showingWaitAnimation=!1)},t.prototype.processFacetSearchAllResultsSelected=function(e){var t=this,n=[];o.each(e,function(e){t.ensureFacetValueIsInList(e),n.push(e.value)});var i=this.values.getSelected().concat(this.values.getExcluded());this.numberOfValues=i.length+o.difference(i,e).length,this.numberOfValues=Math.max(this.numberOfValues,this.options.numberOfValues),this.currentPage=Math.floor((this.numberOfValues-this.options.numberOfValues)/this.options.pageSize),this.updateQueryStateModel(),this.triggerNewQuery(function(){return t.usageAnalytics.logSearchEvent(S.analyticsActionCauseList.facetSelectAll,{facetId:t.options.id,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=e.lookupValue||e.value,n=t;return n=D.FacetUtils.tryToGetTranslatedCaption(this.options.field,t),C.Utils.exists(this.options.valueCaption)&&("object"==typeof this.options.valueCaption&&(n=this.options.valueCaption[t]||n),"function"==typeof this.options.valueCaption&&(this.values.get(t),n=this.options.valueCaption.call(this,this.facetValuesList.get(t).facetValue))),n},t.prototype.showMore=function(){this.currentPage++,this.updateNumberOfValues(),this.nbAvailableValues>=this.numberOfValues||!this.canFetchMore?this.rebuildValueElements():this.triggerMoreQuery()},t.prototype.showLess=function(){g.$$(this.lessElement).removeClass("coveo-active"),this.currentPage=0,this.updateNumberOfValues(),g.$$(this.moreElement).addClass("coveo-active"),this.values.sortValuesDependingOnStatus(this.numberOfValues),this.rebuildValueElements()},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(),this.dependentFacetManager.updateVisibilityBasedOnDependsOn();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 N.FacetValues),this.updateAppearanceDependingOnState(),this.hideWaitingAnimation()},t.prototype.handlePopulateBreadcrumb=function(e){if(p.Assert.exists(e),this.values.hasSelectedOrExcludedValues()){var t=new A.BreadcrumbValueList(this,this.values.getSelected().concat(this.values.getExcluded()),O.BreadcrumbValueElement).build();e.breadcrumbs.push({element:t})}},t.prototype.handlePopulateSearchAlerts=function(e){if(this.values.hasSelectedOrExcludedValues()){var t=this.values.getExcluded(),n=this.values.getSelected();o.isEmpty(t)||e.text.push({value:new A.BreadcrumbValueList(this,t,O.BreadcrumbValueElement).buildAsString(),lineThrough:!0}),o.isEmpty(n)||e.text.push({value:new A.BreadcrumbValueList(this,n,O.BreadcrumbValueElement).buildAsString(),lineThrough:!1})}},t.prototype.initFacetQueryController=function(){this.facetQueryController=new r.FacetQueryController(this)},t.prototype.initFacetValuesList=function(){this.facetValuesList=new k.FacetValuesList(this,P.FacetValueElement),this.element.appendChild(this.facetValuesList.build())},t.prototype.initFacetSearch=function(){this.facetSearch=new R.FacetSearch(this,I.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(){g.$$(this.element).toggleClass("coveo-active",this.values.hasSelectedOrExcludedValues()),g.$$(this.element).toggleClass("coveo-facet-empty",!this.isAnyValueCurrentlyDisplayed()),g.$$(this.facetHeader.eraserElement).toggleClass("coveo-facet-header-eraser-visible",this.values.hasSelectedOrExcludedValues())},t.prototype.initQueryEvents=function(){var e=this;this.bind.onRootElement(u.QueryEvents.duringQuery,function(){return e.handleDuringQuery()}),this.bind.onRootElement(u.QueryEvents.buildingQuery,function(t){return e.handleBuildingQuery(t)}),this.bind.onRootElement(u.QueryEvents.doneBuildingQuery,function(t){return e.handleDoneBuildingQuery(t)}),this.bind.onRootElement(u.QueryEvents.deferredQuerySuccess,function(t){return e.handleDeferredQuerySuccess(t)}),this.bind.onRootElement(u.QueryEvents.queryError,function(){return e.handleQueryError()})},t.prototype.initQueryStateEvents=function(){var e=this;this.includedAttributeId=f.QueryStateModel.getFacetId(this.options.id),this.excludedAttributeId=f.QueryStateModel.getFacetId(this.options.id,!1),this.operatorAttributeId=f.QueryStateModel.getFacetOperator(this.options.id),this.lookupValueAttributeId=f.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(h.MODEL_EVENTS.CHANGE,void 0,function(t){return e.handleQueryStateChanged(t)}),this.dependentFacetManager.listenToParentIfDependentFacet()},t.prototype.initComponentStateEvents=function(){this.componentStateId=f.QueryStateModel.getFacetId(this.options.id),this.componentStateModel.registerComponent(this.componentStateId,this)},t.prototype.initOmniboxEvents=function(){var e=this;this.options.includeInOmnibox&&this.bind.onRootElement(a.OmniboxEvents.populateOmnibox,function(t){return e.handlePopulateOmnibox(t)})},t.prototype.initBreadCrumbEvents=function(){var e=this;this.options.includeInBreadcrumb&&(this.bind.onRootElement(s.BreadcrumbEvents.populateBreadcrumb,function(t){return e.handlePopulateBreadcrumb(t)}),this.bind.onRootElement(s.BreadcrumbEvents.clearBreadcrumb,function(t){return e.handleClearBreadcrumb()}))},t.prototype.initSearchAlertEvents=function(){var e=this;this.bind.onRootElement(l.SearchAlertsEvents.searchAlertsPopulateMessage,function(t){return e.handlePopulateSearchAlerts(t)})},t.prototype.handleOmniboxWithStaticValue=function(e){var t=this,n=new RegExp("^"+e.completeQueryExpression.regex.source,"i"),i=o.first(o.filter(this.getDisplayedValues(),function(e){var i=t.getValueCaption(t.facetValuesList.get(e).facetValue);return n.test(i)}),this.options.numberOfValuesInOmnibox),r=o.map(i,function(e){return t.facetValuesList.get(e).facetValue}),s=new B.OmniboxValuesList(this,r,e,V.OmniboxValueElement).build();e.rows.push({element:s,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 N.FacetValues(e);this.updateValues(t),this.canFetchMore=this.numberOfValues0&&!this.options.useAnd&&this.values.updateDeltaWithFilteredFacetValues(new N.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 n=new Q.ValueElementRenderer(this,N.FacetValue.create(m.l("Search")));this.searchContainer=n.build().withNo([n.excludeIcon,n.icon]),g.$$(this.searchContainer.listItem).addClass("coveo-facet-search-button"),(new j.AccessibleButton).withElement(this.searchContainer.accessibleElement).withLabel(m.l("Search")).withEnterKeyboardAction(function(e){return t.toggleSearchMenu(e)}).build(),y.DeviceUtils.isMobileDevice()&&g.$$(this.searchContainer.label).on("click",function(e){return t.toggleSearchMenu(e)}),g.$$(this.searchContainer.checkbox).on("change",function(){g.$$(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),e?g.$$(this.lessElement).addClass("coveo-active"):g.$$(this.lessElement).removeClass("coveo-active"),t?g.$$(this.moreElement).addClass("coveo-active"):g.$$(this.moreElement).removeClass("coveo-active"),e||t?g.$$(this.footerElement).removeClass("coveo-facet-empty"):g.$$(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"),g.$$(t.checkbox).trigger("change"),e.stopPropagation(),e.preventDefault()},t.prototype.checkForComputedFieldAndSort=function(){-1!=this.options.sortCriteria.toLowerCase().indexOf("computedfield")&&C.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||o.contains(this.options.availableSorts,"custom")||this.options.availableSorts.unshift("custom"),"custom"==this.options.availableSorts[0]&&(this.options.sortCriteria="nosort")},t.prototype.initDependentFacetManager=function(){this.dependentFacetManager=new U.DependentFacetManager(this)},t.prototype.initBottomAndTopSpacer=function(){var e=this,t=g.$$(this.options.paddingContainer).find(".coveo-bottomSpace"),n=g.$$(this.options.paddingContainer).find(".coveo-topSpace");this.options.preservePosition&&(g.$$(this.options.paddingContainer).on("mouseleave",function(){return e.unpinFacetPosition()}),this.pinnedTopSpace=n,this.pinnedBottomSpace=t,this.pinnedTopSpace||(this.pinnedTopSpace=document.createElement("div"),g.$$(this.pinnedTopSpace).addClass("coveo-topSpace"),g.$$(this.pinnedTopSpace).insertBefore(this.options.paddingContainer.firstChild)),this.pinnedBottomSpace||(this.pinnedBottomSpace=document.createElement("div"),g.$$(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={};o.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=o.difference(this.getSelectedValues(),e);C.Utils.isNonEmptyArray(t)&&this.deselectMultipleValues(t),C.Utils.arrayEqual(this.getSelectedValues(),e,!1)||this.selectMultipleValues(e)},t.prototype.handleQueryStateChangedExcluded=function(e){var t=o.difference(this.getExcludedValues(),e);C.Utils.isNonEmptyArray(t)&&this.unexcludeMultipleValues(t),C.Utils.arrayEqual(this.getExcludedValues(),e,!1)||this.excludeMultipleValues(e)},t.prototype.handleLookupvalueChanged=function(e){var t=this;o.each(e,function(e,n){t.facetValuesList.get(decodeURIComponent(n)).facetValue.lookupValue=decodeURIComponent(e)})},t.prototype.handleQueryStateChanged=function(e){p.Assert.exists(e),this.ensureDom();var t=function(e){return e&&(e=o.map(e,function(e){return e.trim()})),e},n=e.attributes,i=t(n[this.includedAttributeId]),r=t(n[this.excludedAttributeId]),s=n[this.operatorAttributeId],a=n[this.lookupValueAttributeId];this.listenToQueryStateChange&&(C.Utils.isNullOrEmptyString(s)||this.handleQueryStateChangedOperator(s),C.Utils.isNullOrUndefined(i)||this.handleQueryStateChangedIncluded(i),C.Utils.isNullOrUndefined(r)||this.handleQueryStateChangedExcluded(r),C.Utils.isNullOrUndefined(a)||this.handleLookupvalueChanged(a))},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,n=new RegExp("^"+e.completeQueryExpression.regex.source,"i"),i=new Promise(function(i,r){var s=new M.FacetSearchParameters(t);s.setValueToSearch(e.completeQueryExpression.word),s.nbResults=t.options.numberOfValuesInOmnibox,t.facetQueryController.search(s).then(function(r){var s=o.map(o.filter(r,function(e){return n.test(e.lookupValue)}),function(e){return t.values.get(e.lookupValue)||N.FacetValue.create(e)}),a=new B.OmniboxValuesList(t,s,e,V.OmniboxValueElement).build();i({element:a,zIndex:t.omniboxZIndex})}).catch(function(){i({element:void 0})})});e.rows.push({deferred:i})},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):(e.importActiveValuesFromOtherList(this.values),e.sortValuesDependingOnStatus(this.numberOfValues),this.values=e),this.updateNumberOfValues()},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 T.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?F.FacetSettings:void 0,sortKlass:$.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&&(g.$$(this.pinnedTopSpace).addClass("coveo-with-animation"),g.$$(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 C.Utils.exists(this.pinnedViewportPosition)},t.prototype.shouldFacetUnpin=function(){return C.Utils.exists(this.unpinnedViewportPosition)},t.prototype.ensurePinnedFacetHasntMoved=function(){if(this.isFacetPinned()){p.Assert.exists(this.pinnedViewportPosition),g.$$(this.pinnedTopSpace).removeClass("coveo-with-animation"),g.$$(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,n=t-this.pinnedViewportPosition;!function(){e instanceof Window?window.scrollTo(0,new g.Win(e).scrollY()+n):e.scrollTop=e.scrollTop+n}(),t=this.element.getBoundingClientRect().top,n=t-this.pinnedViewportPosition,n<0&&(this.pinnedTopSpace.style.height=-1*n+"px"),this.unpinnedViewportPosition=this.pinnedViewportPosition,this.pinnedViewportPosition=null}},t.prototype.buildFooter=function(){return g.$$("div",{className:"coveo-facet-footer"}).el},t.prototype.buildMore=function(){var e=this,t=g.$$("span",{className:"coveo-facet-more-icon"},b.SVGIcons.icons.arrowDown).el;v.SVGDom.addClassToSVGInContainer(t,"coveo-facet-more-icon-svg");var n=g.$$("div",{className:"coveo-facet-more",tabindex:0},t).el;return(new j.AccessibleButton).withElement(n).withLabel(m.l("Expand")).withSelectAction(function(){return e.handleClickMore()}).build(),n},t.prototype.buildLess=function(){var e=this,t=g.$$("span",{className:"coveo-facet-less-icon"},b.SVGIcons.icons.arrowUp).el;v.SVGDom.addClassToSVGInContainer(t,"coveo-facet-less-icon-svg");var n=g.$$("div",{className:"coveo-facet-less",tabindex:0},t).el;return(new j.AccessibleButton).withElement(n).withLabel(m.l("Collapse")).withSelectAction(function(){return e.handleClickLess()}).build(),n},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){var n=new N.FacetValues(t.groupByResults[0]);n.importActiveValuesFromOtherList(e.values),n.sortValuesDependingOnStatus(e.numberOfValues),e.values=n,e.nbAvailableValues=e.values.size(),e.updateNumberOfValues(),e.canFetchMore=e.numberOfValues0){var t=-1;new L.FacetValuesOrder(this,this.facetSort).reorderValues(this.values.getAll()).forEach(function(e,n){e.selected&&(t=n)}),e=t+1}return Math.max(e,this.options.numberOfValues)},t.prototype.cleanupDeltaValuesForMultiValueField=function(){var e=this;this.options.isMultiValueField&&(o.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.ID="Facet",t.omniboxIndex=50,t.doExport=function(){c.exportGlobally({Facet:t,FacetHeader:T.FacetHeader,FacetSearchValuesList:I.FacetSearchValuesList,FacetSettings:F.FacetSettings,FacetSort:$.FacetSort,FacetUtils:D.FacetUtils,FacetValueElement:P.FacetValueElement,FacetValue:N.FacetValue})},t.options={title:x.ComponentOptions.buildLocalizedStringOption({defaultValue:m.l("NoTitle"),section:"CommonOptions",priority:10}),field:x.ComponentOptions.buildFieldOption({required:!0,groupByField:!0,section:"CommonOptions"}),headerIcon:x.ComponentOptions.buildStringOption({deprecated:"This option is exposed for legacy reasons, and the recommendation is to not use this option."}),id:x.ComponentOptions.buildStringOption({postProcessing:function(e,t){if(e){var n=e.replace(/[^a-zA-Z0-9-@$_.+!*'(),,]+/g,"");return C.Utils.isNullOrEmptyString(n)?t.field:n}return t.field}}),isMultiValueField:x.ComponentOptions.buildBooleanOption({defaultValue:!1}),lookupField:x.ComponentOptions.buildFieldOption({deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),enableSettings:x.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"SettingsMenu",priority:9}),enableSettingsFacetState:x.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableSettings"}),availableSorts:x.ComponentOptions.buildListOption({defaultValue:["occurrences","score","alphaAscending","alphaDescending"],depend:"enableSettings",section:"Sorting",values:["AlphaAscending","AlphaDescending","ComputedFieldAscending","ComputedFieldDescending","ChiSquare","NoSort"]}),sortCriteria:x.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||(t.availableSorts.length>0?t.availableSorts[0]:"occurrences")},section:"Sorting"}),customSort:x.ComponentOptions.buildListOption({section:"Sorting"}),numberOfValues:x.ComponentOptions.buildNumberOption({defaultValue:5,min:0,section:"CommonOptions"}),injectionDepth:x.ComponentOptions.buildNumberOption({defaultValue:1e3,min:0}),showIcon:x.ComponentOptions.buildBooleanOption({defaultValue:!1,deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),useAnd:x.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"Filtering"}),enableTogglingOperator:x.ComponentOptions.buildBooleanOption({defaultValue:!1,alias:"allowTogglingOperator",section:"Filtering"}),enableFacetSearch:x.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"FacetSearch",priority:8}),facetSearchDelay:x.ComponentOptions.buildNumberOption({defaultValue:100,min:0,depend:"enableFacetSearch"}),facetSearchIgnoreAccents:x.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableFacetSearch"}),numberOfValuesInFacetSearch:x.ComponentOptions.buildNumberOption({defaultValue:15,min:1,section:"FacetSearch"}),useWildcardsInFacetSearch:x.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"FacetSearch"}),includeInBreadcrumb:x.ComponentOptions.buildBooleanOption({defaultValue:!0}),numberOfValuesInBreadcrumb:x.ComponentOptions.buildNumberOption({defaultFunction:function(){return y.DeviceUtils.isMobileDevice()?3:5},min:0,depend:"includeInBreadcrumb"}),includeInOmnibox:x.ComponentOptions.buildBooleanOption({defaultValue:!1,deprecated:"This option is exposed for legacy reasons. It is not recommended to use this option."}),numberOfValuesInOmnibox:x.ComponentOptions.buildNumberOption({defaultFunction:function(){return y.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:x.ComponentOptions.buildFieldOption({section:"ComputedField",priority:7}),computedFieldOperation:x.ComponentOptions.buildStringOption({defaultValue:"sum",section:"ComputedField"}),computedFieldFormat:x.ComponentOptions.buildStringOption({defaultValue:"c0",section:"ComputedField"}),computedFieldCaption:x.ComponentOptions.buildLocalizedStringOption({defaultValue:m.l("ComputedField"),section:"ComputedField"}),preservePosition:x.ComponentOptions.buildBooleanOption({defaultValue:!0}),paddingContainer:x.ComponentOptions.buildSelectorOption({defaultFunction:function(e){var t=g.$$(e).parent("coveo-facet-column");return null!=t?t:e.parentElement}}),scrollContainer:x.ComponentOptions.buildSelectorOption({defaultFunction:function(e){return document.body}}),enableMoreLess:x.ComponentOptions.buildBooleanOption({defaultValue:!0}),pageSize:x.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableMoreLess"}),enableCollapse:x.ComponentOptions.buildBooleanOption({defaultValue:!0,depend:"enableSettings"}),allowedValues:x.ComponentOptions.buildListOption(),additionalFilter:x.ComponentOptions.buildQueryExpressionOption({section:"Filtering"}),dependsOn:x.ComponentOptions.buildStringOption(),valueCaption:x.ComponentOptions.buildJsonOption(),enableResponsiveMode:x.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"ResponsiveOptions"}),responsiveBreakpoint:x.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:x.ComponentOptions.buildLocalizedStringOption({section:"ResponsiveOptions"})},t}(w.Component);t.Facet=H,_.Initialization.registerAutoCreateComponent(H),H.doExport()},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.searchAlertsCreated="searchAlertsCreated",e.searchAlertsDeleted="searchAlertsDeleted",e.searchAlertsFail="searchAlertsFail",e.searchAlertsPopulateMessage="searchAlertsPopulateMessage",e}();t.SearchAlertsEvents=i},function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n\n
\n
\n
\n
\n
\n
",e},e.highlightElement=function(e,t,n){void 0===n&&(n="coveo-highlight");var i=new RegExp(a.Utils.escapeRegexCharacter(u.StringUtils.latinize(t)),"i"),o=u.StringUtils.latinize(e).search(i);if(o>=0){var r=o+t.length;return u.StringUtils.htmlEncode(e.slice(0,o))+""+u.StringUtils.htmlEncode(e.slice(o,r))+""+u.StringUtils.htmlEncode(e.slice(r))}return e},e.getLoadingSpinner=function(){return o.$$("div",{className:"coveo-loading-spinner"}).el},e.getModalBoxHeader=function(e){var t=o.$$("div");return t.el.innerHTML="
\n \n \n \n
\n
\n "+(e||"")+"\n
",t},e.getQuickviewHeader=function(e,t,n){var u=this,l="";if(t.showDate){var h=a.Utils.getFieldValue(e,"date");h&&(l=r.DateUtils.dateTimeToString(new Date(h)))}var f=s.FileTypes.get(e),m=o.$$("div");m.el.innerHTML="
\n "+l+"\n \n \n \n
\n
\n \n
";var y=o.$$("a",{className:"coveo-quickview-pop-up-reminder"}),g=Coveo.Salesforce?"SalesforceResultLink":"ResultLink",v=i({},e);return t.title&&(v.title=t.title),c.load(g).then(function(){return y.addClass("Coveo"+g),d.Initialization.automaticallyCreateComponentsInsideResult(y.el,v)}).catch(function(e){var n=new p.Logger(u);n.error("Failed to load module "+g+" : "+e),n.info("Fallback on displaying a non clickable header"),y.text(t.title)}).finally(function(){o.$$(m.find(".coveo-quickview-left-header")).append(y.el)}),m},e}();t.DomUtils=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.buildingAdvancedSearch="buildingAdvancedSearch",e.executeAdvancedSearch="executeAdvancedSearch",e}();t.AdvancedSearchEvents=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(11),r=n(5),s=n(57),a=n(22),u=n(4),l=n(59),c=n(0),p=n(45);!function(e){e[e.OPENED=XMLHttpRequest.OPENED||1]="OPENED",e[e.HEADERS_RECEIVED=XMLHttpRequest.HEADERS_RECEIVED||2]="HEADERS_RECEIVED",e[e.DONE=XMLHttpRequest.DONE||4]="DONE"}(i||(i={}));var d=function(){function e(e){void 0===e&&(e={}),this.options=e,this.useJsonp=!1,this.logger=new o.Logger(this)}return e.prototype.call=function(e){var t={url:e.url,queryString:e.errorsAsSuccess?e.queryString.concat(["errorsAsSuccess=1"]):e.queryString,requestData:e.requestData,requestDataType:e.requestDataType||'application/x-www-form-urlencoded; charset="UTF-8"',begun:new Date,method:e.method};t.headers=this.buildRequestHeaders(t),c.isFunction(this.options.requestModifier)&&(t=this.options.requestModifier(t)),this.logger.trace("Performing REST request",t);var n=this.parseURL(t.url),i=window.location.hostname===n.hostname||""===n.hostname,o=""!=window.location.port?window.location.port:"https:"==window.location.protocol?"443":"80",r=o==n.port,s=!(i&&r);return this.useJsonp?this.callUsingAjaxJsonP(t):this.isCORSSupported()||!s?this.callUsingXMLHttpRequest(t,e.responseType):this.isXDomainRequestSupported()?this.callUsingXDomainRequest(t):this.callUsingAjaxJsonP(t)},e.prototype.callUsingXMLHttpRequest=function(e,t){var n=this;return void 0===t&&(t="text"),new Promise(function(o,r){var s=n.getXmlHttpRequest(),u=!1;s.onreadystatechange=function(l){if(s.readyState!=i.OPENED||u){if(s.readyState==i.HEADERS_RECEIVED){var p=s.status;n.isSuccessHttpStatus(p)?s.responseType=t:s.responseType="text"}else if(s.readyState==i.DONE){var d=s.status,h=void 0;switch(t){case"json":if(h=s.response,"json"==t&&"IE"==a.DeviceUtils.getDeviceName())try{h=JSON.parse(h)}catch(e){}break;case"text":h=n.tryParseResponseText(s.responseText,s.getResponseHeader("Content-Type"));break;default:h=s.response}void 0==h&&(h=n.tryParseResponseText(s.responseText,s.getResponseHeader("Content-Type"))),n.isSuccessHttpStatus(d)?n.handleSuccessfulResponseThatMightBeAnError(e,h,o,r):n.handleError(e,s.status,h,r)}}else u=!0,s.withCredentials=!0,c.each(e.headers,function(e,t){s.setRequestHeader(t,e)}),"GET"==e.method?s.send():0===e.requestDataType.indexOf("application/json")?s.send(JSON.stringify(e.requestData)):s.send(n.convertJsonToFormBody(e.requestData))};var l=e.queryString;"GET"==e.method&&(l=l.concat(n.convertJsonToQueryString(e.requestData))),s.open(e.method,n.combineUrlAndQueryString(e.url,l))})},e.prototype.callUsingXDomainRequest=function(e){var t=this;return new Promise(function(n,i){var o=e.queryString.concat([]);t.options.accessToken&&o.push("access_token="+u.Utils.safeEncodeURIComponent(t.options.accessToken));var r=new XDomainRequest;"GET"==e.method&&(o=o.concat(t.convertJsonToQueryString(e.requestData))),r.open(e.method,t.combineUrlAndQueryString(e.url,o)),r.onload=function(){var o=t.tryParseResponseText(r.responseText,r.contentType);t.handleSuccessfulResponseThatMightBeAnError(e,o,n,i)},r.onerror=function(){var n=t.tryParseResponseText(r.responseText,r.contentType);t.handleError(e,0,n,i)},r.ontimeout=function(){return t.logger.error("Request timeout",r,e.requestData)},r.onprogress=function(){return t.logger.trace("Request progress",r,e.requestData)},c.defer(function(){"GET"==e.method?r.send():r.send(t.convertJsonToFormBody(e.requestData))})})},e.prototype.callUsingAjaxJsonP=function(t){var n=this,i=l.JQueryUtils.getJQuery();return r.Assert.check(i,"Using jsonp without having included jQuery is not supported."),new Promise(function(o,r){var s=t.queryString.concat(n.convertJsonToQueryString(t.requestData));n.options.accessToken&&s.push("access_token="+u.Utils.safeEncodeURIComponent(n.options.accessToken)),s.push("callback=?"),i.ajax({url:n.combineUrlAndQueryString(t.url,s),dataType:"jsonp",success:function(e){return n.handleSuccessfulResponseThatMightBeAnError(t,e,o,r)},timeout:e.JSONP_ERROR_TIMEOUT,error:function(){return n.handleError(t,0,void 0,r)}})})},e.prototype.parseURL=function(e){var t=document.createElement("a");return t.href=e,t},e.prototype.getXmlHttpRequest=function(){return new(this.options.xmlHttpRequest||XMLHttpRequest)},e.prototype.convertJsonToQueryString=function(e){r.Assert.exists(e);var t=[];return c.each(e,function(e,n){null!=e&&(c.isObject(e)?t.push(n+"="+u.Utils.safeEncodeURIComponent(JSON.stringify(e))):t.push(n+"="+u.Utils.safeEncodeURIComponent(e.toString())))}),t},e.prototype.convertJsonToFormBody=function(e){return this.convertJsonToQueryString(e).join("&")},e.prototype.handleSuccessfulResponseThatMightBeAnError=function(e,t,n,i){this.isErrorResponseBody(t)?this.handleError(e,t.statusCode,t,i):this.handleSuccess(e,t,n)},e.prototype.handleSuccess=function(e,t,n){var i={duration:s.TimeSpan.fromDates(e.begun,new Date).getMilliseconds(),data:t};this.logger.trace("REST request successful",t,e),n(i)},e.prototype.handleError=function(e,t,n,i){var o={statusCode:t,data:n};this.logger.error("REST request failed",t,n,e),i(o)},e.prototype.combineUrlAndQueryString=function(e,t){return p.UrlUtils.normalizeAsString({paths:[e],queryAsString:t})},e.prototype.isXDomainRequestSupported=function(){return"XDomainRequest"in window},e.prototype.isCORSSupported=function(){return"withCredentials"in this.getXmlHttpRequest()},e.prototype.isSuccessHttpStatus=function(e){return e>=200&&e<300||304===e},e.prototype.tryParseResponseText=function(e,t){if(null==t||-1==t.indexOf("application/json"))return e;if(u.Utils.isNonEmptyString(e))try{return JSON.parse(e)}catch(e){return}},e.prototype.isErrorResponseBody=function(e){return!(!e||!e.statusCode)&&!this.isSuccessHttpStatus(e.statusCode)},e.prototype.buildRequestHeaders=function(e){var t={};return this.options.accessToken?t.Authorization="Bearer "+this.options.accessToken:this.options.username&&this.options.password&&(t.Authorization="Basic "+btoa(this.options.username+":"+this.options.password)),"GET"==e.method?t:(0===e.requestDataType.indexOf("application/json")?t["Content-Type"]='application/json; charset="UTF-8"':t["Content-Type"]='application/x-www-form-urlencoded; charset="UTF-8"',t)},e.JSONP_ERROR_TIMEOUT=1e4,e}();t.EndpointCaller=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.searchEvent="analyticsSearchEvent",e.documentViewEvent="analyticsDocumentViewEvent",e.customEvent="analyticsCustomEvent",e.changeAnalyticsCustomData="changeAnalyticsCustomData",e}();t.AnalyticsEvents=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.set=function(t,n,i){var o,r,s,a,u;i?(s=new Date,s.setTime(s.getTime()+i),a="; expires="+s.toGMTString()):a="",u=location.hostname,1===u.split(".").length?document.cookie=this.prefix+t+"="+n+a+"; path=/":(r=u.split("."),r.shift(),o="."+r.join("."),document.cookie=this.prefix+t+"="+n+a+"; path=/; domain="+o,null!=e.get(t)&&e.get(t)==n||(o="."+u,document.cookie=this.prefix+t+"="+n+a+"; path=/; domain="+o))},e.get=function(e){for(var t=this.prefix+e+"=",n=document.cookie.split(";"),i=0;ic.right&&(d-=l.right-c.right),t.style.width=d+"px",p.horizontal="ok"}if("ok"!=p.vertical||"ok"!=p.horizontal){var h=e.alignInsideBoundary(r,p);e.positionPopup(t,n,i,h,s,a+1)}}},e.finalAdjustement=function(e,t,n,i){var r=o.$$(n).position();n.style.top=r.top+i.verticalOffset-(e.top-t.top)+"px",n.style.left=r.left+i.horizontalOffset-(e.left-t.left)+"px"},e.basicVerticalAlignment=function(e,t,n,o){switch(o.vertical){case i.TOP:e.top-=t.offsetHeight;break;case i.BOTTOM:e.top+=n.offsetHeight;break;case i.MIDDLE:e.top-=t.offsetHeight/3;case i.INNERTOP:break;case i.INNERBOTTOM:e.top-=t.offsetHeight-n.offsetHeight}},e.basicHorizontalAlignment=function(t,n,i,o){switch(o.horizontal){case r.LEFT:t.left-=n.offsetWidth;break;case r.RIGHT:t.left+=i.offsetWidth;break;case r.CENTER:t.left+=e.offSetToAlignCenter(n,i);break;case r.INNERLEFT:break;case r.INNERRIGHT:t.left-=n.offsetWidth-i.offsetWidth}},e.alignInsideBoundary=function(e,t){var n=e;return"left"==t.horizontal&&(n.horizontal=r.RIGHT),"right"==t.horizontal&&(n.horizontal=r.LEFT),"top"==t.vertical&&(n.vertical=i.BOTTOM),"bottom"==t.vertical&&(n.vertical=i.TOP),n},e.offSetToAlignCenter=function(e,t){return(t.offsetWidth-e.offsetWidth)/2},e.getBoundary=function(e){var t,n=o.$$(e).offset();return t="body"==e.tagName.toLowerCase()?Math.max(e.scrollHeight,e.offsetHeight):"html"==e.tagName.toLowerCase()?Math.max(e.clientHeight,e.scrollHeight,e.offsetHeight):e.offsetHeight,{top:n.top,left:n.left,right:n.left+e.offsetWidth,bottom:n.top+t}},e.checkForOutOfBoundary=function(e,t){var n={vertical:"ok",horizontal:"ok"};return e.topt.bottom&&(n.vertical="bottom"),e.leftt.right&&(n.horizontal="right"),n},e}();t.PopupUtils=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.beforeRedirect="beforeRedirect",e}();t.StandaloneSearchInterfaceEvents=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.savePreferences="savePreferences",e.exitPreferencesWithoutSave="exitPreferencesWithoutSave",e}();t.PreferencesPanelEvents=i},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),r=n(87),s=n(5),a=n(0),u=function(e){function t(t){var n=e.call(this)||this;return n.templates=t,s.Assert.exists(t),n}return i(t,e),t.prototype.instantiateToString=function(e,t){void 0===t&&(t={});for(var n=(new o.DefaultInstantiateTemplateOptions).merge(t),i=a.reject(this.templates,function(e){return null!=e.role}),r=0;r0?(h.each(c,function(e,t){var r=d.$$(e).text();e.innerHTML=l.HighlightUtils.highlightString(r,i(r,n,o,a),[],a.cssClass)}),u.innerHTML):e.highlightStreamText(t,n,o,r)},e.highlightStreamText=function(e,t,n,o){var r=(new y).merge(o);return l.HighlightUtils.highlightString(e,i(e,t,n,r),[],r.cssClass)},e}();t.StreamHighlightUtils=g,t.getRestHighlightsForAllTerms=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=n(46),r=n(4),s=function(){function e(){}return e.registerFieldHelper=function(t,n){e.fieldHelpers.push(t),e.registerTemplateHelper(t,n)},e.registerTemplateHelper=function(t,n){i.Assert.isNonEmptyString(t),i.Assert.exists(n),e.registerTemplateHelperInUnderscore(t,n),e.helpers[t]=n},e.getHelper=function(t){return r.Utils.getCaseInsensitiveProperty(e.helpers,t)},e.getHelpers=function(){return e.helpers},e.registerTemplateHelperInUnderscore=function(e,t){i.Assert.isNonEmptyString(e),i.Assert.exists(t),o.UnderscoreTemplate.registerTemplateHelper(e,t)},e.helpers={},e.fieldHelpers=[],e}();t.TemplateHelpers=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);n(379);var o=n(3),r=function(){function e(e,t,n){void 0===e&&(e=function(e){}),this.onChange=e,this.label=t,this.name=n,this.buildContent()}return e.doExport=function(){o.exportGlobally({RadioButton:e})},e.prototype.reset=function(){var e=this.isSelected();this.getRadio().checked=!1,e&&this.onChange(this)},e.prototype.select=function(e){void 0===e&&(e=!0);var t=this.isSelected();this.getRadio().checked=!0,!t&&e&&this.onChange(this)},e.prototype.build=function(){return this.element},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return this.label},e.prototype.isSelected=function(){return this.getRadio().checked},e.prototype.getRadio=function(){return i.$$(this.element).find("input")},e.prototype.getLabel=function(){return i.$$(this.element).find("label")},e.prototype.buildContent=function(){var e=this,t=i.$$("div",{className:"coveo-radio"}),n=i.$$("input",{type:"radio",name:this.name,id:this.label}),o=i.$$("label",{className:"coveo-radio-input-label",for:this.label});o.text(this.label),n.on("change",function(){e.onChange(e)}),t.append(n.el),t.append(o.el),this.element=t.el},e}();t.RadioButton=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(7),r=n(1),s=n(14),a=n(13),u=function(){function e(e,t,n,i){void 0===e&&(e=function(e){}),void 0===t&&(t=0),this.onChange=e,this.min=t,this.max=n,this.label=i,this.buildContent(),this.bindEvents()}return e.doExport=function(){i.exportGlobally({NumericSpinner:e})},e.prototype.reset=function(){this.getSpinnerInput().value="",this.onChange(this)},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return this.getSpinnerInput().value},e.prototype.getIntValue=function(){return this.getSpinnerInput().value?parseInt(this.getSpinnerInput().value,10):this.min},e.prototype.getFloatValue=function(){return this.getSpinnerInput().value?parseFloat(this.getSpinnerInput().value):this.min},e.prototype.setValue=function(e){this.max&&e>this.max&&(e=this.max),e0?e="+"+r.format(this.delta,"n0"):this.occurrences>0&&(e=r.format(this.occurrences,"n0")),e},e.prototype.getFormattedComputedField=function(e){return 0!=this.computedField?r.format(this.computedField,e):void 0},e.create=function(t){if(s.isString(t))return e.createFromValue(t);if(s.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){i.Assert.isNonEmptyString(t);var n=new e;return n.value=t,n.lookupValue=t,n},e.createFromGroupByValue=function(t){i.Assert.exists(t),i.Assert.exists(t);var n=new e;return n.value=t.value,n.lookupValue=o.Utils.exists(t.lookupValue)?t.lookupValue:t.value,n.occurrences=t.numberOfResults,n.computedField=o.Utils.isNonEmptyArray(t.computedFieldResults)?t.computedFieldResults[0]:void 0,n.score=t.score,n},e.createFromFieldValue=function(t){i.Assert.exists(t);var n=new e;return n.value=t.value,n.lookupValue=t.lookupValue,n.occurrences=t.numberOfResults,n},e}();t.FacetValue=a;var u=function(){function e(e){o.Utils.exists(e)?this.values=s.map(e.values,function(e){return a.createFromGroupByValue(e)}):this.values=[]}return e.prototype.add=function(e){i.Assert.exists(e),i.Assert.check(!this.contains(e.value)),this.values.push(e)},e.prototype.remove=function(e){i.Assert.isNonEmptyString(e),e=e,this.values=s.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 i.Assert.isLargerOrEqualsThan(0,e),i.Assert.isSmallerThan(this.values.length,e),this.values[e]},e.prototype.get=function(e){return s.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 s.filter(this.values,function(e){return e.selected})},e.prototype.getExcluded=function(){return s.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(){s.each(this.values,function(e){return e.reset()})},e.prototype.importActiveValuesFromOtherList=function(e){var t=this;i.Assert.exists(e),s.each(e.getSelected(),function(e){var n=t.get(e.value);o.Utils.exists(n)?n.selected=!0:t.values.push(e.cloneWithZeroOccurrences())}),s.each(e.getExcluded(),function(e){var n=t.get(e.value);if(o.Utils.exists(n))n.excluded=!0;else if(0!=e.occurrences){var i=e.occurrences,r=e.cloneWithZeroOccurrences();r.occurrences=i,t.values.push(r)}else t.values.push(e.cloneWithZeroOccurrences())})},e.prototype.updateCountsFromNewValues=function(e){i.Assert.exists(e),this.values=s.map(this.values,function(t){var n=e.get(t.value);return o.Utils.exists(n)?(t.updateCountsFromNewValue(n),t):null==t.occurrences?t.cloneWithZeroOccurrences():t})},e.prototype.updateDeltaWithFilteredFacetValues=function(e,t){var n=this;i.Assert.exists(e),s.each(this.values,function(i){var r=e.get(i.value);i.waitingForDelta=!1,o.Utils.exists(r)?i.occurrences-r.occurrences>0?n.hasOnlyExcludedValues()?(i.delta=null,i.occurrences=r.occurrences):i.delta=i.occurrences-r.occurrences:i.delta=null:i.selected||i.excluded||(t&&0==e.values.length?(i.delta=null,i.occurrences=0):i.delta=i.occurrences)})},e.prototype.mergeWithUnfilteredFacetValues=function(e){var t=this;i.Assert.exists(e);var n=[];s.each(e.values,function(e){var i=t.get(e.value);o.Utils.exists(i)?i.occurrences==e.occurrences?n.push(i):n.push(e.cloneWithDelta(e.occurrences,e.occurrences-i.occurrences)):n.push(e.cloneWithDelta(e.occurrences,e.occurrences))});var r=0;s.each(this.values,function(t){var i=e.get(t.value);if(o.Utils.exists(i)){for(var s=0;su.value.length?new o.EndOfInputResult(u):u}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,o=n(4),r=n(7),s=n(5),a=n(0),u=function(){function e(){}return e.get=function(t){var n=o.Utils.getFieldValue(t,"objecttype"),i=o.Utils.getFieldValue(t,"filetype");return o.Utils.isNonEmptyString(n)&&!n.match(/^(file|document|contentversion|item)$/i)?e.getObjectType(n):o.Utils.isNonEmptyString(i)?e.getFileType(i):{icon:"coveo-icon filetype",caption:r.l("Unknown")}},e.getObjectType=function(e){var t=e.toLowerCase(),n="objecttype_"+t,i=r.l(n);return i.toLowerCase()==n.toLowerCase()&&(i=r.l(e)),{icon:"coveo-icon objecttype "+t.replace(" ","-"),caption:i}},e.getFileType=function(e){var t=e.toLowerCase();"."==t[0]&&(t=t.substring(1));var n="filetype_"+t,i=r.l(n);return i.toLowerCase()==n.toLowerCase()&&(i=r.l(e)),{icon:"coveo-icon filetype "+t.replace(" ","-"),caption:i}},e.getFileTypeCaptions=function(){if(void 0==i){i={};var e=String.locales[String.locale.toLowerCase()];s.Assert.isNotUndefined(e),a.each(a.keys(e),function(e){0==e.indexOf("filetype_")?i[e.substr("filetype_".length)]=e.toLocaleString():0==e.indexOf("objecttype_")&&(i[e.substr("objecttype_".length)]=e.toLocaleString())})}return i},e}();t.FileTypes=u},function(e,t,n){"use strict";function i(){}function o(e,t){var n=new i;if(e instanceof i)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var o,r=-1,s=e.length;if(null==t)for(;++r=l.length)return null!=n&&t.sort(n),null!=i?i(t):t;for(var a,u,c,d=-1,h=t.length,f=l[o++],m=p(),y=r();++dl.length)return e;var o,r=c[n-1];return null!=i&&n>=l.length?o=e.entries():(o=[],e.each(function(e,i){o.push({key:i,values:t(e,n)})})),null!=r?o.sort(function(e,t){return r(e.key,t.key)}):o}var n,i,o,l=[],c=[];return o={object:function(t){return e(t,0,r,s)},map:function(t){return e(t,0,a,u)},entries:function(n){return t(e(n,0,a,u),0)},key:function(e){return l.push(e),o},sortKeys:function(e){return c[l.length-1]=e,o},sortValues:function(e){return n=e,o},rollup:function(e){return i=e,o}}},h=p.prototype;l.prototype=c.prototype={constructor:l,has:h.has,add:function(e){return e+="",this["$"+e]=e,this},remove:h.remove,clear:h.clear,values:h.keys,size:h.size,empty:h.empty,each:h.each};var f=c,m=function(e){var t=[];for(var n in e)t.push(n);return t},y=function(e){var t=[];for(var n in e)t.push(e[n]);return t},g=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};n.d(t,"d",function(){return d}),n.d(t,"e",function(){return f}),n.d(t,"c",function(){return p}),n.d(t,"b",function(){return m}),n.d(t,"f",function(){return y}),n.d(t,"a",function(){return g})},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),r=n(10),s=n(71),a=n(5),u=n(15),l=n(12),c=n(7),p=n(1),d=n(9),h=n(6),f=n(8),m=n(2),y=n(352),g=n(161),v=n(126),b=n(355),C=function(e){function t(n,i,o){var a=e.call(this,n,t.ID,o)||this;a.element=n,a.options=i,a.bindings=o,n instanceof HTMLInputElement&&a.logger.error("Querybox cannot be used on an HTMLInputElement"),a.options=f.ComponentOptions.initComponentOptions(n,t,i),new b.QueryboxOptionsProcessing(a).postProcess(),p.$$(a.element).toggleClass("coveo-query-syntax-disabled",0==a.options.enableQuerySyntax),a.magicBox=g.createMagicBox(n,new v.Grammar("Query",{Query:"[Term*][Spaces?]",Term:"[Spaces?][Word]",Spaces:/ +/,Word:/[^ ]+/}),{inline:!0});var h=p.$$(a.magicBox.element).find("input");return h&&p.$$(h).setAttribute("aria-label",a.options.placeholder||c.l("Search")),a.bind.onRootElement(r.QueryEvents.buildingQuery,function(e){return a.handleBuildingQuery(e)}),a.bind.onRootElement(s.StandaloneSearchInterfaceEvents.beforeRedirect,function(){return a.updateQueryState()}),a.bind.onQueryState(u.MODEL_EVENTS.CHANGE_ONE,l.QUERY_STATE_ATTRIBUTES.Q,function(e){return a.handleQueryStateChanged(e)}),a.options.enableSearchAsYouType&&(p.$$(a.element).addClass("coveo-search-as-you-type"),a.magicBox.onchange=function(){a.searchAsYouType()}),a.magicBox.onsubmit=function(){a.submit()},a.magicBox.onblur=function(){a.updateQueryState()},a.magicBox.onclear=function(){a.updateQueryState(),a.options.triggerQueryOnClear&&(a.usageAnalytics.logSearchEvent(d.analyticsActionCauseList.searchboxClear,{}),a.triggerNewQuery(!1))},a}return i(t,e),t.prototype.submit=function(){this.magicBox.clearSuggestion(),this.updateQueryState(),this.usageAnalytics.logSearchEvent(d.analyticsActionCauseList.searchboxSubmit,{}),this.triggerNewQuery(!1)},t.prototype.setText=function(e){this.magicBox.setText(e),this.updateQueryState()},t.prototype.clear=function(){this.magicBox.clear()},t.prototype.getText=function(){return this.magicBox.getText()},t.prototype.getResult=function(){return this.magicBox.getResult()},t.prototype.getDisplayedResult=function(){return this.magicBox.getDisplayedResult()},t.prototype.getCursor=function(){return this.magicBox.getCursor()},t.prototype.resultAtCursor=function(e){return this.magicBox.resultAtCursor(e)},t.prototype.handleBuildingQuery=function(e){a.Assert.exists(e),a.Assert.exists(e.queryBuilder),this.updateQueryState(),this.lastQuery=this.magicBox.getText(),new y.QueryboxQueryParameters(this.options).addParameters(e.queryBuilder,this.lastQuery)},t.prototype.triggerNewQuery=function(e){clearTimeout(this.searchAsYouTypeTimeout);var t=this.magicBox.getText();this.lastQuery!=t&&null!=t&&(this.lastQuery=t,this.queryController.executeQuery({searchAsYouType:e,logInActionsHistory:!0}))},t.prototype.updateQueryState=function(){this.queryStateModel.set(l.QueryStateModel.attributesEnum.q,this.magicBox.getText())},t.prototype.handleQueryStateChanged=function(e){a.Assert.exists(e);var t=e.value;t!=this.magicBox.getText()&&this.magicBox.setText(t)},t.prototype.searchAsYouType=function(){var e=this;clearTimeout(this.searchAsYouTypeTimeout),this.searchAsYouTypeTimeout=window.setTimeout(function(){e.usageAnalytics.logSearchAsYouType(d.analyticsActionCauseList.searchboxAsYouType,{}),e.triggerNewQuery(!0)},this.options.searchAsYouTypeDelay)},t.ID="Querybox",t.doExport=function(){o.exportGlobally({Querybox:t,QueryboxQueryParameters:y.QueryboxQueryParameters})},t.options={enableSearchAsYouType:f.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"SearchAsYouType"}),searchAsYouTypeDelay:f.ComponentOptions.buildNumberOption({defaultValue:50,min:0,section:"SearchAsYouType"}),enableQuerySyntax:f.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"QuerySyntax"}),enableWildcards:f.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"QuerySyntax"}),enableQuestionMarks:f.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableWildcards"}),enableLowercaseOperators:f.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableQuerySyntax"}),enablePartialMatch:f.ComponentOptions.buildBooleanOption({defaultValue:!1}),partialMatchKeywords:f.ComponentOptions.buildNumberOption({defaultValue:5,min:1,depend:"enablePartialMatch"}),partialMatchThreshold:f.ComponentOptions.buildStringOption({defaultValue:"50%",depend:"enablePartialMatch"}),triggerQueryOnClear:f.ComponentOptions.buildBooleanOption({defaultValue:!1})},t}(h.Component);t.Querybox=C,m.Initialization.registerAutoCreateComponent(C)},function(module,exports,__webpack_require__){"use strict";function showOnlyWithHelper(e,t){return null==t&&(t={}),t.helpers=e,t}var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var underscore_1=__webpack_require__(0),GlobalExports_1=__webpack_require__(3),Assert_1=__webpack_require__(5),QueryStateModel_1=__webpack_require__(12),AccessibleButton_1=__webpack_require__(17),DateUtils_1=__webpack_require__(30),Dom_1=__webpack_require__(1),StringUtils_1=__webpack_require__(19),Utils_1=__webpack_require__(4),AnalyticsActionListMeta_1=__webpack_require__(9),Component_1=__webpack_require__(6),ComponentOptions_1=__webpack_require__(8),Initialization_1=__webpack_require__(2),FacetUtils_1=__webpack_require__(47),TemplateHelpers_1=__webpack_require__(82),Strings_1=__webpack_require__(7),FieldValue=function(_super){function FieldValue(e,t,n,i,o){void 0===o&&(o=FieldValue.ID);var r=_super.call(this,e,o,n)||this;r.element=e,r.options=t,r.result=i,r.options=ComponentOptions_1.ComponentOptions.initOptions(e,FieldValue.simpleOptions,t),null!=r.options.helper&&r.normalizeHelperAndOptions(),r.result=r.result||r.resolveResult(),Assert_1.Assert.exists(r.result);var s=r.getValue();if(null==s)null!=r.element.parentElement&&r.element.parentElement.removeChild(r.element);else{var a=void 0;underscore_1.isArray(s)?a=s:r.options.splitValues?underscore_1.isString(s)&&(a=underscore_1.map(s.split(r.options.separator),function(e){return e.trim()})):(s=s.toString(),a=[s]),r.appendValuesToDom(a),null!=r.options.textCaption&&r.prependTextCaptionToDom()}return r}return __extends(FieldValue,_super),FieldValue.prototype.getValue=function(){var e=Utils_1.Utils.getFieldValue(this.result,this.options.field);return!underscore_1.isArray(e)&&underscore_1.isObject(e)&&(e=null),e},FieldValue.prototype.renderOneValue=function(e){var t=Dom_1.$$("span").el,n=FacetUtils_1.FacetUtils.tryToGetTranslatedCaption(this.options.field,e);if(this.options.helper){var i=TemplateHelpers_1.TemplateHelpers.getHelper(this.options.helper+"v2")||TemplateHelpers_1.TemplateHelpers.getHelper(""+this.options.helper);Utils_1.Utils.exists(i)?n=i.call(this,e,this.getHelperOptions()):this.logger.warn("Helper "+this.options.helper+" is not found in available helpers. The list of supported helpers is :",underscore_1.keys(TemplateHelpers_1.TemplateHelpers.getHelpers()));var o=this.getFullDate(e,this.options.helper);o&&t.setAttribute("title",o),"date"!=this.options.helper&&"dateTime"!=this.options.helper&&"emailDateTime"!=this.options.helper||(n=StringUtils_1.StringUtils.capitalizeFirstLetter(n))}return this.options.htmlValue?t.innerHTML=n:t.appendChild(document.createTextNode(n)),this.bindEventOnValue(t,e,n),t},FieldValue.prototype.getValueContainer=function(){return this.element},FieldValue.prototype.normalizeHelperAndOptions=function(){var e=this;this.options=ComponentOptions_1.ComponentOptions.initOptions(this.element,FieldValue.helperOptions,this.options);var t=underscore_1.keys(FieldValue.options.helperOptions.subOptions),n=underscore_1.filter(t,function(t){var n=FieldValue.options.helperOptions.subOptions[t];if(n){var i=n.helpers;return null!=i&&underscore_1.contains(i,e.options.helper)}return!1});this.options.helperOptions=underscore_1.omit(this.options.helperOptions,function(e,t){return!underscore_1.contains(n,t)})},FieldValue.prototype.getHelperOptions=function(){var inlineOptions=ComponentOptions_1.ComponentOptions.loadStringOption(this.element,"helperOptions",{});return Utils_1.Utils.isNonEmptyString(inlineOptions)?underscore_1.extend({},this.options.helperOptions,eval("("+inlineOptions+")")):this.options.helperOptions},FieldValue.prototype.getFullDate=function(e,t){var n={useLongDateFormat:!0,useTodayYesterdayAndTomorrow:!1,useWeekdayIfThisWeek:!1,omitYearIfCurrentOne:!1};return"date"==t?DateUtils_1.DateUtils.dateToString(new Date(parseInt(e)),n):"dateTime"==t||"emailDateTime"==t?DateUtils_1.DateUtils.dateTimeToString(new Date(parseInt(e)),n):""},FieldValue.prototype.appendValuesToDom=function(e){var t=this;underscore_1.each(e,function(n,i){void 0!=n&&(t.getValueContainer().appendChild(t.renderOneValue(n)),i!==e.length-1&&t.getValueContainer().appendChild(document.createTextNode(t.options.displaySeparator)))})},FieldValue.prototype.renderTextCaption=function(){return Dom_1.$$("span",{className:"coveo-field-caption"},underscore_1.escape(this.options.textCaption)).el},FieldValue.prototype.prependTextCaptionToDom=function(){var e=this.getValueContainer();Dom_1.$$(e).prepend(this.renderTextCaption()),Dom_1.$$(e).addClass("coveo-with-label")},FieldValue.prototype.bindEventOnValue=function(e,t,n){var i=this,o=QueryStateModel_1.QueryStateModel.getFacetId(this.options.facet),r=underscore_1.filter(this.componentStateModel.get(o),function(e){var t=!0,n=Component_1.Component.getComponentRef("FacetRange"),i=Component_1.Component.getComponentRef("FacetSlider");return!e.disabled&&(t&&n&&(t=!(e instanceof n)),t&&i&&(t=!(e instanceof i)),t)});if(r.length>0){var s=underscore_1.find(r,function(e){var n=e.values.get(t);return n&&n.selected}),a=s?Strings_1.l("RemoveFilterOn",n):Strings_1.l("FilterOn",n);(new AccessibleButton_1.AccessibleButton).withTitle(a).withLabel(a).withElement(e).withSelectAction(function(){return i.handleSelection(s,r,t)}).build(),s&&Dom_1.$$(e).addClass("coveo-selected"),Dom_1.$$(e).addClass("coveo-clickable")}},FieldValue.prototype.handleSelection=function(e,t,n){var i=this;null!=e?underscore_1.each(t,function(e){return e.deselectValue(n)}):underscore_1.each(t,function(e){return e.selectValue(n)}),this.queryController.deferExecuteQuery({beforeExecuteQuery:function(){return i.usageAnalytics.logSearchEvent(AnalyticsActionListMeta_1.analyticsActionCauseList.documentField,{facetId:i.options.facet,facetValue:n.toLowerCase()})}})},FieldValue.ID="FieldValue",FieldValue.doExport=function(){GlobalExports_1.exportGlobally({FieldValue:FieldValue})},FieldValue.options={field:ComponentOptions_1.ComponentOptions.buildFieldOption({defaultValue:"@field",required:!0}),facet:ComponentOptions_1.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||t.field}}),htmlValue:ComponentOptions_1.ComponentOptions.buildBooleanOption({defaultValue:!1}),splitValues:ComponentOptions_1.ComponentOptions.buildBooleanOption({defaultValue:!1}),separator:ComponentOptions_1.ComponentOptions.buildStringOption({depend:"splitValues",defaultValue:";"}),displaySeparator:ComponentOptions_1.ComponentOptions.buildStringOption({depend:"splitValues",defaultValue:", "}),helper:ComponentOptions_1.ComponentOptions.buildHelperOption(),helperOptions:ComponentOptions_1.ComponentOptions.buildObjectOption({subOptions:{text:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["anchor"])),target:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["anchor"])),class:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["anchor"])),decimals:ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(["currency"],{min:0})),symbol:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["currency"])),useTodayYesterdayAndTomorrow:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"],{defaultValue:!0})),useWeekdayIfThisWeek:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"],{defaultValue:!0})),omitYearIfCurrentOne:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"],{defaultValue:!0})),useLongDateFormat:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"],{defaultValue:!1})),includeTimeIfToday:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"],{defaultValue:!0})),includeTimeIfThisWeek:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"],{defaultValue:!0})),alwaysIncludeTime:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"],{defaultValue:!1})),predefinedFormat:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["date","dateTime","emailDateTime","time"])),companyDomain:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["email"])),me:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["email"])),lengthLimit:ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(["email"],{min:1})),truncateName:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["email"])),alt:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["image"])),height:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["image"])),width:ComponentOptions_1.ComponentOptions.buildStringOption(showOnlyWithHelper(["image"])),precision:ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(["size"],{min:0,defaultValue:2})),base:ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(["size"],{min:0,defaultValue:0})),isMilliseconds:ComponentOptions_1.ComponentOptions.buildBooleanOption(showOnlyWithHelper(["timeSpan"])),length:ComponentOptions_1.ComponentOptions.buildNumberOption(showOnlyWithHelper(["shorten","shortenPath","shortenUri"],{defaultValue:200}))}}),textCaption:ComponentOptions_1.ComponentOptions.buildLocalizedStringOption()},FieldValue.simpleOptions=underscore_1.omit(FieldValue.options,"helperOptions"),FieldValue.helperOptions={helperOptions:FieldValue.options.helperOptions},FieldValue}(Component_1.Component);exports.FieldValue=FieldValue,Initialization_1.Initialization.registerAutoCreateComponent(FieldValue)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0?new F.TemplateList(s.compact(s.map(e,function(e){return I.TemplateCache.getTemplate(e)}))):null},t.prototype.getAutoSelectedFieldsToInclude=function(){return s.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 M.TableTemplate(this.options.resultTemplate.templates||[])),this.options.resultTemplate instanceof F.TemplateList?s.each(this.options.resultTemplate.templates,function(t){t.layout||(t.layout=e.options.layout)}):this.options.resultTemplate instanceof R.DefaultResultTemplate&&"list"==this.options.layout&&O.ResponsiveDefaultResultTemplate.init(this.root,this,{})},t.prototype.renderResults=function(e,t){var n=this;return void 0===t&&(t=!1),t||this.resultContainer.empty(),this.renderer.renderResults(e,t,this.triggerNewResultDisplayed.bind(this)).then(function(){return n.triggerNewResultsDisplayed()})},t.prototype.buildResults=function(e){var n=this,i=[],o=s.map(e.results,function(e,o){return n.buildResult(e).then(function(e){return null!=e&&i.push({elem:e,idx:o}),t.resultCurrentlyBeingRendered=null,e})});return Promise.all(o).then(function(){return s.pluck(s.sortBy(i,"idx"),"elem")})},t.prototype.buildResult=function(e){var n=this;return p.Assert.exists(e),v.QueryUtils.setStateObjectOnQueryResult(this.queryStateModel.get(),e),v.QueryUtils.setSearchInterfaceObjectOnQueryResult(this.searchInterface,e),t.resultCurrentlyBeingRendered=e,this.options.resultTemplate.instantiateToElement(e,{wrapInDiv:!0,checkCondition:!0,currentLayout:this.options.layout,responsiveComponents:this.searchInterface.responsiveComponents}).then(function(t){return null!=t&&S.Component.bindResultToElement(t,e),n.currentlyDisplayedResults.push(e),n.autoCreateComponentsInsideResult(t,e).initResult.then(function(){return t})})},t.prototype.displayMoreResults=function(e){var n=this;return p.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.fetchingMoreResults=this.queryController.fetchMore(e),this.fetchingMoreResults.then(function(t){p.Assert.exists(t),n.usageAnalytics.logCustomEvent(C.analyticsActionCauseList.pagerScrolling,{},n.element);var i=t.results;n.reachedTheEndOfResults=e>t.results.length,n.buildResults(t).then(function(e){return o(n,void 0,void 0,function(){var t=this;return r(this,function(n){return this.renderResults(e,!0),s.each(i,function(e){t.currentlyDisplayedResults.push(e)}),this.triggerNewResultsDisplayed(),[2]})})})}),this.fetchingMoreResults.finally(function(){n.hideWaitingAnimationForInfiniteScrolling(),n.fetchingMoreResults=void 0,d.Defer.defer(function(){n.successiveScrollCount++,n.successiveScrollCount<=t.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS?n.handleScrollOfResultList():(n.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.logger.info("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"))})}),this.fetchingMoreResults):void this.logger.warn("Ignoring request to display more results since we know there aren't more to display")},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,s.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 n=s.map(this.otherResultLists,function(e){return e.options.layout});s.contains(n,this.options.layout)||this.disableLayoutChange||s.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 p.Assert.exists(e),x.Initialization.automaticallyCreateComponentsInsideResult(e,t)},t.prototype.triggerNewResultDisplayed=function(e,t){var n={result:e,item:t};y.$$(this.element).trigger(l.ResultListEvents.newResultDisplayed,n)},t.prototype.triggerNewResultsDisplayed=function(){y.$$(this.element).trigger(l.ResultListEvents.newResultsDisplayed,{})},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 n=this;p.Assert.exists(e),p.Assert.exists(e.results);var i=e.results;this.logger.trace("Received query results from new query",i),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(n,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,this.renderResults(t)];case 1:return n.sent(),this.showOrHideElementsDependingOnState(!0,0!=this.currentlyDisplayedResults.length),m.DeviceUtils.isMobileDevice()&&void 0!=this.options.mobileScrollContainer&&(this.options.mobileScrollContainer.scrollTop=0),this.options.enableInfiniteScroll&&i.results.length==e.queryBuilder.numberOfResults&&(this.scrollBackToTop(),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(a.QueryEvents.deferredQuerySuccess,function(){setTimeout(function(){e.scrollBackToTop()},0)})},t.prototype.scrollBackToTop=function(){if(this.options.infiniteScrollContainer instanceof Window){var e=this.options.infiniteScrollContainer,t=e.pageYOffset+this.searchInterface.element.getBoundingClientRect().top;e.scrollTo(0,t)}else{this.options.infiniteScrollContainer.scrollTop=0}},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 s.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(s.map(this.options.fieldsToInclude,function(e){return e.substr(1)})),this.options.autoSelectFieldsToInclude){var t=s.flatten(s.map(this.otherResultLists,function(e){return e.getAutoSelectedFieldsToInclude()}));e.queryBuilder.addRequiredFields(s.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 _.InitializationPlaceholder(this.root).withVisibleRootElement().withPlaceholderForResultList(),d.Defer.defer(function(){t.buildResults(e.results).then(function(e){return o(t,void 0,void 0,function(){return r(this,function(t){return this.renderResults(e),[2]})})})}))):(this.disableLayoutChange=!0,this.disable(),this.resultContainer.empty())},t.prototype.isCurrentlyFetchingMoreResults=function(){return b.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(),n=e.scrollY();return new y.Doc(document).height()-(t+n)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 n=y.$$(this.element).findAll(".coveo-show-if-query"),i=y.$$(this.element).findAll(".coveo-show-if-no-query"),o=y.$$(this.element).findAll(".coveo-show-if-results"),r=y.$$(this.element).findAll(".coveo-show-if-no-results");s.each(n,function(t){y.$$(t).toggle(e)}),s.each(i,function(t){y.$$(t).toggle(!e)}),s.each(o,function(n){y.$$(n).toggle(e&&t)}),s.each(r,function(n){y.$$(n).toggle(e&&!t)})},t.prototype.showWaitingAnimation=function(){switch(this.options.waitAnimation.toLowerCase()){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(g.DomUtils.getBasicLoadingAnimation())}},t.prototype.hideWaitingAnimation=function(){switch(this.options.waitAnimation.toLowerCase()){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=g.DomUtils.getLoadingSpinner();if("card"==this.options.layout&&this.options.enableInfiniteScroll){var t=y.$$(this.options.waitAnimationContainer).findAll(".coveo-loading-spinner-container");s.each(t,function(e){return y.$$(e).remove()});var n=y.$$("div",{className:"coveo-loading-spinner-container"});n.append(e),this.options.waitAnimationContainer.appendChild(n.el)}else this.options.waitAnimationContainer.appendChild(g.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");s.each(e,function(e){return y.$$(e).remove()}),s.each(t,function(e){return y.$$(e).remove()})},t.prototype.initResultContainer=function(){if(!this.options.resultContainer){var e="table"===this.options.layout?"table":"div";this.options.resultContainer=y.$$(e,{className:"coveo-result-list-container"}).el,this.element.appendChild(this.options.resultContainer)}this.resultContainer=new $.ResultContainer(this.options.resultContainer,this.searchInterface)},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 x.Initialization.automaticallyCreateComponentsInside(t,e)};switch(this.options.layout){case"card":this.renderer=new D.ResultListCardRenderer(this.options,t);break;case"table":this.renderer=new N.ResultListTableRenderer(this.options,t);break;case"list":default:this.renderer=new P.ResultListRenderer(this.options,t)}},t.ID="ResultList",t.doExport=function(){c.exportGlobally({ResultList:t})},t.options={resultContainer:w.ComponentOptions.buildChildHtmlElementOption(),resultTemplate:E.TemplateComponentOptions.buildTemplateOption({defaultFunction:t.getDefaultTemplate}),waitAnimation:w.ComponentOptions.buildStringOption({defaultValue:"none"}),waitAnimationContainer:w.ComponentOptions.buildChildHtmlElementOption({postProcessing:function(e,t){return e||t.resultContainer}}),enableInfiniteScroll:w.ComponentOptions.buildBooleanOption({defaultValue:!1}),infiniteScrollPageSize:w.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableInfiniteScroll"}),infiniteScrollContainer:w.ComponentOptions.buildChildHtmlElementOption({depend:"enableInfiniteScroll",defaultFunction:function(e){return w.ComponentOptions.findParentScrolling(e)}}),enableInfiniteScrollWaitingAnimation:w.ComponentOptions.buildBooleanOption({depend:"enableInfiniteScroll",defaultValue:!0}),mobileScrollContainer:w.ComponentOptions.buildSelectorOption({defaultFunction:function(){return document.querySelector(".coveo-results-column")}}),autoSelectFieldsToInclude:w.ComponentOptions.buildBooleanOption({defaultValue:!1}),fieldsToInclude:w.ComponentOptions.buildFieldsOption({includeInResults:!0}),layout:w.ComponentOptions.buildStringOption({defaultValue:"list",required:!0})},t.resultCurrentlyBeingRendered=null,t.MAX_AMOUNT_OF_SUCESSIVE_REQUESTS=5,t}(S.Component);t.ResultList=k,x.Initialization.registerAutoCreateComponent(k)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0);n(383);var r=n(3),s=function(){function e(e,t){var n=this;this.labelElement=i.$$("span",{className:"coveo-form-group-label"}),this.labelElement.text(t),this.element=i.$$("fieldset",{className:"coveo-form-group"},this.labelElement),o.each(e,function(e){n.element.append(e.build())})}return e.doExport=function(){r.exportGlobally({FormGroup:e})},e.prototype.build=function(){return this.element.el},e}();t.FormGroup=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(30),r=n(3),s=n(7),a=n(23),u=n(384),l=function(){function e(e){void 0===e&&(e=function(){}),this.onChange=e,this.wasReset=!0,this.buildContent()}return e.prototype.reset=function(){this.picker.setDate(void 0),this.wasReset=!0,this.onChange(this)},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return this.wasReset?"":this.picker.getDate()?o.DateUtils.dateForQuery(this.picker.getDate()):""},e.prototype.getDateValue=function(){return this.wasReset?null:this.picker.getDate()},e.prototype.setValue=function(e){this.picker.setDate(e),this.wasReset=!1},e.prototype.build=function(){return this.element},e.prototype.buildContent=function(){var e=this;this.element=i.$$("input",{className:"coveo-button","aria-label":s.l("Date")}).el,this.element.readOnly=!0,this.picker=new u({field:this.element,onSelect:function(){e.wasReset=!1,e.onChange.call(e,e)},i18n:{previousMonth:s.l("PreviousMonth"),nextMonth:s.l("NextMonth"),months:a.culture().calendar.months.names,weekdays:a.culture().calendar.days.names,weekdaysShort:a.culture().calendar.days.namesAbbr}})},e.doExport=function(){r.exportGlobally({DatePicker:e})},e}();t.DatePicker=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.populateResultLayout="populateResultLayout",e}();t.ResultLayoutEvents=i},function(e,t,n){(function(e){!function(t,n){e.exports=n()}(0,function(){"use strict";function t(){return Ai.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function r(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var n,i=[];for(n=0;n0)for(n=0;n0?"future":"past"];return E(n)?n(t):n.replace(/%s/i,t)}function P(e,t){var n=e.toLowerCase();ki[n]=ki[n+"s"]=ki[t]=e}function N(e){return"string"==typeof e?ki[e]||ki[e.toLowerCase()]:void 0}function k(e){var t,n,i={};for(n in e)l(e,n)&&(t=N(n))&&(i[t]=e[n]);return i}function L(e,t){Li[e]=t}function V(e){var t=[];for(var n in e)t.push({unit:n,priority:Li[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function B(e,t,n){var i=""+Math.abs(e),o=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}function Q(e,t,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),e&&(Ui[e]=o),t&&(Ui[t[0]]=function(){return B(o.apply(this,arguments),t[1],t[2])}),n&&(Ui[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function j(e){var t,n,i=e.match(Vi);for(t=0,n=i.length;t=0&&Bi.test(e);)e=e.replace(Bi,n),Bi.lastIndex=0,i-=1;return e}function z(e,t,n){so[e]=E(t)?t:function(e,i){return e&&n?n:t}}function W(e,t){return l(so,e)?so[e](t._strict,t._locale):new RegExp(G(e))}function G(e){return Y(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,o){return t||n||i||o}))}function Y(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),s(t)&&(i=function(e,n){n[t]=C(e)}),n=0;n=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function Ce(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Se(e,t,n){var i=7+t-n;return-(7+Ce(e,0,i).getUTCDay()-t)%7+i-1}function we(e,t,n,i,o){var r,s,a=(7+n-i)%7,u=Se(e,i,o),l=1+7*(t-1)+a+u;return l<=0?(r=e-1,s=Z(r)+l):l>Z(e)?(r=e+1,s=l-Z(e)):(r=e,s=l),{year:r,dayOfYear:s}}function xe(e,t,n){var i,o,r=Se(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1;return s<1?(o=e.year()-1,i=s+_e(o,t,n)):s>_e(e.year(),t,n)?(i=s-_e(e.year(),t,n),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function _e(e,t,n){var i=Se(e,t,n),o=Se(e+1,t,n);return(Z(e)-i+o)/7}function Ee(e){return xe(e,this._week.dow,this._week.doy).week}function Oe(){return this._week.dow}function Ae(){return this._week.doy}function Te(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Re(e){var t=xe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Me(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Ie(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Fe(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone}function $e(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function De(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Pe(e,t,n){var i,o,r,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?(o=vo.call(this._weekdaysParse,s),-1!==o?o:null):"ddd"===t?(o=vo.call(this._shortWeekdaysParse,s),-1!==o?o:null):(o=vo.call(this._minWeekdaysParse,s),-1!==o?o:null):"dddd"===t?-1!==(o=vo.call(this._weekdaysParse,s))?o:-1!==(o=vo.call(this._shortWeekdaysParse,s))?o:(o=vo.call(this._minWeekdaysParse,s),-1!==o?o:null):"ddd"===t?-1!==(o=vo.call(this._shortWeekdaysParse,s))?o:-1!==(o=vo.call(this._weekdaysParse,s))?o:(o=vo.call(this._minWeekdaysParse,s),-1!==o?o:null):-1!==(o=vo.call(this._minWeekdaysParse,s))?o:-1!==(o=vo.call(this._weekdaysParse,s))?o:(o=vo.call(this._shortWeekdaysParse,s),-1!==o?o:null)}function Ne(e,t,n){var i,o,r;if(this._weekdaysParseExact)return Pe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function ke(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Me(e,this.localeData()),this.add(e-t,"d")):t}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ve(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ie(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Be(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ro),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Qe(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Mo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ue(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Io),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function je(){function e(e,t){return t.length-e.length}var t,n,i,o,r,s=[],a=[],u=[],l=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),r=this.weekdays(n,""),s.push(i),a.push(o),u.push(r),l.push(i),l.push(o),l.push(r);for(s.sort(e),a.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)a[t]=Y(a[t]),u[t]=Y(u[t]),l[t]=Y(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function He(){return this.hours()%12||12}function qe(){return this.hours()||24}function ze(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function We(e,t){return t._meridiemParse}function Ge(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ye(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ke(e){return e?e.toLowerCase().replace("_","-"):e}function Je(e){for(var t,n,i,o,r=0;r0;){if(i=Xe(o.slice(0,t).join("-")))return i;if(n&&n.length>=t&&S(o,n,!0)>=t-1)break;t--}r++}return null}function Xe(t){var n=null;if(!No[t]&&void 0!==e&&e&&e.exports)try{n=Fo._abbr;!function(){var e=new Error('Cannot find module "./locale"');throw e.code="MODULE_NOT_FOUND",e}(),Ze(n)}catch(e){}return No[t]}function Ze(e,t){var n;return e&&(n=r(t)?nt(e):et(e,t))&&(Fo=n),Fo._abbr}function et(e,t){if(null!==t){var n=Po;if(t.abbr=e,null!=No[e])_("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=No[e]._config;else if(null!=t.parentLocale){if(null==No[t.parentLocale])return ko[t.parentLocale]||(ko[t.parentLocale]=[]),ko[t.parentLocale].push({name:e,config:t}),null;n=No[t.parentLocale]._config}return No[e]=new T(A(n,t)),ko[e]&&ko[e].forEach(function(e){et(e.name,e.config)}),Ze(e),No[e]}return delete No[e],null}function tt(e,t){if(null!=t){var n,i,o=Po;i=Xe(e),null!=i&&(o=i._config),t=A(o,t),n=new T(t),n.parentLocale=No[e],No[e]=n,Ze(e)}else null!=No[e]&&(null!=No[e].parentLocale?No[e]=No[e].parentLocale:null!=No[e]&&delete No[e]);return No[e]}function nt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Fo;if(!n(e)){if(t=Xe(e))return t;e=[e]}return Je(e)}function it(){return Fi(No)}function ot(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[lo]<0||n[lo]>11?lo:n[co]<1||n[co]>ue(n[uo],n[lo])?co:n[po]<0||n[po]>24||24===n[po]&&(0!==n[ho]||0!==n[fo]||0!==n[mo])?po:n[ho]<0||n[ho]>59?ho:n[fo]<0||n[fo]>59?fo:n[mo]<0||n[mo]>999?mo:-1,h(e)._overflowDayOfYear&&(tco)&&(t=co),h(e)._overflowWeeks&&-1===t&&(t=yo),h(e)._overflowWeekday&&-1===t&&(t=go),h(e).overflow=t),e}function rt(e,t,n){return null!=e?e:null!=t?t:n}function st(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function at(e){var t,n,i,o,r,s=[];if(!e._d){for(i=st(e),e._w&&null==e._a[co]&&null==e._a[lo]&&ut(e),null!=e._dayOfYear&&(r=rt(e._a[uo],i[uo]),(e._dayOfYear>Z(r)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Ce(r,0,e._dayOfYear),e._a[lo]=n.getUTCMonth(),e._a[co]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[po]&&0===e._a[ho]&&0===e._a[fo]&&0===e._a[mo]&&(e._nextDay=!0,e._a[po]=0),e._d=(e._useUTC?Ce:be).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[po]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}function ut(e){var t,n,i,o,r,s,a,u;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)r=1,s=4,n=rt(t.GG,e._a[uo],xe(Et(),1,4).year),i=rt(t.W,1),((o=rt(t.E,1))<1||o>7)&&(u=!0);else{r=e._locale._week.dow,s=e._locale._week.doy;var l=xe(Et(),r,s);n=rt(t.gg,e._a[uo],l.year),i=rt(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(u=!0):null!=t.e?(o=t.e+r,(t.e<0||t.e>6)&&(u=!0)):o=r}i<1||i>_e(n,r,s)?h(e)._overflowWeeks=!0:null!=u?h(e)._overflowWeekday=!0:(a=we(n,i,o,r,s),e._a[uo]=a.year,e._dayOfYear=a.dayOfYear)}function lt(e){var t,n,i,o,r,s,a=e._i,u=Lo.exec(a)||Vo.exec(a);if(u){for(h(e).iso=!0,t=0,n=Qo.length;t0&&h(e).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),l+=i.length),Ui[r]?(i?h(e).empty=!1:h(e).unusedTokens.push(r),X(r,i,e)):e._strict&&!i&&h(e).unusedTokens.push(r);h(e).charsLeftOver=u-l,a.length>0&&h(e).unusedInput.push(a),e._a[po]<=12&&!0===h(e).bigHour&&e._a[po]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[po]=vt(e._locale,e._a[po],e._meridiem),at(e),ot(e)}function vt(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(i=e.isPM(n),i&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function bt(e){var t,n,i,o,r;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zt(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=wt(e),e._a){var t=e._isUTC?p(e._a):Et(e._a);this._isDSTShifted=this.isValid()&&S(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Wt(){return!!this.isValid()&&!this._isUTC}function Gt(){return!!this.isValid()&&this._isUTC}function Yt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Kt(e,t){var n,i,o,r=e,a=null;return $t(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:s(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Jo.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:C(a[co])*n,h:C(a[po])*n,m:C(a[ho])*n,s:C(a[fo])*n,ms:C(Dt(1e3*a[mo]))*n}):(a=Xo.exec(e))?(n="-"===a[1]?-1:(a[1],1),r={y:Jt(a[2],n),M:Jt(a[3],n),w:Jt(a[4],n),d:Jt(a[5],n),h:Jt(a[6],n),m:Jt(a[7],n),s:Jt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(o=Zt(Et(r.from),Et(r.to)),r={},r.ms=o.milliseconds,r.M=o.months),i=new Ft(r),$t(e)&&l(e,"_locale")&&(i._locale=e._locale),i}function Jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Xt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Zt(e,t){var n;return e.isValid()&&t.isValid()?(t=kt(t,e),e.isBefore(t)?n=Xt(e,t):(n=Xt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function en(e,t){return function(n,i){var o,r;return null===i||isNaN(+i)||(_(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),n="string"==typeof n?+n:n,o=Kt(n,i),tn(this,o,e),this}}function tn(e,n,i,o){var r=n._milliseconds,s=Dt(n._days),a=Dt(n._months);e.isValid()&&(o=null==o||o,a&&he(e,ie(e,"Month")+a*i),s&&oe(e,"Date",ie(e,"Date")+s*i),r&&e._d.setTime(e._d.valueOf()+r*i),o&&t.updateOffset(e,s||a))}function nn(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function on(e,n){var i=e||Et(),o=kt(i,this).startOf("day"),r=t.calendarFormat(this,o)||"sameElse",s=n&&(E(n[r])?n[r].call(this,i):n[r]);return this.format(s||this.localeData().calendar(r,this,Et(i)))}function rn(){return new g(this)}function sn(e,t){var n=v(e)?e:Et(e);return!(!this.isValid()||!n.isValid())&&(t=N(r(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()9999?H(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",H(n,"Z")):H(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function yn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+o)}function gn(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=H(this,e);return this.localeData().postformat(n)}function vn(e,t){return this.isValid()&&(v(e)&&e.isValid()||Et(e).isValid())?Kt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function bn(e){return this.from(Et(),e)}function Cn(e,t){return this.isValid()&&(v(e)&&e.isValid()||Et(e).isValid())?Kt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Sn(e){return this.to(Et(),e)}function wn(e){var t;return void 0===e?this._locale._abbr:(t=nt(e),null!=t&&(this._locale=t),this)}function xn(){return this._locale}function _n(e){switch(e=N(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function En(e){return void 0===(e=N(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function On(){return this._d.valueOf()-6e4*(this._offset||0)}function An(){return Math.floor(this.valueOf()/1e3)}function Tn(){return new Date(this.valueOf())}function Rn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Mn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function In(){return this.isValid()?this.toISOString():null}function Fn(){return f(this)}function $n(){return c({},h(this))}function Dn(){return h(this).overflow}function Pn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Nn(e,t){Q(0,[e,e.length],0,t)}function kn(e){return Qn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ln(e){return Qn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vn(){return _e(this.year(),1,4)}function Bn(){var e=this.localeData()._week;return _e(this.year(),e.dow,e.doy)}function Qn(e,t,n,i,o){var r;return null==e?xe(this,i,o).year:(r=_e(e,i,o),t>r&&(t=r),Un.call(this,e,t,n,i,o))}function Un(e,t,n,i,o){var r=we(e,t,n,i,o),s=Ce(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function jn(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Hn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function qn(e,t){t[mo]=C(1e3*("0."+e))}function zn(){return this._isUTC?"UTC":""}function Wn(){return this._isUTC?"Coordinated Universal Time":""}function Gn(e){return Et(1e3*e)}function Yn(){return Et.apply(null,arguments).parseZone()}function Kn(e){return e}function Jn(e,t,n,i){var o=nt(),r=p().set(i,t);return o[n](r,e)}function Xn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return Jn(e,t,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=Jn(e,i,n,"month");return o}function Zn(e,t,n,i){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var o=nt(),r=e?o._week.dow:0;if(null!=n)return Jn(t,(n+r)%7,i,"day");var a,u=[];for(a=0;a<7;a++)u[a]=Jn(t,(a+r)%7,i,"day");return u}function ei(e,t){return Xn(e,t,"months")}function ti(e,t){return Xn(e,t,"monthsShort")}function ni(e,t,n){return Zn(e,t,n,"weekdays")}function ii(e,t,n){return Zn(e,t,n,"weekdaysShort")}function oi(e,t,n){return Zn(e,t,n,"weekdaysMin")}function ri(){var e=this._data;return this._milliseconds=lr(this._milliseconds),this._days=lr(this._days),this._months=lr(this._months),e.milliseconds=lr(e.milliseconds),e.seconds=lr(e.seconds),e.minutes=lr(e.minutes),e.hours=lr(e.hours),e.months=lr(e.months),e.years=lr(e.years),this}function si(e,t,n,i){var o=Kt(t,n);return e._milliseconds+=i*o._milliseconds,e._days+=i*o._days,e._months+=i*o._months,e._bubble()}function ai(e,t){return si(this,e,t,1)}function ui(e,t){return si(this,e,t,-1)}function li(e){return e<0?Math.floor(e):Math.ceil(e)}function ci(){var e,t,n,i,o,r=this._milliseconds,s=this._days,a=this._months,u=this._data;return r>=0&&s>=0&&a>=0||r<=0&&s<=0&&a<=0||(r+=864e5*li(di(a)+s),s=0,a=0),u.milliseconds=r%1e3,e=b(r/1e3),u.seconds=e%60,t=b(e/60),u.minutes=t%60,n=b(t/60),u.hours=n%24,s+=b(n/24),o=b(pi(s)),a+=o,s-=li(di(o)),i=b(a/12),a%=12,u.days=s,u.months=a,u.years=i,this}function pi(e){return 4800*e/146097}function di(e){return 146097*e/4800}function hi(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=N(e))||"year"===e)return t=this._days+i/864e5,n=this._months+pi(t),"month"===e?n:n/12;switch(t=this._days+Math.round(di(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function fi(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN}function mi(e){return function(){return this.as(e)}}function yi(){return Kt(this)}function gi(e){return e=N(e),this.isValid()?this[e+"s"]():NaN}function vi(e){return function(){return this.isValid()?this._data[e]:NaN}}function bi(){return b(this.days()/7)}function Ci(e,t,n,i,o){return o.relativeTime(t||1,!!n,e,i)}function Si(e,t,n){var i=Kt(e).abs(),o=Er(i.as("s")),r=Er(i.as("m")),s=Er(i.as("h")),a=Er(i.as("d")),u=Er(i.as("M")),l=Er(i.as("y")),c=o<=Or.ss&&["s",o]||o0,c[4]=n,Ci.apply(null,c)}function wi(e){return void 0===e?Er:"function"==typeof e&&(Er=e,!0)}function xi(e,t){return void 0!==Or[e]&&(void 0===t?Or[e]:(Or[e]=t,"s"===e&&(Or.ss=t-1),!0))}function _i(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=Si(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function Ei(e){return(e>0)-(e<0)||+e}function Oi(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i=Ar(this._milliseconds)/1e3,o=Ar(this._days),r=Ar(this._months);e=b(i/60),t=b(e/60),i%=60,e%=60,n=b(r/12),r%=12;var s=n,a=r,u=o,l=t,c=e,p=i?i.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var h=d<0?"-":"",f=Ei(this._months)!==Ei(d)?"-":"",m=Ei(this._days)!==Ei(d)?"-":"",y=Ei(this._milliseconds)!==Ei(d)?"-":"";return h+"P"+(s?f+s+"Y":"")+(a?f+a+"M":"")+(u?m+u+"D":"")+(l||c||p?"T":"")+(l?y+l+"H":"")+(c?y+c+"M":"")+(p?y+p+"S":"")}var Ai,Ti;Ti=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,i=0;i68?1900:2e3)};var vo,bo=ne("FullYear",!0);vo=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;tthis?this:e:m()}),Go=function(){return Date.now?Date.now():+new Date},Yo=["year","quarter","month","week","day","hour","minute","second","millisecond"];Pt("Z",":"),Pt("ZZ",""),z("Z",io),z("ZZ",io),K(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Nt(io,e)});var Ko=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Jo=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Xo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Kt.fn=Ft.prototype,Kt.invalid=It;var Zo=en(1,"add"),er=en(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var tr=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Nn("gggg","weekYear"),Nn("ggggg","weekYear"),Nn("GGGG","isoWeekYear"),Nn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),z("G",to),z("g",to),z("GG",Gi,Hi),z("gg",Gi,Hi),z("GGGG",Xi,zi),z("gggg",Xi,zi),z("GGGGG",Zi,Wi),z("ggggg",Zi,Wi),J(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=C(e)}),J(["gg","GG"],function(e,n,i,o){n[o]=t.parseTwoDigitYear(e)}),Q("Q",0,"Qo","quarter"),P("quarter","Q"),L("quarter",7),z("Q",ji),K("Q",function(e,t){t[lo]=3*(C(e)-1)}),Q("D",["DD",2],"Do","date"),P("date","D"),L("date",9),z("D",Gi),z("DD",Gi,Hi),z("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),K(["D","DD"],co),K("Do",function(e,t){t[co]=C(e.match(Gi)[0])});var nr=ne("Date",!0);Q("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),L("dayOfYear",4),z("DDD",Ji),z("DDDD",qi),K(["DDD","DDDD"],function(e,t,n){n._dayOfYear=C(e)}),Q("m",["mm",2],0,"minute"),P("minute","m"),L("minute",14),z("m",Gi),z("mm",Gi,Hi),K(["m","mm"],ho);var ir=ne("Minutes",!1);Q("s",["ss",2],0,"second"),P("second","s"),L("second",15),z("s",Gi),z("ss",Gi,Hi),K(["s","ss"],fo);var or=ne("Seconds",!1);Q("S",0,0,function(){return~~(this.millisecond()/100)}),Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Q(0,["SSS",3],0,"millisecond"),Q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),L("millisecond",16),z("S",Ji,ji),z("SS",Ji,Hi),z("SSS",Ji,qi);var rr;for(rr="SSSS";rr.length<=9;rr+="S")z(rr,eo);for(rr="S";rr.length<=9;rr+="S")K(rr,qn);var sr=ne("Milliseconds",!1);Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");var ar=g.prototype;ar.add=Zo,ar.calendar=on,ar.clone=rn,ar.diff=dn,ar.endOf=En,ar.format=gn,ar.from=vn,ar.fromNow=bn,ar.to=Cn,ar.toNow=Sn,ar.get=re,ar.invalidAt=Dn,ar.isAfter=sn,ar.isBefore=an,ar.isBetween=un,ar.isSame=ln,ar.isSameOrAfter=cn,ar.isSameOrBefore=pn,ar.isValid=Fn,ar.lang=tr,ar.locale=wn,ar.localeData=xn,ar.max=Wo,ar.min=zo,ar.parsingFlags=$n,ar.set=se,ar.startOf=_n,ar.subtract=er,ar.toArray=Rn,ar.toObject=Mn,ar.toDate=Tn,ar.toISOString=mn,ar.inspect=yn,ar.toJSON=In,ar.toString=fn,ar.unix=An,ar.valueOf=On,ar.creationData=Pn,ar.year=bo,ar.isLeapYear=te,ar.weekYear=kn,ar.isoWeekYear=Ln,ar.quarter=ar.quarters=jn,ar.month=fe,ar.daysInMonth=me,ar.week=ar.weeks=Te,ar.isoWeek=ar.isoWeeks=Re,ar.weeksInYear=Bn,ar.isoWeeksInYear=Vn,ar.date=nr,ar.day=ar.days=ke,ar.weekday=Le,ar.isoWeekday=Ve,ar.dayOfYear=Hn,ar.hour=ar.hours=Do,ar.minute=ar.minutes=ir,ar.second=ar.seconds=or,ar.millisecond=ar.milliseconds=sr,ar.utcOffset=Vt,ar.utc=Qt,ar.local=Ut,ar.parseZone=jt,ar.hasAlignedHourOffset=Ht,ar.isDST=qt,ar.isLocal=Wt,ar.isUtcOffset=Gt,ar.isUtc=Yt,ar.isUTC=Yt,ar.zoneAbbr=zn,ar.zoneName=Wn,ar.dates=x("dates accessor is deprecated. Use date instead.",nr),ar.months=x("months accessor is deprecated. Use month instead",fe),ar.years=x("years accessor is deprecated. Use year instead",bo),ar.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Bt),ar.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zt);var ur=T.prototype;ur.calendar=R,ur.longDateFormat=M,ur.invalidDate=I,ur.ordinal=F,ur.preparse=Kn,ur.postformat=Kn,ur.relativeTime=$,ur.pastFuture=D,ur.set=O,ur.months=le,ur.monthsShort=ce,ur.monthsParse=de,ur.monthsRegex=ge,ur.monthsShortRegex=ye,ur.week=Ee,ur.firstDayOfYear=Ae,ur.firstDayOfWeek=Oe,ur.weekdays=Fe,ur.weekdaysMin=De,ur.weekdaysShort=$e,ur.weekdaysParse=Ne,ur.weekdaysRegex=Be,ur.weekdaysShortRegex=Qe,ur.weekdaysMinRegex=Ue,ur.isPM=Ge,ur.meridiem=Ye,Ze("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===C(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.lang=x("moment.lang is deprecated. Use moment.locale instead.",Ze),t.langData=x("moment.langData is deprecated. Use moment.localeData instead.",nt);var lr=Math.abs,cr=mi("ms"),pr=mi("s"),dr=mi("m"),hr=mi("h"),fr=mi("d"),mr=mi("w"),yr=mi("M"),gr=mi("y"),vr=vi("milliseconds"),br=vi("seconds"),Cr=vi("minutes"),Sr=vi("hours"),wr=vi("days"),xr=vi("months"),_r=vi("years"),Er=Math.round,Or={ss:44,s:45,m:45,h:22,d:26,M:11},Ar=Math.abs,Tr=Ft.prototype;return Tr.isValid=Mt,Tr.abs=ri,Tr.add=ai,Tr.subtract=ui,Tr.as=hi,Tr.asMilliseconds=cr,Tr.asSeconds=pr,Tr.asMinutes=dr,Tr.asHours=hr,Tr.asDays=fr,Tr.asWeeks=mr,Tr.asMonths=yr,Tr.asYears=gr,Tr.valueOf=fi,Tr._bubble=ci,Tr.clone=yi,Tr.get=gi,Tr.milliseconds=vr,Tr.seconds=br,Tr.minutes=Cr,Tr.hours=Sr,Tr.days=wr,Tr.weeks=bi,Tr.months=xr,Tr.years=_r,Tr.humanize=_i,Tr.toISOString=Oi,Tr.toString=Oi,Tr.toJSON=Oi,Tr.locale=wn,Tr.localeData=xn,Tr.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Oi),Tr.lang=tr,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),z("x",to),z("X",oo),K("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),K("x",function(e,t,n){n._d=new Date(C(e))}),t.version="2.20.1",function(e){Ai=e}(Et),t.fn=ar,t.min=At,t.max=Tt,t.now=Go,t.utc=p,t.unix=Gn,t.months=ei,t.isDate=a,t.locale=Ze,t.invalid=m,t.duration=Kt,t.isMoment=v,t.weekdays=ni,t.parseZone=Yn,t.localeData=nt,t.isDuration=$t,t.monthsShort=ti,t.weekdaysMin=oi,t.defineLocale=et,t.updateLocale=tt,t.locales=it,t.weekdaysShort=ii,t.normalizeUnits=N,t.relativeTimeRounding=wi,t.relativeTimeThreshold=xi,t.calendarFormat=nn,t.prototype=ar,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},t})}).call(t,n(107)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(66);t.AdvancedSearchEvents=i.AdvancedSearchEvents;var o=n(68);t.AnalyticsEvents=o.AnalyticsEvents;var r=n(37);t.BreadcrumbEvents=r.BreadcrumbEvents;var s=n(75);t.DebugEvents=s.DebugEvents;var a=n(146);t.DistanceEvents=a.DistanceEvents;var u=n(16);t.InitializationEvents=u.InitializationEvents;var l=n(31);t.OmniboxEvents=l.OmniboxEvents;var c=n(72);t.PreferencesPanelEvents=c.PreferencesPanelEvents;var p=n(10);t.QueryEvents=p.QueryEvents;var d=n(33);t.ResultListEvents=d.ResultListEvents;var h=n(101);t.ResultLayoutEvents=h.ResultLayoutEvents;var f=n(64);t.SearchAlertsEvents=f.SearchAlertsEvents;var m=n(42);t.SettingsEvents=m.SettingsEvents;var y=n(104);t.SliderEvents=y.SliderEvents;var g=n(71);t.StandaloneSearchInterfaceEvents=g.StandaloneSearchInterfaceEvents},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.startSlide="startSlide",e.duringSlide="duringSlide",e.endSlide="endSlide",e.graphValueSelected="graphValueSelected",e}();t.SliderEvents=i},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),r=n(60),s=n(4),a=n(23),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.decimals=0,t}return i(t,e),t}(r.Options),l=function(){function e(){}return e.currencyToString=function(e,t){if(s.Utils.isNullOrUndefined(e))return"";e=Number(e),o.Assert.isNumber(e),t=(new u).merge(t);var n=a.culture().numberFormat.currency,i=n.symbol;s.Utils.isNonEmptyString(t.symbol)&&(n.symbol=t.symbol);var r=a.format(e,"c"+t.decimals.toString());return n.symbol=i,r},e}();t.CurrencyUtils=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.hsvToRgb=function(e,t,n){var i,o,r,s=Math.floor(6*e),a=6*e-s,u=n*(1-t),l=n*(1-a*t),c=n*(1-(1-a)*t);switch(s%6){case 0:i=n,o=c,r=u;break;case 1:i=l,o=n,r=u;break;case 2:i=u,o=n,r=c;break;case 3:i=u,o=l,r=n;break;case 4:i=c,o=u,r=n;break;case 5:i=n,o=u,r=l}return[Math.round(255*i),Math.round(255*o),Math.round(255*r)]},e.rgbToHsv=function(e,t,n){e/=255,t/=255,n/=255;var i,o,r=Math.max(e,t,n),s=Math.min(e,t,n),a=r,u=r-s;if(o=0==r?0:u/r,r==s)i=0;else{switch(r){case e:i=(t-n)/u+(tt.MIN_THRESHOLD_FOR_DUPLICATE_VALUE},e.prototype.stripInternalTime=function(e){return e&&e.forEach(function(e,t,n){delete e.internalTime}),e},e}();t.HistoryStore=r,Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function i(){return t.preferredStorage?t.preferredStorage:o.hasLocalStorage()?localStorage:o.hasCookieStorage()?new s:o.hasSessionStorage()?sessionStorage:new a}var o=n(112),r=n(238);t.preferredStorage=null,t.getAvailableStorage=i;var s=function(){function e(){}return e.prototype.getItem=function(e){return r.Cookie.get(e)},e.prototype.removeItem=function(e){r.Cookie.erase(e)},e.prototype.setItem=function(e,t){r.Cookie.set(e,t)},e}();t.CookieStorage=s;var a=function(){function e(){}return e.prototype.getItem=function(e){return null},e.prototype.removeItem=function(e){},e.prototype.setItem=function(e,t){},e}();t.NullStorage=a},function(e,t,n){"use strict";function i(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}function o(){try{return"sessionStorage"in window&&null!==window.sessionStorage}catch(e){return!1}}function r(){return navigator.cookieEnabled}function s(){return null!==document}function a(){return s()&&null!==document.location}t.hasLocalStorage=i,t.hasSessionStorage=o,t.hasCookieStorage=r,t.hasDocument=s,t.hasDocumentLocation=a},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]=5)throw new Error(r.REPEATED_FAILURES)},e}();t.AccessToken=u},function(e,t,n){"use strict";function i(){var e=String.locales||(String.locales={});e.en=s(e.en,a),String.toLocaleString.call(this,{en:a}),String.locale="en",String.defaultLocale="en",r.culture("en")}function o(){var e=String.locales||(String.locales={});e.en=s(e.en,a),String.toLocaleString.call(this,{en:a}),String.locale="en",String.defaultLocale="en",r.culture("en")}Object.defineProperty(t,"__esModule",{value:!0});var r=n(23),s=function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n},a={"box user":"User","filetype_box user":"User",html:"HTML File",filetype_html:"HTML File",wiki:"Wiki",filetype_wiki:"Wiki",webscraperwebpage:"Web Page",filetype_webscraperwebpage:"Web Page",image:"Image",filetype_image:"Image",folder:"Folder",filetype_folder:"Folder",txt:"Text",filetype_txt:"Text",zip:"Zip File",filetype_zip:"Zip File",olefile:"OLE file",filetype_olefile:"OLE file",gmailmessage:"Gmail Message",filetype_gmailmessage:"Gmail Message",pdf:"PDF File",filetype_pdf:"PDF File",swf:"Flash File",filetype_swf:"Flash File",xml:"XML File",filetype_xml:"XML File",vsd:"Visio",filetype_vsd:"Visio",svg:"SVG",filetype_svg:"SVG",svm:"Open Office",filetype_svm:"Open Office",rssitem:"RSS feed",filetype_rssitem:"RSS feed",doc:"Document",filetype_doc:"Document",docx:"Microsoft Word Document",filetype_docx:"Microsoft Word Document",xls:"Spreadsheet Document",filetype_xls:"Spreadsheet Document",ppt:"Presentation Document",filetype_ppt:"Presentation Document",video:"Video",filetype_video:"Video",youtube:"YouTube video",filetype_youtube:"YouTube video",saleforceitem:"Salesforce",filetype_saleforceitem:"Salesforce",dynamicscrmitem:"Dynamics CRM",filetype_dynamicscrmitem:"Dynamics CRM",salesforceitem:"Salesforce",filetype_salesforceitem:"Salesforce",odt:"Open Text Document",filetype_odt:"Open Text Document",box:"User",filetype_box:"User",jiraissue:"Jira Issue",filetype_jiraissue:"Jira Issue",cfpage:"Confluence Page",filetype_cfpage:"Confluence Page",cfcomment:"Confluence Comment",filetype_cfcomment:"Confluence Comment",cfspace:"Confluence Space",filetype_cfspace:"Confluence Space",cfblogentry:"Confluence Blog Entry",filetype_cfblogentry:"Confluence Blog Entry",confluencespace:"Confluence Space",filetype_confluencespace:"Confluence Space",exchangemessage:"Message",filetype_exchangemessage:"Message",exchangeappointment:"Appointment",filetype_exchangeappointment:"Appointment",exchangenote:"Note",filetype_exchangenote:"Note",exchangetask:"Task",filetype_exchangetask:"Task",exchangeperson:"Exchange User",filetype_exchangeperson:"Exchange User",activedirperson:"Active Directory User",filetype_activedirperson:"Active Directory User",exchangeactivity:"Activity",filetype_exchangeactivity:"Activity",exchangecalendarmessage:"Calendar Message",filetype_exchangecalendarmessage:"Calendar Message",exchangedocument:"Exchange Document",filetype_exchangedocument:"Exchange Document",exchangedsn:"DSN",filetype_exchangedsn:"DSN",exchangefreebusy:"Free/Busy",filetype_exchangefreebusy:"Free/Busy",exchangegroup:"Group",filetype_exchangegroup:"Group",exchangerssfeed:"RSS Feed",filetype_exchangerssfeed:"RSS Feed",exchangejunkmessage:"Junk Email",filetype_exchangejunkmessage:"Junk Email",exchangeofficecom:"Communications",filetype_exchangeofficecom:"Communications",lithiummessage:"Lithium Message",filetype_lithiummessage:"Lithium Message",lithiumthread:"Lithium Thread",filetype_lithiumthread:"Lithium Thread",lithiumboard:"Lithium Board",filetype_lithiumboard:"Lithium Board",lithiumcategory:"Lithium Category",filetype_lithiumcategory:"Lithium Category",lithiumcommunity:"Lithium Community",filetype_lithiumcommunity:"Lithium Community",people:"User",objecttype_people:"User",message:"Message",objecttype_message:"Message",feed:"RSS Feed",objecttype_feed:"RSS Feed",thread:"Thread",objecttype_thread:"Thread",file:"File",objecttype_file:"File",board:"Board",objecttype_board:"Board",category:"Category",objecttype_category:"Category",account:"Account",objecttype_account:"Account",annotation:"Note",objecttype_annotation:"Note",campaign:"Campaign",objecttype_campaign:"Campaign",case:"Case",objecttype_case:"Case",contact:"Contact",objecttype_contact:"Contact",contract:"Contract",objecttype_contract:"Contract",event:"Event",objecttype_event:"Event",email:"Email",objecttype_email:"Email",goal:"Goal",objecttype_goal:"Goal",incident:"Case",objecttype_incident:"Case",invoice:"Invoice",objecttype_invoice:"Invoice",lead:"Lead",objecttype_lead:"Lead",list:"List",objecttype_list:"Marketing List",solution:"Solution",objecttype_solution:"Solution",report:"Report",objecttype_report:"Report",task:"Task",objecttype_task:"Task",user:"User",objecttype_user:"User",attachment:"Attachment",objecttype_attachment:"Attachment",casecomment:"Case Comment",objecttype_casecomment:"Case Comment",opportunity:"Opportunity",objecttype_opportunity:"Opportunity",opportunityproduct:"Opportunity Product",objecttype_opportunityproduct:"Opportunity Product",feeditem:"Chatter",objecttype_feeditem:"Chatter",feedcomment:"Comment",objecttype_feedcomment:"Comment",note:"Note",objecttype_note:"Note",product:"Product",objecttype_product:"Product",partner:"Partner",objecttype_partner:"Partner",queueitem:"Queue Item",objecttype_queueitem:"Queue Item",quote:"Quote",objecttype_quote:"Quote",salesliterature:"Sales Literature",objecttype_salesliterature:"Sales Literature",salesorder:"Sales Order",objecttype_salesorder:"Sales Order",service:"Service",objecttype_service:"Service",socialprofile:"Social Profile",objecttype_socialprofile:"Social Profile",kbdocumentation:"Knowledge Document",objecttype_kbdocumentation:"Knowledge Document",kbtechnicalarticle:"Technical Documentation",objecttype_kbtechnicalarticle:"Technical Documentation",kbsolution:"Solution",objecttype_kbsolution:"Solution",kbknowledgearticle:"Knowledge Article",objecttype_kbknowledgearticle:"Knowledge Article",kbattachment:"Attachment",objecttype_kbattachment:"Attachment",kbarticle:"Article",objecttype_kbarticle:"Article",kbarticlecomment:"Article Comment",objecttype_kbarticlecomment:"Article Comment",knowledgearticle:"Knowledge Article",objecttype_knowledgearticle:"Knowledge Article",topic:"Topic",objecttype_topic:"Topic",dashboard:"Dashboard",objecttype_dashboard:"Dashboard",contentversion:"Document",objecttype_contentversion:"Document",collaborationgroup:"Collaboration group",objecttype_collaborationgroup:"Collaboration group",phonecall:"Phone call",objecttype_phonecall:"Phone call",appointment:"Appointment",objecttype_appointment:"Appointment",spportal:"Portal",filetype_spportal:"Portal",spsite:"SharePoint Site",filetype_spsite:"SharePoint Site",spuserprofile:"SharePoint User",filetype_spuserprofile:"SharePoint User",sparea:"Area",filetype_sparea:"Area",spannouncement:"Announcement",filetype_spannouncement:"Announcement",spannouncementlist:"Announcements",filetype_spannouncementlist:"Announcements",spcontact:"Contact",filetype_spcontact:"Contact",spcontactlist:"Contacts",filetype_spcontactlist:"Contacts",spcustomlist:"Custom Lists",filetype_spcustomlist:"Custom Lists",spdiscussionboard:"Discussion Board",filetype_spdiscussionboard:"Discussion Board",spdiscussionboardlist:"Discussion Boards",filetype_spdiscussionboardlist:"Discussion Boards",spdocumentlibrarylist:"Document Library",filetype_spdocumentlibrarylist:"Document Library",spevent:"Event",filetype_spevent:"Event",speventlist:"Events",filetype_speventlist:"Events",spformlibrarylist:"Form Library",filetype_spformlibrarylist:"Form Library",spissue:"Issue",filetype_spissue:"Issue",spissuelist:"Issues",filetype_spissuelist:"Issues",splink:"Link",filetype_splink:"Link",splinklist:"Links",filetype_splinklist:"Links",sppicturelibrarylist:"Picture Library",filetype_sppicturelibrarylist:"Picture Library",spsurvey:"Survey",filetype_spsurvey:"Survey",spsurveylist:"Surveys",filetype_spsurveylist:"Surveys",sptask:"Task",filetype_sptask:"Task",sptasklist:"Tasks",filetype_sptasklist:"Tasks",spagenda:"Agenda",filetype_spagenda:"Agenda",spagendalist:"Agendas",filetype_spagendalist:"Agendas",spattendee:"Attendee",filetype_spattendee:"Attendee",spattendeelist:"Attendees",filetype_spattendeelist:"Attendees",spcustomgridlist:"Custom Grids",filetype_spcustomgridlist:"Custom Grids",spdecision:"Decision",filetype_spdecision:"Decision",spdecisionlist:"Decisions",filetype_spdecisionlist:"Decisions",spobjective:"Objective",filetype_spobjective:"Objective",spobjectivelist:"Objectives",filetype_spobjectivelist:"Objectives",sptextbox:"Textbox",filetype_sptextbox:"Textbox",sptextboxlist:"Textbox list",filetype_sptextboxlist:"Textbox list",spthingstobring:"Thing To Bring",filetype_spthingstobring:"Thing To Bring",spthingstobringlist:"Things To Bring",filetype_spthingstobringlist:"Things To Bring",sparealisting:"Area Listing",filetype_sparealisting:"Area Listing",spmeetingserie:"Meeting series",filetype_spmeetingserie:"Meeting series",spmeetingserielist:"Meeting Series List",filetype_spmeetingserielist:"Meeting Series List",spsitedirectory:"Site Directory Item",filetype_spsitedirectory:"Site Directory Item",spsitedirectorylist:"Site Directory",filetype_spsitedirectorylist:"Site Directory",spdatasource:"Data Source",filetype_spdatasource:"Data Source",spdatasourcelist:"Data Source List",filetype_spdatasourcelist:"Data Source List",splisttemplatecataloglist:"List Template Gallery",filetype_splisttemplatecataloglist:"List Template Gallery",spwebpartcataloglist:"WebPart Gallery",filetype_spwebpartcataloglist:"WebPart Gallery",spwebtemplatecataloglist:"Site Template Gallery",filetype_spwebtemplatecataloglist:"Site Template Gallery",spworkspacepagelist:"Workspace Pages",filetype_spworkspacepagelist:"Workspace Pages",spunknownlist:"Custom List",filetype_spunknownlist:"Custom List",spadministratortask:"Administrator Task",filetype_spadministratortask:"Administrator Task",spadministratortasklist:"Administrator Tasks",filetype_spadministratortasklist:"Administrator Tasks",spareadocumentlibrarylist:"Area Document Library",filetype_spareadocumentlibrarylist:"Area Document Library",spblogcategory:"Blog Category",filetype_spblogcategory:"Blog Category",spblogcategorylist:"Blog Categories",filetype_spblogcategorylist:"Blog Categories",spblogcomment:"Blog Comment",filetype_spblogcomment:"Blog Comment",spblogcommentlist:"Blog Comments",filetype_spblogcommentlist:"Blog Comments",spblogpost:"Blog Post",filetype_spblogpost:"Blog Post",spblogpostlist:"Blog Posts",filetype_spblogpostlist:"Blog Posts",spdataconnectionlibrarylist:"Data Connection Library",filetype_spdataconnectionlibrarylist:"Data Connection Library",spdistributiongroup:"Distribution Group",filetype_spdistributiongroup:"Distribution Group",spdistributiongrouplist:"Distribution Groups",filetype_spdistributiongrouplist:"Distribution Groups",spipfslist:"InfoPath Forms Servers",filetype_spipfslist:"InfoPath Forms Servers",spkeyperformanceindicator:"Key Performance Indicator",filetype_spkeyperformanceindicator:"Key Performance Indicator",spkeyperformanceindicatorlist:"Key Performance Indicators",filetype_spkeyperformanceindicatorlist:"Key Performance Indicators",splanguagesandtranslator:"Languages and Translator",filetype_splanguagesandtranslator:"Languages and Translator",splanguagesandtranslatorlist:"Languages and Translators",filetype_splanguagesandtranslatorlist:"Languages and Translators",spmasterpagescataloglist:"Master Page Gallery",filetype_spmasterpagescataloglist:"Master Page Gallery",spnocodeworkflowlibrarylist:"No-code Workflow Libraries",filetype_spnocodeworkflowlibrarylist:"No-code Workflow Libraries",spprojecttask:"Project Task",filetype_spprojecttask:"Project Task",spprojecttasklist:"Project Tasks",filetype_spprojecttasklist:"Project Tasks",sppublishingpageslibrarylist:"Page Library",filetype_sppublishingpageslibrarylist:"Page Library",spreportdocumentlibrarylist:"Report Document Library",filetype_spreportdocumentlibrarylist:"Report Document Library",spreportlibrarylist:"Report Library",filetype_spreportlibrarylist:"Report Library",spslidelibrarylist:"Slide Library",filetype_spslidelibrarylist:"Slide Library",sptab:"Tabs",filetype_sptab:"Tabs",sptablist:"Tabs List",filetype_sptablist:"Tabs List",sptranslationmanagementlibrarylist:"Translation Management Library",filetype_sptranslationmanagementlibrarylist:"Translation Management Library",spuserinformation:"User Information",filetype_spuserinformation:"User Information",spuserinformationlist:"User Information List",filetype_spuserinformationlist:"User Information List",spwikipagelibrarylist:"Wiki Page Library",filetype_spwikipagelibrarylist:"Wiki Page Library",spworkflowhistory:"Workflow History",filetype_spworkflowhistory:"Workflow History",spworkflowhistorylist:"Workflow History List",filetype_spworkflowhistorylist:"Workflow History List",spworkflowprocess:"Custom Workflow Process",filetype_spworkflowprocess:"Custom Workflow Process",spworkflowprocesslist:"Custom Workflow Processes",filetype_spworkflowprocesslist:"Custom Workflow Processes",sppublishingimageslibrarylist:"Publishing Image Library",filetype_sppublishingimageslibrarylist:"Publishing Image Library",spcirculation:"Circulation",filetype_spcirculation:"Circulation",spcirculationlist:"Circulations",filetype_spcirculationlist:"Circulations",spdashboardslibrarylist:"Dashboards Library",filetype_spdashboardslibrarylist:"Dashboards Library",spdataconnectionforperformancepointlibrarylist:"PerformancePoint Data Connection Library",filetype_spdataconnectionforperformancepointlibrarylist:"PerformancePoint Data Connection Library",sphealthreport:"Health Report",filetype_sphealthreport:"Health Report",sphealthreportlist:"Health Reports",filetype_sphealthreportlist:"Health Reports",sphealthrule:"Health Rule",filetype_sphealthrule:"Health Rule",sphealthrulelist:"Health Rules",filetype_sphealthrulelist:"Health Rules",spimedictionary:"IME Dictionary",filetype_spimedictionary:"IME Dictionary",spimedictionarylist:"IME Dictionaries",filetype_spimedictionarylist:"IME Dictionaries",spperformancepointcontent:"PerformancePoint Content",filetype_spperformancepointcontent:"PerformancePoint Content",spperformancepointcontentlist:"PerformancePoint Contents",filetype_spperformancepointcontentlist:"PerformancePoint Contents",spphonecallmemo:"Phone Call Memo",filetype_spphonecallmemo:"Phone Call Memo",spphonecallmemolist:"Phone Call Memos",filetype_spphonecallmemolist:"Phone Call Memos",sprecordlibrarylist:"Record Library",filetype_sprecordlibrarylist:"Record Library",spresource:"Resource",filetype_spresource:"Resource",spresourcelist:"Resources",filetype_spresourcelist:"Resources",spprocessdiagramslibrarylist:"Process Diagram Library",filetype_spprocessdiagramslibrarylist:"Process Diagram Library",spsitethemeslibrarylist:"Site Theme Library",filetype_spsitethemeslibrarylist:"Site Theme Library",spsolutionslibrarylist:"Solution Library",filetype_spsolutionslibrarylist:"Solution Library",spwfpublibrarylist:"WFPUB Library",filetype_spwfpublibrarylist:"WFPUB Library",spwhereabout:"Whereabout",filetype_spwhereabout:"Whereabout",spwhereaboutlist:"Whereabouts",filetype_spwhereaboutlist:"Whereabouts",spdocumentlink:"Link to a Document",filetype_spdocumentlink:"Link to a Document",spdocumentset:"Document Set",filetype_spdocumentset:"Document Set",spmicrofeedpost:"Microfeed Post",filetype_spmicrofeedpost:"Microfeed Post",spmicrofeedlist:"Microfeed",filetype_spmicrofeedlist:"Microfeed",splistfolder:"List Folder",filetype_splistfolder:"List Folder",youtubevideo:"YouTube video",filetype_youtubevideo:"YouTube video",youtubeplaylistitem:"YouTube playlist item",filetype_youtubeplaylistitem:"YouTube playlist item",youtubeplaylist:"YouTube playlist",filetype_youtubeplaylist:"YouTube playlist",Unknown:"Unknown",And:"AND",Authenticating:"Authenticating {0}...",Clear:"Clear {0}",CompleteQuery:"Complete query",Exclude:"Exclude {0}",EnterTag:"Add Tag",Next:"Next",Last:"Last",Link:"Link",Or:"OR",Previous:"Previous",QueryDidntMatchAnyDocuments:"Your query did not match any documents.",QueryException:"Your query has an error: {0}.",Me:"Me",Remove:"Remove",Search:"Search",SearchFor:"Search for {0}",ShareQuery:"Share Query",Preferences:"Preferences",LinkOpeningSettings:"Link opening settings",Reauthenticate:"Reauthenticate {0}",ResultsFilteringExpression:"Results filtering expressions",FiltersInYourPreferences:"Filters in your preferences",Create:"Create",SearchIn:"Search in {0}",Seconds:"in {0} seconds",ShowingResultsOf:"Results {0}-{1} of {2}",ShowingResultsOfWithQuery:"Results {0}-{1} of {2} for {3}",SwitchTo:"Switch to {0}",Unexclude:"Unexclude {0}",ClearAllFilters:"Clear All Filters",SkipLogin:"Skip login",LoginInProgress:"Login in progress, please wait ...",Login:"Log In",GetStarted:"Get Started",More:"More",NMore:"{0} more...",Less:"Fewer",Settings:"Settings",Score:"Score",ScoreDescription:"The score is computed from the number of occurrences as well as from the position in the result set.",Occurrences:"Occurrences",OccurrencesDescription:"Sort by number of occurrences, with values having the highest number appearing first.",Label:"Label",Of:"of",LabelDescription:"Sort alphabetically on the field values.",Value:"Value",ValueDescription:"Sort on the values of the first computed field",AlphaAscending:"Value Ascending",AlphaDescending:"Value Descending",ChiSquare:"Chi Square",Nosort:"No Sort",NosortDescription:"Do not sort the values. The values will be returned in a random order.",RelativeFrequency:"Relative Frequency",RelativeFrequencyDescription:"Sort based on the relative frequency of values. Less common values will appear higher.",DateDistribution:"Date distribution",Custom:"Custom",CustomDescription:"Sort based on a custom order",ComputedField:"Computed Field",Ascending:"Ascending",Descending:"Descending",noResultFor:"No results for {0}",autoCorrectedQueryTo:"Query was automatically corrected to {0}",didYouMean:"Did you mean: {0}",SuggestedResults:"Suggested Results",SuggestedQueries:"Suggested Queries",MostRelevantItems:"Most relevant items:",AllItems:"All items:",ShowLess:"Show less",ShowMore:"Show more",HideFacet:"Hide Facet",ShowFacet:"Show Facet",AndOthers:"and {0} others",Others:"{0} others",MostRelevantPosts:"Most Relevant Posts:",CompleteThread:"Complete Thread:",ShowCompleteThread:"Show Complete Thread",ShowOnlyTopMatchingPosts:"Show Only Top Matching Posts",MostRelevantReplies:"Most Relevant Replies:",AllConversation:"All Conversation:",ShowAllConversation:"Show All Conversation",ShowAllReplies:"Show All Replies",ShowOnlyMostRelevantReplies:"Show Only Most Relevant Replies",Close:"Close",Open:"Open",OpenInOutlookWhenPossible:"Open in Outlook (when possible)",AlwaysOpenInNewWindow:"Always open results in new window",Quickview:"Quick View",NoQuickview:"The Quick View for this document is unavailable",ErrorReport:"Error Report",OopsError:"Something went wrong.",ProblemPersists:"If the problem persists contact the administrator.",GoBack:"Go Back",Reset:"Reset",Retry:"Retry",MoreInfo:"More Information",Username:"Username",Password:"Password",PostedBy:"Posted by",CannotConnect:"Cannot connect to the server address.",BadUserPass:"Password does not match with username.",PleaseEnterYourCredentials:"Please enter your credentials for {0}.",PleaseEnterYourSearchPage:"Please enter your search page URL",Collapse:"Collapse",Collapsable:"Collapsible",Expand:"Expand",Today:"Today",Yesterday:"Yesterday",Tomorrow:"Tomorrow",Duration:"Duration: {0}",IndexDuration:"Index Duration: {0}",ProxyDuration:"Proxy Duration: {0}",ClientDuration:"Client Duration: {0}",Unavailable:"Unavailable",Reply:"Reply",ReplyAll:"Reply All",Forward:"Forward",From:"From",Caption:"Caption",Expression:"Expression",Tab:"Tab",Tabs:"Tabs",EnterExpressionName:"Enter expression name",EnterExpressionToFilterWith:"Enter expression to filter results with",SelectTab:"Select Tab",SelectAll:"Select All",PageUrl:"Search page URL",ErrorSavingToDevice:"Error while saving the information to your device",ErrorReadingFromDevice:"Error while reading the information from your device",AppIntro:"Speak with a product specialist who can answer your questions about Coveo and help you decide which Coveo solution is right for you. Or, try a live demo !",TryDemo:"Try the demo",ContactUs:"Contact us",NewToCoveo:"New to Coveo?",LetUsHelpGetStarted:"Let us help you get started",LikesThis:"{0} likes this.",CannotConnectSearchPage:"Cannot connect to your search page",AreYouSureDeleteFilter:"Are you sure you want to delete the filter {0} with the expression {1}",OnlineHelp:"Online Help",Done:"Done",SaveFacetState:"Save this facet state",ClearFacetState:"Clear facet state",DisplayingTheOnlyMessage:"Displaying the only message in this conversation",NoNetworkConnection:"No network connection",UnknownConnection:"Unknown connection",EthernetConnection:"Ethernet connection",WiFi:"WiFi connection",CELL:"Cellular connection",CELL_2G:"Cellular 2G connection",CELL_3G:"Cellular 3G connection",CELL_4G:"Cellular 4G connection",Relevance:"Relevance",Date:"Date",Amount:"Amount",QueryExceptionNoException:"No exception",QueryExceptionInvalidSyntax:"Invalid syntax",QueryExceptionInvalidCustomField:"Invalid custom field",QueryExceptionInvalidDate:"Invalid date",QueryExceptionInvalidExactPhrase:"Invalid exact phrase",QueryExceptionInvalidDateOp:"Invalid date operator",QueryExceptionInvalidNear:"Invalid NEAR operator",QueryExceptionInvalidWeightedNear:"Invalid weighted NEAR",QueryExceptionInvalidTerm:"Invalid term",QueryExceptionTooManyTerms:"Too many terms",QueryExceptionWildcardTooGeneral:"Wildcard too general",QueryExceptionInvalidSortField:"Invalid sort field",QueryExceptionInvalidSmallStringOp:"Invalid small string operator",QueryExceptionRequestedResultsMax:"Requested results maximum",QueryExceptionAggregatedMirrorDead:"Aggregated mirror is offline",QueryExceptionAggregatedMirrorQueryTimeOut:"Aggregated mirror query timeout",QueryExceptionAggregatedMirrorInvalidBuildNumber:"Aggregated mirror invalid build number",QueryExceptionAggregatedMirrorCannotConnect:"Aggregated mirror cannot connect",QueryExceptionNotEnoughLeadingCharsWildcard:"Not enough leading character wildcard",QueryExceptionSecurityInverterNotFound:"Security inverter not found",QueryExceptionSecurityInverterAccessDenied:"Security inverter access denied",QueryExceptionAggregatedMirrorCannotImpersonate:"Aggregated mirror cannot impersonate",QueryExceptionUnexpected:"Unexpected",QueryExceptionAccessDenied:"Access denied",QueryExceptionSuperUserTokenInvalid:"Super user token invalid",QueryExceptionSuperUserTokenExpired:"Super user token is expired",QueryExceptionLicenseQueriesExpired:"Queries license expired",QueryExceptionLicenseSuperUserTokenNotSupported:"License super user token not supported",QueryExceptionInvalidSession:"Invalid session",QueryExceptionInvalidDocument:"Invalid document",QueryExceptionSearchDisabled:"Search disabled",FileType:"File type",ShowAttachment:"Show attachment",OnFeed:"on {0}'s feed.",Author:"Author",NoTitle:"No title",CurrentSelections:"Current selections",AllContent:"All content",CancelLastAction:"Cancel last action",SearchTips:"Search tips",CheckSpelling:"Check the spelling of your keywords.",TryUsingFewerKeywords:"Try using fewer, different or more general keywords.",SelectFewerFilters:"Select fewer filters to broaden your search.",Document:"Document",Time:"Time",StartDate:"Start Date",StartTime:"Start Time",DurationTitle:"Duration",UserQuery:"User query",ShowUserActions:"Show User Actions",NoData:"No data available",EventType:"Event type",GoToFullSearch:"Full search",GoToEdition:"Customize Panel",RemoveContext:"Remove context",BoxAttachToCase:"Attach to case",AttachToCase:"Attach to case",Attach:"Attach",Attached:"Attached",Detach:"Detach",Details:"Details",AdditionalFilters:"Additional filters",SelectNonContextualSearch:"Remove the context from the current record to broaden your search",CopyPasteToSupport:"Copy paste this message to the Coveo Support team for more information.",FollowQueryDescription:"Alert me for changes to the search results of this query.",SearchAlerts_Panel:"Manage Alerts",SearchAlerts_PanelDescription:"View and manage your search alerts.",SearchAlerts_PanelNoSearchAlerts:"You have no subscriptions.",SearchAlerts_Fail:"The Search Alerts service is currently unavailable.",SearchAlerts_Type:"Type",SearchAlerts_Content:"Content",SearchAlerts_Actions:"Action",EmptyQuery:"",SearchAlerts_Type_followQuery:"Query",SearchAlerts_Type_followDocument:"Item",SearchAlerts_unFollowing:"Stop Following",SearchAlerts_follow:"Follow",SearchAlerts_followed:"Followed",SearchAlerts_followQuery:"Follow Query",Subscription_StopFollowingQuery:"Stop Following Query",SearchAlerts_Frequency:"When",SubscriptionsManageSubscriptions:"Manage Alerts",SubscriptionsMessageFollowQuery:"You will receive alerts when the query {0} returns new or updated items.",SubscriptionsMessageFollow:"You will receive alerts for changes to the item {0}.",Expiration:"Expiration",Monthly:"Monthly",Daily:"Daily",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",Sunday:"Sunday",NextDay:"Next {0}",LastDay:"Last {0}",StartTypingCaseForSuggestions:"Describe your problem to see possible solutions",ExportToExcel:"Export to Excel",ExportToExcelDescription:"Export search results to Excel",CaseCreationNoResults:"No recommended solutions were found",SortBy:"Sort by",BoxCreateArticle:"Create Article",Facets:"Facets",AdvancedSearch:"Advanced Search",Keywords:"Keywords",AllTheseWords:"All these words",ExactPhrase:"This exact phrase",AnyOfTheseWords:"Any of these words",NoneOfTheseWords:"None of these words",Anytime:"Anytime",InTheLast:"In the last",Days:"days",Months:"months",Month:"Month",Year:"Year",Between:"Between",Language:"Language",Size:"Size",AtLeast:"at least",AtMost:"at most",Contains:"contains",DoesNotContain:"does not contain",Matches:"matches",Bytes:"bytes",card:"Card",table:"Table",ResultLinks:"Result links",EnableQuerySyntax:"Enable query syntax",On:"On",Off:"Off",Automatic:"Automatic",ResultsPerPage:"Results per page",PreviousMonth:"Previous month",NextMonth:"Next month",Title:"Title",FiltersInAdvancedSearch:"Filters in Advanced Search",NoEndpoints:"{0} has no registered endpoints.",InvalidToken:"The token used is invalid.",AddSources:"You will need to add sources in your index, or wait for the created sources to finish indexing.",TryAgain:"Please try again.",CoveoOnlineHelp:"Coveo Online Help",CannotAccess:"{0} cannot be accessed.",CoveoOrganization:"Coveo Organization",SearchAPIDuration:"Search API Duration: {0}",LastUpdated:"Last updated",AllDates:"All dates",WithinLastDay:"Within last day",WithinLastWeek:"Within last week",WithinLastMonth:"Within last month",WithinLastYear:"Within last year",RelevanceInspector:"Relevance Inspector",KeywordInCategory:"{0} in {1}",ResultCount:"{0} results",ShowingResults:"{0} results",ShowingResultsWithQuery:"{0} results for {1}",NumberOfVideos:"Number of videos",AllCategories:"All Categories",Recommended:"Recommended",Featured:"Featured",CoveoHomePage:"Coveo Home page",SizeValue:"Size value",UnitMeasurement:"Unit of measurement",Toggle:"Toggle",FilterOn:"Filter on {0}",RemoveFilterOn:"Remove filter on {0}",Enter:"Enter",InsertAQuery:"Insert a query",PressEnterToSend:"Press enter to send",SortResultsBy:"Sort results by {0}",DisplayResultsAs:"Display results as {0}",FacetTitle:"{0} facet",SelectValueWithResultCount:"Select {0} with {1}",UnselectValueWithResultCount:"Unselect {0} with {1}",PageNumber:"Page {0}",DisplayResultsPerPage:"Display {0} results per page"};t.defaultLanguage=i,t.setLanguageAfterPageLoaded=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(24),o=n(0);String.toLocaleString=i.LocaleString;var r=/(((?!<\/pl>).)*)<\/pl>/g,s=/(((?!<\/sn>).)*)<\/sn>/g;t.L10N={format:function(e){for(var n=[],i=1;i0){var l=o.last(n);(o.isBoolean(l)||o.isNumber(l))&&(n.pop(),r=t.L10N.formatPlSn(r,l)),o.each(n,function(e,t){return r=r.replace("{"+t+"}",e)})}else r=r.replace(/{[0-9]}|[a-zA-Z]+<\/pl>||<\/sn>/g,"").trim();return r},formatPlSn:function(e,t){return e=(o.isBoolean(t)?t:t>1)?e.replace(r,"$1").replace(s,""):e.replace(r,"").replace(s,"$1")}}},function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0)return this.logger.info("Logging analytics search events",e),this.sendToService(e,"searches","searchEvents")},e.prototype.sendDocumentViewEvent=function(e){return a.Assert.exists(e),this.logger.info("Logging analytics document view",e),this.sendToService(e,"click","clickEvent")},e.prototype.sendCustomEvent=function(e){return a.Assert.exists(e),this.logger.info("Logging analytics custom event",e),this.sendToService(e,"custom","customEvent")},e.prototype.getTopQueries=function(e){var t=this.buildAnalyticsUrl("/stats/topQueries");return this.getFromService(t,e)},e.prototype.sendToService=function(t,n,i){return o(this,void 0,void 0,function(){var o,s,a,u,l,d;return r(this,function(r){switch(r.label){case 0:if(o=e.CUSTOM_ANALYTICS_VERSION||e.DEFAULT_ANALYTICS_VERSION,s=p.UrlUtils.normalizeAsParts({paths:[this.options.serviceUrl,"/rest/",o,"/analytics/",n],query:{org:this.organization,visitor:c.Cookie.get("visitorId")}}),null==e.pendingRequest)return[3,4];r.label=1;case 1:return r.trys.push([1,,3,4]),[4,e.pendingRequest];case 2:return r.sent(),[3,4];case 3:return[2,this.sendToService(t,n,i)];case 4:a=e.pendingRequest=this.endpointCaller.call({errorsAsSuccess:!1,method:"POST",queryString:s.queryNormalized,requestData:t,url:s.path,responseType:"text",requestDataType:"application/json"}),r.label=5;case 5:return r.trys.push([5,7,,10]),[4,a];case 6:return u=r.sent(),e.pendingRequest=null,this.handleAnalyticsEventResponse(u.data),[2,u.data];case 7:return l=r.sent(),e.pendingRequest=null,this.options.accessToken.isExpired(l)?[4,this.options.accessToken.doRenew()]:[3,9];case 8:if(d=r.sent())return[2,this.sendToService(t,n,i)];r.label=9;case 9:throw l;case 10:return[2]}})})},e.prototype.getFromService=function(e,t){var n=i({},t,{access_token:this.options.accessToken.token});return this.endpointCaller.call({errorsAsSuccess:!1,method:"GET",queryString:this.options.organization?["org="+d.Utils.safeEncodeURIComponent(this.options.organization)]:[],requestData:n,responseType:"json",url:e}).then(function(e){return e.data})},e.prototype.handleAnalyticsEventResponse=function(t){var n,i;return t.visitId?(n=t.visitId,i=t.visitorId):t.searchEventResponses&&(n=s.first(t.searchEventResponses).visitId,i=s.first(t.searchEventResponses).visitorId),n&&(this.visitId=n),i&&c.Cookie.set("visitorId",i,e.VISITOR_COOKIE_TIME),t},e.prototype.buildAnalyticsUrl=function(t){return p.UrlUtils.normalizeAsString({paths:[this.options.serviceUrl,"/rest/",e.CUSTOM_ANALYTICS_VERSION||e.DEFAULT_ANALYTICS_VERSION,t]})},e.DEFAULT_ANALYTICS_URI="https://usageanalytics.coveo.com",e.DEFAULT_ANALYTICS_VERSION="v15",e.CUSTOM_ANALYTICS_VERSION=void 0,e.VISITOR_COOKIE_TIME=864e9,e}();t.AnalyticsEndpoint=h},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),r=n(16),s=n(1),a=n(39),u=n(28),l=n(35),c=n(4),p=n(0),d=n(12),h=n(9),f=n(85),m=n(15),y=function(e){function t(n,i,a,u,l){var c=e.call(this,n,t.ID)||this;return c.window=i,c.queryStateModel=a,c.queryController=u,c.usageAnalytics=l,c.ignoreNextHashChange=!1,c.initialHashChange=!1,c.willUpdateHash=!1,o.Assert.exists(c.queryStateModel),o.Assert.exists(c.queryController),s.$$(c.element).on(r.InitializationEvents.restoreHistoryState,function(){c.logger.trace("Restore history state. Update model"),c.updateModelFromHash(),c.lastState=c.queryStateModel.getAttributes()}),s.$$(c.element).on(c.queryStateModel.getEventName(m.Model.eventTypes.all),function(){c.logger.trace("Query model changed. Update hash"),c.updateHashFromModel()}),c.hashchange=function(){c.handleHashChange(),c.lastState=c.queryStateModel.getAttributes()},c.window.addEventListener("hashchange",c.hashchange),s.$$(c.element).on(r.InitializationEvents.nuke,function(){return c.handleNuke()}),c}return i(t,e),Object.defineProperty(t.prototype,"hashUtils",{get:function(){return this.hashUtilsModule?this.hashUtilsModule:a.HashUtils},set:function(e){this.hashUtilsModule=e},enumerable:!0,configurable:!0}),t.prototype.setState=function(e){this.setHashValues(e)},t.prototype.replaceState=function(e){this.ignoreNextHashChange=!0;var t="#"+this.hashUtils.encodeValues(e);this.window.location.replace(t)},t.prototype.setHashValues=function(e){this.logger.trace("Update history hash");var t="#"+this.hashUtils.encodeValues(e),n=this.window.location.hash!=t;this.ignoreNextHashChange=n,this.logger.trace("ignoreNextHashChange",this.ignoreNextHashChange),this.logger.trace("initialHashChange",this.initialHashChange),this.logger.trace("from",this.window.location.hash,"to",t),this.initialHashChange?(this.initialHashChange=!1,n&&(this.replaceState(e),this.logger.trace("History hash modified",t))):n&&(this.window.location.hash=t,this.logger.trace("History hash created",t))},t.prototype.debugInfo=function(){return{state:this.queryStateModel.getAttributes()}},t.prototype.handleHashChange=function(){if(this.logger.trace("History hash changed"),this.ignoreNextHashChange)return this.logger.trace("History hash change ignored"),void(this.ignoreNextHashChange=!1);var e=this.updateModelFromHash();if(p.difference(e,t.attributesThatDoNotTriggerQuery).length>0){if(this.lastState){var n=c.Utils.differenceBetweenObjects(this.queryStateModel.getAttributes(),this.lastState);this.mapStateDifferenceToUsageAnalyticsCall(n)}this.queryController.executeQuery()}},t.prototype.handleNuke=function(){this.window.removeEventListener("hashchange",this.hashchange)},t.prototype.updateHashFromModel=function(){var e=this;this.logger.trace("Model -> history hash"),this.willUpdateHash||(u.Defer.defer(function(){var t=e.queryStateModel.getAttributes();e.setHashValues(t),e.logger.debug("Saving state to hash",t),e.willUpdateHash=!1}),this.willUpdateHash=!0)},t.prototype.updateModelFromHash=function(){var e=this;this.logger.trace("History hash -> model");var t={},n=[];return p.each(this.queryStateModel.attributes,function(i,o,r){var s=e.getHashValue(o);t[o]=s,e.queryStateModel.get(o)!=s&&n.push(o)}),this.initialHashChange=!0,this.queryStateModel.setMultiple(t),n},t.prototype.getHashValue=function(e){o.Assert.isNonEmptyString(e);var t;try{var n=this.hashUtils.getHash(this.window);t=this.hashUtils.getValue(e,n)}catch(t){this.logger.error("Could not parse parameter "+e+" from URI")}return c.Utils.isUndefined(t)&&(t=this.queryStateModel.defaultAttributes[e]),t},t.prototype.mapStateDifferenceToUsageAnalyticsCall=function(e){var t=this;return this.usageAnalytics?d.QUERY_STATE_ATTRIBUTES.Q in e?void f.logSearchBoxSubmitEvent(this.usageAnalytics):d.QUERY_STATE_ATTRIBUTES.SORT in e?void f.logSortEvent(this.usageAnalytics,e[d.QUERY_STATE_ATTRIBUTES.SORT]):void p.keys(e).forEach(function(e){var n=t.extractFacetInfoFromStateDifference(e);n&&t.usageAnalytics.logSearchEvent(n.actionCause,{facetId:n.fieldName,facetTitle:n.fieldName,facetValue:n.valueModified})}):(this.logger.warn("The query state has been modified directly in the URL and we couldn't log the proper analytics call."),void this.logger.warn("This is caused by an history controller that has been initialized without the usage analytics parameter."))},t.prototype.extractFacetInfoFromStateDifference=function(e){var t,n=/f:(?!.*:not)(.*)/,i=n.exec(e),o=/f:(.*):not/,r=o.exec(e),s=this.queryStateModel.get(e)||[],a=this.lastState[e]||[],u=s.length");if(n>=t.maxDepth)return this.toJsonRef(e);if(y.isArray(e))return y.map(e,function(t,r){return o.toJson(t,n+1,i.concat([e]))});if(y.isDate(e))return this.toJsonRef(e,m.format(e,"F"));var r={};return y.each(e,function(t,s){r[s]=o.toJson(t,n+1,i.concat([e]))}),r.ref,r}return e},t.prototype.toJsonRef=function(e,t){return t=new String(t||e),t.ref=e,t},t.prototype.componentToJson=function(e,t){return void 0===t&&(t=0),y.keys(e.options).length>0?this.toJson(e.options,t):this.toJsonRef(e.options,new String("No options"))},t.prototype.htmlToJson=function(e){if(null!=e)return{tagName:e.tagName,id:e.id,classList:e.className.split(/\s+/)}},t.prototype.templateToJson=function(e){if(null==e)return null;var t=e.element,n={type:e.getType()};return null!=t&&(n.id=t.id,n.condition=t.attributes["data-condition"],n.content=t.innerText),n},t.prototype.selectElementText=function(e){if(window.getSelection&&document.createRange){var t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}else if("createTextRange"in document.body){var i=document.body.createTextRange();i.moveToElementText(e),i.select()}},t.prototype.search=function(e,t){var n=this;y.isEmpty(e)?(l.$$(t).findAll(".coveo-search-match, .coveo-search-submatch").forEach(function(e){l.$$(e).removeClass("coveo-search-match, coveo-search-submatch")}),l.$$(t).removeClass("coveo-searching")):(l.$$(t).addClass("coveo-searching-loading"),setTimeout(function(){var i=l.$$(t).findAll(".coveo-section .coveo-section-container > .coveo-property");y.each(i,function(t){n.findInProperty(t,e)}),l.$$(t).addClass("coveo-searching"),l.$$(t).removeClass("coveo-searching-loading")}))},t.prototype.highlightSearch=function(e,t){var n;if(e instanceof HTMLElement?n=e:e instanceof l.Dom&&(n=e.el),null!=n&&null!=n.innerText){var i=n.innerText.split(new RegExp("(?="+c.StringUtils.regexEncode(t)+")","gi"));n.innerHTML="",i.forEach(function(e){var i,o=new RegExp("("+c.StringUtils.regexEncode(t)+")","i"),r=e.match(o);null!=r?(i=l.$$("span",{className:"coveo-debug-highlight"}),i.text(r[1]),n.appendChild(i.el),i=l.$$("span"),i.text(e.substr(r[1].length)),n.appendChild(i.el)):(i=l.$$("span"),i.text(e),n.appendChild(i.el))})}},t.prototype.removeHighlightSearch=function(e){null!=e&&(e.innerHTML=e.innerText)},t.prototype.showAnimationDuringQuery=function(){l.$$(this.modalBox.content).addClass("coveo-debug-loading")},t.prototype.hideAnimationDuringQuery=function(){l.$$(this.modalBox.content).removeClass("coveo-debug-loading")},t.ID="Debug",t.doExport=function(){S.exportGlobally({Debug:t})},t.options={enableDebug:r.ComponentOptions.buildBooleanOption({defaultValue:!1})},t.customOrder=["error","queryDuration","result","fields","rankingInfo","template","query","results","state"],t.durationKeys=["indexDuration","proxyDuration","clientDuration","duration"],t.maxDepth=10,t}(d.RootComponent);t.Debug=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(49),r=n(0),s=function(){function e(){}return e.detectPublicPath=function(){this.pathHasBeenConfigured||(n.p=e.getDynamicPublicPath())},e.getDynamicPublicPath=function(){var e=this.getCurrentScript(),t=this.getCoveoScript();if(this.isScript(t)||new o.Logger(this).warn("You should add the class coveo-script on the script tag that includes the Coveo framework. Not doing so may cause the framework to not be able to auto-detect the path to load the lazy chunks in certain environments.\n More details here https://docs.coveo.com/en/295/javascript-search-framework/lazy-versus-eager-component-loading#fixing-code-chunks-loading-path-issues"),i.Utils.isNullOrUndefined(e)){if(this.isScript(t))return this.parseScriptDirectoryPath(t);var n=document.getElementsByTagName("script");return this.parseScriptDirectoryPath(n[n.length-1])}return this.parseScriptDirectoryPath(e)},e.configureResourceRoot=function(e){this.pathHasBeenConfigured=!0,n.p=e},e.reset=function(){this.pathHasBeenConfigured=!1},e.getCurrentScript=function(){return document.currentScript},e.getCoveoScript=function(){var e=this;return r.find(document.querySelectorAll(".coveo-script"),function(t){return e.isScript(t)})},e.parseScriptDirectoryPath=function(e){return e.src.replace(/\/[\w\.-]*\.js((#|\?)(.*)){0,1}$/,"/")},e.isScript=function(e){return e&&o.$$(e).is("script")},e.pathHasBeenConfigured=!1,e}();t.PublicPathUtils=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(22),o=n(78),r=n(88),s=n(5),a=n(11),u=n(9),l=n(28),c=n(1),p=n(68),d=n(124),h=n(12),f=n(6),m=n(74),y=n(20),g=n(0),v=function(){function e(e,t,n,o,r,u,l,c,p){this.endpoint=e,this.rootElement=t,this.userId=n,this.userDisplayName=o,this.anonymous=r,this.splitTestRunName=u,this.splitTestRunVersion=l,this.originLevel1=c,this.sendToCloud=p,this.isContextual=!1,this.originContext="Search",this.language=String.locale,this.device=i.DeviceUtils.getDeviceName(),this.mobile=i.DeviceUtils.isMobileDevice(),s.Assert.exists(e),s.Assert.exists(t),s.Assert.isNonEmptyString(this.language),s.Assert.isNonEmptyString(this.device),s.Assert.isNonEmptyString(this.originLevel1),this.logger=new a.Logger(this)}return e.prototype.isActivated=function(){return!0},e.prototype.getCurrentVisitId=function(){return this.endpoint.getCurrentVisitId()},e.prototype.getCurrentVisitIdPromise=function(){return this.endpoint.getCurrentVisitIdPromise()},e.prototype.getCurrentEventCause=function(){return null!=this.pendingSearchEvent?this.pendingSearchEvent.getEventCause():null!=this.pendingSearchAsYouTypeSearchEvent?this.pendingSearchAsYouTypeSearchEvent.getEventCause():null},e.prototype.getCurrentEventMeta=function(){return null!=this.pendingSearchEvent?this.pendingSearchEvent.getEventMeta():null!=this.pendingSearchAsYouTypeSearchEvent?this.pendingSearchAsYouTypeSearchEvent.getEventMeta():null},e.prototype.logSearchEvent=function(e,t){var n=this.buildMetaObject(t);this.pushSearchEvent(e,n)},e.prototype.logSearchAsYouType=function(e,t){var n=this.buildMetaObject(t);this.pushSearchAsYouTypeEvent(e,n)},e.prototype.logClickEvent=function(e,t,n,i){var o=this.buildMetaObject(t,n);return this.pushClickEvent(e,o,n,i)},e.prototype.logCustomEvent=function(e,t,n,i){var o=this.buildMetaObject(t,i);return this.pushCustomEvent(e,o,n)},e.prototype.getTopQueries=function(e){return this.endpoint.getTopQueries(e)},e.prototype.sendAllPendingEvents=function(){this.pendingSearchAsYouTypeSearchEvent&&this.pendingSearchAsYouTypeSearchEvent.sendRightNow()},e.prototype.cancelAllPendingEvents=function(){this.pendingSearchAsYouTypeSearchEvent&&(this.pendingSearchAsYouTypeSearchEvent.cancel(),this.pendingSearchAsYouTypeSearchEvent=null),this.pendingSearchEvent&&(this.pendingSearchEvent.cancel(),this.pendingSearchEvent=null)},e.prototype.getPendingSearchEvent=function(){return this.pendingSearchEvent?this.pendingSearchEvent:this.pendingSearchAsYouTypeSearchEvent?this.pendingSearchAsYouTypeSearchEvent:null},e.prototype.warnAboutSearchEvent=function(){g.isUndefined(this.pendingSearchEvent)&&g.isUndefined(this.pendingSearchAsYouTypeSearchEvent)&&(this.logger.warn("A search was triggered, but no analytics event was logged. If you wish to have consistent analytics data, consider logging a search event using the methods provided by the framework","https://developers.coveo.com/x/TwA5"),window.console&&console.trace&&console.trace())},e.prototype.setOriginContext=function(e){this.originContext=e},e.prototype.pushCustomEvent=function(e,t,n){var i=this.buildCustomEvent(e,t,n);return this.triggerChangeAnalyticsCustomData("CustomEvent",t,i),this.checkToSendAnyPendingSearchAsYouType(e),c.$$(this.rootElement).trigger(p.AnalyticsEvents.customEvent,{customEvent:d.APIAnalyticsBuilder.convertCustomEventToAPI(i)}),this.sendToCloud?this.endpoint.sendCustomEvent(i):Promise.resolve(null)},e.prototype.pushSearchEvent=function(e,t){var n=this;if(s.Assert.exists(e),this.pendingSearchEvent&&this.pendingSearchEvent.getEventCause()!==e.name&&(this.pendingSearchEvent.stopRecording(),this.pendingSearchEvent=null),this.checkToSendAnyPendingSearchAsYouType(e),!this.pendingSearchEvent){var i=this.buildSearchEvent(e,t);this.triggerChangeAnalyticsCustomData("SearchEvent",t,i);var r=this.pendingSearchEvent=new o.PendingSearchEvent(this.rootElement,this.endpoint,i,this.sendToCloud);l.Defer.defer(function(){n.pendingSearchEvent=void 0,r.stopRecording()})}},e.prototype.checkToSendAnyPendingSearchAsYouType=function(e){this.eventIsNotRelatedToSearchbox(e.name)?this.sendAllPendingEvents():this.cancelAnyPendingSearchAsYouTypeEvent()},e.prototype.pushSearchAsYouTypeEvent=function(e,t){this.cancelAnyPendingSearchAsYouTypeEvent();var n=this.buildSearchEvent(e,t);this.triggerChangeAnalyticsCustomData("SearchEvent",t,n),this.pendingSearchAsYouTypeSearchEvent=new r.PendingSearchAsYouTypeSearchEvent(this.rootElement,this.endpoint,n,this.sendToCloud)},e.prototype.pushClickEvent=function(e,t,n,i){var o=this.buildClickEvent(e,t,n,i);return this.checkToSendAnyPendingSearchAsYouType(e),this.triggerChangeAnalyticsCustomData("ClickEvent",t,o,{resultData:n}),s.Assert.isNonEmptyString(o.searchQueryUid),s.Assert.isNonEmptyString(o.collectionName),s.Assert.isNonEmptyString(o.sourceName),s.Assert.isNumber(o.documentPosition),c.$$(this.rootElement).trigger(p.AnalyticsEvents.documentViewEvent,{documentViewEvent:d.APIAnalyticsBuilder.convertDocumentViewToAPI(o)}),this.sendToCloud?this.endpoint.sendDocumentViewEvent(o):Promise.resolve(null)},e.prototype.buildAnalyticsEvent=function(e,t){return{actionCause:e.name,actionType:e.type,username:this.userId,userDisplayName:this.userDisplayName,anonymous:this.anonymous,device:this.device,mobile:this.mobile,language:this.language,responseTime:void 0,originLevel1:this.originLevel1,originLevel2:this.getOriginLevel2(this.rootElement),originLevel3:document.referrer,originContext:this.originContext,customData:g.keys(t).length>0?t:void 0,userAgent:navigator.userAgent}},e.prototype.buildSearchEvent=function(e,t){return this.merge(this.buildAnalyticsEvent(e,t),{searchQueryUid:void 0,pipeline:void 0,splitTestRunName:this.splitTestRunName,splitTestRunVersion:this.splitTestRunVersion,queryText:void 0,advancedQuery:void 0,results:void 0,resultsPerPage:void 0,pageNumber:void 0,didYouMean:void 0,facets:void 0,contextual:this.isContextual})},e.prototype.buildClickEvent=function(e,t,n,i){return this.merge(this.buildAnalyticsEvent(e,t),{searchQueryUid:n.queryUid,queryPipeline:n.pipeline,splitTestRunName:this.splitTestRunName||n.splitTestRun,splitTestRunVersion:this.splitTestRunVersion||(void 0!=n.splitTestRun?n.pipeline:void 0),documentUri:n.uri,documentUriHash:y.QueryUtils.getUriHash(n),documentUrl:n.clickUri,documentTitle:n.title,documentCategory:y.QueryUtils.getObjectType(n),originLevel2:this.getOriginLevel2(i),collectionName:y.QueryUtils.getCollection(n),sourceName:y.QueryUtils.getSource(n),documentPosition:n.index+1,responseTime:0,viewMethod:e.name,rankingModifier:n.rankingModifier})},e.prototype.buildCustomEvent=function(e,t,n){return this.merge(this.buildAnalyticsEvent(e,t),{eventType:e.type,eventValue:e.name,originLevel2:this.getOriginLevel2(n),responseTime:0})},e.prototype.getOriginLevel2=function(e){return this.resolveActiveTabFromElement(e)||"default"},e.prototype.buildMetaObject=function(e,t){var n=g.extend({},e);if(n.JSUIVersion=m.version.lib+";"+m.version.product,t){var i=y.QueryUtils.getPermanentId(t);n.contentIDKey=i.fieldUsed,n.contentIDValue=i.fieldValue}return n},e.prototype.cancelAnyPendingSearchAsYouTypeEvent=function(){this.pendingSearchAsYouTypeSearchEvent&&(this.pendingSearchAsYouTypeSearchEvent.cancel(),this.pendingSearchAsYouTypeSearchEvent=void 0)},e.prototype.resolveActiveTabFromElement=function(e){s.Assert.exists(e);var t=this.resolveQueryStateModel(e);return t&&t.get(h.QueryStateModel.attributesEnum.t)},e.prototype.resolveQueryStateModel=function(e){return f.Component.resolveBinding(e,h.QueryStateModel)},e.prototype.eventIsNotRelatedToSearchbox=function(e){return e!==u.analyticsActionCauseList.searchboxSubmit.name&&e!==u.analyticsActionCauseList.searchboxClear.name},e.prototype.triggerChangeAnalyticsCustomData=function(e,t,n,i){t.metaDataAsString={},t.metaDataAsNumber={};var o={language:n.language,originLevel1:n.originLevel1,originLevel2:n.originLevel2,originLevel3:n.originLevel3,metaObject:t},r=g.extend({},{type:e,actionType:n.actionType,actionCause:n.actionCause},o,i);c.$$(this.rootElement).trigger(p.AnalyticsEvents.changeAnalyticsCustomData,r),n.language=r.language,n.originLevel1=r.originLevel1,n.originLevel2=r.originLevel2,n.originLevel3=r.originLevel3,n.customData=t;var s=n.customData.metaDataAsString;g.keys(s).length>0&&(this.logger.warn("Using deprecated 'metaDataAsString' key to log custom analytics data. Custom meta should now be put at the root of the object."),g.extend(n.customData,s)),delete n.customData.metaDataAsString;var a=n.customData.metaDataAsNumber;g.keys(a).length>0&&(this.logger.warn("Using deprecated 'metaDataAsNumber' key to log custom analytics data. Custom meta should now be put at the root of the object."),g.extend(n.customData,a)),delete n.customData.metaDataAsNumber},e.prototype.merge=function(e,t){return g.extend({},e,t)},e}();t.LiveAnalyticsClient=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.convertSearchEventToAPI=function(e){return{advancedQuery:e.advancedQuery,customMetadatas:e.customData,device:e.device,didYouMean:e.didYouMean,language:e.language,pageNumber:e.pageNumber,queryText:e.queryText,responseTime:e.responseTime,numberOfResults:e.numberOfResults,resultsPerPage:e.resultsPerPage,searchHub:e.originLevel1,searchInterface:e.originLevel2,searchQueryUid:e.searchQueryUid,type:e.actionType,actionCause:e.actionCause,queryPipeline:e.queryPipeline,splitTestRunName:e.splitTestRunName,splitTestRunVersion:e.splitTestRunVersion}},e.convertDocumentViewToAPI=function(e){return{collectionName:e.collectionName,device:e.device,documentPosition:e.documentPosition,title:e.documentTitle,documentUrl:e.documentUrl,documentUri:e.documentUri,documentUriHash:e.documentUriHash,language:e.language,responseTime:e.responseTime,searchHub:e.originLevel1,searchInterface:e.originLevel2,searchQueryUid:e.searchQueryUid,sourceName:e.sourceName,viewMethod:e.viewMethod,customMetadatas:e.customData,actionCause:e.actionCause,queryPipeline:e.queryPipeline,splitTestRunName:e.splitTestRunName,splitTestRunVersion:e.splitTestRunVersion}},e.convertCustomEventToAPI=function(e){return{actionCause:e.actionCause,actionType:e.actionType,device:e.device,language:e.language,responseTime:e.responseTime,searchHub:e.originLevel1,searchInterface:e.originLevel2,customMetadatas:e.customData}},e}();t.APIAnalyticsBuilder=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(47),r=n(36),s=n(1),a=n(0),u=n(328),l=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,i.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;a.each(this.getCurrentlyShowedValueInSearch(e),function(e){var n=o.FacetUtils.getValuesToUseForSearchInFacet(e,t.facet);a.each(n,function(e){t.alwaysExclude.push(e)})}),a.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 n;n=this.valueToSearch?t.concat(this.alwaysInclude).concat(this.alwaysExclude):a.compact(t.concat(this.alwaysInclude).concat(this.facet.options.allowedValues));var i=this.completeFacetWithStandardValues;null!=this.facet.options.lookupField&&(i=!1);var o={allowedValues:n,allowedValuesPatternType:this.facet.options.useWildcardsInFacetSearch?u.AllowedValuesPatternType.Wildcards:u.AllowedValuesPatternType.Legacy,maximumNumberOfValues:e,completeFacetWithStandardValues:i,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=a.clone(this.facet.queryController.getLastQuery());return e||(e=(new r.QueryBuilder).build()),e.enableQuerySyntax?e.q=this.facet.facetQueryController.basicExpressionToUseForFacetSearch:i.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 a.map(s.$$(e).findAll(".coveo-facet-value-caption"),function(e){return s.$$(e).getAttribute("data-original-value")||s.$$(e).text()})},e.prototype.lowerCaseAll=function(){this.alwaysExclude=a.chain(this.alwaysExclude).map(function(e){return e.toLowerCase()}).uniq().value(),this.alwaysInclude=a.chain(this.alwaysInclude).map(function(e){return e.toLowerCase()}).uniq().value()},e}();t.FacetSearchParameters=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(343),o=n(341),r=n(345),s=n(0),a=n(339),u=n(157),l=n(340),c=function(){function e(e,t){void 0===t&&(t={}),this.expressions={},this.start=new i.ExpressionRef(e,null,"start",this),this.addExpressions(t)}return e.prototype.addExpressions=function(e){var t=this;s.each(e,function(e,n){t.addExpression(n,e)})},e.prototype.addExpression=function(t,n){if(t in this.expressions)throw new Error("Grammar already contain the id:"+t);this.expressions[t]=e.buildExpression(n,t,this)},e.prototype.getExpression=function(e){return this.expressions[e]},e.prototype.parse=function(e){return this.start.parse(e,!0)},e.buildExpression=function(e,t,n){if(void 0===e)throw new Error("Invalid Expression: "+e);if(s.isString(e))return this.buildStringExpression(e,t,n);if(s.isArray(e))return new o.ExpressionOptions(s.map(e,function(e,o){return new i.ExpressionRef(e,null,t+"_"+o,n)}),t);if(s.isRegExp(e))return new r.ExpressionRegExp(e,t,n);if(s.isFunction(e))return new a.ExpressionFunction(e,t,n);throw new Error("Invalid Expression: "+e)},e.buildStringExpression=function(t,n,o){var r=e.stringMatch(t,e.spliter),a=s.map(r,function(e,t){if(e[1]){var r=e[1],s=e[3]?Number(e[3]):e[2]||null;return new i.ExpressionRef(r,s,n+"_"+t,o)}return new u.ExpressionConstant(e[4],n+"_"+t)});if(1==a.length){var c=a[0];return c.id=n,c}return new l.ExpressionList(a,n)},e.stringMatch=function(e,t){for(var n=[],i=new RegExp(t.source,"g"),o=i.exec(e);null!==o;)n.push(o),o=i.exec(e);return n},e.spliter=/\[(\w+)(\*|\+|\?|\{([1-9][0-9]*)\})?\]|(.[^\[]*)/,e}();t.Grammar=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i;!function(e){e[e.WINDOWS=0]="WINDOWS",e[e.MACOSX=1]="MACOSX",e[e.UNIX=2]="UNIX",e[e.LINUX=3]="LINUX",e[e.UNKNOWN=4]="UNKNOWN"}(i=t.OS_NAME||(t.OS_NAME={}));var o=function(){function e(){}return e.get=function(e){void 0===e&&(e=navigator);return-1!=e.appVersion.indexOf("Win")?i.WINDOWS:-1!=e.appVersion.indexOf("Mac")?i.MACOSX:-1!=e.appVersion.indexOf("X11")?i.UNIX:-1!=e.appVersion.indexOf("Linux")?i.LINUX:i.UNKNOWN},e}();t.OSUtils=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(50),o=n(66),r=n(1),s=function(){function e(e,t){this.inputName=e,this.root=t}return e.prototype.reset=function(){this.clear()},e.prototype.build=function(){return this.input=new i.TextInput(this.onChange.bind(this),this.inputName),this.input.getElement()},e.prototype.setValue=function(e){this.input.setValue(e)},e.prototype.getValue=function(){return this.input.getValue()},e.prototype.clear=function(){this.input.setValue("")},e.prototype.updateQuery=function(e){var t=this.getValue();t&&e.advancedExpression.add(t)},e.prototype.onChange=function(){this.root?r.$$(this.root).trigger(o.AdvancedSearchEvents.executeAdvancedSearch):this.input&&r.$$(this.input.getElement()).trigger(o.AdvancedSearchEvents.executeAdvancedSearch)},e}();t.KeywordsInput=s},function(e,t,n){"use strict";function i(e,t,n,o){function r(t){return e(t=new Date(+t)),t}return r.floor=r,r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t0))return a;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,i){if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););})},n&&(r.count=function(t,i){return s.setTime(+t),a.setTime(+i),e(s),e(a),Math.floor(n(s,a))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(o?function(t){return o(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}function o(e){return i(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*p)/d})}function r(e){return i(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/d})}var s=new Date,a=new Date,u=i(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});u.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):u:null};var l=u,c=u.range,p=6e4,d=6048e5,h=i(function(e){e.setTime(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),f=h,m=h.range,y=i(function(e){e.setTime(Math.floor(e/p)*p)},function(e,t){e.setTime(+e+t*p)},function(e,t){return(t-e)/p},function(e){return e.getMinutes()}),g=y,v=y.range,b=i(function(e){var t=e.getTimezoneOffset()*p%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),C=b,S=b.range,w=i(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*p)/864e5},function(e){return e.getDate()-1}),x=w,_=w.range,E=o(0),O=o(1),A=o(2),T=o(3),R=o(4),M=o(5),I=o(6),F=E.range,$=O.range,D=A.range,P=T.range,N=R.range,k=M.range,L=I.range,V=i(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),B=V,Q=V.range,U=i(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});U.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var j=U,H=U.range,q=i(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*p)},function(e,t){return(t-e)/p},function(e){return e.getUTCMinutes()}),z=q,W=q.range,G=i(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),Y=G,K=G.range,J=i(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),X=J,Z=J.range,ee=r(0),te=r(1),ne=r(2),ie=r(3),oe=r(4),re=r(5),se=r(6),ae=ee.range,ue=te.range,le=ne.range,ce=ie.range,pe=oe.range,de=re.range,he=se.range,fe=i(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),me=fe,ye=fe.range,ge=i(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});ge.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var ve=ge,be=ge.range;n.d(t,"g",function(){return i}),n.d(t,"h",function(){return l}),n.d(t,"i",function(){return c}),n.d(t,"L",function(){return l}),n.d(t,"M",function(){return c}),n.d(t,"r",function(){return f}),n.d(t,"s",function(){return m}),n.d(t,"V",function(){return f}),n.d(t,"W",function(){return m}),n.d(t,"j",function(){return g}),n.d(t,"k",function(){return v}),n.d(t,"e",function(){return C}),n.d(t,"f",function(){return S}),n.d(t,"a",function(){return x}),n.d(t,"b",function(){return _}),n.d(t,"B",function(){return E}),n.d(t,"C",function(){return F}),n.d(t,"t",function(){return E}),n.d(t,"u",function(){return F}),n.d(t,"l",function(){return O}),n.d(t,"m",function(){return $}),n.d(t,"x",function(){return A}),n.d(t,"y",function(){return D}),n.d(t,"z",function(){return T}),n.d(t,"A",function(){return P}),n.d(t,"v",function(){return R}),n.d(t,"w",function(){return N}),n.d(t,"c",function(){return M}),n.d(t,"d",function(){return k}),n.d(t,"p",function(){return I}),n.d(t,"q",function(){return L}),n.d(t,"n",function(){return B}),n.d(t,"o",function(){return Q}),n.d(t,"D",function(){return j}),n.d(t,"E",function(){return H}),n.d(t,"N",function(){return z}),n.d(t,"O",function(){return W}),n.d(t,"J",function(){return Y}),n.d(t,"K",function(){return K}),n.d(t,"F",function(){return X}),n.d(t,"G",function(){return Z}),n.d(t,"_5",function(){return ee}),n.d(t,"_6",function(){return ae}),n.d(t,"X",function(){return ee}),n.d(t,"Y",function(){return ae}),n.d(t,"P",function(){return te}),n.d(t,"Q",function(){return ue}),n.d(t,"_1",function(){return ne}),n.d(t,"_2",function(){return le}),n.d(t,"_3",function(){return ie}),n.d(t,"_4",function(){return ce}),n.d(t,"Z",function(){return oe}),n.d(t,"_0",function(){return pe}),n.d(t,"H",function(){return re}),n.d(t,"I",function(){return de}),n.d(t,"T",function(){return se}),n.d(t,"U",function(){return he}),n.d(t,"R",function(){return me}),n.d(t,"S",function(){return ye}),n.d(t,"_7",function(){return ve}),n.d(t,"_8",function(){return be})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(55),r=n(4),s=function(){function e(e,t,n,i){this.basicExpression=e,this.advancedExpression=t,this.constantExpression=n,this.disjunctionExpression=i}return e.isEmpty=function(e){var t=i.chain(e).values().compact().value();return i.isEmpty(t)},e.prototype.reset=function(){this.basicExpression="",this.advancedExpression="",this.constantExpression="",this.disjunctionExpression=""},Object.defineProperty(e.prototype,"withoutConstant",{get:function(){return this.expressionBuilders.withoutConstantExpression.build()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return o.ExpressionBuilder.mergeUsingOr(this.expressionBuilders.fullExpression,this.expressionBuilders.disjunctionExpression).build()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"basic",{get:function(){return this.expressionBuilders.basicExpression.build()},set:function(e){this.basic=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"advanced",{get:function(){return this.expressionBuilders.advancedExpression.build()},set:function(e){this.advancedExpression=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"constant",{get:function(){return this.expressionBuilders.constantExpression.build()},set:function(e){this.constantExpression=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"expressionBuilders",{get:function(){var e=function(e,t){r.Utils.isNonEmptyString(t)&&e.add(t)},t=new o.ExpressionBuilder;e(t,this.basicExpression);var n=new o.ExpressionBuilder;e(n,this.advancedExpression);var i=new o.ExpressionBuilder;e(i,this.constantExpression);var s=new o.ExpressionBuilder;return e(s,this.disjunctionExpression),{basicExpression:t,advancedExpression:n,constantExpression:i,disjunctionExpression:s,withoutConstantExpression:o.ExpressionBuilder.merge(t,n),fullExpression:o.ExpressionBuilder.merge(t,n,i)}},enumerable:!0,configurable:!0}),e}();t.QueryBuilderExpression=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(24),r=n(3),s=n(1),a=n(65),u=n(14),l=n(13),c=n(4),p=n(6),d=n(8),h=n(2),f=n(26),m=n(80),y=function(e){function t(n,i,r,a,f){void 0===f&&(f=o.ModalBox);var y=e.call(this,n,t.ID,r)||this;y.element=n,y.options=i,y.bindings=r,y.result=a,y.ModalBox=f,y.options=d.ComponentOptions.initComponentOptions(n,t,i),y.resultLink=s.$$("a",{className:p.Component.computeCssClassName(m.ResultLink)});var g=s.$$("div",{className:"coveo-youtube-thumbnail-container"});y.resultLink.append(g.el);var v=s.$$("img",{src:c.Utils.getFieldValue(y.result,"ytthumbnailurl"),className:"coveo-youtube-thumbnail-img",alt:y.result.title,title:y.result.title});v.el.style.width=y.options.width,v.el.style.height=y.options.height,v.el.onerror=function(){var e=s.$$("div",{},l.SVGIcons.icons.video).el;u.SVGDom.addStyleToSVGInContainer(e,{width:y.options.width}),s.$$(v).remove(),g.append(e)},g.append(v.el);var b=s.$$("span",{className:"coveo-youtube-thumbnail-play-button"});return g.append(b.el),s.$$(y.element).append(y.resultLink.el),h.Initialization.automaticallyCreateComponentsInsideResult(n,a,{ResultLink:y.options.embed?{onClick:function(){return y.openYoutubeIframe()}}:null}),y}return i(t,e),t.prototype.openResultLink=function(){f.get(this.resultLink.el).openLinkAsConfigured()},t.prototype.openYoutubeIframe=function(){var e=this,t=s.$$("iframe",{src:"https://www.youtube.com/embed/"+this.extractVideoId()+"?autoplay=1",allowfullscreen:"allowfullscreen",width:"100%",height:"100%"}),n=s.$$("div");n.append(t.el),this.modalbox=this.ModalBox.open(n.el,{overlayClose:!0,title:a.DomUtils.getQuickviewHeader(this.result,{showDate:!0,title:this.result.title},this.bindings).el,className:"coveo-youtube-player",validation:function(){return!0},body:this.element.ownerDocument.body,sizeMod:"big"}),s.$$(s.$$(this.modalbox.wrapper).find(".coveo-quickview-close-button")).on("click",function(){e.modalbox.close()})},t.prototype.extractVideoId=function(){return this.result.clickUri.split("watch?v=")[1]},t.ID="YouTubeThumbnail",t.doExport=function(){r.exportGlobally({YouTubeThumbnail:t})},t.options={width:d.ComponentOptions.buildStringOption({defaultValue:"200px"}),height:d.ComponentOptions.buildStringOption({defaultValue:"112px"}),embed:d.ComponentOptions.buildBooleanOption({defaultValue:!0})},t}(p.Component);t.YouTubeThumbnail=y,h.Initialization.registerAutoCreateComponent(y)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(62),r=n(8),s=n(4),a=n(82),u=n(30),l=n(385),c=n(2),p=n(23),d=n(3),h=function(e){function t(n,i,o){var s=e.call(this,n,r.ComponentOptions.initComponentOptions(n,t,i),o,t.ID)||this;return s.element=n,s.options.enableFacetSearch=!1,s.options.enableSettings=!1,s.options.includeInOmnibox=!1,s.options.enableMoreLess=!1,s}return i(t,e),t.prototype.getValueCaption=function(t){return s.Utils.exists(this.options.valueCaption)&&"string"==typeof this.options.valueCaption?this.translateValueCaptionFromFunctionName(t):!s.Utils.exists(this.options.valueCaption)&&this.options.dateField?this.translateValueCaptionFromDate(t):e.prototype.getValueCaption.call(this,t)},t.prototype.initFacetQueryController=function(){this.facetQueryController=new l.FacetRangeQueryController(this)},t.prototype.processNewGroupByResults=function(t){var n=this;null!=t&&null==this.options.ranges&&t.values.sort(function(e,t){return n.sortRangeGroupByResults(e,t)}),e.prototype.processNewGroupByResults.call(this,t)},t.prototype.sortRangeGroupByResults=function(e,t){var n,i,o=this.extractStartAndEndValue(e),r=this.extractStartAndEndValue(t);return n=o?o.start:e.value,i=r?r.start:t.value,this.options.dateField?Date.parse(n)-Date.parse(i):Number(n)-Number(i)},t.prototype.translateValueCaptionFromFunctionName=function(e){var t=this.extractStartAndEndValue(e),n=t.start,i=t.end;if(null==n||null==i)return null;var o=a.TemplateHelpers.getHelper(this.options.valueCaption);if(null!=o)return o.call(this,n)+" - "+o.call(this,i);var r=n.match(/^[\+\-]?[0-9]+(\.[0-9]+)?$/)?Number(n):u.DateUtils.convertFromJsonDateIfNeeded(n),s=i.match(/^[\+\-]?[0-9]+(\.[0-9]+)?$/)?Number(i):u.DateUtils.convertFromJsonDateIfNeeded(i);return p.format(r,this.options.valueCaption)+" - "+p.format(s,this.options.valueCaption)},t.prototype.extractStartAndEndValue=function(e){var t=/^(.*)\.\.(.*)$/.exec(e.value);return null==t?null:{start:t[1],end:t[2]}},t.prototype.translateValueCaptionFromDate=function(e){var t=a.TemplateHelpers.getHelper("dateTime"),n=this.extractStartAndEndValue(e),i=n.start,o=n.end,r={alwaysIncludeTime:!1,includeTimeIfThisWeek:!1,includeTimeIfToday:!1,omitYearIfCurrentOne:!1,useTodayYesterdayAndTomorrow:!1,useWeekdayIfThisWeek:!1};return t(i,r)+" - "+t(o,r)},t.ID="FacetRange",t.parent=o.Facet,t.doExport=function(){d.exportGlobally({FacetRange:t})},t.options={dateField:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),ranges:r.ComponentOptions.buildJsonOption()},t}(o.Facet);t.FacetRange=h,c.Initialization.registerAutoCreateComponent(h)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(3),s=n(10),a=n(5),u=n(1),l=n(4),c=n(6),p=n(8),d=n(2),h=n(36),f=n(357),m=function(e){function t(n,i,o){var r=e.call(this,n,t.ID,o)||this;return r.element=n,r.options=i,r.options=p.ComponentOptions.initComponentOptions(n,t,i),a.Assert.check(l.Utils.isCoveoField(r.options.field),r.options.field+" is not a valid field"),a.Assert.exists(r.options.maximumExpandedResults),r.swapParentChildFoldingFields(),r.bind.onRootElement(s.QueryEvents.buildingQuery,r.handleBuildingQuery),r.bind.onRootElement(s.QueryEvents.preprocessResults,r.handlepreprocessResults),r}return i(t,e),t.foldWithParent=function(e){var n={score:Number.NEGATIVE_INFINITY,children:[],result:{raw:!1}};o.each(e,function(e,i){var r=t.findUniqueId(n.children,e.uniqueId);if(null==e.parentResult||e.parentResult.uniqueId==e.uniqueId)null==r&&(r={result:e,score:i,children:[]},n.children.push(r),r.parent=n);else{null!=r?(r.score=Math.min(i,r.score),r.parent.children=o.without(r.parent.children,r)):r={result:e,score:i,children:[]};var s=t.findUniqueId(n.children,e.parentResult.uniqueId);null==s&&(s={result:e.parentResult,score:Number.POSITIVE_INFINITY,children:[]},n.children.push(s),s.parent=n),s.children.push(r),r.parent=s;for(var a=s;null!=a&&r.score ) OR @uri")),l.Utils.isNonEmptyString(this.options.expandExpression)&&(i.cq=this.options.expandExpression),null!=this.options.child&&(i.parentField=this.options.child),null!=this.options.parent&&(i.childField=this.options.parent),i.filterField=null,i.filterFieldRange=null,i.firstResult=0,this.options.rearrange?(this.options.rearrange.putInQueryBuilder(r),i.sortCriteria=r.sortCriteria,i.sortField=r.sortField):(i.sortCriteria=t.sortCriteria,i.sortField=t.sortField),this.queryController.getEndpoint().search(i).then(function(e){return n.handlePreprocessMoreResults(e),e.results}).catch(function(e){return n.logger.error("Invalid query performed while trying to retrieve more results for folding.",e),[]})},t.prototype.handlePreprocessMoreResults=function(e){var n=this.options.getMoreResults||t.defaultGetMoreResults;e.results=n(e.results),u.$$(this.element).trigger(s.QueryEvents.preprocessMoreResults,{results:e})},t.ID="Folding",t.doExport=function(){r.exportGlobally({Folding:t})},t.options={field:p.ComponentOptions.buildFieldOption({defaultValue:"@foldingcollection"}),child:p.ComponentOptions.buildFieldOption({defaultValue:"@foldingchild"}),parent:p.ComponentOptions.buildFieldOption({defaultValue:"@foldingparent"}),childField:p.ComponentOptions.buildFieldOption({deprecated:"This option is deprecated. Instead, use the data-parent option."}),parentField:p.ComponentOptions.buildFieldOption({deprecated:"This option is deprecated. Instead, use the data-child option."}),range:p.ComponentOptions.buildNumberOption({defaultValue:2,min:0}),rearrange:p.ComponentOptions.buildCustomOption(function(e){return l.Utils.isNonEmptyString(e)?f.SortCriteria.parse(e):null}),enableExpand:p.ComponentOptions.buildBooleanOption({defaultValue:!0}),expandExpression:p.ComponentOptions.buildQueryExpressionOption({depend:"enableExpand"}),maximumExpandedResults:p.ComponentOptions.buildNumberOption({defaultValue:100,min:1,depend:"enableExpand"}),getResult:p.ComponentOptions.buildCustomOption(function(){return null}),getMoreResults:p.ComponentOptions.buildCustomOption(function(){return null})},t}(c.Component);t.Folding=m,d.Initialization.registerAutoCreateComponent(m)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(5),a=n(20),u=n(2),l=n(4),c=n(94),p=n(1),d=n(3),h=function(e){function t(n,i,u,c){var d=e.call(this,n,t.ID,u)||this;d.element=n,d.options=i,d.result=c,d.options=r.ComponentOptions.initComponentOptions(n,t,i),d.result=d.result||d.resolveResult(),s.Assert.exists(d.result);var h=p.$$(d.element).find("."+o.Component.computeCssClassNameForType("Quickview"));return!l.Utils.isNullOrUndefined(h)&&a.QueryUtils.hasHTMLVersion(d.result)&&(p.$$(d.element).addClass("coveo-with-quickview"),p.$$(d.element).on("click",function(){o.Component.get(h).open()})),t.createIcon(d.result,d.options,n,u),d}return i(t,e),t.createIcon=function(e,n,i,o){void 0===n&&(n={}),void 0===i&&(i=p.$$("div").el);var r=c.FileTypes.get(e);return!o&&e.searchInterface&&(o=e.searchInterface.getBindings()),r=t.preprocessIconInfo(n,r),p.$$(i).toggleClass("coveo-small",!0===n.small),void 0!=n.value&&(!0===n.small&&-1==n.value.indexOf("-small")&&(r.icon+="-small"),!1===n.small&&-1!=n.value.indexOf("-small")&&(r.icon=r.icon.replace("-small",""))),p.$$(i).addClass(r.icon),i.setAttribute("title",r.caption),t.shouldDisplayLabel(n,o)&&(i.appendChild(p.$$("span",{className:"coveo-icon-caption-overlay"},r.caption).el),p.$$(i).addClass("coveo-icon-with-caption-overlay"),p.$$(i).setAttribute("data-with-label","true")),i},t.shouldDisplayLabel=function(e,t){return!1!==e.withLabel},t.preprocessIconInfo=function(e,t){return null!=e.labelValue&&(t.caption=e.labelValue),null!=e.value&&(t.icon="coveo-icon "+e.value),null==t.caption&&(t.caption=""),null==t.icon&&(t.icon="coveo-icon coveo-sprites-custom"),t},t.ID="Icon",t.doExport=function(){d.exportGlobally({Icon:t})},t.options={value:r.ComponentOptions.buildStringOption(),small:r.ComponentOptions.buildBooleanOption(),withLabel:r.ComponentOptions.buildBooleanOption(),labelValue:r.ComponentOptions.buildLocalizedStringOption()},t}(o.Component);t.Icon=h,u.Initialization.registerAutoCreateComponent(h)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n=256?this.cleanCustomData(e,t-10):e.join(";")},t.prototype.handleSuggestions=function(){var e={suggestions:[],omnibox:this};this.bind.trigger(this.element,a.OmniboxEvents.populateOmniboxSuggestions,e);var t=this.getText();return y.Utils.isNullOrEmptyString(t)||this.partialQueries.push(t),r.compact(e.suggestions)},t.prototype.handleBeforeRedirect=function(){this.updateQueryState()},t.prototype.handleBuildingQuery=function(e){var t=this;c.Assert.exists(e),c.Assert.exists(e.queryBuilder),this.updateQueryState(),this.lastQuery=this.getQuery(e.searchAsYouType);var n=this.lastQuery==this.magicBox.getDisplayedResult().input?this.magicBox.getDisplayedResult().clone():this.magicBox.grammar.parse(this.lastQuery).clean(),i={result:n};if(this.options.enableQuerySyntax){var o=i.result.findAll("FieldValueNotQuoted");if(r.each(o,function(e){return e.value='"'+e.value.replace(/"|\u00A0/g," ")+'"'}),this.options.fieldAlias){var s=i.result.findAll(function(e){return"FieldName"==e.expression.id&&e.isSuccess()});r.each(s,function(e){var n=r.find(r.keys(t.options.fieldAlias),function(t){return t.toLowerCase()==e.value.toLowerCase()});null!=n&&(e.value=t.options.fieldAlias[n])})}}this.bind.trigger(this.element,a.OmniboxEvents.omniboxPreprocessResultForQuery,i);var u=i.result.toString();new _.QueryboxQueryParameters(this.options).addParameters(e.queryBuilder,u)},t.prototype.handleTabPress=function(){this.options.enableQuerySuggestAddon&&this.handleTabPressForSuggestions(),this.handleTabPressForOldOmniboxAddon()},t.prototype.handleTabPressForSuggestions=function(){if(this.options.enableSearchAsYouType)this.setText(this.getQuery(!0));else{var e=r.compact(r.map(this.lastSuggestions,function(e){return e.text}));this.usageAnalytics.logCustomEvent(this.getOmniboxAnalyticsEventCause(),this.buildCustomDataForPartialQueries(0,e),this.element)}},t.prototype.handleTabPressForOldOmniboxAddon=function(){var e=this.lastSuggestions.filter(function(e){return e.dom}).map(function(e){return m.$$(e.dom)}),t=this.findAllElementsWithClass(e,".coveo-omnibox-selected");if(t.length>0)m.$$(t[0]).trigger("tabSelect");else if(!this.options.enableQuerySuggestAddon){var n=this.findAllElementsWithClass(e,".coveo-omnibox-selectable");n.length>0&&m.$$(n[0]).trigger("tabSelect")}},t.prototype.findAllElementsWithClass=function(e,t){return e.map(function(e){return e.find(t)}).filter(function(e){return e}).reduce(function(e,t){return e.concat(t)},[])},t.prototype.triggerNewQuery=function(e,t){clearTimeout(this.searchAsYouTypeTimeout);var n=this.getQuery(e);this.shouldExecuteQuery(e)&&(this.lastQuery=n,t(),this.queryController.executeQuery({searchAsYouType:e,logInActionsHistory:!0}))},t.prototype.getQuery=function(e){if(this.lastQuery==this.magicBox.getText())return this.lastQuery;if(!e)return this.magicBox.getText();var t=this.magicBox.getWordCompletion();if(null!=t)return t;var n=this.magicBox.getWordCompletion()||this.getFirstSuggestion();return n||(this.isAutoSuggestion()?this.lastQuery||this.magicBox.getText():this.magicBox.getText())},t.prototype.getFirstSuggestion=function(){if(null==this.lastSuggestions)return"";if(this.lastSuggestions.length<=0)return"";var e=r.find(this.lastSuggestions,function(e){return null!=e.text});return null==e?"":e.text},t.prototype.updateQueryState=function(){this.queryStateModel.set(h.QueryStateModel.attributesEnum.q,this.magicBox.getText())},t.prototype.handleQueryStateChanged=function(e){c.Assert.exists(e);var t=e.value;t!=this.magicBox.getText()&&this.magicBox.setText(t)},t.prototype.handleQuerySuccess=function(){this.isAutoSuggestion()||(this.partialQueries=[])},t.prototype.handleDuringQuery=function(e){var t=this;e.promise.then(function(){var n=t.usageAnalytics.getPendingSearchEvent();n instanceof v.PendingSearchAsYouTypeSearchEvent&&n.beforeResolve.then(function(n){e.promise.then(function(){t.modifyEventTo&&(n.modifyEventCause(t.modifyEventTo),t.modifyEventTo=null)})})})},t.prototype.searchAsYouType=function(e){var t=this;void 0===e&&(e=!1),this.clearSearchAsYouType(),this.shouldExecuteQuery(!0)&&(this.searchAsYouTypeTimeout=window.setTimeout(function(){if(t.suggestionShouldTriggerQuery()||e){var n=r.map(t.lastSuggestions,function(e){return e.text}),i=r.indexOf(n,t.magicBox.getWordCompletion());t.triggerNewQuery(!0,function(){t.usageAnalytics.logSearchAsYouType(g.analyticsActionCauseList.searchboxAsYouType,t.buildCustomDataForPartialQueries(i,n))}),t.clearSearchAsYouType()}},this.options.searchAsYouTypeDelay))},t.prototype.isAutoSuggestion=function(){return this.options.enableSearchAsYouType&&this.options.enableQuerySuggestAddon},t.prototype.shouldExecuteQuery=function(e){var t=this.getQuery(e);return!1===this.searchInterface.options.allowQueriesWithoutKeywords?this.lastQuery!=t&&y.Utils.isNonEmptyString(t):this.lastQuery!=t&&null!=t},t.prototype.suggestionShouldTriggerQuery=function(e){if(void 0===e&&(e=this.lastSuggestions),this.shouldExecuteQuery(!0)&&e&&e[0]){var t=e[0];if(t&&void 0!=t.executableConfidence)return t.executableConfidence>=.8;if(t.text&&0==t.text.indexOf(this.magicBox.getText()))return!0}return!1},t.prototype.clearSearchAsYouType=function(){clearTimeout(this.searchAsYouTypeTimeout),this.searchAsYouTypeTimeout=void 0},t.prototype.getOmniboxAnalyticsEventCause=function(){return this.searchInterface instanceof E.StandaloneSearchInterface?g.analyticsActionCauseList.omniboxFromLink:g.analyticsActionCauseList.omniboxAnalytics},t.ID="Omnibox",t.doExport=function(){s.exportGlobally({Omnibox:t,QueryboxQueryParameters:_.QueryboxQueryParameters})},t.options={inline:S.ComponentOptions.buildBooleanOption({defaultValue:!1}),enableSearchAsYouType:S.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"SearchAsYouType"}),searchAsYouTypeDelay:S.ComponentOptions.buildNumberOption({defaultValue:2e3,min:0,depend:"enableSearchAsYouType",section:"SearchAsYouType"}),enableFieldAddon:S.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableQuerySyntax",postProcessing:function(e,t){return e&&(t.enableQuerySyntax=!0),e},section:"QuerySyntax"}),enableSimpleFieldAddon:S.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableFieldAddon"}),listOfFields:S.ComponentOptions.buildFieldsOption({depend:"enableFieldAddon"}),enableQuerySuggestAddon:S.ComponentOptions.buildBooleanOption({defaultValue:!0,alias:["enableTopQueryAddon","enableRevealQuerySuggestAddon"]}),enableQueryExtensionAddon:S.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"enableQuerySyntax",postProcessing:function(e,t){return e&&(t.enableQuerySyntax=!0),e},section:"QuerySyntax"}),placeholder:S.ComponentOptions.buildLocalizedStringOption(),omniboxTimeout:S.ComponentOptions.buildNumberOption({defaultValue:2e3,min:0}),enableQuerySyntax:S.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"QuerySyntax"})},t}(C.Component);t.Omnibox=P,P.options=o({},P.options,x.Querybox.options),w.Initialization.registerAutoCreateComponent(P)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),r=n(7);n(398);var s=n(4),a=n(3),u=function(){function e(e,t,n){void 0===e&&(e=function(e){}),this.onChange=e,this.options=t,this.label=n,this.buildContent()}return e.doExport=function(){a.exportGlobally({MultiSelect:e})},e.prototype.build=function(){return this.element},e.prototype.getElement=function(){return this.element},e.prototype.getValue=function(){return o.chain(this.element.options).toArray().filter(function(e){return e.selected}).map(function(e){return e.value}).value()},e.prototype.getUnselectedValues=function(){return o.chain(this.element.options).toArray().filter(function(e){return!e.selected}).map(function(e){return e.value}).value()},e.prototype.setValue=function(e){var t=this.getValue(),n=o.partition(o.toArray(this.element.options),function(e){return o.contains(t,e.value)}),r=o.partition(o.toArray(this.element.options),function(t){return o.contains(e,t.value)});o.each(r[0],function(e){return e.selected=!0}),o.each(r[1],function(e){return e.selected=!1});var a=!1;s.Utils.arrayEqual(n[0],r[0],!1)||(a=!0),s.Utils.arrayEqual(n[1],r[1],!1)||(a=!0),a&&i.$$(this.element).trigger("change")},e.prototype.reset=function(){var e=this.getValue();this.element.selectedIndex=-1,s.Utils.isEmptyArray(e)||i.$$(this.element).trigger("change")},e.prototype.buildContent=function(){var e=this;this.element=i.$$("select",{className:"mdc-multi-select mdl-list",'title':"advanced filters list" ,multiple:"",size:this.options.length.toString()}).el;var t=i.$$("optgroup",{className:"mdc-list-group",label:this.label}),n=o.map(this.options,function(e){return i.$$("option",{value:e,className:"mdc-list-item"},r.l(e))});o.each(n,function(e){return t.append(e.el)}),this.element.appendChild(t.el),i.$$(this.element).on("change",function(){return e.onChange(e)})},e}();t.MultiSelect=u},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),r=n(7),s=n(17),a=n(1),u=n(14),l=n(13),c=n(4),p=n(9),d=n(6),h=n(2),f=function(e){function t(n,i,o){var p=e.call(this,n,t.ID,o)||this;if(p.element=n,p.options=i,(new s.AccessibleButton).withElement(n).withOwner(p.bind).withLabel(r.l("Search")).withSelectAction(function(){return p.handleClick()}).build(),""==c.Utils.trim(a.$$(p.element).text())){var d=a.$$("span",{className:"coveo-search-button"},l.SVGIcons.icons.search).el;u.SVGDom.addClassToSVGInContainer(d,"coveo-search-button-svg");var h=a.$$("span",{className:"coveo-search-button-loading"},l.SVGIcons.icons.loading).el;u.SVGDom.addClassToSVGInContainer(h,"coveo-search-button-loading-svg"),n.appendChild(d),n.appendChild(h)}return p}return i(t,e),t.prototype.click=function(){this.handleClick()},t.prototype.handleClick=function(){this.logger.debug("Performing query following button click"),this.usageAnalytics.logSearchEvent(p.analyticsActionCauseList.searchboxSubmit,{}),this.queryController.executeQuery()},t.ID="SearchButton",t.doExport=function(){o.exportGlobally({SearchButton:t})},t.options={},t}(d.Component);t.SearchButton=f,h.Initialization.registerAutoCreateComponent(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(4),r=n(0);n(298);var s=n(10),a=n(16),u=n(33),l=n(39),c=function(){function e(e){this.root=e,this.facetPlaceholder='
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
',this.resultListPlaceholder='
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
',this.cardResultListPlaceholder='
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n',this.recommendationResultListPlaceholder='
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n ',this.eventToRemovePlaceholder=a.InitializationEvents.afterComponentsInitialization}return e.prototype.withEventToRemovePlaceholder=function(e){return this.eventToRemovePlaceholder=e,this},e.prototype.withFullInitializationStyling=function(){var t=this;return i.$$(this.root).addClass(e.INITIALIZATION_CLASS),i.$$(this.root).removeClass(e.AFTER_INITIALIZATION_CLASS),i.$$(this.root).one(this.eventToRemovePlaceholder,function(){i.$$(t.root).removeClass(e.INITIALIZATION_CLASS),i.$$(t.root).addClass(e.AFTER_INITIALIZATION_CLASS)}),this},e.prototype.withHiddenRootElement=function(){return i.$$(this.root).addClass("coveo-hidden"),this},e.prototype.withVisibleRootElement=function(){return i.$$(this.root).removeClass("coveo-hidden"),this},e.prototype.withWaitingForFirstQueryMode=function(){var e=this;return i.$$(this.root).addClass("coveo-waiting-for-query"),i.$$(this.root).one(s.QueryEvents.duringQuery,function(){i.$$(e.root).removeClass("coveo-waiting-for-query")}),this},e.prototype.withAllPlaceholders=function(){return this.withPlaceholderForFacets(),this.withPlaceholderForResultList(),this.withPlaceholderSearchbox(),this},e.prototype.withPlaceholderForFacets=function(){var t=this,n=this.getAllFacetsElements();if(o.Utils.isNonEmptyArray(n)){var a=[];r.each(n,function(t){return i.$$(t).addClass(e.INITIALIZATION_CLASS)}),r.each(r.first(n,e.NUMBER_OF_FACETS),function(e){i.$$(e).addClass("coveo-with-placeholder");var n=i.$$("div",{className:"coveo-facet-placeholder"},t.facetPlaceholder);e.appendChild(n.el),a.push(n)}),i.$$(this.root).one(this.eventToRemovePlaceholder,function(){var o=function(){r.each(a,function(e){return e.remove()}),r.each(n,function(t){return i.$$(t).removeClass(e.INITIALIZATION_CLASS)}),r.each(n,function(e){return i.$$(e).removeClass("coveo-with-placeholder")})};i.$$(t.root).one(s.QueryEvents.queryError,function(){return o()}),i.$$(t.root).one(s.QueryEvents.deferredQuerySuccess,function(){return o()})})}return this},e.prototype.withPlaceholderSearchbox=function(){var t=i.$$(this.root).findAll(".CoveoSearchbox");return o.Utils.isNonEmptyArray(t)&&(r.each(t,function(t){i.$$(t).addClass(e.INITIALIZATION_CLASS)}),i.$$(this.root).one(this.eventToRemovePlaceholder,function(){r.each(t,function(t){return i.$$(t).removeClass(e.INITIALIZATION_CLASS)})})),this},e.prototype.withPlaceholderForResultList=function(){var t=i.$$(this.root).findAll(".CoveoResultList");if(o.Utils.isNonEmptyArray(t)){r.each(t,function(t){return i.$$(t).addClass(e.INITIALIZATION_CLASS)});var n=this.determineResultListPlaceholder(t),a=n.placeholderToUse,l=n.resultListToUse,c=n.rootToUse;i.$$(l).append(c),i.$$(l).addClass("coveo-with-placeholder"),r.times(this.isRecommendationRoot()?e.NUMBER_OF_RESULTS_RECOMMENDATION:e.NUMBER_OF_RESULTS,function(){c.innerHTML+=a});var p=function(){i.$$(c).remove(),r.each(t,function(t){return i.$$(t).removeClass(e.INITIALIZATION_CLASS)}),i.$$(l).removeClass("coveo-with-placeholder")};i.$$(this.root).one(u.ResultListEvents.newResultDisplayed,function(){return p()}),i.$$(this.root).one(s.QueryEvents.queryError,function(){return p()}),i.$$(this.root).one(s.QueryEvents.noResults,function(){return p()})}return this},e.prototype.determineResultListPlaceholder=function(e){var t;if(e.length>1?t=l.HashUtils.getValue("layout",l.HashUtils.getHash()):1==e.length&&(t=e[0].getAttribute("data-layout")),t||(t="list"),e.length>1){var n=r.find(e,function(e){return e.getAttribute("data-layout")==t});return n||(n=r.find(e,function(e){return null==e.getAttribute("data-layout")})),n||(n=r.first(e)),{placeholderToUse:this.determineResultListFromLayout(t),resultListToUse:n,rootToUse:this.determineRootFromLayout(t)}}return 1==e.length?{placeholderToUse:this.determineResultListFromLayout(t),resultListToUse:e[0],rootToUse:this.determineRootFromLayout(t)}:null},e.prototype.determineResultListFromLayout=function(e){switch(e){case"list":return this.isRecommendationRoot()?this.recommendationResultListPlaceholder:this.resultListPlaceholder;case"card":return this.cardResultListPlaceholder;default:return this.resultListPlaceholder}},e.prototype.determineRootFromLayout=function(e){switch(e){case"list":return i.$$("div").el;case"card":return i.$$("div",{className:"coveo-result-list-container coveo-card-layout-container"}).el;default:return i.$$("div").el}},e.prototype.isRecommendationRoot=function(){return i.$$(this.root).hasClass("CoveoRecommendation")},e.prototype.getAllFacetsElements=function(){var e=[".CoveoFacet",".CoveoFacetRange",".CoveoTimespanFacet",".CoveoFacetSlider",".CoveoHierarchicalFacet",".CoveoCategoryFacet"].join(", ");return i.$$(this.root).findAll(e)},e.NUMBER_OF_FACETS=3,e.NUMBER_OF_RESULTS=10,e.NUMBER_OF_RESULTS_RECOMMENDATION=5,e.INITIALIZATION_CLASS="coveo-during-initialization",e.AFTER_INITIALIZATION_CLASS="coveo-after-initialization",e}();t.InitializationPlaceholder=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),o=n(7),r=n(0),s=function(){function e(){}return e.splitSemicolonSeparatedListOfEmailAddresses=function(e){var t=e.split(/\s*;\s*/);return r.filter(t,function(e){return i.Utils.exists(e)&&i.Utils.isNonEmptyString(i.Utils.trim(e))})},e.emailAddressesToHyperlinks=function(t,n,s,a,u){void 0===a&&(a=2),void 0===u&&(u=!1),t=r.filter(t,function(e){return i.Utils.exists(e)&&i.Utils.isNonEmptyString(i.Utils.trim(e))});var l=r.map(t,function(t){var r=e.parseEmail(t),a=r[1],l=r[0];if(i.Utils.exists(s)&&a==s&&(l=o.l("Me")),u){var c=l.split(" ");i.Utils.isNullOrUndefined(c[1])||(l=c[0]+" "+c[1].substring(0,1)+".")}var p=a.indexOf("@")>=0?a.indexOf("@")+1:0,d=a.substr(p);return i.Utils.exists(n)&&d!=n&&(l+=" ("+d+")"),''+l+""}),c=l.length-a,p=c>0?e.buildEmailAddressesAndOthers(r.last(l,c)):"";return r.first(l,a).join(", ")+p},e.buildEmailAddressesAndOthers=function(e){return' '+o.l("AndOthers",e.length.toString(),e.length)+' , '+e.join(" , ")+""},e.parseEmail=function(e){var t,n=e.match(/^\s*(.*)\s+<(.*)>$/);return null!=n?(t=n[1],/^'.*'|'.*'$/.test(t)&&(t=t.substr(1,t.length-2)),e=n[2]):(t=e,e=e),[t,e]},e}();t.EmailUtils=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(){function e(){}return e.buildAttributeString=function(e){var t=[];return i.each(e,function(e,n,i){void 0!=e&&t.push(n+"="+JSON.stringify(e.toString()))}),t.join(" ")},e}();t.HTMLUtils=o;var r=function(){function e(){}return e.buildAnchor=function(e,t){var n;return t&&t.text?(n=t.text,t.text=void 0):n=e,""+n+""},e}();t.AnchorUtils=r;var s=function(){function e(){}return e.buildImage=function(e,t){var n=""},e.selectImageFromResult=function(e){return document.querySelector("img[data-coveo-uri-hash="+e.raw.urihash+"]")},e.buildImageWithDirectSrcAttribute=function(t,n){var i=new Image,o=t.getViewAsDatastreamUri(n.uniqueId,"$Thumbnail$",{contentType:"image/png"});i.onload=function(){e.selectImageFromResult(n).setAttribute("src",o)},i.src=o},e.buildImageWithBase64SrcAttribute=function(t,n){t.getRawDataStream(n.uniqueId,"$Thumbnail$").then(function(t){var i=String.fromCharCode.apply(null,new Uint8Array(t));e.selectImageFromResult(n).setAttribute("src","data:image/png;base64, "+btoa(i))}).catch(function(){e.selectImageFromResult(n).remove()})},e.buildImageFromResult=function(t,n,o){o=o||{};var r=e.buildImage(void 0,i.extend(o,{"data-coveo-uri-hash":t.raw.urihash}));return n.isJsonp()?e.buildImageWithDirectSrcAttribute(n,t):e.buildImageWithBase64SrcAttribute(n,t),r},e}();t.ImageUtils=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&0!=t.values[0].numberOfResults&&(this.setupInitialSliderStateStart(t.values[0].value.split("..")[0]),this.setupInitialSliderStateEnd(t.values[t.values.length-1].value.split("..")[1]))},t.prototype.setupInitialSliderStateStart=function(e){void 0==this.initialStartOfSlider&&(this.initialStartOfSlider=e,this.options.dateField&&isNaN(e)&&(this.initialStartOfSlider=new Date(e.replace("@"," ")).getTime()))},t.prototype.setupInitialSliderStateEnd=function(e){void 0==this.initialEndOfSlider&&(this.initialEndOfSlider=e,this.options.dateField&&isNaN(e)&&(this.initialEndOfSlider=new Date(e.replace("@"," ")).getTime()))},t.prototype.updateAppearanceDependingOnState=function(e){var t=this;void 0===e&&(e=!1),a.Defer.defer(function(){!t.isEmpty||t.isActive()||e?(v.$$(t.element).removeClass("coveo-disabled-empty"),v.$$(t.facetHeader.eraserElement).toggle(t.isActive())):v.$$(t.element).addClass("coveo-disabled-empty"),t.isActive()||e?v.$$(t.element).removeClass("coveo-disabled"):v.$$(t.element).addClass("coveo-disabled"),t.isActive()&&t.slider&&t.slider.onMoving()})},t.prototype.handleNuke=function(){window.removeEventListener("resize",this.onResize)},t.prototype.isFacetEmpty=function(e,t){return null==e||null==e.values[0]||0==e.values[0].numberOfResults||0==t.results.results.length},t.options={title:_.ComponentOptions.buildLocalizedStringOption({defaultValue:g.l("NoTitle"),section:"CommonOptions"}),dateField:_.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"CommonOptions"}),field:_.ComponentOptions.buildFieldOption({groupByField:!0,required:!0,section:"CommonOptions"}),id:_.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||t.field}}),dateFormat:_.ComponentOptions.buildStringOption({section:"Display"}),queryOverride:_.ComponentOptions.buildQueryExpressionOption({section:"Filtering"}),start:_.ComponentOptions.buildStringOption({section:"Filtering"}),end:_.ComponentOptions.buildStringOption({section:"Filtering"}),excludeOuterBounds:_.ComponentOptions.buildBooleanOption({defaultValue:!1,section:"Filtering"}),rounded:_.ComponentOptions.buildNumberOption({min:0,section:"Filtering"}),steps:_.ComponentOptions.buildNumberOption({min:2}),rangeSlider:_.ComponentOptions.buildBooleanOption(),displayAsValue:_.ComponentOptions.buildObjectOption({subOptions:{enable:_.ComponentOptions.buildBooleanOption({defaultValue:!0}),unitSign:_.ComponentOptions.buildStringOption(),separator:_.ComponentOptions.buildStringOption({defaultValue:"-"})},section:"Display"}),displayAsPercent:_.ComponentOptions.buildObjectOption({subOptions:{enable:_.ComponentOptions.buildBooleanOption({defaultValue:!1}),separator:_.ComponentOptions.buildStringOption({defaultValue:"-"})},section:"Display"}),graph:_.ComponentOptions.buildObjectOption({subOptions:{steps:_.ComponentOptions.buildNumberOption({min:2}),animationDuration:_.ComponentOptions.buildNumberOption({min:0}),margin:_.ComponentOptions.buildObjectOption({subOptions:{top:_.ComponentOptions.buildNumberOption({min:0}),bottom:_.ComponentOptions.buildNumberOption({min:0}),left:_.ComponentOptions.buildNumberOption({min:0}),right:_.ComponentOptions.buildNumberOption({min:0})}})},section:"Graph"}),getSteps:_.ComponentOptions.buildCustomOption(function(){return null}),valueCaption:_.ComponentOptions.buildCustomOption(function(){return null}),enableResponsiveMode:_.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"ResponsiveOptions"}),dropdownHeaderLabel:_.ComponentOptions.buildLocalizedStringOption({section:"ResponsiveOptions"}),responsiveBreakpoint:_.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`."})},t.ID="FacetSlider",t.doExport=function(){s.exportGlobally({FacetSlider:t,Slider:A.Slider})},t.DEBOUNCED_RESIZE_DELAY=250,t}(x.Component);t.FacetSlider=I,E.Initialization.registerAutoCreateComponent(I)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(18),r=n(8),s=n(10),a=n(31),u=n(33),l=n(42),c=n(72),p=n(68),d=n(9),h=n(37),f=n(165),m=n(12),y=n(15),g=n(4),v=n(1),b=n(461),C=n(89),S=n(26),w=n(16),x=n(0),_=n(3),E=n(358),O=n(464),A=n(149);n(465);var T=function(e){function t(n,i,o,a){void 0===i&&(i={}),void 0===o&&(o={}),void 0===a&&(a=window);var u=e.call(this,n,r.ComponentOptions.initComponentOptions(n,t,i),o,a)||this;return u.element=n,u.options=i,u.analyticsOptions=o,u.element.style.display="",u.options.id||u.generateDefaultId(),u.preventEventPropagation(),u.options.mainSearchInterface&&u.bindToMainSearchInterface(),v.$$(u.element).on(s.QueryEvents.buildingQuery,function(e,t){return u.handleRecommendationBuildingQuery(t)}),v.$$(u.element).on(s.QueryEvents.querySuccess,function(e,t){return u.handleRecommendationQuerySuccess(t)}),v.$$(u.element).on(s.QueryEvents.noResults,function(e,t){return u.handleRecommendationNoResults()}),v.$$(u.element).on(s.QueryEvents.queryError,function(e,t){return u.handleRecommendationQueryError()}),u.historyStore=new C.history.HistoryStore,u.options.mainSearchInterface||u.ensureCurrentPageViewExistsInStore(),b.ResponsiveRecommendation.init(u.root,u,i),u}return i(t,e),t.prototype.getId=function(){return this.options.id},t.prototype.enable=function(){e.prototype.enable.call(this),this.show()},t.prototype.disable=function(){e.prototype.disable.call(this),this.hide()},t.prototype.hide=function(){v.$$(this.element).addClass("coveo-hidden")},t.prototype.show=function(){v.$$(this.element).removeClass("coveo-hidden")},t.prototype.ensureCurrentPageViewExistsInStore=function(){var e={name:"PageView",value:document.location.toString(),time:JSON.stringify(new Date),title:document.title};this.historyStore.addElement(e)},t.prototype.bindToMainSearchInterface=function(){this.bindComponentOptionsModelToMainSearchInterface(),this.bindQueryEventsToMainSearchInterface()},t.prototype.bindComponentOptionsModelToMainSearchInterface=function(){var e=this,t=S.get(this.options.mainSearchInterface,o.SearchInterface),n=null!=t,i=function(){var n=t.getBindings().componentOptionsModel;e.componentOptionsModel.setMultiple(n.getAttributes()),v.$$(e.options.mainSearchInterface).on(e.componentOptionsModel.getEventName(y.MODEL_EVENTS.ALL),function(){e.componentOptionsModel.setMultiple(n.getAttributes())})};n?i():v.$$(this.options.mainSearchInterface).on(w.InitializationEvents.afterComponentsInitialization,function(){t=S.get(e.options.mainSearchInterface,o.SearchInterface),i()})},t.prototype.bindQueryEventsToMainSearchInterface=function(){var e=this;v.$$(this.options.mainSearchInterface).on(s.QueryEvents.querySuccess,function(t,n){e.mainInterfaceQuery=n,e.mainQuerySearchUID=n.results.searchUid,e.mainQueryPipeline=n.results.pipeline,0!=n.results.results.length&&(e.usageAnalytics.logSearchEvent(d.analyticsActionCauseList.recommendation,{}),e.queryController.executeQuery({closeModalBox:!1}))}),v.$$(this.options.mainSearchInterface).on(s.QueryEvents.queryError,function(){return e.hide()}),v.$$(this.options.mainSearchInterface).on(s.QueryEvents.noResults,function(){return e.hide()})},t.prototype.handleRecommendationBuildingQuery=function(e){this.disabled||(this.modifyQueryForRecommendation(e),this.addRecommendationInfoInQuery(e))},t.prototype.handleRecommendationQuerySuccess=function(e){this.disabled||this.options.hideIfNoResults&&(0===e.results.totalCount?this.hide():this.show())},t.prototype.handleRecommendationNoResults=function(){this.disabled||this.options.hideIfNoResults&&this.hide()},t.prototype.handleRecommendationQueryError=function(){this.disabled||this.hide()},t.prototype.modifyQueryForRecommendation=function(e){this.mainInterfaceQuery&&g.Utils.copyObjectAttributes(e.queryBuilder,this.mainInterfaceQuery.queryBuilder,this.options.optionsToUse)},t.prototype.addRecommendationInfoInQuery=function(e){x.isEmpty(this.options.userContext)||e.queryBuilder.addContext(this.options.userContext),e.queryBuilder.recommendation=this.options.id},t.prototype.preventEventPropagation=function(){this.preventEventPropagationOn(s.QueryEvents),this.preventEventPropagationOn(a.OmniboxEvents),this.preventEventPropagationOn(u.ResultListEvents),this.preventEventPropagationOn(l.SettingsEvents),this.preventEventPropagationOn(c.PreferencesPanelEvents),this.preventEventPropagationOn(p.AnalyticsEvents),this.preventEventPropagationOn(h.BreadcrumbEvents),this.preventEventPropagationOn(f.QuickviewEvents),this.preventEventPropagationOn(w.InitializationEvents),this.preventEventPropagationOn(this.getAllModelEvents())},t.prototype.preventEventPropagationOn=function(e,t){void 0===t&&(t=function(e){return e});for(var n in e)v.$$(this.root).on(t(n),function(e){return e.stopPropagation()})},t.prototype.getAllModelEvents=function(){var e=this,t={},n=this.getBindings().queryStateModel;return x.each(x.values(y.Model.eventTypes),function(i){var o=n.getEventName(i);t[o]=o,x.each(x.values(m.QUERY_STATE_ATTRIBUTES),function(n){var o=e.queryStateModel.getEventName(i+n);t[o]=o})}),t},t.prototype.generateDefaultId=function(){var e="Recommendation";1!==t.NEXT_ID&&(this.logger.warn("Generating another recommendation default id","Consider configuring a human friendly / meaningful id for this interface"),e=e+"_"+t.NEXT_ID),t.NEXT_ID++,this.options.id=e},t.ID="Recommendation",t.NEXT_ID=1,t.doExport=function(){_.exportGlobally({Recommendation:t,DefaultRecommendationTemplate:E.DefaultRecommendationTemplate,RecommendationQuery:O.RecommendationQuery,RecommendationAnalyticsClient:A.RecommendationAnalyticsClient})},t.options={mainSearchInterface:r.ComponentOptions.buildSelectorOption(),userContext:r.ComponentOptions.buildJsonOption(),id:r.ComponentOptions.buildStringOption(),optionsToUse:r.ComponentOptions.buildListOption({defaultValue:["expression"]}),sendActionsHistory:r.ComponentOptions.buildBooleanOption({defaultValue:!0,deprecated:"This option is now deprecated. The correct way to control this behaviour is to configure an appropriate machine learning model in the administration interface (Recommendation, Relevance tuning, Query suggestions)"}),hideIfNoResults:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),autoTriggerQuery:r.ComponentOptions.buildBooleanOption({postProcessing:function(e,t){return!t.mainSearchInterface&&e}}),enableResponsiveMode:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),responsiveBreakpoint:r.ComponentOptions.buildNumberOption({defaultValue:1e3}),dropdownHeaderLabel:r.ComponentOptions.buildLocalizedStringOption({defaultValue:"Recommendations"})},t}(o.SearchInterface);t.Recommendation=T},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(471);var o=n(0),r=n(16),s=n(10),a=n(101),u=n(33),l=n(5),c=n(15),p=n(12),d=n(3),h=n(7),f=n(1),m=n(14),y=n(13),g=n(4),v=n(9),b=n(6),C=n(8),S=n(2),w=n(472),x=n(17);t.defaultLayout="list";var _=function(e){function t(n,i,o){var a=e.call(this,n,t.ID,o)||this;return a.element=n,a.options=i,a.options=C.ComponentOptions.initComponentOptions(n,t,i),a.currentActiveLayouts={},a.bind.onQueryState(c.MODEL_EVENTS.CHANGE_ONE,p.QUERY_STATE_ATTRIBUTES.LAYOUT,a.handleQueryStateChanged.bind(a)),a.bind.onRootElement(s.QueryEvents.querySuccess,function(e){return a.handleQuerySuccess(e)}),a.bind.onRootElement(s.QueryEvents.queryError,function(e){return a.handleQueryError(e)}),a.resultLayoutSection=f.$$(a.element).closest(".coveo-result-layout-section"),a.bind.oneRootElement(r.InitializationEvents.afterComponentsInitialization,function(){return a.populate()}),a.bind.oneRootElement(r.InitializationEvents.afterInitialization,function(){return a.handleQueryStateChanged()}),w.ResponsiveResultLayout.init(a.root,a,{}),a}return i(t,e),Object.defineProperty(t.prototype,"activeLayouts",{get:function(){return this.currentActiveLayouts},enumerable:!0,configurable:!0}),t.prototype.changeLayout=function(e){if(l.Assert.check(this.isLayoutDisplayedByButton(e),"Layout not available or invalid"),e!==this.currentLayout||""===this.getModelValue()){this.setModelValue(e);var t=this.queryController.getLastResults();this.setLayout(e,t),t?this.usageAnalytics.logCustomEvent(v.analyticsActionCauseList.resultsLayoutChange,{resultsLayoutChangeTo:e},this.element):(this.usageAnalytics.logSearchEvent(v.analyticsActionCauseList.resultsLayoutChange,{resultsLayoutChangeTo:e}),this.queryController.firstQuery||this.queryController.executeQuery())}},t.prototype.getCurrentLayout=function(){return this.currentLayout},t.prototype.disableLayouts=function(e){var t=this;if(g.Utils.isNonEmptyArray(e)){o.each(e,function(e){return t.disableLayout(e)});var n=o.difference(o.keys(this.currentActiveLayouts),e);if(o.isEmpty(n)){this.logger.error("Cannot disable the last valid layout ... Re-enabling the first one possible");var i=o.keys(this.currentActiveLayouts)[0];this.enableLayout(i),this.setLayout(i)}else{var r=o.contains(n,this.currentLayout)?this.currentLayout:n[0];this.changeLayout(r)}}},t.prototype.enableLayouts=function(e){var t=this;o.each(e,function(e){t.enableLayout(e)})},t.prototype.disableLayout=function(e){this.isLayoutDisplayedByButton(e)&&this.hideButton(e)},t.prototype.enableLayout=function(e){var t=this.activeResultLists;o.find(t,function(t){return t.options.layout==e})&&this.isLayoutDisplayedByButton(e)&&(this.showButton(e),this.updateSelectorAppearance())},Object.defineProperty(t.prototype,"resultLists",{get:function(){return this.searchInterface.getComponents("ResultList")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"activeResultLists",{get:function(){return o.filter(this.resultLists,function(e){return!e.disabled})},enumerable:!0,configurable:!0}),t.prototype.hideButton=function(e){if(this.isLayoutDisplayedByButton(e)){var t=this.currentActiveLayouts[e].button;f.$$(t.el).addClass("coveo-hidden"),t.visible=!1,this.updateSelectorAppearance()}},t.prototype.showButton=function(e){if(this.isLayoutDisplayedByButton(e)){var t=this.currentActiveLayouts[e].button;f.$$(t.el).removeClass("coveo-hidden"),t.visible=!0}},t.prototype.setLayout=function(e,t){e&&(this.currentLayout&&f.$$(this.currentActiveLayouts[this.currentLayout].button.el).removeClass("coveo-selected"),f.$$(this.currentActiveLayouts[e].button.el).addClass("coveo-selected"),this.currentLayout=e,f.$$(this.element).trigger(u.ResultListEvents.changeLayout,{layout:e,results:t}))},t.prototype.handleQuerySuccess=function(e){this.hasNoResults=0==e.results.results.length,this.shouldShowSelector()?this.show():this.hide()},t.prototype.handleQueryStateChanged=function(e){var t=this.getModelValue(),n=o.find(o.keys(this.currentActiveLayouts),function(e){return e===t});void 0!==n?this.setLayout(n):this.setLayout(o.keys(this.currentActiveLayouts)[0])},t.prototype.handleQueryError=function(e){this.hasNoResults=!0,this.hide()},t.prototype.updateSelectorAppearance=function(){this.shouldShowSelector()?this.show():this.hide()},t.prototype.populate=function(){var e=this,n={layouts:[]};f.$$(this.root).trigger(a.ResultLayoutEvents.populateResultLayout,n);var i=o.uniq(n.layouts.map(function(e){return e.toLowerCase()}));o.each(i,function(e){return l.Assert.check(o.contains(t.validLayouts,e),"Invalid layout")}),o.isEmpty(i)||(o.each(i,function(t){return e.addButton(t)}),this.shouldShowSelector()||this.hide())},t.prototype.addButton=function(e){var t=this,n=f.$$("span",{className:"coveo-result-layout-selector"}),i=f.$$("span",{className:"coveo-result-layout-selector-caption"},h.l(e));n.append(i.el);var o=f.$$("span",{className:"coveo-icon coveo-"+e+"-layout-icon"},y.SVGIcons.icons[e+"Layout"]);m.SVGDom.addClassToSVGInContainer(o.el,"coveo-"+e+"-svg"),n.prepend(o.el);var r=function(){return t.changeLayout(e)};(new x.AccessibleButton).withElement(n).withLabel(h.l("DisplayResultsAs",h.l(e))).withSelectAction(r).withOwner(this.bind).build(),e===this.currentLayout&&n.addClass("coveo-selected"),f.$$(this.element).append(n.el),this.currentActiveLayouts[e]={button:{visible:!0,el:n.el},enabled:!0}},t.prototype.hide=function(){var e=this.resultLayoutSection||this.element;f.$$(e).addClass("coveo-result-layout-hidden")},t.prototype.show=function(){var e=this.resultLayoutSection||this.element;f.$$(e).removeClass("coveo-result-layout-hidden")},t.prototype.getModelValue=function(){return this.queryStateModel.get(p.QueryStateModel.attributesEnum.layout)},t.prototype.setModelValue=function(e){this.queryStateModel.set(p.QueryStateModel.attributesEnum.layout,e)},t.prototype.shouldShowSelector=function(){return o.keys(this.currentActiveLayouts).length>1&&o.filter(this.currentActiveLayouts,function(e){return e.button.visible}).length>1&&!this.hasNoResults},t.prototype.isLayoutDisplayedByButton=function(e){return o.contains(o.keys(this.currentActiveLayouts),e)},t.ID="ResultLayoutSelector",t.aliases=["ResultLayout"],t.doExport=function(){d.exportGlobally({ResultLayoutSelector:t,ResultLayout:t})},t.validLayouts=["list","card","table"],t.options={mobileLayouts:C.ComponentOptions.buildListOption({defaultValue:["card","table"]}),tabletLayouts:C.ComponentOptions.buildListOption({defaultValue:["list","card","table"]}),desktopLayouts:C.ComponentOptions.buildListOption({defaultValue:["list","card","table"]})},t}(b.Component);t.ResultLayoutSelector=_,S.Initialization.registerAutoCreateComponent(_)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(483);var o=n(0),r=n(3),s=n(16),a=n(10),u=n(5),l=n(15),c=n(12),p=n(44),d=n(17),h=n(1),f=n(4),m=n(9),y=n(6),g=n(8),v=n(2),b=n(484),C=function(e){function t(n,i,o){var r=e.call(this,n,t.ID,o)||this;return r.element=n,r.options=i,r.options=g.ComponentOptions.initComponentOptions(n,t,i),r.bind.onRootElement(a.QueryEvents.buildingQuery,function(e){return r.handleBuildingQuery(e)}),r.bind.onRootElement(s.InitializationEvents.afterInitialization,function(){return r.handleAfterInitialization()}),r.bind.onQueryState(l.MODEL_EVENTS.CHANGE_ONE,c.QUERY_STATE_ATTRIBUTES.T,function(e){return r.handleQueryStateChanged(e)}),(new d.AccessibleButton).withElement(n).withSelectAction(function(){return r.select()}).withLabel(r.options.caption).withTitle(r.options.caption).withOwner(r.bind).build(),r.render(),b.ResponsiveTabs.init(r.root,r,r.options),r}return i(t,e),t.prototype.select=function(){if(!this.disabled){var e={t:this.options.id,sort:this.options.sort||c.QueryStateModel.defaultAttributes.sort};this.options.layout&&(e.layout=this.options.layout),this.queryStateModel.setMultiple(e),this.usageAnalytics.logSearchEvent(m.analyticsActionCauseList.interfaceChange,{interfaceChangeTo:this.options.id}),this.queryController.executeQuery()}},t.prototype.isElementIncludedInTab=function(e){u.Assert.exists(e);var t=this.splitListOfTabs(e.getAttribute("data-tab")),n=this.splitListOfTabs(e.getAttribute("data-tab-not"));return u.Assert.check(!(0!=t.length&&0!=n.length),"You cannot both explicitly include and exclude an element from tabs."),0!=t.length&&-1!=o.indexOf(t,this.options.id)||0!=n.length&&-1==o.indexOf(n,this.options.id)||0==t.length&&0==n.length},t.prototype.render=function(){var e=this.options.icon;if(f.Utils.isNonEmptyString(e)){var t=h.$$("span").el;h.$$(t).addClass(["coveo-icon",e]),this.element.insertBefore(t,this.element.firstChild)}var n=this.options.caption;if(f.Utils.isNonEmptyString(n)){var i=document.createElement("p");h.$$(i).text(n),this.element.appendChild(i)}},t.prototype.handleBuildingQuery=function(e){u.Assert.exists(e),!this.disabled&&this.isSelected()&&(e.queryBuilder.tab=this.options.id,f.Utils.isNonEmptyString(this.options.expression)&&(this.options.constant?e.queryBuilder.constantExpression.add(this.options.expression):e.queryBuilder.advancedExpression.add(this.options.expression)),this.options.enableDuplicateFiltering&&(e.queryBuilder.enableDuplicateFiltering=!0),null!=this.options.pipeline&&(e.queryBuilder.pipeline=this.options.pipeline),null!=this.options.maximumAge&&(e.queryBuilder.maximumAge=this.options.maximumAge))},t.prototype.handleQueryStateChanged=function(e){u.Assert.exists(e),!this.disabled&&this.isSelected()?(h.$$(this.element).addClass("coveo-selected"),this.queryController.setEndpoint(this.options.endpoint),this.showAndHideAppropriateElements()):h.$$(this.element).removeClass("coveo-selected")},t.prototype.handleAfterInitialization=function(){this.isSelected()&&this.options.layout&&this.queryStateModel.set(c.QUERY_STATE_ATTRIBUTES.LAYOUT,this.options.layout)},t.prototype.isSelected=function(){return this.queryStateModel.get(c.QueryStateModel.attributesEnum.t)==this.options.id},t.prototype.showAndHideAppropriateElements=function(){var e=this,t=[],n=[];o.each(h.$$(this.root).findAll("[data-tab],[data-tab-not]"),function(i){e.isElementIncludedInTab(i)?(e.toggleAllComponentsUnder(i,!0),t.push(i)):(e.toggleAllComponentsUnder(i,!1),n.push(i))}),h.$$(this.root).one(a.QueryEvents.querySuccess,function(){o.each(t,function(e){return h.$$(e).removeClass("coveo-tab-disabled")}),o.each(n,function(e){return h.$$(e).addClass("coveo-tab-disabled")})})},t.prototype.splitListOfTabs=function(e){return f.Utils.exists(e)?o.map(e.split(","),function(e){return f.Utils.trim(e)}):[]},t.prototype.toggleAllComponentsUnder=function(e,t){u.Assert.exists(e);var n=function(e){var n=y.Component.get(e,void 0,!0);n&&(t?n.enable():n.disable())};n(e),o.each(h.$$(e).findAll("*"),function(e){n(e)})},t.prototype.enable=function(){e.prototype.enable.call(this),this.element.style.display=""},t.prototype.disable=function(){e.prototype.disable.call(this),this.element.style.display="none"},t.ID="Tab",t.doExport=function(){r.exportGlobally({Tab:t})},t.options={id:g.ComponentOptions.buildStringOption({required:!0,section:"Common Options"}),caption:g.ComponentOptions.buildLocalizedStringOption({required:!0,section:"Common Options"}),icon:g.ComponentOptions.buildStringOption(),expression:g.ComponentOptions.buildQueryExpressionOption({section:"Filtering"}),endpoint:g.ComponentOptions.buildCustomOption(function(e){return null!=e?p.SearchEndpoint.endpoints[e]:null}),sort:g.ComponentOptions.buildStringOption(),layout:g.ComponentOptions.buildStringOption(),constant:g.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"Filtering"}),enableDuplicateFiltering:g.ComponentOptions.buildBooleanOption({defaultValue:!1}),pipeline:g.ComponentOptions.buildStringOption(),maximumAge:g.ComponentOptions.buildNumberOption(),enableResponsiveMode:g.ComponentOptions.buildBooleanOption({defaultValue:!0,section:"ResponsiveOptions"}),dropdownHeaderLabel:g.ComponentOptions.buildLocalizedStringOption({section:"ResponsiveOptions"})},t}(y.Component);t.Tab=C,v.Initialization.registerAutoCreateComponent(C)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0&&(this.currentPage--,this.numberOfValues=this.options.numberOfValues+this.currentPage*this.options.pageSize,this.reload())},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){S.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.reset=function(){this.changeActivePath(this.options.basePath),this.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetClear),this.executeQuery()},t.prototype.disable=function(){e.prototype.disable.call(this),this.hide()},t.prototype.hide=function(){l.$$(this.element).addClass("coveo-hidden")},t.prototype.show=function(){l.$$(this.element).removeClass("coveo-hidden")},t.prototype.debugValue=function(e){return o(this,void 0,void 0,function(){var t,n;return r(this,function(i){switch(i.label){case 0:return t=new R.QueryBuilder,this.categoryFacetQueryController.addDebugGroupBy(t,e),[4,this.queryController.getEndpoint().search(t.build())];case 1:return n=i.sent(),T.CategoryFacetDebug.analyzeResults(n.groupByResults[0],this.options.delimitingCharacter),[2]}})})},t.prototype.showWaitingAnimation=function(){"hidden"==this.waitElement.el.style.visibility&&(this.waitElement.el.style.visibility="visible")},t.prototype.hideWaitAnimation=function(){"visible"==this.waitElement.el.style.visibility&&(this.waitElement.el.style.visibility="hidden")},t.prototype.logAnalyticsEvent=function(e,t){void 0===t&&(t=this.activePath),this.usageAnalytics.logSearchEvent(e,{categoryFacetId:this.options.id,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,n){this.show();var i,o=this.sortParentValues(e.parentValues),r=this.categoryValueRoot,s=!1,a=Math.floor(t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING/2),u=Math.ceil(t.NUMBER_OF_VALUES_TO_KEEP_AFTER_TRUNCATING/2);o=this.hideBasePathInParentValues(o),this.shouldTruncate(o)&&(i=this.findPathOfLastTruncatedParentValue(o,u),s=!0,o=C.first(o,a).concat(C.last(o,u))),this.isPristine()||this.addAllCategoriesButton();for(var l=0;lt.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 n=e.length-t-1;return C.reduce(C.first(e,n+1),function(e,t){return e.concat([t.value])},[])},t.prototype.addAllCategoriesButton=function(){var e=this,t=this.categoryFacetTemplates.buildAllCategoriesButton();t.on("click",function(){return e.reset()}),this.categoryValueRoot.listRoot.append(t.el)},t.prototype.isPristine=function(){return b.Utils.arrayEqual(this.activePath,this.options.basePath)},t.prototype.buildFacetHeader=function(){var e=this;this.waitElement=l.$$("div",{className:t.WAIT_ELEMENT_CLASS},y.SVGIcons.icons.loading),m.SVGDom.addClassToSVGInContainer(this.waitElement.el,"coveo-category-facet-header-wait-animation-svg"),this.waitElement.el.style.visibility="hidden";var n=l.$$("div",{className:"coveo-category-facet-title"},this.options.title);this.facetHeader=l.$$("div",{className:"coveo-category-facet-header"},n),l.$$(this.element).prepend(this.facetHeader.el),this.facetHeader.append(this.waitElement.el);var i=l.$$("div",{title:a.l("Clear",this.options.title),className:"coveo-category-facet-header-eraser coveo-facet-header-eraser"},y.SVGIcons.icons.mainClear);m.SVGDom.addClassToSVGInContainer(i.el,"coveo-facet-header-eraser-svg"),i.on("click",function(){e.logAnalyticsEvent(A.analyticsActionCauseList.categoryFacetClear),e.reset()}),this.facetHeader.append(i.el)},t.prototype.handleQueryStateChanged=function(e){if(this.listenToQueryStateChange){var t=e.attributes[this.queryStateAttribute];!b.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(v.MODEL_EVENTS.CHANGE,void 0,function(t){return e.handleQueryStateChanged(t)})},t.prototype.addFading=function(){l.$$(this.element).addClass("coveo-category-facet-values-fade")},t.prototype.removeFading=function(){l.$$(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=[],n=this,i=0,o=this.activePath;ithis.options.numberOfValues&&this.moreLessContainer.append(this.buildLessButton()),this.moreValuesToFetch&&this.moreLessContainer.append(this.buildMoreButton())},t.prototype.clear=function(){this.categoryValueRoot.clear(),this.options.enableFacetSearch&&this.categoryFacetSearch.clear(),this.moreLessContainer&&this.moreLessContainer.detach(),l.$$(this.element).removeClass("coveo-category-facet-non-empty-path")},t.prototype.buildMoreButton=function(){var e=this,t=l.$$("span",{className:"coveo-facet-more-icon"},y.SVGIcons.icons.arrowDown).el;m.SVGDom.addClassToSVGInContainer(t,"coveo-facet-more-icon-svg");var n=l.$$("div",{className:"coveo-category-facet-more",tabindex:0},t),i=function(){return e.showMore()};return n.on("click",function(){return e.showMore()}),n.on("keyup",_.KeyboardUtils.keypressAction(_.KEYBOARD.ENTER,i)),n.el},t.prototype.buildLessButton=function(){var e=this,t=l.$$("span",{className:"coveo-facet-less-icon"},y.SVGIcons.icons.arrowUp).el;m.SVGDom.addClassToSVGInContainer(t,"coveo-facet-less-icon-svg");var n=l.$$("div",{className:"coveo-category-facet-less",tabIndex:0},t),i=function(){return e.showLess()};return n.on("click",i),n.on("keyup",_.KeyboardUtils.keypressAction(_.KEYBOARD.ENTER,i)),n.el},t.prototype.handlePopulateBreadCrumb=function(e){var t=this,n=this.getVisibleParentValues().pop();if(!this.isPristine()&&n){var i=function(){t.logAnalyticsEvent(A.analyticsActionCauseList.breadcrumbFacet),t.reset()},o=new O.CategoryFacetBreadcrumb(this.options.title,i,n);e.breadcrumbs.push({element:o.build()})}},t.prototype.handleClearBreadcrumb=function(){this.changeActivePath(this.options.basePath)},Object.defineProperty(t.prototype,"hasValues",{get:function(){return this.getAvailableValues().length>0},enumerable:!0,configurable:!0}),t.doExport=function(){p.exportGlobally({CategoryFacet:t})},t.ID="CategoryFacet",t.options={field:u.ComponentOptions.buildFieldOption({required:!0}),title:u.ComponentOptions.buildLocalizedStringOption({defaultValue:a.l("NoTitle")}),numberOfValues:u.ComponentOptions.buildNumberOption({defaultValue:5,min:0,section:"CommonOptions"}),enableFacetSearch:u.ComponentOptions.buildBooleanOption({defaultValue:!0}),id:u.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||t.field}}),injectionDepth:u.ComponentOptions.buildNumberOption({defaultValue:1e3,min:0}),numberOfResultsInFacetSearch:u.ComponentOptions.buildNumberOption({defaultValue:15,min:1}),facetSearchDelay:u.ComponentOptions.buildNumberOption({defaultValue:100,min:0}),enableMoreLess:u.ComponentOptions.buildBooleanOption({defaultValue:!0}),pageSize:u.ComponentOptions.buildNumberOption({defaultValue:10,min:1,depend:"enableMoreLess"}),delimitingCharacter:u.ComponentOptions.buildStringOption({defaultValue:"|"}),basePath:u.ComponentOptions.buildListOption({defaultValue:[]}),maximumDepth:u.ComponentOptions.buildNumberOption({min:1,defaultValue:Number.MAX_VALUE}),debug:u.ComponentOptions.buildBooleanOption({defaultValue:!1})},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}(s.Component);t.CategoryFacet=M,c.Initialization.registerAutoCreateComponent(M),M.doExport()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.onPositionResolved="onPositionResolved",e.onResolvingPosition="onResolvingPosition",e.onPositionNotResolved="onPositionNotResolved",e}();t.DistanceEvents=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(15);t.Model=i.Model;var o=n(12);t.QueryStateModel=o.QueryStateModel;var r=n(25);t.ComponentOptionsModel=r.ComponentOptionsModel;var s=n(61);t.ComponentStateModel=s.ComponentStateModel},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),o=n(1),r=n(7),s=n(6),a=n(0),u=n(26),l=n(0),c=function(){function e(){}return e.message=function(t,n){return e.messageBuilderForMode(t)(n,e.getSummaryStrings(n))},e.htmlMessage=function(t,n){return e.messageBuilderForMode(t)(n,e.getHtmlSummaryStrings(n))},e.replaceQueryTags=function(e,t){var n=/\$\{query\}/g;return e?e.replace(n,t):""},e.messageBuilderForMode=function(t){return e.isInfiniteScrollMode(t)?e.buildInfiniteScrollMessage:e.buildStandardMessage},e.isInfiniteScrollMode=function(e){var t="."+s.Component.computeCssClassNameForType("ResultList"),n=o.$$(e).findAll(t);return a.any(n,function(e){var t=u.get(e).options;return t&&t.enableInfiniteScroll})},e.buildStandardMessage=function(t,n){var i=t.results.results.length,o={includingQuery:r.l("ShowingResultsOfWithQuery",n.first,n.last,n.totalCount,n.query,i),excludingQuery:r.l("ShowingResultsOf",n.first,n.last,n.totalCount,i)};return e.buildMessage(t,o)},e.buildInfiniteScrollMessage=function(t,n){var i=t.results.results.length,o={includingQuery:r.l("ShowingResultsWithQuery",n.totalCount,n.query,i),excludingQuery:r.l("ShowingResults",n.totalCount,i)};return e.buildMessage(t,o)},e.buildMessage=function(t,n){var i=t.results.results.length,o=e.sanitizeQuery(t.query);return i?o?n.includingQuery:n.excludingQuery:""},e.getHtmlSummaryStrings=function(t){var n=e.getSummaryStrings(t);return{first:e.wrapWithSpanTag(n.first),last:e.wrapWithSpanTag(n.last),totalCount:e.wrapWithSpanTag(n.totalCount),query:e.wrapWithSpanTag(n.query)}},e.wrapWithSpanTag=function(e){return o.$$("span",{className:"coveo-highlight"},e).el.outerHTML},e.getSummaryStrings=function(t){var n=t.query,o=t.results;return{first:i.format(n.firstResult+1,"n0"),last:i.format(n.firstResult+o.results.length,"n0"),totalCount:i.format(o.totalCountFiltered,"n0"),query:e.sanitizeQuery(n)}},e.sanitizeQuery=function(e){return e.q?l.escape(e.q.trim()):""},e}();t.QuerySummaryUtils=c},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(123),r=n(9),s=n(6),a=n(18),u=n(0),l=function(e){function t(t,n,i,o,r,s,a,u,l,c){var p=e.call(this,t,n,i,o,r,s,a,u,l)||this;return p.endpoint=t,p.rootElement=n,p.userId=i,p.userDisplayName=o,p.anonymous=r,p.splitTestRunName=s,p.splitTestRunVersion=a,p.originLevel1=u,p.sendToCloud=l,p.bindings=c,p.recommendation=p.bindings.searchInterface,p}return i(t,e),t.prototype.logSearchEvent=function(t,n){t==r.analyticsActionCauseList.interfaceLoad&&(t=r.analyticsActionCauseList.recommendationInterfaceLoad),e.prototype.logSearchEvent.call(this,t,n)},t.prototype.logClickEvent=function(t,n,i,o){t==r.analyticsActionCauseList.documentOpen&&(t=r.analyticsActionCauseList.recommendationOpen);var l=[e.prototype.logClickEvent.call(this,t,n,i,o)];if(this.recommendation.mainQuerySearchUID&&null!=this.recommendation.mainQueryPipeline){var c=s.Component.get(this.recommendation.options.mainSearchInterface,a.SearchInterface);i.queryUid=this.recommendation.mainQuerySearchUID,i.pipeline=this.recommendation.mainQueryPipeline,l.push(c.usageAnalytics.logClickEvent(t,n,i,o))}return Promise.all(l).then(function(e){return u.first(e)})},t.prototype.getOriginLevel2=function(e){return this.recommendation.getId()},t}(o.LiveAnalyticsClient);t.RecommendationAnalyticsClient=l},function(e,t,n){"use strict";function i(e){e.templateSettings={evaluate:/(?:<%|{{)([\s\S]+?)(?:%>|}})/g,interpolate:/(?:<%|{{)=([\s\S]+?)(?:%>|}})/g,escape:/(?:<%|{{)-([\s\S]+?)(?:%>|}})/g}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.underscoreInstance=o,function(){void 0==window.Coveo&&(window.Coveo={}),void 0==window.Coveo._&&(window.Coveo._=o,i(window.Coveo._),t.underscoreInstance=window.Coveo._)}(),window._=o,i(window._)},function(e,t,n){"use strict";function i(){return!!o()&&(t.jQueryInstance=a(),void 0==window.Coveo&&(window.Coveo={}),void 0==window.Coveo.$&&(window.Coveo.$=t.jQueryInstance),t.jQueryInstance.fn.coveo=function(){for(var e=[],t=0;tthis.value.length?new o.EndOfInputResult(r):r},e.prototype.toString=function(){return this.value},e}();t.ExpressionConstant=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionEndOfInput={id:"end of input",parse:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(93),o=n(347);t.Field={basicExpressions:["FieldSimpleQuery","FieldQuery","Field"],grammars:{FieldQuery:"[Field][OptionalSpaces][FieldQueryOperation]",FieldQueryOperation:["FieldQueryValue","FieldQueryNumeric"],FieldQueryValue:"[FieldOperator][OptionalSpaces][FieldValue]",FieldQueryNumeric:"[FieldOperatorNumeric][OptionalSpaces][FieldValueNumeric]",FieldSimpleQuery:"[FieldName]:[OptionalSpaces][FieldValue]",Field:"@[FieldName]",FieldName:/[a-zA-Z][a-zA-Z0-9\.\_]*/,FieldOperator:/==|=|<>/,FieldOperatorNumeric:/<=|>=|<|>/,FieldValue:["DateRange","NumberRange","DateRelative","Date","Number","FieldValueList","FieldValueString"],FieldValueNumeric:["DateRelative","Date","Number"],FieldValueString:["DoubleQuoted","FieldValueNotQuoted"],FieldValueList:"([FieldValueString][FieldValueStringList*])",FieldValueStringList:"[FieldValueSeparator][FieldValueString]",FieldValueSeparator:/ *, */,FieldValueNotQuoted:/[^ \(\),]+/,NumberRange:"[Number][Spaces?]..[Spaces?][Number]"},include:[o.Date,i.Basic]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(55),o=n(4),r=n(125),s=n(5),a=n(47),u=n(0),l=n(130),c=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 i.ExpressionBuilder,n=this.facet.values.getSelected();n.length>0&&(this.facet.options.useAnd?u.each(n,function(n){t.addFieldExpression(e.facet.options.field,"==",[n.value])}):t.addFieldExpression(this.facet.options.field,"==",u.map(n,function(e){return e.value})));var r=this.facet.values.getExcluded();return r.length>0&&t.addFieldNotEqualExpression(this.facet.options.field,u.map(r,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){s.Assert.exists(e);var t=this.createGroupByAllowedValues(),n=this.createBasicGroupByRequest(t),i=this.createGroupByQueryOverride(e);if(o.Utils.isNullOrUndefined(i)&&l.QueryBuilderExpression.isEmpty(i)){var r=e.computeCompleteExpressionParts();this.expressionToUseForFacetSearch=null==r.withoutConstant?"":r.withoutConstant,this.basicExpressionToUseForFacetSearch=null==r.basic?"":r.basic,this.advancedExpressionToUseForFacetSearch=r.advanced,this.constantExpressionToUseForFacetSearch=r.constant}else n.queryOverride=i.basic,n.advancedQueryOverride=i.advanced,n.constantQueryOverride=i.constant,this.expressionToUseForFacetSearch=i.withoutConstant,this.basicExpressionToUseForFacetSearch=i.basic,this.advancedExpressionToUseForFacetSearch=i.advanced,this.constantExpressionToUseForFacetSearch=i.constant;this.lastGroupByRequestIndex=e.groupByRequests.length,this.lastGroupByRequest=n,e.groupByRequests.push(n)},e.prototype.search=function(e,t){var n=this;return void 0===t&&(t=e.nbResults),e.completeFacetWithStandardValues=!1,new Promise(function(i,o){var r=function(o){var r=o.length;if(o=n.checkForFacetSearchValuesToRemove(o,e.valueToSearch),a.FacetUtils.needAnotherFacetSearch(o.length,r,t,5))return e.nbResults+=5,n.search(e,o.length);i(o)},s=n.facet.getEndpoint().search(e.getQuery());n.currentSearchPromise=s,s.then(function(t){if(n.currentSearchPromise==s){var i=[];t.groupByResults&&t.groupByResults[0]&&u.each(t.groupByResults[0].values,function(t){t.lookupValue?u.contains(e.alwaysExclude,t.lookupValue.toLowerCase())||i.push(t):u.contains(e.alwaysExclude,t.value.toLowerCase())||i.push(t)}),r(u.first(i,e.nbResults))}else o()}).catch(function(e){o(e)})})},e.prototype.fetchMore=function(e){var t=this,n=new r.FacetSearchParameters(this.facet);return n.alwaysInclude=this.facet.options.allowedValues||u.pluck(this.facet.values.getAll(),"value"),n.nbResults=e,this.facet.getEndpoint().search(n.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 r.FacetSearchParameters(this.facet),n=t.getQuery();return n.aq=(n.aq?n.aq:"")+" "+this.computeOurFilterExpression(),u.each(e,function(e){e.waitingForDelta=!0}),n.groupBy=[this.createBasicGroupByRequest(u.map(e,function(e){return e.value}))],n.groupBy[0].completeFacetWithStandardValues=!1,this.facet.getEndpoint().search(n)},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()):u.map(this.getAllowedValuesFromSelected(),function(e){return e.value})},e.prototype.createBasicGroupByRequest=function(e,t){void 0===t&&(t=!0);var n=this.facet.numberOfValues;if(null!=this.facet.options.customSort){var i=this.getUnionWithCustomSortLowercase(this.facet.options.customSort,this.facet.values.getSelected().concat(this.facet.values.getExcluded()));n=Math.max(n,i.length)}var r={field:this.facet.options.field,maximumNumberOfValues:n+(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&&(r.lookupField=this.facet.options.lookupField),null!=e&&(r.allowedValues=e),t&&o.Utils.isNonEmptyString(this.facet.options.computedField)&&(r.computedFields=[{field:this.facet.options.computedField,operation:this.facet.options.computedFieldOperation}]),r},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 n=u.map(e,function(e){return e.toLowerCase()}),i=u.chain(t).filter(function(e){return!u.contains(n,e.value.toLowerCase())}).map(function(e){return e.value}).value();return u.compact(e.concat(i))},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),l.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){return this.facet.values.hasSelectedOrExcludedValues()&&(t=e.computeCompleteExpressionPartsExcept(this.computeOurFilterExpression()),l.QueryBuilderExpression.isEmpty(t)&&(t.advanced="@uri")),t},e.prototype.processQueryOverrideForAdditionalFilter=function(e,t){return o.Utils.isEmptyString(t.constant)?t.constant=""+this.additionalFilter:t.constant=t.constant+" "+this.additionalFilter,t},e.prototype.processQueryOverrideForEmptyValues=function(e,t){var n=u.chain(t).keys().each(function(e){(o.Utils.isEmptyString(t[e])||o.Utils.isNullOrUndefined(t[e]))&&delete t[e]}).value();return 0==u.keys(n).length&&(t=void 0),t},e.prototype.checkForFacetSearchValuesToRemove=function(e,t){var n=this,i=a.FacetUtils.getRegexToUseForFacetSearch(t,this.facet.options.facetSearchIgnoreAccents);return u.filter(e,function(e){var t=u.isEmpty(n.facet.options.allowedValues)||n.isValueAllowedByAllowedValueOption(e.value),o=n.facet.getValueCaption(e);return t&&i.test(o)})},e.prototype.filterByAllowedValueOption=function(e){var t=this;return u.filter(e,function(e){return t.isValueAllowedByAllowedValueOption(e.value)})},e.prototype.isValueAllowedByAllowedValueOption=function(e){return u.some(this.facet.options.allowedValues,function(t){return new RegExp("^"+t.replace(/\*/g,".*").replace(/\?/g,".")+"$","gi").test(e)})},e}();t.FacetQueryController=c},function(e,t,n){"use strict";function i(e,t,n){return new p(e,t,n)}function o(e){return"requestAnimationFrame"in window?window.requestAnimationFrame(e):setTimeout(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),s=n(380),a=n(351),u=n(350),l=n(0),c=n(382),p=function(){function e(e,t,n){void 0===n&&(n={});var i=this;this.element=e,this.grammar=t,this.options=n,this.lastSuggestions=[],l.isUndefined(this.options.inline)&&(this.options.inline=!1),r.$$(e).addClass("magic-box"),this.options.inline&&r.$$(e).addClass("magic-box-inline"),r.$$(this.element).setAttribute("role","combobox");r.$$(this.element).setAttribute("aria-label","predictive text") ,this.result=this.grammar.parse(""),this.displayedResult=this.result.clean();var o=r.$$(e).find(".magic-box-input");o||(o=document.createElement("div"),o.className="magic-box-input",e.appendChild(o)),this.inputManager=new u.InputManager(o,function(e,t){t?(i.setText(e),i.onselect&&i.onselect(i.getFirstSuggestionText())):(i.setText(e),i.showSuggestion(),i.onchange&&i.onchange())},this),this.inputManager.ontabpress=function(){i.ontabpress&&i.ontabpress()};var s=this.inputManager.getValue();s&&(this.displayedResult.input=s),this.inputManager.setResult(this.displayedResult);var p=document.createElement("div");p.className="magic-box-suggestions",this.element.appendChild(p),this.suggestionsManager=new a.SuggestionsManager(p,this.element,this.inputManager,{selectableClass:this.options.selectableSuggestionClass,selectedClass:this.options.selectedSuggestionClass,timeout:this.options.suggestionTimeout}),this.magicBoxClear=new c.MagicBoxClear(this),this.setupHandler()}return e.prototype.getResult=function(){return this.result},e.prototype.getDisplayedResult=function(){return this.displayedResult},e.prototype.setText=function(e){r.$$(this.element).toggleClass("magic-box-notEmpty",e.length>0),this.magicBoxClear.toggleTabindex(e.length>0),this.result=this.grammar.parse(e),this.displayedResult=this.result.clean(),this.inputManager.setResult(this.displayedResult)},e.prototype.setCursor=function(e){this.inputManager.setCursor(e)},e.prototype.getCursor=function(){return this.inputManager.getCursor()},e.prototype.resultAtCursor=function(e){return this.displayedResult.resultAt(this.getCursor(),e)},e.prototype.setupHandler=function(){var e=this;this.inputManager.onblur=function(){r.$$(e.element).removeClass("magic-box-hasFocus"),e.onblur&&e.onblur(),e.options.inline||e.clearSuggestion()},this.inputManager.onfocus=function(){r.$$(e.element).addClass("magic-box-hasFocus"),e.showSuggestion(),e.onfocus&&e.onfocus()},this.inputManager.onkeydown=function(t){if(38==t||40==t)return!1;if(13==t){return null==e.suggestionsManager.selectAndReturnKeyboardFocusedElement()&&e.onsubmit&&e.onsubmit(),!1}return 27==t&&(e.clearSuggestion(),e.blur()),!0},this.inputManager.onchangecursor=function(){e.showSuggestion()},this.inputManager.onkeyup=function(t){if(38==t)e.onmove&&e.onmove(),e.focusOnSuggestion(e.suggestionsManager.moveUp()),e.onchange&&e.onchange();else{if(40!=t)return!0;e.onmove&&e.onmove(),e.focusOnSuggestion(e.suggestionsManager.moveDown()),e.onchange&&e.onchange()}return!1}},e.prototype.showSuggestion=function(){var e=this;this.suggestionsManager.mergeSuggestions(null!=this.getSuggestions?this.getSuggestions():[],function(t){e.updateSuggestion(t)})},e.prototype.updateSuggestion=function(e){var t=this;this.lastSuggestions=e;var n=this.getFirstSuggestionText();this.inputManager.setWordCompletion(n&&n.text),this.onsuggestions&&this.onsuggestions(e),l.each(e,function(e){null==e.onSelect&&null!=e.text&&(e.onSelect=function(){t.setText(e.text),t.onselect&&t.onselect(e)})})},e.prototype.focus=function(){r.$$(this.element).addClass("magic-box-hasFocus"),this.inputManager.focus()},e.prototype.blur=function(){this.inputManager.blur()},e.prototype.clearSuggestion=function(){var e=this;this.suggestionsManager.mergeSuggestions([],function(t){e.updateSuggestion(t)}),this.inputManager.setWordCompletion(null)},e.prototype.focusOnSuggestion=function(e){null==e||null==e.text?(e=this.getFirstSuggestionText(),this.inputManager.setResult(this.displayedResult,e&&e.text)):this.inputManager.setResult(this.grammar.parse(e.text).clean(),e.text)},e.prototype.getFirstSuggestionText=function(){return l.find(this.lastSuggestions,function(e){return null!=e.text})},e.prototype.getText=function(){return this.inputManager.getValue()},e.prototype.getWordCompletion=function(){return this.inputManager.getWordCompletion()},e.prototype.clear=function(){this.setText(""),this.showSuggestion(),this.focus(),this.onclear&&this.onclear()},e.prototype.hasSuggestions=function(){return this.suggestionsManager.hasSuggestions},e}();t.MagicBoxInstance=p,t.createMagicBox=i,t.requestAnimationFrame=o,s.doMagicBoxExport()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(){function e(){}return e.escapeRegExp=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},e.highlightText=function(e,t,n,i,o){var r=this;if(void 0===n&&(n=!1),void 0===i&&(i="magic-box-hightlight"),void 0===o&&(o=""),0==t.length)return e;var s=this.escapeRegExp(t),a="("+s+")|(.*?(?="+s+")|.+)",u=new RegExp(a,n?"gi":"g");return e.replace(u,function(e,t,n){return r.escapeText(null!=t?i:o,e)})},e.escapeText=function(e,t){return''+i.escape(t)+""},e}();t.MagicBoxUtils=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(0),r=function(){function e(e,t){this.resultListOptions=e,this.autoCreateComponentsFn=t}return e.prototype.renderResults=function(e,t,n){var r=this;return void 0===t&&(t=!1),Promise.all([this.getStartFragment(e,t),this.getEndFragment(e,t)]).then(function(t){var s=t[0],a=t[1],u=document.createDocumentFragment();s&&u.appendChild(s),o.each(e,function(e){u.appendChild(e),n(i.Component.getResult(e),e)}),a&&u.appendChild(a),r.resultListOptions.resultContainer.appendChild(u)})},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=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.buildURI=function(e,t,n){return e.replace(t,n)},e.bindClickEventToElement=function(e,t,n){return e},e}();t.ChatterUtils=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.quickviewLoaded="quickviewLoaded",e.openQuickview="openQuickview",e}();t.QuickviewEvents=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUBSCRIPTION_TYPE={followQuery:"followQuery",followDocument:"followDocument"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(66),o=n(1),r=n(83),s=n(0),a=function(){function e(e,t){this.inputName=e,this.root=t,this.buildContent()}return e.prototype.reset=function(){this.radio.reset()},e.prototype.build=function(){return this.element},e.prototype.getElement=function(){return this.element},e.prototype.isSelected=function(){return this.getRadio().checked},e.prototype.updateQuery=function(e){try{var t=this.getValue();t&&e.advancedExpression.add(t),this.removeErrorMessage()}catch(e){this.setErrorMessage(e)}},e.prototype.getRadio=function(){return o.$$(this.element).find("input")},e.prototype.setErrorMessage=function(e){this.removeErrorMessage(),this.error=o.$$("div",{className:"coveo-error coveo-error-date-input"},e).el,o.$$(this.element).append(this.error)},e.prototype.removeErrorMessage=function(){this.error&&o.$$(this.error).remove()},e.prototype.buildContent=function(){var e=this;this.radio=new r.RadioButton(function(){e.deactivateAllInputs(),e.activateSelectedInput()},this.inputName,"coveo-advanced-search-date-input"),this.element=this.radio.getElement(),o.$$(this.element).addClass("coveo-advanced-search-date-input-section"),o.$$(this.radio.getRadio()).addClass("coveo-advanced-search-date"),o.$$(this.radio.getLabel()).addClass("coveo-advanced-search-label")},e.prototype.deactivateAllInputs=function(){var e=o.$$(this.element.parentElement).findAll("fieldset");s.each(e,function(e){e.disabled=!0})},e.prototype.activateSelectedInput=function(){var e=o.$$(this.element).findAll("fieldset");s.each(e,function(e){e.disabled=!1})},e.prototype.onChange=function(){this.root?o.$$(this.root).trigger(i.AdvancedSearchEvents.executeAdvancedSearch):this.element&&o.$$(this.element).trigger(i.AdvancedSearchEvents.executeAdvancedSearch)},e}();t.DateInput=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(66),r=n(7),s=function(){function e(e,t){this.inputName=e,this.root=t}return e.prototype.reset=function(){},e.prototype.build=function(){var e=i.$$("div",{className:"coveo-advanced-search-document-input-section"}),t=i.$$("span",{className:"coveo-advanced-search-label"});return t.text(r.l(this.inputName)),e.append(t.el),this.element=e.el,this.element},e.prototype.getValue=function(){return""},e.prototype.updateQuery=function(e){this.getValue()&&e.advancedExpression.add(this.getValue())},e.prototype.onChange=function(){this.root?i.$$(this.root).trigger(o.AdvancedSearchEvents.executeAdvancedSearch):this.element&&i.$$(this.element).trigger(o.AdvancedSearchEvents.executeAdvancedSearch)},e}();t.DocumentInput=s},function(e,t,n){"use strict";function i(e){return new o(e)}function o(e){if(!(t=m.exec(e)))throw new Error("invalid format: "+e);var t,n=t[1]||" ",i=t[2]||">",o=t[3]||"-",r=t[4]||"",s=!!t[5],a=t[6]&&+t[6],u=!!t[7],l=t[8]&&+t[8].slice(1),c=t[9]||"";"n"===c?(u=!0,c="g"):f[c]||(c=""),(s||"0"===n&&"="===i)&&(s=!0,n="0",i="="),this.fill=n,this.align=i,this.sign=o,this.symbol=r,this.zero=s,this.width=a,this.comma=u,this.precision=l,this.type=c}function r(e){return y=S(e),g=y.format,v=y.formatPrefix,y}var s,a=function(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]},u=function(e){return e=a(Math.abs(e)),e?e[1]:NaN},l=function(e,t){return function(n,i){for(var o=n.length,r=[],s=0,a=e[0],u=0;o>0&&a>0&&(u+a+1>i&&(a=Math.max(1,i-u)),r.push(n.substring(o-=a,o+a)),!((u+=a+1)>i));)a=e[s=(s+1)%e.length];return r.reverse().join(t)}},c=function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}},p=function(e,t){e=e.toPrecision(t);e:for(var n,i=e.length,o=1,r=-1;o0&&(r=0)}return r>0?e.slice(0,r)+e.slice(n+1):e},d=function(e,t){var n=a(e,t);if(!n)return e+"";var i=n[0],o=n[1],r=o-(s=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,u=i.length;return r===u?i:r>u?i+new Array(r-u+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+a(e,Math.max(0,t+r-1))[0]},h=function(e,t){var n=a(e,t);if(!n)return e+"";var i=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")},f={"":p,"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return h(100*e,t)},r:h,s:d,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},m=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;i.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var y,g,v,b=function(e){return e},C=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],S=function(e){function t(e){function t(e){var t,i,r,c=b,d=S;if("c"===v)d=w(e)+d,e="";else{e=+e;var f=e<0;if(e=w(Math.abs(e),g),f&&0==+e&&(f=!1),c=(f?"("===l?l:"-":"-"===l||"("===l?"":l)+c,d=("s"===v?C[8+s/3]:"")+d+(f&&"("===l?")":""),x)for(t=-1,i=e.length;++t(r=e.charCodeAt(t))||r>57){d=(46===r?a+e.slice(t+1):e.slice(t))+d,e=e.slice(0,t);break}}y&&!h&&(e=o(e,1/0));var _=c.length+e.length+d.length,E=_>1)+c+e+d+E.slice(_);break;default:e=E+c+e+d}return p(e)}e=i(e);var n=e.fill,u=e.align,l=e.sign,c=e.symbol,h=e.zero,m=e.width,y=e.comma,g=e.precision,v=e.type,b="$"===c?r[0]:"#"===c&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",S="$"===c?r[1]:/[%p]/.test(v)?d:"",w=f[v],x=!v||/[defgprs%]/.test(v);return g=null==g?v?6:12:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),t.toString=function(){return e+""},t}function n(e,n){var o=t((e=i(e),e.type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(u(n)/3))),s=Math.pow(10,-r),a=C[8+r/3];return function(e){return o(s*e)+a}}var o=e.grouping&&e.thousands?l(e.grouping,e.thousands):b,r=e.currency,a=e.decimal,p=e.numerals?c(e.numerals):b,d=e.percent||"%";return{format:t,formatPrefix:n}};r({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var w=function(e){return Math.max(0,-u(Math.abs(e)))},x=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(u(t)/3)))-u(Math.abs(e)))},_=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,u(t)-u(e))+1};n.d(t,"b",function(){return r}),n.d(t,"a",function(){return g}),n.d(t,"d",function(){return v}),n.d(t,"c",function(){return S}),n.d(t,"e",function(){return i}),n.d(t,"f",function(){return w}),n.d(t,"g",function(){return x}),n.d(t,"h",function(){return _})},function(e,t,n){"use strict";function i(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function o(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function r(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function s(e){function t(e,t){return function(n){var i,o,r,s=[],a=-1,u=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in u||(u.w=1),"Z"in u?(i=o(r(u.y)),a=i.getUTCDay(),i=a>4||0===a?Se.P.ceil(i):Object(Se.P)(i),i=Se.F.offset(i,7*(u.V-1)),u.y=i.getUTCFullYear(),u.m=i.getUTCMonth(),u.d=i.getUTCDate()+(u.w+6)%7):(i=t(r(u.y)),a=i.getDay(),i=a>4||0===a?Se.l.ceil(i):Object(Se.l)(i),i=Se.a.offset(i,7*(u.V-1)),u.y=i.getFullYear(),u.m=i.getMonth(),u.d=i.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),a="Z"in u?o(r(u.y)).getUTCDay():t(r(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(a+5)%7:u.w+7*u.U-(a+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,o(u)):t(u)}}function s(e,t,n,i){for(var o,r,s=0,a=t.length,u=n.length;s=u)return-1;if(37===(o=t.charCodeAt(s++))){if(o=t.charAt(s++),!(r=Je[o in we?t.charAt(s++):o])||(i=r(e,n,i))<0)return-1}else if(o!=n.charCodeAt(i++))return-1}return i}function a(e,t,n){var i=Ve.exec(t.slice(n));return i?(e.p=Be[i[0].toLowerCase()],n+i[0].length):-1}function u(e,t,n){var i=je.exec(t.slice(n));return i?(e.w=He[i[0].toLowerCase()],n+i[0].length):-1}function he(e,t,n){var i=Qe.exec(t.slice(n));return i?(e.w=Ue[i[0].toLowerCase()],n+i[0].length):-1}function fe(e,t,n){var i=We.exec(t.slice(n));return i?(e.m=Ge[i[0].toLowerCase()],n+i[0].length):-1}function me(e,t,n){var i=qe.exec(t.slice(n));return i?(e.m=ze[i[0].toLowerCase()],n+i[0].length):-1}function ye(e,t,n){return s(e,Ie,t,n)}function ge(e,t,n){return s(e,Fe,t,n)}function ve(e,t,n){return s(e,$e,t,n)}function be(e){return Ne[e.getDay()]}function Ce(e){return Pe[e.getDay()]}function xe(e){return Le[e.getMonth()]}function _e(e){return ke[e.getMonth()]}function Ee(e){return De[+(e.getHours()>=12)]}function Oe(e){return Ne[e.getUTCDay()]}function Ae(e){return Pe[e.getUTCDay()]}function Te(e){return Le[e.getUTCMonth()]}function Re(e){return ke[e.getUTCMonth()]}function Me(e){return De[+(e.getUTCHours()>=12)]}var Ie=e.dateTime,Fe=e.date,$e=e.time,De=e.periods,Pe=e.days,Ne=e.shortDays,ke=e.months,Le=e.shortMonths,Ve=l(De),Be=c(De),Qe=l(Pe),Ue=c(Pe),je=l(Ne),He=c(Ne),qe=l(ke),ze=c(ke),We=l(Le),Ge=c(Le),Ye={a:be,A:Ce,b:xe,B:_e,c:null,d:M,e:M,f:P,H:I,I:F,j:$,L:D,m:N,M:k,p:Ee,Q:pe,s:de,S:L,u:V,U:B,V:Q,w:U,W:j,x:null,X:null,y:H,Y:q,Z:z,"%":ce},Ke={a:Oe,A:Ae,b:Te,B:Re,c:null,d:W,e:W,f:X,H:G,I:Y,j:K,L:J,m:Z,M:ee,p:Me,Q:pe,s:de,S:te,u:ne,U:ie,V:oe,w:re,W:se,x:null,X:null,y:ae,Y:ue,Z:le,"%":ce},Je={a:u,A:he,b:fe,B:me,c:ye,d:C,e:C,f:O,H:w,I:w,j:S,L:E,m:b,M:x,p:a,Q:T,s:R,S:_,u:d,U:h,V:f,w:p,W:m,x:ge,X:ve,y:g,Y:y,Z:v,"%":A};return Ye.x=t(Fe,Ye),Ye.X=t($e,Ye),Ye.c=t(Ie,Ye),Ke.x=t(Fe,Ke),Ke.X=t($e,Ke),Ke.c=t(Ie,Ke),{format:function(e){var n=t(e+="",Ye);return n.toString=function(){return e},n},parse:function(e){var t=n(e+="",i);return t.toString=function(){return e},t},utcFormat:function(e){var n=t(e+="",Ke);return n.toString=function(){return e},n},utcParse:function(e){var t=n(e,o);return t.toString=function(){return e},t}}}function a(e,t,n){var i=e<0?"-":"",o=(i?-e:e)+"",r=o.length;return i+(r68?1900:2e3),n+i[0].length):-1}function v(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function b(e,t,n){var i=xe.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function C(e,t,n){var i=xe.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function S(e,t,n){var i=xe.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function w(e,t,n){var i=xe.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function x(e,t,n){var i=xe.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function _(e,t,n){var i=xe.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function E(e,t,n){var i=xe.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function O(e,t,n){var i=xe.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function A(e,t,n){var i=_e.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function T(e,t,n){var i=xe.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function R(e,t,n){var i=xe.exec(t.slice(n));return i?(e.Q=1e3*+i[0],n+i[0].length):-1}function M(e,t){return a(e.getDate(),t,2)}function I(e,t){return a(e.getHours(),t,2)}function F(e,t){return a(e.getHours()%12||12,t,2)}function $(e,t){return a(1+Se.a.count(Object(Se.D)(e),e),t,3)}function D(e,t){return a(e.getMilliseconds(),t,3)}function P(e,t){return D(e,t)+"000"}function N(e,t){return a(e.getMonth()+1,t,2)}function k(e,t){return a(e.getMinutes(),t,2)}function L(e,t){return a(e.getSeconds(),t,2)}function V(e){var t=e.getDay();return 0===t?7:t}function B(e,t){return a(Se.t.count(Object(Se.D)(e),e),t,2)}function Q(e,t){var n=e.getDay();return e=n>=4||0===n?Object(Se.v)(e):Se.v.ceil(e),a(Se.v.count(Object(Se.D)(e),e)+(4===Object(Se.D)(e).getDay()),t,2)}function U(e){return e.getDay()}function j(e,t){return a(Se.l.count(Object(Se.D)(e),e),t,2)}function H(e,t){return a(e.getFullYear()%100,t,2)}function q(e,t){return a(e.getFullYear()%1e4,t,4)}function z(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+a(t/60|0,"0",2)+a(t%60,"0",2)}function W(e,t){return a(e.getUTCDate(),t,2)}function G(e,t){return a(e.getUTCHours(),t,2)}function Y(e,t){return a(e.getUTCHours()%12||12,t,2)}function K(e,t){return a(1+Se.F.count(Object(Se._7)(e),e),t,3)}function J(e,t){return a(e.getUTCMilliseconds(),t,3)}function X(e,t){return J(e,t)+"000"}function Z(e,t){return a(e.getUTCMonth()+1,t,2)}function ee(e,t){return a(e.getUTCMinutes(),t,2)}function te(e,t){return a(e.getUTCSeconds(),t,2)}function ne(e){var t=e.getUTCDay();return 0===t?7:t}function ie(e,t){return a(Se.X.count(Object(Se._7)(e),e),t,2)}function oe(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Object(Se.Z)(e):Se.Z.ceil(e),a(Se.Z.count(Object(Se._7)(e),e)+(4===Object(Se._7)(e).getUTCDay()),t,2)}function re(e){return e.getUTCDay()}function se(e,t){return a(Se.P.count(Object(Se._7)(e),e),t,2)}function ae(e,t){return a(e.getUTCFullYear()%100,t,2)}function ue(e,t){return a(e.getUTCFullYear()%1e4,t,4)}function le(){return"+0000"}function ce(){return"%"}function pe(e){return+e}function de(e){return Math.floor(+e/1e3)}function he(e){return ye=s(e),ge=ye.format,ve=ye.parse,be=ye.utcFormat,Ce=ye.utcParse,ye}function fe(e){return e.toISOString()}function me(e){var t=new Date(e);return isNaN(t)?null:t}var ye,ge,ve,be,Ce,Se=n(129),we={"-":"",_:" ",0:"0"},xe=/^\s*\d+/,_e=/^%/,Ee=/[\\^$*+?|[\]().{}]/g;he({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Oe=Date.prototype.toISOString?fe:be("%Y-%m-%dT%H:%M:%S.%LZ"),Ae=Oe,Te=+new Date("2000-01-01T00:00:00.000Z")?me:Ce("%Y-%m-%dT%H:%M:%S.%LZ"),Re=Te;n.d(t,"d",function(){return he}),n.d(t,"c",function(){return ge}),n.d(t,"f",function(){return ve}),n.d(t,"g",function(){return be}),n.d(t,"h",function(){return Ce}),n.d(t,"e",function(){return s}),n.d(t,"a",function(){return Ae}),n.d(t,"b",function(){return Re})},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]=256?this.cleanCustomData(e,t-10):e.join(";")},t.prototype.getOmniboxAnalyticsEventCause=function(){return this.searchInterface instanceof m.StandaloneSearchInterface?d.analyticsActionCauseList.omniboxFromLink:d.analyticsActionCauseList.omniboxAnalytics},t.ID="AnalyticsSuggestions",t.options={omniboxZIndex:r.ComponentOptions.buildNumberOption({defaultValue:52,min:0}),headerTitle:r.ComponentOptions.buildLocalizedStringOption({defaultValue:c.l("SuggestedQueries")}),numberOfSuggestions:r.ComponentOptions.buildNumberOption({defaultValue:5,min:1})},t}(s.Component);t.AnalyticsSuggestions=b,h.Initialization.registerAutoCreateComponent(b)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(5),a=n(10),u=n(16),l=n(42),c=n(65),p=n(1),d=n(2),h=n(7),f=n(24),m=n(0),y=n(3);n(411);var g=n(13),v=function(e){function t(n,i,o,c){void 0===i&&(i={});var p=e.call(this,n,t.ID,o)||this;return p.element=n,p.options=i,p._window=c,p.options=r.ComponentOptions.initComponentOptions(n,t,i),s.Assert.exists(p.options.name),p.handlers=[],p._window=p._window||window,p.redirectCount=0,p.bind.onRootElement(a.QueryEvents.buildingCallOptions,p.handleBuildingCallOptions),p.bind.onRootElement(a.QueryEvents.queryError,p.handleQueryError),p.bind.onRootElement(u.InitializationEvents.nuke,p.handleNuke),p.bind.onRootElement(l.SettingsEvents.settingsPopulateMenu,function(e){e.menuData.push({text:h.l("Reauthenticate",p.options.caption),className:"coveo-authentication-provider",onOpen:function(){return p.authenticateWithProvider()},svgIcon:g.SVGIcons.icons.dropdownAuthenticate,svgIconClassName:"coveo-authentication-provider-svg"})}),p}return i(t,e),t.prototype.handleBuildingCallOptions=function(e){e.options.authentication.push(this.options.name)},t.prototype.handleQueryError=function(e){var t=e.error;t.isMissingAuthentication&&t.provider===this.options.name&&this.redirectCount<2&&-1!==this.redirectCount?(++this.redirectCount,this.authenticateWithProvider()):(this.logger.error("The AuthenticationProvider is in a redirect loop. This may be due to a back-end configuration problem."),this.redirectCount=-1)},t.prototype.authenticateWithProvider=function(){this.options.useIFrame?this.authenticateWithIFrame():this.redirectToAuthenticationProvider()},t.prototype.redirectToAuthenticationProvider=function(){this.logger.info("Redirecting to authentication provider "+this.options.name),this._window.location.href=this.getAuthenticationProviderUriForRedirect()},t.prototype.authenticateWithIFrame=function(){this.logger.info("Using iframe to retrieve authentication for provider "+this.options.name);var e,t=p.$$("iframe",{src:this.getAuthenticationProviderUriForIFrame()}).el;e=this.options.showIFrame?this.createPopupForVisibleIFrame(t):this.createPopupForWaitMessage(t);var n=this.createHandler(e,t);p.$$(this._window).one("message",n),this.handlers.push(n)},t.prototype.createHandler=function(e,t){var n=this;return function(){p.$$(t).detach(),n.logger.info("Got authentication for provider "+n.options.name+"; retrying query."),e.close(),n.queryController.executeQuery()}},t.prototype.handleNuke=function(){var e=this;m.each(this.handlers,function(t){return p.$$(e._window).off("message",t)})},t.prototype.createPopupForWaitMessage=function(e){var t=p.$$("div",{className:"coveo-waiting-for-authentication-popup"},c.DomUtils.getBasicLoadingAnimation()).el;return p.$$(e).hide(),document.body.appendChild(e),f.ModalBox.open(t,{title:h.l("Authenticating",this.options.caption),sizeMod:"small"}),f.ModalBox},t.prototype.createPopupForVisibleIFrame=function(e){p.$$(e).addClass("coveo-authentication-iframe");var t=p.$$("div",{},e).el;return f.ModalBox.open(t,{title:h.l("Authenticating",this.options.caption),className:"coveo-authentication-popup",sizeMod:"big"}),f.ModalBox},t.prototype.getAuthenticationProviderUriForRedirect=function(){return this.queryController.getEndpoint().getAuthenticationProviderUri(this.options.name,this._window.location.href,void 0)},t.prototype.getAuthenticationProviderUriForIFrame=function(){return this.queryController.getEndpoint().getAuthenticationProviderUri(this.options.name,void 0,"success")},t.ID="AuthenticationProvider",t.doExport=function(){y.exportGlobally({AuthenticationProvider:t})},t.options={name:r.ComponentOptions.buildStringOption(),caption:r.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||t.name}}),useIFrame:r.ComponentOptions.buildBooleanOption({defaultValue:!1,alias:["useIframe"]}),showIFrame:r.ComponentOptions.buildBooleanOption({defaultValue:!0,alias:["showIframe"],depend:"useIFrame"})},t}(o.Component);t.AuthenticationProvider=v,d.Initialization.registerAutoCreateComponent(v)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(2),a=n(4),u=n(3),l=n(131),c=n(1),p=n(24);n(412);var d=function(e){function t(n,i,o,u,l,c){void 0===c&&(c=p.ModalBox);var d=e.call(this,n,t.ID,o)||this;d.element=n,d.options=i,d.result=u,d._window=l,d.ModalBox=c,d.options=r.ComponentOptions.initComponentOptions(n,t,i),d._window=d._window||window;var h="";return d.options.overlayColor&&(h+="linear-gradient("+d.options.overlayColor+", "+(d.options.overlayGradient?"rgba(0,0,0,0)":d.options.overlayColor)+"), "),h+="url('"+(d.options.imageUrl||a.Utils.getFieldValue(u,d.options.imageField))+"') center center",d.element.style.background=h,d.element.style.backgroundSize="cover",s.Initialization.automaticallyCreateComponentsInsideResult(n,u),d.configureSpecialBackdropActions(),d}return i(t,e),t.prototype.configureSpecialBackdropActions=function(){if(a.Utils.getFieldValue(this.result,"ytthumbnailurl")){var e=new l.YouTubeThumbnail(c.$$("div").el,{embed:!0},this.getBindings(),this.result,this.ModalBox);c.$$(this.element).on("click",function(t){c.$$(t.target).hasClass("CoveoResultLink")||e.openResultLink()})}},t.ID="Backdrop",t.doExport=function(){u.exportGlobally({Backdrop:t})},t.options={imageUrl:r.ComponentOptions.buildStringOption(),imageField:r.ComponentOptions.buildFieldOption(),overlayColor:r.ComponentOptions.buildColorOption(),overlayGradient:r.ComponentOptions.buildBooleanOption({defaultValue:!1,depend:"overlayColor"})},t}(o.Component);t.Backdrop=d,s.Initialization.registerAutoCreateComponent(d)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),r=n(2),s=n(97),a=n(19),u=n(5),l=n(1),c=n(0),p=n(3),d=function(e){function t(n,i,r,s){var a=e.call(this,n,o.ComponentOptions.initComponentOptions(n,t,i),r,s,t.ID)||this;return a.options=i,c.isString(a.options.colors)&&(a.options.colors=t.parseColors(a.options.colors)),null==a.options.colors.values&&(a.options.colors.values={}),a}return i(t,e),t.parseColors=function(e){if(e){if(t.colorsRegex.test(e)){var n={values:{}},i=a.StringUtils.match(e,t.colorRegex);return c.each(i,function(e){var t=e[1],i=e[2];null!=t?n.values[t.replace(/\\(:|;)/g,"$1")]={icon:i}:n.icon=i}),n}try{return JSON.parse(e)}catch(t){u.Assert.fail("Invalid colors for badge '"+e+"'")}}return{}},t.prototype.getColor=function(e){void 0===e&&(e="");var t=c.find(c.keys(this.options.colors.values),function(t){return e.toLowerCase()==t.toLowerCase()}),n=t?this.options.colors.values[t]:{};return{icon:n.icon||this.options.colors.icon,text:n.text||this.options.colors.text}},t.prototype.renderOneValue=function(t){var n=e.prototype.renderOneValue.call(this,t);l.$$(n).addClass("coveo-value");var i=this.getColor(t),o=l.$$("span",{className:"coveo-badge-icon"}).el;null!=i.icon&&(o.style.color=i.icon);var r=l.$$("span",{className:"coveo-badge-label"},n.innerHTML).el;return null!=i.text&&(r.style.color=i.text),l.$$(n).empty(),n.appendChild(o),n.appendChild(r),n},t.prototype.prependTextCaptionToDom=function(){},t.ID="Badge",t.doExport=function(){p.exportGlobally({Badge:t})},t.options={colors:o.ComponentOptions.buildCustomOption(function(e){return t.parseColors(e)},{defaultValue:{values:{}}}),textCaption:o.ComponentOptions.buildLocalizedStringOption()},t.parent=s.FieldValue,t.colorRegex=/(?:\s*((?:[^:;]|\\[;:])*)\s*:\s*)?(\w+|#[A-Fa-f0-9]{6}|#[A-Fa-f0-9]{3})/g,t.colorsRegex=new RegExp("^(\\s*"+t.colorRegex.source+"\\s*;)*(\\s*"+t.colorRegex.source+")?\\s*$"),t}(s.FieldValue);t.Badge=d,d.options=c.omit(d.options,"textCaption"),r.Initialization.registerAutoCreateComponent(d)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(413);var o=n(0),r=n(37),s=n(16),a=n(10),u=n(3),l=n(7),c=n(17),p=n(1),d=n(14),h=n(13),f=n(9),m=n(6),y=n(8),g=n(2),v=function(e){function t(n,i,o){var a=e.call(this,n,t.ID,o)||this;return a.element=n,a.options=i,a.options=y.ComponentOptions.initComponentOptions(n,t,i),a.bind.oneRootElement(s.InitializationEvents.afterInitialization,function(){return a.handleAfterInitialization()}),a.bind.onRootElement(r.BreadcrumbEvents.redrawBreadcrumb,function(){return a.redrawBreadcrumb()}),a.element.style.display="none",a}return i(t,e),t.prototype.getBreadcrumbs=function(){var e={breadcrumbs:[]};return this.bind.trigger(this.root,r.BreadcrumbEvents.populateBreadcrumb,e),this.logger.debug("Retrieved breadcrumbs",e.breadcrumbs),this.lastBreadcrumbs=e.breadcrumbs,e.breadcrumbs},t.prototype.clearBreadcrumbs=function(){var e={};this.bind.trigger(this.root,r.BreadcrumbEvents.clearBreadcrumb,e),this.logger.debug("Clearing breadcrumbs"),this.usageAnalytics.logSearchEvent(f.analyticsActionCauseList.breadcrumbResetAll,{}),this.queryController.executeQuery()},t.prototype.drawBreadcrumb=function(e){var t=this;p.$$(this.element).empty(),0!=e.length?this.element.style.display="":this.element.style.display="none";var n=document.createElement("div");p.$$(n).addClass("coveo-breadcrumb-items"),this.element.appendChild(n),o.each(e,function(e){var t=e.element;p.$$(t).addClass("coveo-breadcrumb-item"),n.appendChild(t)});var i=p.$$("div",{className:"coveo-breadcrumb-clear-all",title:l.l("ClearAllFilters")}).el;(new c.AccessibleButton).withElement(i).withSelectAction(function(){return t.clearBreadcrumbs()}).withOwner(this.bind).withLabel(l.l("ClearAllFilters")).build();var r=p.$$("div",{className:"coveo-icon coveo-breadcrumb-clear-all-icon"},h.SVGIcons.icons.checkboxHookExclusionMore).el;d.SVGDom.addClassToSVGInContainer(r,"coveo-breadcrumb-clear-all-svg"),i.appendChild(r);var s=p.$$("div",void 0,l.l("Clear","")).el;i.appendChild(s),this.element.appendChild(i)},t.prototype.redrawBreadcrumb=function(){this.lastBreadcrumbs?this.drawBreadcrumb(this.lastBreadcrumbs):this.drawBreadcrumb(this.getBreadcrumbs())},t.prototype.handleDeferredQuerySuccess=function(){this.drawBreadcrumb(this.getBreadcrumbs())},t.prototype.handleQueryError=function(){this.drawBreadcrumb(this.getBreadcrumbs())},t.prototype.handleAfterInitialization=function(){var e=this;this.bind.onRootElement(a.QueryEvents.deferredQuerySuccess,function(){return e.handleDeferredQuerySuccess()}),this.bind.onRootElement(a.QueryEvents.queryError,function(){return e.handleQueryError()})},t.ID="Breadcrumb",t.options={},t.doExport=function(){u.exportGlobally({Breadcrumb:t})},t}(m.Component);t.Breadcrumb=v,g.Initialization.registerAutoCreateComponent(v)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(2),a=n(5),u=n(1),l=n(29),c=n(0),p=n(3);n(414);var d=n(13),h=n(14),f=function(e){function t(n,i,o,s){var l=e.call(this,n,t.ID,o)||this;return l.element=n,l.options=i,l.result=s,l.removedTabIndexElements=[],l.options=r.ComponentOptions.initComponentOptions(n,t,i),l.parentResult=u.$$(l.element).closest("CoveoResult"),a.Assert.check(void 0!==l.parentResult,"ActionBar needs to be a child of a Result"),l.options.hidden?(u.$$(l.parentResult).addClass("coveo-clickable"),l.appendArrow(),l.bindEvents(),c.forEach(u.$$(l.element).findAll("*"),function(e){e.hasAttribute("tabindex")&&"0"==e.getAttribute("tabindex")&&(l.removedTabIndexElements.push(e),e.removeAttribute("tabindex"))})):(l.element.style.transition="none",l.element.style.transform="none"),l}return i(t,e),t.prototype.show=function(){u.$$(this.element).addClass("coveo-opened"),c.forEach(this.removedTabIndexElements,function(e){e.setAttribute("tabindex","0")})},t.prototype.hide=function(){u.$$(this.element).removeClass("coveo-opened"),c.forEach(this.removedTabIndexElements,function(e){e.removeAttribute("tabindex")})},t.prototype.bindEvents=function(){var e=this;u.$$(this.parentResult).on("click",function(){return e.show()}),u.$$(this.parentResult).on("mouseleave",function(){return e.hide()}),this.options.openOnMouseOver&&u.$$(this.arrowContainer).on("mouseenter",function(){return e.show()})},t.prototype.appendArrow=function(){var e=this;this.arrowContainer=u.$$("div",{className:"coveo-card-action-bar-arrow-container",tabindex:0}).el,this.bind.on(this.arrowContainer,"keyup",l.KeyboardUtils.keypressAction(l.KEYBOARD.ENTER,function(){return e.show()}));var t=u.$$("span",{className:"coveo-icon coveo-card-action-bar-arrow-icon"},d.SVGIcons.icons.arrowUp);h.SVGDom.addClassToSVGInContainer(t.el,"coveo-card-action-bar-arrow-svg"),this.arrowContainer.appendChild(t.el),this.parentResult.appendChild(this.arrowContainer)},t.ID="CardActionBar",t.doExport=function(){p.exportGlobally({CardActionBar:t})},t.options={hidden:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),openOnMouseOver:r.ComponentOptions.buildBooleanOption({defaultValue:!0,depend:"hidden"})},t}(o.Component);t.CardActionBar=f,s.Initialization.registerAutoCreateComponent(f)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(2),a=n(415),u=n(1),l=n(5),c=n(29),p=n(3);n(416);var d=n(13),h=n(14),f=n(4),m=function(e){function t(n,i,o){var s=e.call(this,n,t.ID,o)||this;return s.element=n,s.options=i,s.options=r.ComponentOptions.initComponentOptions(n,t,i),s.parentCard=u.$$(s.element).closest(".CoveoResult"),l.Assert.exists(s.parentCard),u.$$(s.parentCard).addClass("coveo-with-card-overlay"),s.createOverlay(),s.createButton(s.element),s.closeOverlay(),s}return i(t,e),t.prototype.toggleOverlay=function(e){void 0!==e?e?this.openOverlay():this.closeOverlay():u.$$(this.overlay).hasClass("coveo-opened")?this.closeOverlay():this.openOverlay()},t.prototype.openOverlay=function(){u.$$(this.overlay).removeClass("coveo-hidden-for-tab-nav"),u.$$(this.overlay).addClass("coveo-opened"),u.$$(this.parentCard).addClass("coveo-card-overlay-opened"),this.bind.trigger(this.element,a.CardOverlayEvents.openCardOverlay)},t.prototype.closeOverlay=function(){u.$$(this.overlay).addClass("coveo-hidden-for-tab-nav"),u.$$(this.overlay).removeClass("coveo-opened"),u.$$(this.parentCard).removeClass("coveo-card-overlay-opened"),this.bind.trigger(this.element,a.CardOverlayEvents.closeCardOverlay)},t.prototype.createOverlay=function(){var e=this;this.overlay=u.$$("div",{className:"coveo-card-overlay"}).el;var t=u.$$("div",{className:"coveo-card-overlay-header"}).el;this.createButton(t),this.overlay.appendChild(t);for(var n=u.$$("div",{className:"coveo-card-overlay-body"}).el;this.element.childNodes.length>0;)n.appendChild(this.element.firstChild);this.overlay.appendChild(n);var i=u.$$("span",{className:"coveo-icon coveo-open-card-overlay"},d.SVGIcons.icons.arrowDown);h.SVGDom.addClassToSVGInContainer(i.el,"coveo-open-card-overlay-svg");var o=u.$$("div",{className:"coveo-card-overlay-footer",tabindex:"0"},i.el);o.on("click",function(){return e.toggleOverlay(!1)}),this.bind.on(o.el,"keyup",c.KeyboardUtils.keypressAction(c.KEYBOARD.ENTER,function(){return e.toggleOverlay(!1)})),this.overlay.appendChild(o.el),this.parentCard.appendChild(this.overlay)},t.prototype.createButton=function(e){var t=this;if(this.options.icon){var n=u.$$("span",{className:"coveo-icon "},d.SVGIcons.icons[this.options.icon]).el;e.appendChild(n),h.SVGDom.addClassToSVGInContainer(e,"coveo-"+f.Utils.toDashCase(this.options.icon)+"-svg")}e.appendChild(u.$$("span",{className:"coveo-label"},this.options.title).el),e.setAttribute("tabindex","0"),u.$$(e).on("click",function(){return t.toggleOverlay()}),this.bind.on(e,"keyup",c.KeyboardUtils.keypressAction(c.KEYBOARD.ENTER,function(){return t.toggleOverlay()}))},t.ID="CardOverlay",t.doExport=function(){p.exportGlobally({CardOverlay:t})},t.options={title:r.ComponentOptions.buildLocalizedStringOption({required:!0,defaultValue:"NoTitle"}),icon:r.ComponentOptions.buildIconOption()},t}(o.Component);t.CardOverlay=m,s.Initialization.registerAutoCreateComponent(m)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=n(8),s=n(6),a=n(4),u=n(1),l=n(7),c=n(164),p=n(3),d=function(e){function t(n,i,o,s){var l=e.call(this,n,t.ID,o)||this;if(l.element=n,l.options=i,l.bindings=o,l.result=s,l.options=r.ComponentOptions.initComponentOptions(n,t,i),!a.Utils.isNullOrUndefined(a.Utils.getFieldValue(s,"sflikedby"))&&!a.Utils.isNullOrUndefined(a.Utils.getFieldValue(s,"sflikedbyid"))){var c=a.Utils.getFieldValue(s,"sflikedby").split(";"),p=a.Utils.getFieldValue(s,"sflikedbyid").split(";"),d=u.$$("div",{className:"coveo-chatter-result-box-row"});u.$$(n).append(d.el);var h=u.$$("div",{className:"coveo-sprites-common-thumbup_inactive coveo-chatter-result-box-icon"});d.append(h.el);var f=u.$$("div",{className:"coveo-chatter-result-likes"});d.append(f.el),l.renderLikesList(f.el,s,c,p,l.options.nbLikesToRender)}return l}return i(t,e),t.prototype.renderLikesList=function(e,t,n,i,o){for(var r=this,s=u.$$("div"),a=0;a0){var d=u.$$("span");d.el.innerHTML=l.l("LikesThis",s.el.innerHTML,i.length),u.$$(e).append(d.el)}},t.prototype.renderLikeLink=function(e,t,n){var i=u.$$("a",{href:c.ChatterUtils.buildURI(e.clickUri,a.Utils.getFieldValue(e,"sffeeditemid"),n)});return i.text(t),i.el},t.ID="ChatterLikedBy",t.doExport=function(){p.exportGlobally({ChatterLikedBy:t})},t.options={nbLikesToRender:r.ComponentOptions.buildNumberOption({defaultValue:2,min:0}),openInPrimaryTab:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),openInSubTab:r.ComponentOptions.buildBooleanOption({defaultValue:!0})},t}(s.Component);t.ChatterLikedBy=d,o.Initialization.registerAutoCreateComponent(d)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(4),s=n(164),a=n(7),u=n(2),l=n(1),c=n(3),p=function(e){function t(n,i,o,u){var c=e.call(this,n,t.ID,o)||this;if(c.element=n,c.options=i,c.bindings=o,c.result=u,!r.Utils.isNullOrUndefined(r.Utils.getFieldValue(u,"sfcontentversionid"))){var p=l.$$("div",{className:"coveo-chatter-result-box-row"});l.$$(n).append(p.el);var d=l.$$("div",{className:"coveo-sprites-common-system coveo-chatter-result-box-icon"});p.append(d.el);var h=l.$$("a",{href:s.ChatterUtils.buildURI(u.clickUri,r.Utils.getFieldValue(u,"sffeeditemid"),r.Utils.getFieldValue(u,"sfcontentversionid"))});p.append(h.el);var f=r.Utils.getFirstAvailableFieldValue(u,["sfcontentfilename","sftitle","sf_title"]);r.Utils.isNullOrUndefined(f)?h.text(a.l("ShowAttachment")):h.text(f)}return c}return i(t,e),t.ID="ChatterPostAttachment",t.doExport=function(){c.exportGlobally({ChatterPostAttachment:t})},t}(o.Component);t.ChatterPostAttachment=p,u.Initialization.registerAutoCreateComponent(p)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(164),a=n(2),u=n(7),l=n(4),c=n(1),p=n(3),d=function(e){function t(n,i,o,s){var a=e.call(this,n,t.ID,o)||this;if(a.element=n,a.options=i,a.bindings=o,a.result=s,a.options=r.ComponentOptions.initComponentOptions(n,t,i),null!=l.Utils.getFieldValue(a.result,"sfcreatedbyname")){var p=c.$$("span");if(p.text((a.options.useFromInstead?u.l("From"):u.l("PostedBy"))+" "),c.$$(n).append(p.el),c.$$(n).append(a.renderLink(l.Utils.getFieldValue(a.result,"sfcreatedbyname"),l.Utils.getFieldValue(a.result,"sfcreatedbyid"))),a.options.enablePostedOn&&!l.Utils.isNullOrUndefined(l.Utils.getFieldValue(a.result,"sfparentname"))&&!l.Utils.isNullOrUndefined(l.Utils.getFieldValue(a.result,"sfparentid")))if(l.Utils.isNullOrUndefined(l.Utils.getFieldValue(a.result,"sfuserid"))||l.Utils.getFieldValue(a.result,"sfuserid")==l.Utils.getFieldValue(a.result,"sfinsertedbyid")){if(l.Utils.isNullOrUndefined(l.Utils.getFieldValue(a.result,"sfuserid"))){var d=c.$$("span");d.text(" "+u.l("On").toLowerCase()+" "),c.$$(n).append(d.el),c.$$(n).append(a.renderLink(l.Utils.getFieldValue(a.result,"sfparentname"),l.Utils.getFieldValue(a.result,"sfparentid")))}}else{var h=c.$$("span"),f=" "+u.l("OnFeed",a.renderLink(l.Utils.getFieldValue(a.result,"sfparentname"),l.Utils.getFieldValue(a.result,"sfparentid")).outerHTML);h.el.innerHTML=f,c.$$(n).append(h.el)}}return a}return i(t,e),t.prototype.renderLink=function(e,t){var n=c.$$("a",{href:s.ChatterUtils.buildURI(this.result.clickUri,l.Utils.getFieldValue(this.result,"sffeeditemid"),t)});return n.text(e),s.ChatterUtils.bindClickEventToElement(n.el,this.options.openInPrimaryTab,this.options.openInSubTab)},t.ID="ChatterPostedBy",t.doExport=function(){p.exportGlobally({ChatterPostedBy:t})},t.options={enablePostedOn:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),useFromInstead:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),openInPrimaryTab:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),openInSubTab:r.ComponentOptions.buildBooleanOption({defaultValue:!0})},t.fields=["sfcreatedbyname","sfcreatedbyid","sffeeditemid","sfuserid","sfinsertedbyid","sfparentid","sfparentname"],t}(o.Component);t.ChatterPostedBy=d,a.Initialization.registerAutoCreateComponent(d)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(4),s=n(2),a=n(1),u=n(3),l=function(e){function t(n,i,o,s){var u=e.call(this,n,t.ID,o)||this;if(u.element=n,u.options=i,u.bindings=o,u.result=s,!r.Utils.isNullOrUndefined(r.Utils.getFieldValue(u.result,"coveochatterfeedtopics"))){var l=a.$$("div",{className:"coveo-chatter-result-box-row"}),c=r.Utils.getFieldValue(s,"coveochatterfeedtopics").split(";"),p=a.$$("div",{className:"coveo-sprites-common-tagging_tag coveo-chatter-result-box-icon"});l.append(p.el);for(var d=0;d'+p.StringUtils.htmlEncode(t)+""),this.element.appendChild(i);var o=c.$$("div",{className:"coveo-did-you-mean-automatic-correct"}).el;o.innerHTML=l.l("autoCorrectedQueryTo",''+n+""),this.element.appendChild(o),c.$$(this.element).show(),this.usageAnalytics.logSearchEvent(h.analyticsActionCauseList.didyoumeanAutomatic,{})}},t.prototype.handleProcessNewQueryResults=function(e){var t=this;a.Assert.exists(e),a.Assert.exists(e.results);var n=e.results;if(this.logger.trace("Received query results from new query",n),d.Utils.isNonEmptyArray(n.queryCorrections)){var i=this.buildCorrectedSentence(n.queryCorrections[0]);this.correctedTerm=n.queryCorrections[0].correctedQuery;var o=c.$$("div",{className:"coveo-did-you-mean-suggestion"},l.l("didYouMean","")).el;this.element.appendChild(o);var r=c.$$("a",{},i).el;o.appendChild(r),c.$$(r).on("click",function(){t.doQueryWithCorrectedTerm()}),c.$$(this.element).show()}},t.prototype.buildCorrectedSentence=function(e){var t=[],n=0;return o.each(e.wordCorrections,function(i){t.push(p.StringUtils.htmlEncode(e.correctedQuery.slice(n,i.offset))),n=i.offset,t.push(""),t.push(p.StringUtils.htmlEncode(e.correctedQuery.slice(n,i.length+n))),t.push(""),n=i.offset+i.length}),t.push(p.StringUtils.htmlEncode(e.correctedQuery.slice(n))),t.join("")},t.ID="DidYouMean",t.doExport=function(){r.exportGlobally({DidYouMean:t})},t.options={enableAutoCorrection:m.ComponentOptions.buildBooleanOption({defaultValue:!0})},t}(f.Component);t.DidYouMean=g,y.Initialization.registerAutoCreateComponent(g)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0))return[3,5];t=e.shift(),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t.getPosition()];case 2:return n=o.sent(),n.latitude&&n.longitude?[2,n]:[3,4];case 3:return i=o.sent(),this.logger.warn("An error occurred while trying to resolve the position within a position provider.",i),[3,4];case 4:return[3,0];case 5:return[2]}})})},t.prototype.triggerDistanceNotSet=function(){this.isFirstPositionResolved=!0,this.logger.warn("None of the given position providers could resolve the current position. The distance field will not be calculated and the distance components will be disabled until the next call to 'setPosition'."),this.bind.trigger(this.element,a.DistanceEvents.onPositionNotResolved,{}),this.disable()},t.prototype.registerDistanceQuery=function(){var e=this;this.bind.onRootElement(p.QueryEvents.buildingQuery,function(t){if(e.isFirstPositionResolved&&t&&t.queryBuilder){var n={function:e.getConvertedUnitsFunction("dist("+e.options.latitudeField+", "+e.options.longitudeField+", "+e.latitude+", "+e.longitude+")"),fieldName:""+e.options.distanceField};t.queryBuilder.queryFunctions.push(n),e.enableDistanceComponents()}})},t.prototype.enableDistanceComponents=function(){var e=this;s.$$(this.root).findAll("."+this.options.disabledDistanceCssClass).forEach(function(t){try{t.classList.remove(e.options.disabledDistanceCssClass);var n=h.get(t);n&&n.enable()}catch(n){e.logger.error("Could not re-enable distance component.",n,t)}})},t.prototype.getConvertedUnitsFunction=function(e){return e+"/"+this.options.unitConversionFactor},t.ID="DistanceResources",t.doExport=function(){f.exportGlobally({DistanceResources:t})},t.options={distanceField:c.ComponentOptions.buildFieldOption({required:!0}),latitudeField:c.ComponentOptions.buildFieldOption({required:!0}),longitudeField:c.ComponentOptions.buildFieldOption({required:!0}),unitConversionFactor:c.ComponentOptions.buildNumberOption({defaultValue:1e3,validator:function(e){return!!e&&e>0}}),disabledDistanceCssClass:c.ComponentOptions.buildStringOption({defaultValue:"coveo-distance-disabled"}),latitudeValue:c.ComponentOptions.buildNumberOption({float:!0}),longitudeValue:c.ComponentOptions.buildNumberOption({float:!0}),googleApiKey:c.ComponentOptions.buildStringOption(),useNavigator:c.ComponentOptions.buildBooleanOption(),triggerNewQueryOnNewPosition:c.ComponentOptions.buildBooleanOption({defaultValue:!1}),cancelQueryUntilPositionResolved:c.ComponentOptions.buildBooleanOption({defaultValue:!0})},t}(l.Component);t.DistanceResources=v,d.Initialization.registerAutoCreateComponent(v)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(1),a=n(10),u=n(9),l=n(7),c=n(5),p=n(2),d=n(3);n(421);var h=n(17),f=function(e){function t(n,i,o){var u=e.call(this,n,t.ID,o)||this;return u.element=n,u.options=i,u.options=r.ComponentOptions.initComponentOptions(n,t,i),u.container=s.$$("div",{className:"coveo-error-report-container"}),u.element.appendChild(u.container.el),u.options.showDetailedError&&(u.message=s.$$("div",{className:"coveo-error-report-message"}),u.container.append(u.message.el)),u.helpSuggestion=s.$$("div",{className:"coveo-error-report-help-suggestion"}),s.$$(u.element).hide(),u.bind.onRootElement(a.QueryEvents.newQuery,function(){return u.handleNewQuery()}),u.bind.onRootElement(a.QueryEvents.queryError,function(e){return u.handleQueryError(e)}),u}return i(t,e),t.prototype.back=function(){this.usageAnalytics.logCustomEvent(u.analyticsActionCauseList.errorBack,{},this.root),this.usageAnalytics.logSearchEvent(u.analyticsActionCauseList.errorBack,{}),history.back()},t.prototype.reset=function(){this.queryStateModel.reset(),this.usageAnalytics.logSearchEvent(u.analyticsActionCauseList.errorClearQuery,{}),this.usageAnalytics.logCustomEvent(u.analyticsActionCauseList.errorClearQuery,{},this.root),this.queryController.executeQuery()},t.prototype.retry=function(){this.usageAnalytics.logSearchEvent(u.analyticsActionCauseList.errorRetry,{}),this.usageAnalytics.logCustomEvent(u.analyticsActionCauseList.errorRetry,{},this.root),this.queryController.executeQuery()},t.prototype.buildOrGetTitleElements=function(){var e,t=s.$$(this.element).find(".coveo-error-report-title");t?e=s.$$(t):(e=s.$$("div",{className:"coveo-error-report-title"}),this.container.prepend(e.el));var n=e.find("h1");n||(n=s.$$("h1").el,e.append(n));var i=e.find("h2");return i||(i=s.$$("h2").el,e.append(i)),{title:e,h1:s.$$(n),h2:s.$$(i)}},t.prototype.setErrorTitle=function(e,t){var n={h1:e?l.l(e):l.l("OopsError"),h2:t?l.l(t):l.l("ProblemPersists")},i=this.buildOrGetTitleElements(),o=i.h1,r=i.h2;o&&r&&(s.$$(o).text(n.h1),s.$$(r).text(n.h2))},t.prototype.buildPrevious=function(){var e=this,t=s.$$("span",{className:"coveo-error-report-previous"},l.l("GoBack"));return(new h.AccessibleButton).withElement(t).withSelectAction(function(){return e.back()}).withLabel(l.l("GoBack")).build(),t.el},t.prototype.buildReset=function(){var e=this,t=s.$$("span",{className:"coveo-error-report-clear"},l.l("Reset"));return(new h.AccessibleButton).withElement(t).withSelectAction(function(){return e.reset()}).withLabel(l.l("Reset")).build(),t.el},t.prototype.buildRetry=function(){var e=this,t=s.$$("span",{className:"coveo-error-report-retry"},l.l("Retry"));return(new h.AccessibleButton).withElement(t).withSelectAction(function(){return e.retry()}).withLabel(l.l("Retry")).build(),t.el},t.prototype.handleNewQuery=function(){s.$$(this.element).hide();var e=this.buildOrGetTitleElements(),t=e.h1,n=e.h2;t.remove(),n.remove(),null!=this.closePopup&&this.closePopup()},t.prototype.handleQueryError=function(e){var t=this;if(c.Assert.exists(e),c.Assert.exists(e.error),e.endpoint.options.queryStringArguments.organizationId?this.organizationId=e.endpoint.options.queryStringArguments.organizationId:this.organizationId=l.l("CoveoOrganization"),!e.error.isMissingAuthentication){switch(e.error.name){case"NoEndpointsException":this.options.showDetailedError=!1,this.buildEndpointErrorElements("http://www.coveo.com/go?dest=cloudhelp&lcid=9&context=257"),this.setErrorTitle(l.l("NoEndpoints",this.organizationId),l.l("AddSources"));break;case"InvalidTokenException":this.options.showDetailedError=!1,this.buildEndpointErrorElements("https://developers.coveo.com/x/XICE"),this.setErrorTitle(l.l("CannotAccess",this.organizationId),l.l("InvalidToken"));break;default:this.buildOptionsElement(),this.setErrorTitle()}if(this.options.showDetailedError){this.message.empty();var n=s.$$("span",{className:"coveo-error-report-more-info"},l.l("MoreInfo"));n.on("click",function(){n.empty(),t.message.el.appendChild(t.buildErrorInfo(e.error))}),this.message.el.appendChild(n.el)}s.$$(this.element).show()}},t.prototype.buildErrorInfo=function(e){var t=s.$$("div",{className:"coveo-error-info"}),n=s.$$("textarea",void 0,JSON.stringify(e,null,2));t.el.appendChild(n.el);var i=s.$$("div",{className:"coveo-error-info-label"},l.l("CopyPasteToSupport"));return t.el.appendChild(i.el),t.el},t.prototype.buildOptionsElement=function(){var e=this.container.find(".coveo-error-report-options");e&&s.$$(e).remove();var t=s.$$("div",{className:"coveo-error-report-options"});t.el.appendChild(this.buildPrevious()),t.el.appendChild(this.buildReset()),t.el.appendChild(this.buildRetry()),this.container.append(t.el)},t.prototype.buildEndpointErrorElements=function(e){void 0===e&&(e="http://www.coveo.com/go?dest=cloudhelp&lcid=9&context=254"),this.helpSuggestion.empty();var t=s.$$("a",{href:e,className:"coveo-error-report-help-link"});t.setHtml(l.l("CoveoOnlineHelp")),this.helpSuggestion.append(t.el),this.container.el.insertBefore(this.helpSuggestion.el,this.message.el)},t.ID="ErrorReport",t.doExport=function(){d.exportGlobally({ErrorReport:t})},t.options={showDetailedError:r.ComponentOptions.buildBooleanOption({defaultValue:!0})},t}(o.Component);t.ErrorReport=f,p.Initialization.registerAutoCreateComponent(f)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(5),a=n(51),u=n(2),l=n(3);n(422);var c=function(e){function t(n,i,o,u){var l=e.call(this,n,t.ID,o)||this;return l.element=n,l.options=i,l.bindings=o,l.result=u,l.options=r.ComponentOptions.initComponentOptions(n,t,i),l.result=l.result||l.resolveResult(),s.Assert.exists(l.result),l.element.innerHTML=a.HighlightUtils.highlightString(l.result.excerpt,l.result.excerptHighlights,null,"coveo-highlight"),l}return i(t,e),t.ID="Excerpt",t.doExport=function(){l.exportGlobally({Excerpt:t})},t}(o.Component);t.Excerpt=c,u.Initialization.registerAutoCreateComponent(c)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(42),a=n(9),u=n(2),l=n(7),c=n(0),p=n(3);n(423);var d=n(13),h=n(18),f=n(26),m=function(e){function t(n,i,o,a){var u=e.call(this,n,t.ID,o)||this;return u.element=n,u.options=i,u.bindings=o,u._window=a,u._window=u._window||window,u.options=r.ComponentOptions.initComponentOptions(n,t,i),u.bind.onRootElement(s.SettingsEvents.settingsPopulateMenu,function(e){e.menuData.push({text:l.l("ExportToExcel"),className:"coveo-export-to-excel",tooltip:l.l("ExportToExcelDescription"),onOpen:function(){return u.download()},svgIcon:d.SVGIcons.icons.dropdownExport,svgIconClassName:"coveo-export-to-excel-svg"})}),u}return i(t,e),t.prototype.download=function(){var e=this.queryController.getLastQuery();if(e){e=c.omit(e,["numberOfResults","fieldsToInclude"]),this.options.fieldsToInclude&&(e.fieldsToInclude=this.options.fieldsToInclude),this.logger.debug("Performing query following 'Export to Excel' click");var t=this.queryController.getEndpoint();this.usageAnalytics.logCustomEvent(a.analyticsActionCauseList.exportToExcel,{},this.element),this._window.location.replace(t.getExportToExcelLink(e,this.options.numberOfResults))}},t.create=function(e,n,i){return new t(e,n,f.get(i,h.SearchInterface).getBindings())},t.ID="ExportToExcel",t.doExport=function(){p.exportGlobally({ExportToExcel:t})},t.options={numberOfResults:r.ComponentOptions.buildNumberOption({defaultValue:100,min:1}),fieldsToInclude:r.ComponentOptions.buildFieldsOption()},t}(o.Component);t.ExportToExcel=m,u.Initialization.registerAutoCreateComponent(m)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(361),r=n(6),s=n(8),a=n(5),u=n(4),l=n(31),c=n(12),p=n(2),d=n(9),h=n(1),f=n(0),m=n(3);n(362);var y=function(e){function t(n,i,r){var c=e.call(this,n,t.ID,r)||this;c.options=i,c.options&&"omniboxSuggestionOptions"in c.options&&(c.options=f.extend(c.options,c.options.omniboxSuggestionOptions)),c.options=s.ComponentOptions.initComponentOptions(n,t,i),a.Assert.check(u.Utils.isCoveoField(c.options.field),c.options.field+" is not a valid field"),c.options.onSelect=c.options.onSelect||c.onRowSelection;var p,d=function(e){var t=h.$$("div",{className:"magic-box-suggestion coveo-omnibox-selectable coveo-top-field-suggestion-row"});return e.data&&(t.el.innerHTML=e.data),t.el.outerHTML};if(null==c.options.headerTitle)p={row:d};else{p={header:{template:function(){var e=h.$$("div",{className:"coveo-top-field-suggestion-header"}),t=h.$$("span",{className:"coveo-icon-top-field"}),n=h.$$("span",{className:"coveo-caption"});return c.options.headerTitle&&n.text(c.options.headerTitle),e.append(t.el),e.append(n.el),e.el.outerHTML},title:c.options.headerTitle},row:d}}return c.suggestionForOmnibox=new o.SuggestionForOmnibox(p,function(e,t){c.options.onSelect.call(c,e,t)},function(e,t){c.onRowTab(e,t)}),c.bind.onRootElement(l.OmniboxEvents.populateOmnibox,function(e){return c.handlePopulateOmnibox(e)}),c}return i(t,e),t.prototype.selectSuggestion=function(e){if(this.currentlyDisplayedSuggestions)if(isNaN(e))this.currentlyDisplayedSuggestions[e]&&h.$$(this.currentlyDisplayedSuggestions[e].element).trigger("click");else{var t=f.findWhere(this.currentlyDisplayedSuggestions,{pos:e});t&&h.$$(t.element).trigger("click")}},t.prototype.handlePopulateOmnibox=function(e){var t=this;a.Assert.exists(e);var n=e.completeQueryExpression.word,i=new Promise(function(i){t.queryController.getEndpoint().listFieldValues(t.buildListFieldValueRequest(n)).then(function(n){var o=t.suggestionForOmnibox.buildOmniboxElement(n,e);t.currentlyDisplayedSuggestions={},o?(f.map(h.$$(o).findAll(".coveo-omnibox-selectable"),function(e,n){t.currentlyDisplayedSuggestions[h.$$(e).text()]={element:e,pos:n}}),i({element:o,zIndex:t.options.omniboxZIndex})):i({element:void 0})}).catch(function(){i({element:void 0})})});e.rows.push({deferred:i})},t.prototype.onRowSelection=function(e,t){t.clear(),t.closeOmnibox(),this.queryStateModel.set(c.QueryStateModel.attributesEnum.q,e),this.usageAnalytics.logSearchEvent(d.analyticsActionCauseList.omniboxField,{}),this.queryController.executeQuery()},t.prototype.onRowTab=function(e,t){t.clear(),t.closeOmnibox(),this.queryStateModel.set(c.QueryStateModel.attributesEnum.q,""+e),this.usageAnalytics.logCustomEvent(d.analyticsActionCauseList.omniboxField,{},this.element)},t.prototype.buildListFieldValueRequest=function(e){return{field:this.options.field,ignoreAccents:!0,sortCriteria:"occurrences",maximumNumberOfValues:this.options.numberOfSuggestions,patternType:"Wildcards",pattern:"*"+e+"*",queryOverride:this.options.queryOverride}},t.ID="FieldSuggestions",t.doExport=function(){m.exportGlobally({FieldSuggestions:t})},t.options={field:s.ComponentOptions.buildFieldOption({required:!0}),queryOverride:s.ComponentOptions.buildQueryExpressionOption({defaultValue:""}),omniboxZIndex:s.ComponentOptions.buildNumberOption({defaultValue:51,min:0}),headerTitle:s.ComponentOptions.buildLocalizedStringOption(),numberOfSuggestions:s.ComponentOptions.buildNumberOption({defaultValue:5,min:1}),onSelect:s.ComponentOptions.buildCustomOption(function(){return null})},t}(r.Component);t.FieldSuggestions=y,p.Initialization.registerAutoCreateComponent(y)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]this.options.maximumDescriptionLength&&(e=e.slice(0,this.options.maximumDescriptionLength)+" ..."),e},t.ID="HiddenQuery",t.doExport=function(){y.exportGlobally({HiddenQuery:t})},t.options={maximumDescriptionLength:r.ComponentOptions.buildNumberOption({min:0,defaultValue:100}),title:r.ComponentOptions.buildLocalizedStringOption({defaultValue:s.l("AdditionalFilters")+": "})},t}(o.Component);t.HiddenQuery=b,h.Initialization.registerAutoCreateComponent(b)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(91),r=n(62),s=n(8),a=n(432),u=n(433),l=n(4),c=n(1),p=n(28),d=n(434),h=n(436),f=n(437),m=n(5),y=n(439),g=n(441),v=n(2),b=n(0),C=n(3);n(442);var S=n(13),w=n(14),x=function(e){function t(n,i,o){var r=e.call(this,n,i,o,t.ID)||this;return r.element=n,r.bindings=o,r.shouldReshuffleFacetValuesClientSide=!1,r.correctLevels=[],r.options=s.ComponentOptions.initComponentOptions(n,t,r.options),r.numberOfValuesToShow=r.originalNumberOfValuesToShow=r.options.numberOfValues||5,r.numberOfValues=Math.max(r.options.numberOfValues,1e4),r.options.injectionDepth=Math.max(r.options.injectionDepth,1e4),r.logger.info("Hierarchy facet: Set number of values very high in order to build hierarchy",r.numberOfValues,r),r.logger.info("Hierarchy facet: Set injection depth very high in order to build hierarchy",r.options.injectionDepth),r}return i(t,e),t.prototype.selectValue=function(t,n){void 0===n&&(n=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists([t]);var i=this.getValueFromHierarchy(t);n&&this.selectChilds(i,i.childs),this.flagParentForSelection(i),e.prototype.selectValue.call(this,t)},t.prototype.selectMultipleValues=function(t,n){var i=this;void 0===n&&(n=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists(t),b.each(t,function(e){var t=i.getValueFromHierarchy(e);i.flagParentForSelection(t),n&&b.each(t.childs,function(e){i.selectValue(e.facetValue)})}),e.prototype.selectMultipleValues.call(this,t)},t.prototype.deselectValue=function(t,n){var i=this;void 0===n&&(n=!0),this.ensureDom(),this.ensureValueHierarchyExists([t]);var o=this.getValueFromHierarchy(t);if(n){if(void 0!=o.childs){var r=b.filter(o.childs,function(e){var t=i.getFacetValueFromHierarchy(e.facetValue);return t.selected||t.excluded});o.hasChildSelected=!1,r.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,n){void 0===n&&(n=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists([t]);var i=this.getValueFromHierarchy(t);n?this.excludeChilds(i.childs):(this.deselectChilds(i,i.childs),this.close(i)),this.flagParentForSelection(i),e.prototype.excludeValue.call(this,t)},t.prototype.unexcludeValue=function(t,n){void 0===n&&(n=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists([t]);var i=this.getValueFromHierarchy(t);n&&this.unexcludeChilds(i.childs),this.unflagParentForSelection(i),e.prototype.unexcludeValue.call(this,t)},t.prototype.deselectMultipleValues=function(t,n){var i=this;void 0===n&&(n=!this.options.useAnd),this.ensureDom(),this.ensureValueHierarchyExists(t),b.each(t,function(e){var t=i.getValueFromHierarchy(e);t.hasChildSelected=!1,i.unflagParentForSelection(t),n&&b.each(t.childs,function(e){i.getValueFromHierarchy(e.facetValue).hasChildSelected=!1,i.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),n=t;return l.Utils.exists(this.options.valueCaption)&&("object"==typeof this.options.valueCaption&&(n=this.options.valueCaption[t]||n),"function"==typeof this.options.valueCaption&&(n=this.options.valueCaption.call(this,e))),n},t.prototype.getDisplayedValues=function(){var e=this,t=b.filter(this.values.getAll(),function(t){if(e.getValueFromHierarchy(t)){var n=e.getElementFromFacetValueList(t);return!c.$$(n).hasClass("coveo-inactive")}return!1});return b.pluck(t,"value")},t.prototype.updateSort=function(t){e.prototype.updateSort.call(this,t)},t.prototype.open=function(e){var t;void 0!=(t=b.isString(e)?this.getValueHierarchy(e):e instanceof o.FacetValue?this.getValueHierarchy(e.value):e)&&(c.$$(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,n=this;void 0!=(t=b.isString(e)?this.getValueHierarchy(e):e instanceof o.FacetValue?this.getValueHierarchy(e.value):e)&&(c.$$(this.getElementFromFacetValueList(t.facetValue)).removeClass("coveo-open"),this.hideChilds(t.childs),b.each(t.childs,function(e){n.close(n.getValueHierarchy(e.facetValue.value))}),this.getValueHierarchy(t.facetValue.value).keepOpened=!1)},t.prototype.reset=function(){var t=this;b.each(this.getAllValueHierarchy(),function(e){e.hasChildSelected=!1,e.allChildShouldBeSelected=!1}),b.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 u.HierarchicalFacetQueryController(this)},t.prototype.initFacetSearch=function(){this.facetSearch=new h.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 f.HierarchicalBreadcrumbValuesList(this,this.values.getSelected().concat(this.values.getExcluded()),this.getAllValueHierarchy()).buildAsString())},t.prototype.handlePopulateBreadcrumb=function(e){if(m.Assert.exists(e),this.values.hasSelectedOrExcludedValues()){var t=new f.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,n=e.completeQueryExpression.regex,i=b.first(b.filter(this.getAllValueHierarchy(),function(e){return n.test(t.getValueCaption(e.facetValue))}),this.options.numberOfValuesInOmnibox),o=b.compact(b.map(i,function(e){var n=t.getFromFacetValueList(e.facetValue);return n?n.facetValue:void 0})),r=new y.OmniboxHierarchicalValuesList(this,o,e).build();e.rows.push({element:r,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 a.HierarchicalFacetValuesList(this,g.HierarchicalFacetValueElement),this.element.appendChild(this.facetValuesList.build())},t.prototype.updateMoreLess=function(){var t=this.numberOfValuesToShowthis.originalNumberOfValuesToShow;e.prototype.updateMoreLess.call(this,n,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=b.map(e,function(e){return o.FacetValue.createFromValue(e)}));var n=!1;b.each(e,function(e){void 0==t.getValueHierarchy(e.value)&&(n=!0)}),n&&this.processHierarchy(e)},t.prototype.crop=function(){var e=this,t=b.partition(this.topLevelHierarchy,function(e){return e.facetValue.selected||e.facetValue.excluded||e.hasChildSelected}),n=this.numberOfValuesToShow-t[0].length;b.each(b.last(t[1],t[1].length-n),function(t){e.hideFacetValue(t),e.hideChilds(t.childs)}),b.each(b.first(t[1],n),function(t){e.showFacetValue(t)})},t.prototype.placeChildsUnderTheirParent=function(e,t){var n=this,i=e.childs;if(i){var o=this.facetValuesList.sortFacetValues(b.pluck(i,"facetValue")).reverse();b.each(o,function(e){var i=n.getValueFromHierarchy(e);if(i){var o=n.getElementFromFacetValueList(e);c.$$(o).insertAfter(t),i.childs&&0!=i.childs.length&&n.placeChildsUnderTheirParent(i,o)}})}e.keepOpened?(this.open(e),this.showChilds(e.childs)):this.hideChilds(e.childs)},t.prototype.addCssClassToParentAndChilds=function(e,t){var n=this;c.$$(t).addClass("coveo-has-childs"),e.hasChildSelected&&c.$$(t).addClass("coveo-has-childs-selected");var i=c.$$("span",{className:"coveo-hierarchical-facet-expand"},S.SVGIcons.icons.facetExpand),o=c.$$("span",{className:"coveo-hierarchical-facet-collapse"},S.SVGIcons.icons.facetCollapse);w.SVGDom.addClassToSVGInContainer(i.el,"coveo-hierarchical-facet-expand-svg"),w.SVGDom.addClassToSVGInContainer(o.el,"coveo-hierarchical-facet-collapse-svg");var r=c.$$("div",{className:"coveo-has-childs-toggle"},i.el,o.el).el;c.$$(r).on("click",function(){c.$$(t).hasClass("coveo-open")?n.close(e):n.open(e)}),c.$$(t).prepend(r)},t.prototype.buildParentChildRelationship=function(){var e=this,t=document.createDocumentFragment();t.appendChild(this.facetValuesList.valueContainer);var n=b.map(this.facetValuesList.sortFacetValues(),function(t){return e.getValueFromHierarchy(t)});b.each(n,function(t){var n=e.getElementFromFacetValueList(t.facetValue);l.Utils.isNonEmptyArray(t.childs)?(e.placeChildsUnderTheirParent(t,n),e.addCssClassToParentAndChilds(t,n)):c.$$(n).addClass("coveo-no-childs"),n.style.marginLeft=e.options.marginByLevel*(t.level-e.options.levelStart)+"px"}),c.$$(t).insertAfter(this.headerElement)},t.prototype.setValueListContent=function(){var e=this;this.facetValuesList.hierarchyFacetValues=b.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,n=b.map(e,function(e){var n=t.getParent(e),i=e.lookupValue||e.value;return{facetValue:e,level:t.getLevel(e),parent:n,self:i}});return this.setInHierarchy(n),b.each(this.getAllValueHierarchy(),function(e){e.facetValue.selected&&t.flagParentForSelection(e)}),n},t.prototype.processHierarchy=function(e){var t=this;void 0===e&&(e=this.values.getAll()),b.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=b.filter(e,function(e){var n=void 0==t.options.levelStart||e.level>=t.options.levelStart,i=void 0==t.options.levelEnd||e.level0?c.show():c.hide()}),c.bind.onRootElement(r.QueryEvents.queryError,function(){return c.hide()}),c}return i(t,e),t.prototype.hide=function(){a.$$(this.element).addClass("coveo-hidden")},t.prototype.show=function(){a.$$(this.element).removeClass("coveo-hidden")},t.ID="Logo",t.doExport=function(){o.exportGlobally({Logo:t})},t.options={},t}(c.Component);t.Logo=h,d.Initialization.registerAutoCreateComponent(h)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(23);n(443);var r=n(0),s=n(3),a=n(10),u=n(12),l=n(1),c=n(20),p=n(4),d=n(6),h=n(8),f=n(2),m=n(53),y=n(444),g=n(445),v=function(e){function t(n,i,o){var r=e.call(this,n,t.ID,o)||this;return r.element=n,r.options=i,r.groupByIndex=[],r.rowId="",r.columnId="",r.selectedRowValue=void 0,r.selectedColumnValue=void 0,r.numberOfRows=0,r.numberOfColumns=0,r.options=h.ComponentOptions.initComponentOptions(n,t,i),r.options.previewTemplate||(r.options.previewTemplate=new g.DefaultMatrixResultPreviewTemplate(r.options.computedField,r.options.computedFieldFormat)),r.options.previewSortField||(r.options.previewSortField=r.options.computedField),r.options.columnFieldValues.length!=r.options.columnLabels.length&&(r.options.columnLabels=r.options.columnFieldValues),r.buildMatrix(),null==r.options.rowField?r.logger.error("'rowField' option is required in the Matrix component"):null==r.options.columnField?r.logger.error("'columnField' option is required in the Matrix component"):null==r.options.computedField?r.logger.error("'computedField' option is required in the Matrix component"):(r.bindEvents(),r.initQueryState()),r}return i(t,e),t.prototype.selectCell=function(e,t){var n,i;0!==e&&e!==this.numberOfRows-1&&(n=this.getRowValue(e)),0!==t&&t!==this.numberOfColumns-1&&(i=this.getColumnValue(t)),n&&this.isRowFacetPresent()?this.queryStateModel.set(this.rowId,[n]):(this.selectedRowValue=n,this.queryStateModel.set(this.rowId,[])),i&&this.isColumnFacetPresent()?this.queryStateModel.set(this.columnId,[i]):(this.selectedColumnValue=i,this.queryStateModel.set(this.columnId,[]))},t.prototype.getSelectedColumnValue=function(){return this.selectedColumnValue},t.prototype.getSelectedRowValue=function(){return this.selectedRowValue},t.prototype.getCellElement=function(e,t){return this.data[e][t].getHTML()},t.prototype.getCellValue=function(e,t){var n=this.getCellElement(e,t);return l.$$(n).text()},t.prototype.drawMatrix=function(){var e=this,t=l.$$("div",{className:"coveo-matrix-row matrix-header-row"});this.drawRow(t.el,0);for(var n=this.options.enableColumnTotals?this.numberOfRows-1:this.numberOfRows,i=1;i0){for(var r=this,s=o.start;s<=o.end;s++)!function(e){var n=document.createElement("a");m.$$(n).addClass(["coveo-pager-list-item-text","coveo-pager-anchor"]),m.$$(n).text(e.toString(10));var i=e,o=m.$$("li",{className:"coveo-pager-list-item",tabindex:0}).el;i===r.currentPage&&m.$$(o).addClass("coveo-active");var s=function(){return t.handleClickPage(i)};(new b.AccessibleButton).withElement(o).withLabel(f.l("PageNumber",e.toString(10))).withClickAction(s).withEnterKeyboardAction(s).build(),o.appendChild(n),r.list.appendChild(o)}(s);this.options.enableNavigationButton&&o.lastResultPage>1&&this.renderNavigationButton(o)}}},t.prototype.handleNoResults=function(e){var t;if(e.results.totalCount>0){var n=this.computePagerBoundary(e.results.totalCountFiltered,e.results.totalCount).lastResultPage;this.currentPage>n&&(t=n)}else this.currentPage>this.getMaxNumberOfPagesForCurrentResultsPerPage()&&(t=this.getMaxNumberOfPagesForCurrentResultsPerPage());null!=t&&(this.currentPage=t,e.retryTheQuery=!0,this.needToReset=!1,this.ignoreNextQuerySuccess=!1,this.updateQueryStateModel(this.getFirstResultNumber(this.currentPage)))},t.prototype.reset=function(){m.$$(this.list).empty()},t.prototype.handleBuildingQuery=function(e){h.Assert.exists(e);var t=this.getQueryEventArgs();e.queryBuilder.firstResult=t.first,null==e.queryBuilder.numberOfResults&&(e.queryBuilder.numberOfResults=t.count)},t.prototype.computePagerBoundary=function(e,t){var n=this.searchInterface.resultsPerPage,i=Math.floor(e/n)+1,o=Math.min(Math.ceil(t/n),this.getMaxNumberOfPagesForCurrentResultsPerPage());o=Math.max(o,1);var r=Math.floor(this.options.numberOfPages/2),s=i-r;s=Math.max(s,1);var a=s+this.options.numberOfPages-1;return a=Math.min(a,o),{start:s,end:a,lastResultPage:o,currentPage:i}},t.prototype.renderNavigationButton=function(e){if(this.currentPage>1){var t=this.renderPreviousButton();this.list.insertBefore(t.el,this.list.firstChild)}if(this.currentPage ").el},t.prototype.buildHtmlToken=function(e,t){var n=e.charAt(0).toUpperCase()+e.slice(1),i=d.extend({},this.result,{clickUri:t,title:n,titleHighlights:this.getModifiedHighlightsForModifiedResultTitle(n)}),o=new c.ResultLink(this.buildElementForResultLink(n),this.options,this.bindings,i);return this.links.push(o),o.element},t.prototype.renderParentsXml=function(e,t){for(var n=a.Utils.parseXml(t),i=n.getElementsByTagName("parent"),o=[],r=[],s=0;s0){var u=this.buildSeparator();r.push(u),e.appendChild(u)}var l=i.item(s),c=this.buildHtmlToken(l.getAttribute("name"),l.getAttribute("uri"));o.push(c),e.appendChild(c)}},t.prototype.renderShortenedUri=function(){var e;e=-1==this.result.printableUri.indexOf("\\")?r.StringAndHoles.shortenUri(this.result.printableUri,u.$$(this.element).width()):r.StringAndHoles.shortenPath(this.result.printableUri,u.$$(this.element).width());var t=r.HighlightUtils.highlightString(e.value,this.result.printableUriHighlights,e.holes,"coveo-highlight"),n=d.extend({},this.result,{title:t,titleHighlights:this.getModifiedHighlightsForModifiedResultTitle(t)}),i=new c.ResultLink(this.buildElementForResultLink(this.result.printableUri),this.options,this.bindings,n);this.links.push(i),this.element.appendChild(i.element)},t.prototype.buildElementForResultLink=function(e){return u.$$("a",{className:"CoveoResultLink coveo-printable-uri-part",title:e}).el},t.prototype.getModifiedHighlightsForModifiedResultTitle=function(e){return p.getRestHighlightsForAllTerms(e,this.result.termsToHighlight,this.result.phrasesToHighlight,new p.DefaultStreamHighlightOptions)},t.ID="PrintableUri",t.options={},t.doExport=function(){l.exportGlobally({PrintableUri:t})},t}(f.Component);t.PrintableUri=m,m.options=d.extend({},m.options,c.ResultLink.options),s.Initialization.registerAutoCreateComponent(m)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(10),a=n(5),u=n(1),l=n(7),c=n(2),p=n(23),d=n(3);n(450);var h=function(e){function t(n,i,o){var a=e.call(this,n,t.ID,o)||this;return a.element=n,a.options=i,a.options=r.ComponentOptions.initComponentOptions(n,t,i),a.bind.onRootElement(s.QueryEvents.querySuccess,function(e){return a.handleQuerySuccess(e)}),a.bind.onRootElement(s.QueryEvents.queryError,function(){return u.$$(a.element).hide()}),a.element.style.display="none",a.textContainer=u.$$("span").el,a.element.appendChild(a.textContainer),a}return i(t,e),t.prototype.handleQuerySuccess=function(e){if(!this.disabled&&e.results.results.length>0){a.Assert.exists(e);var t=[l.l("Duration",this.formatQueryDuration(e.results.duration)),l.l("SearchAPIDuration",this.formatQueryDuration(e.results.searchAPIDuration)),l.l("IndexDuration",this.formatQueryDuration(e.results.indexDuration))].join("\n");this.textContainer.textContent=this.formatQueryDuration(e.results.duration),this.element.setAttribute("title",t),this.element.style.display="inline"}else this.element.style.display="none"},t.prototype.formatQueryDuration=function(e){if(void 0==e)return l.l("Unavailable");var t=Math.max(e/1e3,.01);return"en"===String.locale?l.l("Seconds",p.format(t,"n2"),t,!0):l.l("Seconds",p.format(t,"n2"),t)},t.ID="QueryDuration",t.doExport=function(){d.exportGlobally({QueryDuration:t})},t.options={},t}(o.Component);t.QueryDuration=h,c.Initialization.registerAutoCreateComponent(h)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(451);var o=n(0),r=n(10),s=n(360),a=n(3),u=n(5),l=n(12),c=n(7),p=n(1),d=n(9),h=n(6),f=n(8),m=n(2),y=n(148);t.noResultsCssClass="coveo-show-if-no-results";var g=function(e){function n(t,i,o){var s=e.call(this,t,n.ID,o)||this;return s.element=t,s.options=i,s.options=f.ComponentOptions.initComponentOptions(t,n,i),s.bind.onRootElement(r.QueryEvents.querySuccess,function(e){return s.handleQuerySuccess(e)}),s.bind.onRootElement(r.QueryEvents.queryError,function(){return s.hide()}),s.hide(),s.textContainer=p.$$("span").el,p.$$(s.element).prepend(s.textContainer),s}return i(n,e),n.prototype.hide=function(){p.$$(this.element).addClass("coveo-hidden")},n.prototype.show=function(){p.$$(this.element).removeClass("coveo-hidden")},n.prototype.render=function(e){p.$$(this.textContainer).empty(),this.show(),this.updateNoResultsSnapshot(),this.hideNoResultsPage(),this.options.onlyDisplaySearchTips||this.updateSummaryIfResultsWereReceived(e);var t=e.results;if(null!=t.exception&&null!=t.exception.code){var n=("QueryException"+t.exception.code).toLocaleString();this.textContainer.innerHTML=c.l("QueryException",n)}else 0==t.results.length?(this.updateQueryTagsInNoResultsContainer(),this.displayInfoOnNoResults()):this.lastKnownGoodState=this.queryStateModel.getAttributes()},n.prototype.handleQuerySuccess=function(e){u.Assert.exists(e),this.render(e)},n.prototype.updateSummaryIfResultsWereReceived=function(e){if(e.results.results.length){var t=y.QuerySummaryUtils.htmlMessage(this.root,e);this.textContainer.innerHTML=t}},n.prototype.updateNoResultsSnapshot=function(){var e=this.getNoResultsContainer();null==this.noResultsSnapshot&&e&&(this.noResultsSnapshot=e.innerHTML)},n.prototype.updateQueryTagsInNoResultsContainer=function(){var e=this.getNoResultsContainer();e&&(e.innerHTML=this.replaceQueryTagsWithHighlightedQuery(this.noResultsSnapshot))},n.prototype.replaceQueryTagsWithHighlightedQuery=function(e){var t=''+this.sanitizedQuery+"";return y.QuerySummaryUtils.replaceQueryTags(e,t)},Object.defineProperty(n.prototype,"sanitizedQuery",{get:function(){return o.escape(this.queryStateModel.get(l.QueryStateModel.attributesEnum.q))},enumerable:!0,configurable:!0}),n.prototype.displayInfoOnNoResults=function(){if(this.showNoResultsPage(),this.options.enableNoResultsFoundMessage){var e=this.getNoResultsFoundMessageElement();this.textContainer.appendChild(e.el)}if(this.options.enableCancelLastAction){var t=this.getCancelLastActionElement();this.textContainer.appendChild(t.el)}if(this.options.enableSearchTips){var n=this.getSearchTipsTitleElement(),i=this.getSearchTipsListElement();this.textContainer.appendChild(n.el),this.textContainer.appendChild(i.el)}},n.prototype.hideNoResultsPage=function(){this.getAllNoResultsContainer().forEach(function(e){p.$$(e).removeClass("coveo-no-results")})},n.prototype.showNoResultsPage=function(){this.getAllNoResultsContainer().forEach(function(e){p.$$(e).addClass("coveo-no-results")})},n.prototype.getNoResultsContainer=function(){return p.$$(this.element).find("."+t.noResultsCssClass)},n.prototype.getAllNoResultsContainer=function(){return p.$$(this.element).findAll("."+t.noResultsCssClass)},n.prototype.getNoResultsFoundMessageElement=function(){var e=this.replaceQueryTagsWithHighlightedQuery(this.options.noResultsFoundMessage);return p.$$("div",{className:"coveo-query-summary-no-results-string"},e)},n.prototype.getCancelLastActionElement=function(){var e=this,t=p.$$("div",{className:"coveo-query-summary-cancel-last"},c.l("CancelLastAction"));return t.on("click",function(){e.usageAnalytics.logCustomEvent(d.analyticsActionCauseList.noResultsBack,{},e.root),e.usageAnalytics.logSearchEvent(d.analyticsActionCauseList.noResultsBack,{}),e.lastKnownGoodState?(e.queryStateModel.reset(),e.queryStateModel.setMultiple(e.lastKnownGoodState),p.$$(e.root).trigger(s.QuerySummaryEvents.cancelLastAction),e.queryController.executeQuery()):history.back()}),t},n.prototype.getSearchTipsTitleElement=function(){var e=p.$$("div",{className:"coveo-query-summary-search-tips-info"});return e.text(c.l("SearchTips")),e},n.prototype.getSearchTipsListElement=function(){var e=p.$$("ul"),t=p.$$("li");t.text(c.l("CheckSpelling"));var n=p.$$("li");if(n.text(c.l("TryUsingFewerKeywords")),e.el.appendChild(t.el),e.el.appendChild(n.el),this.queryStateModel.atLeastOneFacetIsActive()){var i=p.$$("li");i.text(c.l("SelectFewerFilters")),e.el.appendChild(i.el)}return e},n.ID="QuerySummary",n.doExport=function(){a.exportGlobally({QuerySummary:n})},n.options={onlyDisplaySearchTips:f.ComponentOptions.buildBooleanOption({defaultValue:!1}),enableNoResultsFoundMessage:f.ComponentOptions.buildBooleanOption({defaultValue:!0}),noResultsFoundMessage:f.ComponentOptions.buildStringOption({defaultValue:c.l("noResultFor","${query}"),depend:"enableNoResultsFoundMessage",postProcessing:function(e){return o.escape(e)}}),enableCancelLastAction:f.ComponentOptions.buildBooleanOption({defaultValue:!0}),enableSearchTips:f.ComponentOptions.buildBooleanOption({defaultValue:!0})},n}(h.Component);t.QuerySummary=g,m.Initialization.registerAutoCreateComponent(g)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0?e.options.subResultTemplate.instantiateToElement(n):e.options.resultTemplate.instantiateToElement(n)).then(function(i){if(e.autoCreateComponentsInsideResult(i,d.extend({},n,{attachments:[]})),p.$$(i).addClass("coveo-result-attachments-container"),e.element.appendChild(i),e.attachmentHasSubAttachment(n)&&e.attachmentLevel0),this.expandedCaption&&p.$$(this.expandedCaption).toggle(this.showingMoreResults),p.$$(this.oneResultCaption).toggleClass("coveo-hidden",!(e&&1==e)),this.showMore&&(p.$$(this.showMore).toggle(!this.showingMoreResults&&!a.Utils.exists(this.moreResultsPromise)),p.$$(this.showLess).toggle(this.showingMoreResults));var t=p.$$(this.element).find(".coveo-show-if-normal");t&&p.$$(t).toggle(!this.showingMoreResults);var n=p.$$(this.element).find(".coveo-show-if-expanded");n&&p.$$(n).toggle(this.showingMoreResults)},t.prototype.scrollToResultElement=function(){var e=p.$$(this.element).closest("CoveoResult");window.scrollTo(0,new p.Win(window).scrollY()+e.getBoundingClientRect().top)},t.prototype.displayThoseResults=function(e){var t=this,n=h.map(e,function(e){return t.renderChildResult(e)});return Promise.all(n).then(function(e){return p.$$(t.results).empty(),h.each(e,function(e){t.results.appendChild(e)}),!0})},t.prototype.renderChildResult=function(e){var t=this;return u.QueryUtils.setStateObjectOnQueryResult(this.queryStateModel.get(),e),u.QueryUtils.setSearchInterfaceObjectOnQueryResult(this.searchInterface,e),this.options.resultTemplate.instantiateToElement(e,{wrapInDiv:!1,checkCondition:!1,responsiveComponents:this.searchInterface.responsiveComponents}).then(function(n){return p.$$(n).addClass("coveo-result-folding-child-result"),p.$$(n).toggleClass("coveo-normal-child-result",!t.showingMoreResults),p.$$(n).toggleClass("coveo-expanded-child-result",t.showingMoreResults),t.autoCreateComponentsInsideResult(n,e).initResult.then(function(){return n})})},t.prototype.autoCreateComponentsInsideResult=function(e,t){c.Assert.exists(e);var n=this.searchInterface.options,i={options:n,bindings:this.getBindings(),result:t};return l.Initialization.automaticallyCreateComponentsInside(e,i)},t.prototype.cancelAnyPendingShowMore=function(){this.moreResultsPromise&&(this.moreResultsPromise=void 0),c.Assert.doesNotExists(this.moreResultsPromise),c.Assert.doesNotExists(this.waitAnimation)},t.prototype.bindOverlayEvents=function(){var e=this;this.bind.one(this.element.parentElement,"openCardOverlay",function(){e.result.moreResults&&e.showMoreResults()})},t.prototype.getAnalyticsMetadata=function(){return{documentURL:this.result.clickUri,documentTitle:this.result.title,author:a.Utils.getFieldValue(this.result,"author")}},t.ID="ResultFolding",t.doExport=function(){f.exportGlobally({ResultFolding:t,DefaultFoldingTemplate:s.DefaultFoldingTemplate})},t.options={resultTemplate:v.TemplateComponentOptions.buildTemplateOption({defaultFunction:function(){return new s.DefaultFoldingTemplate}}),normalCaption:r.ComponentOptions.buildLocalizedStringOption(),expandedCaption:r.ComponentOptions.buildLocalizedStringOption(),moreCaption:r.ComponentOptions.buildLocalizedStringOption({postProcessing:function(e){return e||d.l("ShowMore")}}),lessCaption:r.ComponentOptions.buildLocalizedStringOption({postProcessing:function(e){return e||d.l("ShowLess")}}),oneResultCaption:r.ComponentOptions.buildLocalizedStringOption({postProcessing:function(e){return e||d.l("DisplayingTheOnlyMessage")}})},t}(o.Component);t.ResultFolding=b,l.Initialization.registerAutoCreateComponent(b)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(473);var o,r=n(3),s=n(17),a=n(1),u=n(14),l=n(13),c=n(4),p=n(6),d=n(8),h=n(2);!function(e){e[e.Undefined=0]="Undefined",e[e.Lowest=1]="Lowest",e[e.Low=2]="Low",e[e.Average=3]="Average",e[e.Good=4]="Good",e[e.Best=5]="Best"}(o=t.RatingValues||(t.RatingValues={}));var f=function(e){function t(n,i,o,r){var s=e.call(this,n,t.ID,o)||this;return s.element=n,s.options=i,s.bindings=o,s.result=r,s.options=d.ComponentOptions.initComponentOptions(n,t,i),c.Utils.isNullOrUndefined(r.rating)||s.renderComponent(n,r.rating),s}return i(t,e),t.prototype.renderComponent=function(e,t){for(var n=1;n<=5;n++)this.renderStar(e,n<=t,n)},t.prototype.renderStar=function(e,t,n){var i,o=this,r=a.$$(e).find('a[rating-value="'+n+'"]');null==r?(i=a.$$("a",{className:"coveo-result-rating-star"},l.SVGIcons.icons.star),u.SVGDom.addClassToSVGInContainer(i.el,"coveo-result-rating-star-svg"),e.appendChild(i.el),this.bindings.searchInterface.options.enableCollaborativeRating&&((new s.AccessibleButton).withElement(i).withSelectAction(function(e){var t=e.currentTarget;o.rateDocument(parseInt(t.getAttribute("rating-value")))}).withLabel(n.toString()).build(),i.on("mouseover",function(t){var n=t.currentTarget;o.renderComponent(e,parseInt(n.getAttribute("rating-value")))}),i.on("mouseout",function(){o.renderComponent(e,o.result.rating)})),i.el.setAttribute("rating-value",n.toString())):i=a.$$(r),i.toggleClass("coveo-result-rating-star-active",t)},t.prototype.rateDocument=function(e){var t=this,n={rating:o[e],uniqueId:this.result.uniqueId};this.queryController.getEndpoint().rateDocument(n).then(function(){t.result.rating=e,t.renderComponent(t.element,e)}).catch(function(){t.logger.error("An error occurred while rating the item")})},t.ID="ResultRating",t.doExport=function(){r.exportGlobally({ResultRating:t})},t}(p.Component);t.ResultRating=f,h.Initialization.registerAutoCreateComponent(f)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(38),a=n(16),u=n(72),l=n(15),c=n(10),p=n(12),d=n(37),h=n(9),f=n(2),m=n(7),y=n(4),g=n(1),v=n(0),b=n(3);n(474);var C=n(58),S=n(50),w=n(136),x=n(99),_=n(13),E=n(14),O=function(e){function t(n,i,u){var c=e.call(this,n,t.ID,u)||this;return c.element=n,c.options=i,c.bindings=u,c.preferencePanelCheckboxInput={},c.options=r.ComponentOptions.initComponentOptions(n,t,i),c.preferencePanel=g.$$(c.element).closest(o.Component.computeCssClassNameForType("PreferencesPanel")),c.preferencePanel?(c.preferencePanelLocalStorage=new s.LocalStorageUtils(t.ID),c.mergeLocalPreferencesWithStaticPreferences(),c.bindPreferencePanelEvent(),c.bindBreadcrumbEvent(),c.bindQueryEvent(),c.bind.oneRootElement(a.InitializationEvents.afterComponentsInitialization,function(){return c.createDom()}),c.bind.oneQueryState(l.MODEL_EVENTS.CHANGE_ONE,p.QUERY_STATE_ATTRIBUTES.T,function(){return c.fromPreferencesToCheckboxInput()}),c):(c.logger.warn('Cannot instantiate ResultsFilterPreferences, as there is no "CoveoPreferencesPanel" in your page !'),c)}return i(t,e),t.prototype.createDom=function(){this.container=new x.FormGroup([],m.l("ResultsFilteringExpression")).build(),this.element.appendChild(this.container),this.buildCheckboxesInput(),this.options.showAdvancedFilters&&this.buildAdvancedFilters()},t.prototype.save=function(){this.fromCheckboxInputToPreferences();var e=v.omit(this.preferences,"tab");this.logger.info("Saving preferences",e),this.preferencePanelLocalStorage.save(e)},t.prototype.exitWithoutSave=function(){this.fromPreferencesToCheckboxInput(),this.hideAdvancedFilterBuilder()},t.prototype.bindPreferencePanelEvent=function(){var e=this;this.bind.on(this.preferencePanel,u.PreferencesPanelEvents.savePreferences,function(){return e.save()}),this.bind.on(this.preferencePanel,u.PreferencesPanelEvents.exitPreferencesWithoutSave,function(){return e.exitWithoutSave()})},t.prototype.bindBreadcrumbEvent=function(){var e=this;this.options.includeInBreadcrumb&&(this.bind.onRootElement(d.BreadcrumbEvents.populateBreadcrumb,function(t){return e.handlePopulateBreadcrumb(t)}),this.bind.onRootElement(d.BreadcrumbEvents.clearBreadcrumb,function(){return e.handleClearBreadcrumb()}))},t.prototype.bindQueryEvent=function(){var e=this;this.bind.onRootElement(c.QueryEvents.buildingQuery,function(t){return e.handleBuildingQuery(t)})},t.prototype.handleBuildingQuery=function(e){v.each(this.getActiveFilters(),function(t){y.Utils.isNonEmptyString(t.expression)&&e.queryBuilder.advancedExpression.add(t.expression)})},t.prototype.handlePopulateBreadcrumb=function(e){var t=this.getActiveFilters();if(y.Utils.isNonEmptyArray(t)){var n=g.$$("div",{className:"coveo-results-filter-preferences-breadcrumb"}),i=g.$$("span",{className:"coveo-title"});i.text(m.l("FiltersInYourPreferences")+":"),n.el.appendChild(i.el);var o=g.$$("span",{className:"coveo-values"});n.el.appendChild(o.el);for(var r=0;r0;null!=r&&u&&(l.$$(e).on("click",function(){o.contains(r,t)?n.queryStateModel.set(i,o.without(r,t)):n.queryStateModel.set(i,o.union(r,[t])),n.queryController.deferExecuteQuery({beforeExecuteQuery:function(){return n.usageAnalytics.logSearchEvent(m.analyticsActionCauseList.documentTag,{facetId:n.options.field,facetValue:t})}})}),o.contains(r,t)&&l.$$(e).addClass("coveo-selected"),l.$$(e).addClass("coveo-clickable"))},t.prototype.clearPopup=function(){l.$$(this.autoCompletePopup).hide(),l.$$(this.autoCompletePopup).empty()},t.prototype.showPopup=function(){l.$$(this.autoCompletePopup).show()},t.prototype.populateSuggestions=function(){var e=this,t=this.queryController.getEndpoint(),n=this.textBox.value,i={field:this.options.field,ignoreAccents:!0,sortCriteria:"occurences",maximumNumberOfValues:this.options.suggestBoxSize,queryOverride:"@uri",pattern:this.buildRegEx(n),patternType:"RegularExpression"};t.listFieldValues(i).then(function(t){e.clearPopup(),o.each(t,function(t){e.autoCompletePopup.appendChild(e.buildSelectableValue(t.lookupValue))}),e.showPopup(),e.autoCompletePopup.style.width=e.textBox.offsetWidth+" px"})},t.prototype.manageAutocompleteAutoHide=function(){var e,n=this;l.$$(this.textBox).on("mouseover",function(){clearTimeout(e)}),l.$$(this.autoCompletePopup).on("mouseout",function(i){l.$$(i.target).hasClass(t.autoCompleteClass)&&(e=setTimeout(function(){n.clearPopup()},n.options.autoCompleteTimer))}),l.$$(this.autoCompletePopup).on("mouseenter",function(){clearTimeout(e)}),l.$$(this.element).on("mouseenter",function(){n.clearPopup(),l.$$(n.element).addClass("coveo-opened")}),l.$$(l.$$(this.element).closest(".CoveoResult")).on("mouseleave",function(){n.clearPopup(),""==n.textBox.value&&l.$$(n.element).removeClass("coveo-opened")}),l.$$(l.$$(this.element).closest(".CoveoResult")).on("focusout",function(e){""!=n.textBox.value&&l.$$(e.target).closest(".CoveoResult")!=l.$$(n.element).closest(".CoveoResult")&&l.$$(n.element).addClass("coveo-error")}),l.$$(l.$$(this.element).closest(".CoveoResult")).on("focusin",function(){l.$$(n.element).removeClass("coveo-error")})},t.prototype.buildRegEx=function(e){var t=this;return"(?=.*"+e+")"+o.map(this.tags,function(e){return t.buildTermToExclude(e)}).join("")+".*"},t.prototype.buildTermToExclude=function(e){return"(?!^"+e+"$)"},t.prototype.manageUpDownEnter=function(e){var t=l.$$(this.element).findAll(".coveo-selectable");if(e==c.KEYBOARD.ENTER)return void this.doAddTag();if(t.length>0){var n=this.computeNextIndex(e,t);n=Math.max(0,n),n=Math.min(t.length-1,n);var i=l.$$(t[n]);i.addClass("coveo-selected"),this.textBox.value=i.text()}},t.prototype.computeNextIndex=function(e,t){var n=0;return o.each(t,function(t,i){l.$$(t).hasClass("coveo-selected")&&(e==c.KEYBOARD.UP_ARROW?n=i-1:e==c.KEYBOARD.DOWN_ARROW&&(n=i+1),l.$$(t).removeClass("coveo-selected"))}),n},t.prototype.buildSelectableValue=function(e){var t=this,n=l.$$("div",{className:"coveo-selectable"});return n.el.appendChild(this.buildShortenedTagWithTitle(e)),n.on("click",function(){t.doAddTagWithValue(e)}),n.el},t.prototype.doRemoveTag=function(e,t){var n=this,i={fieldName:this.options.field,fieldValue:t,doAdd:!1,uniqueId:this.result.uniqueId};this.queryController.getEndpoint().tagDocument(i).then(function(){n.tags.splice(o.indexOf(n.tags,t),1),l.$$(e).detach()})},t.prototype.doAddTagWithValue=function(e){var t=this;o.each(e.split(","),function(e){t.doAddSingleTagValue(e)})},t.prototype.doAddSingleTagValue=function(e){var t=this;if(this.clearPopup(),o.indexOf(this.tags,e)>-1)return void l.$$(this.element).addClass("coveo-error");this.tags.push(e);var n={fieldName:this.options.field,fieldValue:e,doAdd:!0,uniqueId:this.result.uniqueId};this.queryController.getEndpoint().tagDocument(n).then(function(){t.tagZone.appendChild(t.buildTagValue(e)),t.textBox.value="",l.$$(t.element).removeClass("coveo-error")}).catch(function(){t.tags=o.without(t.tags,o.findWhere(t.tags,e))})},t.prototype.doAddTag=function(){var e=f.Utils.trim(this.textBox.value.toLowerCase());this.doAddTagWithValue(e)},t.ID="ResultTagging",t.autoCompleteClass="coveo-result-tagging-auto-complete",t.doExport=function(){r.exportGlobally({ResultTagging:t})},t.options={field:g.ComponentOptions.buildFieldOption({match:function(e){return"Tag"==e.type},required:!0}),suggestBoxSize:g.ComponentOptions.buildNumberOption({defaultValue:5,min:0}),autoCompleteTimer:g.ComponentOptions.buildNumberOption({defaultValue:2e3,min:0})},t.AUTO_COMPLETE_CLASS="coveo-result-tagging-auto-complete",t}(y.Component);t.ResultTagging=b,v.Initialization.registerAutoCreateComponent(b)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(5),a=n(64),u=n(166),l=n(2),c=n(7),p=n(1),d=n(9),h=n(20),f=n(0),m=n(4),y=n(29),g=n(3),v=n(13),b=n(14),C=function(e){function t(n,i,o,u){var l=e.call(this,n,t.ID,o)||this;l.element=n,l.options=i,l.bindings=o,l.result=u,l.options=r.ComponentOptions.initComponentOptions(n,t,i),s.Assert.exists(l.result),l.container=p.$$(l.element),l.text=p.$$("span");var c=l.buildIcon(),d=l.buildLoadingIcon();return l.container.append(c),l.container.append(d),l.container.append(l.text.el),l.container.on("click",function(){return l.toggleFollow()}),l.container.setAttribute("tabindex","0"),l.bind.on(l.container,"keyup",y.KeyboardUtils.keypressAction(y.KEYBOARD.ENTER,function(){return l.toggleFollow()})),l.bind.onRootElement(a.SearchAlertsEvents.searchAlertsDeleted,function(e){return l.handleSubscriptionDeleted(e)}),l.bind.onRootElement(a.SearchAlertsEvents.searchAlertsCreated,function(e){return l.handleSubscriptionCreated(e)}),l.container.addClass("coveo-follow-item-loading"),l.updateIsFollowed(),l}return i(t,e),t.prototype.setFollowed=function(e){this.container.removeClass("coveo-follow-item-loading"),this.subscription=e,this.container.addClass("coveo-follow-item-followed"),this.text.text(c.l("SearchAlerts_unFollowing"))},t.prototype.setNotFollowed=function(){this.container.removeClass("coveo-follow-item-loading"),this.subscription=t.buildFollowRequest(this.getId(),this.result.title,this.options),this.container.removeClass("coveo-follow-item-followed"),this.text.text(c.l("SearchAlerts_follow"))},t.prototype.toggleFollow=function(){var e=this;this.container.hasClass("coveo-follow-item-loading")||(this.container.removeClass("coveo-follow-item-followed"),this.container.addClass("coveo-follow-item-loading"),this.subscription.id?(this.logAnalyticsEvent(d.analyticsActionCauseList.searchAlertsUnfollowDocument),this.queryController.getEndpoint().deleteSubscription(this.subscription).then(function(){var t={subscription:e.subscription,dom:e.element};p.$$(e.root).trigger(a.SearchAlertsEvents.searchAlertsDeleted,t)}).catch(function(){e.container.removeClass("coveo-follow-item-loading");var t={dom:e.element};p.$$(e.root).trigger(a.SearchAlertsEvents.searchAlertsFail,t)})):(this.logAnalyticsEvent(d.analyticsActionCauseList.searchAlertsFollowDocument),this.queryController.getEndpoint().follow(this.subscription).then(function(t){var n={subscription:t,dom:e.element};p.$$(e.root).trigger(a.SearchAlertsEvents.searchAlertsCreated,n)}).catch(function(){e.container.removeClass("coveo-follow-item-loading");var t={dom:e.element};p.$$(e.root).trigger(a.SearchAlertsEvents.searchAlertsFail,t)})))},t.prototype.getText=function(){return this.text.text()},t.prototype.updateIsFollowed=function(){var e=this;this.queryController.getEndpoint().listSubscriptions().then(function(t){if(f.isArray(t)){var n=f.find(t,function(t){var n=t.typeConfig;return n&&null!=n.id&&n.id==e.getId()});null!=n?e.setFollowed(n):e.setNotFollowed()}else e.remove()}).catch(function(){e.remove()})},t.prototype.buildIcon=function(){var e=p.$$("span",{className:"coveo-follow-item-icon"},v.SVGIcons.icons.dropdownFollowQuery);return b.SVGDom.addClassToSVGInContainer(e.el,"coveo-follow-item-icon-svg"),e.el},t.prototype.buildLoadingIcon=function(){var e=p.$$("span",{className:"coveo-follow-item-icon-loading"},v.SVGIcons.icons.loading);return b.SVGDom.addClassToSVGInContainer(e.el,"coveo-follow-item-icon-loading-svg"),e.el},t.prototype.handleSubscriptionDeleted=function(e){if(e.subscription&&e.subscription.type==u.SUBSCRIPTION_TYPE.followDocument){e.subscription.typeConfig.id==this.getId()&&this.setNotFollowed()}},t.prototype.handleSubscriptionCreated=function(e){if(e.subscription&&e.subscription.type==u.SUBSCRIPTION_TYPE.followDocument){e.subscription.typeConfig.id==this.getId()&&this.setFollowed(e.subscription)}},t.prototype.remove=function(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)},t.prototype.getId=function(){return m.Utils.getFieldValue(this.result,"sysurihash")||m.Utils.getFieldValue(this.result,"urihash")},t.buildFollowRequest=function(e,t,n){var i={id:e,title:t};return n.modifiedDateField&&(i.modifiedDateField=n.modifiedDateField),n.watchedFields&&(i.watchedFields=n.watchedFields),{type:u.SUBSCRIPTION_TYPE.followDocument,typeConfig:i,name:t}},t.prototype.logAnalyticsEvent=function(e){this.usageAnalytics.logCustomEvent(e,{author:h.QueryUtils.getAuthor(this.result),documentLanguage:h.QueryUtils.getLanguage(this.result),documentSource:h.QueryUtils.getSource(this.result),documentTitle:this.result.title,contentIDValue:h.QueryUtils.getPermanentId(this.result).fieldValue,contentIDKey:h.QueryUtils.getPermanentId(this.result).fieldUsed},this.element)},t.ID="FollowItem",t.doExport=function(){g.exportGlobally({FollowItem:t})},t.options={watchedFields:r.ComponentOptions.buildFieldsOption(),modifiedDateField:r.ComponentOptions.buildStringOption()},t}(o.Component);t.FollowItem=C,l.Initialization.registerAutoCreateComponent(C)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(478),a=n(42),u=n(10),l=n(5),c=n(64),p=n(166),d=n(2),h=n(7),f=n(1),m=n(24),y=n(9),g=n(0),v=n(3),b=n(52),C=n(13),S=n(26),w=n(18),x=function(e){function t(n,i,o,l){void 0===l&&(l=m.ModalBox);var c=e.call(this,n,t.ID,o)||this;c.element=n,c.options=i,c.ModalBox=l,c.options=r.ComponentOptions.initComponentOptions(n,t,i),c.options.enableMessage&&(c.message=new s.SearchAlertsMessage(n,{closeDelay:c.options.messageCloseDelay},c.getBindings())),c.queryController.getEndpoint().options.isGuestUser?c.logger.warn("Logged in as guest user, search alerts are therefore not available."):c.bind.onRootElement(a.SettingsEvents.settingsPopulateMenu,function(e){c.options.enableManagePanel&&e.menuData.push({text:h.l("SearchAlerts_Panel"),className:"coveo-subscriptions-panel",onOpen:function(){return c.openPanel()},onClose:function(){return c.close()},svgIcon:C.SVGIcons.icons.dropdownFollowQuery,svgIconClassName:"coveo-subscriptions-panel-svg"})});var p=!1;return c.bind.onRootElement(u.QueryEvents.querySuccess,function(){p||(p=!0,c.queryController.getEndpoint().listSubscriptions().then(function(){c.bind.onRootElement(a.SettingsEvents.settingsPopulateMenu,function(e){c.options.enableFollowQuery&&e.menuData.push({text:h.l("SearchAlerts_followQuery"),className:"coveo-follow-query",tooltip:h.l("FollowQueryDescription"),onOpen:function(){return c.followQuery()},onClose:function(){},svgIcon:C.SVGIcons.icons.dropdownFollowQuery,svgIconClassName:"coveo-follow-query-svg"})})}).catch(function(e){if(403!=e.status)throw e}))}),c}return i(t,e),t.prototype.followQuery=function(){var e=this,t=this.queryController.createQueryBuilder({}),n=this.buildFollowQueryRequest(t.build(),this.options);this.usageAnalytics.logCustomEvent(y.analyticsActionCauseList.searchAlertsFollowQuery,{subscription:n.name},this.element),this.queryController.getEndpoint().follow(n).then(function(t){if(t){var n={subscription:t,dom:e.findQueryBoxDom()};f.$$(e.root).trigger(c.SearchAlertsEvents.searchAlertsCreated,n)}else e.triggerSearchAlertsFail()}).catch(function(){e.triggerSearchAlertsFail()})},t.prototype.openPanel=function(){var e=this,t=f.$$("div"),n=f.$$("div",{className:"coveo-subscriptions-panel-title"},h.l("SearchAlerts_Panel"));t.append(n.el);var i=f.$$("div"),o=f.$$("table",{className:"coveo-subscriptions-panel-content",cellspacing:0});i.append(o.el);var r=f.$$("thead");o.append(r.el);var s=f.$$("tr");r.append(s.el);var a=f.$$("th",{className:"coveo-subscriptions-panel-content-type"},h.l("SearchAlerts_Type")),u=f.$$("th",null,h.l("SearchAlerts_Content")),l=f.$$("th",null,h.l("SearchAlerts_Frequency")),c=f.$$("th",{className:"coveo-subscriptions-panel-content-actions"},h.l("SearchAlerts_Actions"));s.append(a.el),s.append(u.el),s.append(l.el),s.append(c.el);var p=f.$$("tbody",{className:"coveo-subscriptions-panel-spacer"},f.$$("tr",null,f.$$("td",{colsspan:3})));o.append(p.el);var d=f.$$("tbody",{className:"coveo-subscriptions-panel-subscriptions"},f.$$("tr",{className:"coveo-subscriptions-panel-no-subscriptions"},f.$$("td",{colspan:3},h.l("SearchAlerts_PanelNoSearchAlerts"))));o.append(d.el);var m="big";return this.queryController.getEndpoint().listSubscriptions().then(function(t){g.each(t,function(t){e.addSearchAlert(t,i)})}).catch(function(){m="small",i.empty(),i.append(e.getFailureMessage().el)}).finally(function(){e.modal=e.ModalBox.open(i.el,{title:t.el.outerHTML,className:"coveo-subscriptions-panel",sizeMod:m})})},t.prototype.getFailureMessage=function(){return f.$$("div",{className:"coveo-subscriptions-panel-fail"},h.l("SearchAlerts_Fail"))},t.prototype.handleSearchAlertsFail=function(){if(null!=this.modal){var e=f.$$(this.modal.wrapper).find(".coveo-modal-body");f.$$(e).empty(),f.$$(e).append(this.getFailureMessage().el)}},t.prototype.close=function(){this.modal&&(this.modal.close(),this.modal=null)},t.prototype.addSearchAlert=function(e,t){var n,i=this,o=[{value:"monthly",label:h.l("Monthly")},{value:"daily",label:h.l("Daily")},{value:"monday",label:h.l("Monday")},{value:"tuesday",label:h.l("Tuesday")},{value:"wednesday",label:h.l("Wednesday")},{value:"thursday",label:h.l("Thursday")},{value:"friday",label:h.l("Friday")},{value:"saturday",label:h.l("Saturday")},{value:"sunday",label:h.l("Sunday")}];if(e.name)if(""==e.name)n="<empty>";else{var r=f.$$("div").el;r.innerHTML=e.name,n=f.$$(r).text()}else if(e.type==p.SUBSCRIPTION_TYPE.followQuery){var s=e.typeConfig;n=g.escape(s.query.q)||h.l("EmptyQuery")}else{var s=e.typeConfig;n=g.escape(s.title||s.id)}var a=f.$$("tr",{className:"coveo-subscriptions-panel-subscription"}),u=g.pluck(o,"value"),l=function(e){return g.findWhere(o,{value:e}).label},d=f.$$("td",{className:"coveo-subscriptions-panel-content-type"},h.l("SearchAlerts_Type_"+e.type)),m=f.$$("td",{className:"coveo-subscriptions-panel-context",title:n});m.setHtml(n);var v=f.$$("td",null,f.$$("div",{className:"coveo-subscriptions-panel-frequency"},function(){return new b.Dropdown(function(t){i.usageAnalytics.logCustomEvent(y.analyticsActionCauseList.searchAlertsUpdateSubscription,{subscription:n,frequency:t.getValue()},i.element),e.frequency=t.getValue(),i.updateAndSyncSearchAlert(e)},u,l).build()}())),C=f.$$("td",{className:"coveo-subscriptions-panel-content-actions"},null,f.$$("div",{className:"coveo-subscriptions-panel-action coveo-subscriptions-panel-action-unfollow"},h.l("SearchAlerts_unFollowing")),f.$$("div",{className:"coveo-subscriptions-panel-action coveo-subscriptions-panel-action-follow"},h.l("SearchAlerts_follow")));a.append(d.el),a.append(m.el),a.append(v.el),a.append(C.el);var S=t.find(".coveo-subscriptions-panel-no-subscriptions");a.insertBefore(S),v.find("select").value=e.frequency,f.$$(a.find(".coveo-subscriptions-panel-action-unfollow")).on("click",function(){a.addClass("coveo-subscription-unfollowed"),i.queryController.getEndpoint().deleteSubscription(e).then(function(){e.type==p.SUBSCRIPTION_TYPE.followDocument?i.logAnalyticsEvent(y.analyticsActionCauseList.searchAlertsUnfollowDocument,e):e.type==p.SUBSCRIPTION_TYPE.followQuery&&i.logAnalyticsEvent(y.analyticsActionCauseList.searchAlertsUnfollowQuery,e),delete e.id;var t={subscription:e};f.$$(i.root).trigger(c.SearchAlertsEvents.searchAlertsDeleted,t)}).catch(function(){i.handleSearchAlertsFail()})}),f.$$(a.find(".coveo-subscriptions-panel-action-follow")).on("click",function(){a.removeClass("coveo-subscription-unfollowed"),i.queryController.getEndpoint().follow(e).then(function(t){e.type==p.SUBSCRIPTION_TYPE.followDocument?i.logAnalyticsEvent(y.analyticsActionCauseList.searchAlertsFollowDocument,e):e.type==p.SUBSCRIPTION_TYPE.followQuery&&i.logAnalyticsEvent(y.analyticsActionCauseList.searchAlertsFollowQuery,e),e.id=t.id;var n={subscription:e};f.$$(i.root).trigger(c.SearchAlertsEvents.searchAlertsCreated,n)}).catch(function(){i.handleSearchAlertsFail()})})},t.prototype.updateAndSyncSearchAlert=function(e){var t=this;this.queryController.getEndpoint().updateSubscription(e).then(function(t){return g.extend(e,t)}).catch(function(){t.handleSearchAlertsFail()})},t.prototype.triggerSearchAlertsFail=function(){var e={dom:this.findQueryBoxDom()};f.$$(this.root).trigger(c.SearchAlertsEvents.searchAlertsFail,e)},t.prototype.findQueryBoxDom=function(){var e,t=this.searchInterface.getComponents("Querybox");if(t&&t.length>0)e=g.first(t).element;else{var n=this.searchInterface.getComponents("Omnibox");n&&n.length>0&&(e=g.first(n).element)}return e},t.prototype.buildFollowQueryRequest=function(e,t){var n={query:e};return t.modifiedDateField&&(n.modifiedDateField=t.modifiedDateField),{type:p.SUBSCRIPTION_TYPE.followQuery,typeConfig:n,name:this.message.getFollowQueryMessage(e.q)}},t.prototype.logAnalyticsEvent=function(e,t){this.usageAnalytics.logCustomEvent(e,{subscription:t.name},this.element)},t.create=function(e,n,i){return l.Assert.exists(e),new t(e,n,S.get(i,w.SearchInterface).getBindings())},t.ID="SearchAlerts",t.doExport=function(){v.exportGlobally({SearchAlerts:t,SearchAlertsMessage:s.SearchAlertsMessage})},t.options={enableManagePanel:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),enableFollowQuery:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),modifiedDateField:r.ComponentOptions.buildFieldOption(),enableMessage:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),messageCloseDelay:r.ComponentOptions.buildNumberOption({defaultValue:2e3,min:0,depend:"enableMessage"})},t}(o.Component);t.SearchAlerts=x,d.Initialization.registerAutoCreateComponent(x)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0),this.currentCriteria=this.options.sortCriteria[(t+1)%this.options.sortCriteria.length]}else this.currentCriteria=this.options.sortCriteria[0];this.queryStateModel.set(l.QueryStateModel.attributesEnum.sort,this.currentCriteria.toString())},t.prototype.enable=function(){c.$$(this.element).removeClass("coveo-tab-disabled"),this.update(),e.prototype.enable.call(this)},t.prototype.disable=function(){c.$$(this.element).addClass("coveo-tab-disabled"),e.prototype.disable.call(this)},t.prototype.getCurrentCriteria=function(){return this.currentCriteria},t.prototype.match=function(e){return o.any(this.options.sortCriteria,function(t){return e==t.toString()})},t.prototype.handleQueryStateChanged=function(e){this.update()},t.prototype.update=function(){var e=this.queryStateModel.get(l.QueryStateModel.attributesEnum.sort);if(h.Utils.isNonEmptyString(e)){var t=v.SortCriteria.parse(e);this.currentCriteria=o.find(this.options.sortCriteria,function(e){return t.equals(e)})}else this.currentCriteria=null;this.updateAppearance()},t.prototype.setTextToCaptionIfDefined=function(){this.captionIsDefined&&c.$$(this.element).text(this.options.caption)},Object.defineProperty(t.prototype,"captionIsDefined",{get:function(){return h.Utils.isNonEmptyString(this.options.caption)},enumerable:!0,configurable:!0}),t.prototype.addAccessiblityAttributes=function(){var e=this,t=C.l(this.displayedSortText);(new b.AccessibleButton).withElement(this.element).withSelectAction(function(){return e.handleClick()}).withLabel(C.l("SortResultsBy",t)).build()},Object.defineProperty(t.prototype,"displayedSortText",{get:function(){return this.captionIsDefined?this.options.caption:this.element.textContent},enumerable:!0,configurable:!0}),t.prototype.handleBuildingQuery=function(e){a.Assert.exists(e),(this.queryStateModel.get(l.QueryStateModel.attributesEnum.sort)==l.QueryStateModel.defaultAttributes.sort||this.isSelected())&&this.currentCriteria&&this.currentCriteria.putInQueryBuilder(e.queryBuilder)},t.prototype.handleQuerySuccess=function(e){0==e.results.results.length?c.$$(this.element).addClass("coveo-sort-hidden"):c.$$(this.element).removeClass("coveo-sort-hidden")},t.prototype.handleQueryError=function(e){c.$$(this.element).addClass("coveo-sort-hidden")},t.prototype.handleClick=function(){var e=this,t=this.currentCriteria;this.select(),t!=this.currentCriteria&&this.queryController.deferExecuteQuery({beforeExecuteQuery:function(){return f.logSortEvent(e.usageAnalytics,e.currentCriteria.sort+e.currentCriteria.direction)}})},t.prototype.isToggle=function(){return this.options.sortCriteria.length>1},t.prototype.isSelected=function(){return h.Utils.exists(this.currentCriteria)},t.prototype.updateAppearance=function(){if(c.$$(this.element).toggleClass("coveo-selected",this.isSelected()),this.isToggle()){var e=this.currentCriteria?this.currentCriteria.direction:this.options.sortCriteria[0].direction;c.$$(this.element).removeClass("coveo-ascending"),c.$$(this.element).removeClass("coveo-descending"),this.isSelected()&&c.$$(this.element).addClass("ascending"===e?"coveo-ascending":"coveo-descending")}},t.ID="Sort",t.doExport=function(){r.exportGlobally({Sort:t,SortCriteria:v.SortCriteria})},t.options={sortCriteria:y.ComponentOptions.buildCustomListOption(function(e){return o.map(e,function(e){return"string"==typeof e?new v.SortCriteria(e):e})},{required:!0}),caption:y.ComponentOptions.buildLocalizedStringOption({required:!0})},t}(m.Component);t.Sort=S,g.Initialization.registerAutoCreateComponent(S)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(3),s=n(5),a=n(1),u=n(6),l=n(8),c=n(2),p=n(53),d=function(e){function t(n,i,o,r){var a=e.call(this,n,t.ID,o)||this;if(a.element=n,a.options=i,a.bindings=o,a.result=r,a.options=l.ComponentOptions.initComponentOptions(n,t,i),a.result=a.result||a.resolveResult(),s.Assert.exists(a.result),null!=a.options.condition){new Function("obj","with(obj||{}){return "+a.options.condition+"}")(a.result)&&a.initialize()}else a.initialize();return a}return i(t,e),t.prototype.initialize=function(){var e=this;if(null!=this.options.template){var n=this.searchInterface.options,i={options:n,bindings:this.bindings,result:this.result},r=a.$$(this.element).parents(u.Component.computeCssClassName(t));o.each(r,function(t){var n=t.cloneNode();a.$$(n).empty();var i=n.outerHTML;s.Assert.check(-1===i.indexOf(e.element.outerHTML),"TemplateLoader cannot load a template into itself.")}),this.element.innerHTML=this.options.template.instantiateToString(this.result,{checkCondition:!1,responsiveComponents:this.bindings?this.bindings.searchInterface.responsiveComponents:null}),c.Initialization.automaticallyCreateComponentsInside(this.element,i)}},t.ID="TemplateLoader",t.doExport=function(){r.exportGlobally({TemplateLoader:t})},t.options={template:p.TemplateComponentOptions.buildTemplateOption(),condition:l.ComponentOptions.buildStringOption()},t}(u.Component);t.TemplateLoader=d,c.Initialization.registerAutoCreateComponent(d)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(8),r=n(6),s=n(2),a=n(1),u=n(3);n(486);var l=function(e){function t(n,i,r){var s=e.call(this,n,t.ID,r)||this;return s.element=n,s.options=i,s.options=o.ComponentOptions.initComponentOptions(n,t,i),a.$$(s.element).text(s.options.value),s.element.style.fontSize=s.options.size,s.element.style.fontStyle=s.options.style,s.element.style.color=s.options.color,s.element.style.fontWeight=s.options.weight,s.element.style.textAlign=s.options.textAlign,s.element.style.marginTop=s.options.marginTop,s.element.style.marginBottom=s.options.marginBottom,s.element.style.marginRight=s.options.marginRight,s.element.style.marginLeft=s.options.marginLeft,s.element.style.paddingTop=s.options.paddingTop,s.element.style.paddingBottom=s.options.paddingBottom,s.element.style.paddingLeft=s.options.paddingLeft,s.element.style.paddingRight=s.options.paddingRight,s}return i(t,e),t.ID="Text",t.doExport=function(){u.exportGlobally({Text:t})},t.options={value:o.ComponentOptions.buildLocalizedStringOption(),size:o.ComponentOptions.buildStringOption(),style:o.ComponentOptions.buildStringOption(),color:o.ComponentOptions.buildStringOption(),weight:o.ComponentOptions.buildStringOption(),textAlign:o.ComponentOptions.buildStringOption(),marginTop:o.ComponentOptions.buildStringOption(),marginBottom:o.ComponentOptions.buildStringOption(),marginLeft:o.ComponentOptions.buildStringOption(),marginRight:o.ComponentOptions.buildStringOption(),paddingTop:o.ComponentOptions.buildStringOption(),paddingBottom:o.ComponentOptions.buildStringOption(),paddingLeft:o.ComponentOptions.buildStringOption(),paddingRight:o.ComponentOptions.buildStringOption()},t}(r.Component);t.Text=l,s.Initialization.registerAutoCreateComponent(l)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(80),a=n(20),u=n(2),l=n(1),c=n(26),p=n(134),d=n(0),h=n(3),f=function(e){function t(n,i,o,u){var c=e.call(this,n,t.ID,o)||this;if(c.element=n,c.options=i,c.bindings=o,c.result=u,c.options=r.ComponentOptions.initOptions(n,t.options,i),"img"!=c.element.tagName.toLowerCase()?(c.img=l.$$("img").el,c.element.appendChild(c.img)):c.img=c.element,c.options.clickable)if("img"!=c.element.tagName.toLowerCase())new s.ResultLink(c.element,c.options,c.bindings,c.result);else{var d=l.$$("a");l.$$(c.element).replaceWith(d.el),l.$$(d).append(c.element),new s.ResultLink(d.el,c.options,c.bindings,c.result)}if(c.img.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),a.QueryUtils.hasThumbnail(u))c.buildThumbnailImage();else{c.logger.info("Result has no thumbnail. Cannot build thumbnail image, instanciating an Icon component instead.");var h=new p.Icon(l.$$("div").el,{small:!0},o,u);l.$$(c.element).replaceWith(h.element)}return c}return i(t,e),t.prototype.buildThumbnailImage=function(){var e=this.bindings.queryController.getEndpoint();e.isJsonp()?this.buildImageWithDirectSrcAttribute(e):this.buildImageWithBase64SrcAttribute(e)},t.prototype.buildImageWithDirectSrcAttribute=function(e){var t=e.getViewAsDatastreamUri(this.result.uniqueId,"$Thumbnail$",{contentType:"image/png"});this.img.setAttribute("src",t),this.resizeContainingFieldTable()},t.prototype.buildImageWithBase64SrcAttribute=function(e){var t=this;e.getRawDataStream(this.result.uniqueId,"$Thumbnail$").then(function(e){var n=String.fromCharCode.apply(null,new Uint8Array(e));t.img.setAttribute("src","data:image/png;base64, "+btoa(n)),t.resizeContainingFieldTable()}).catch(function(){t.setEmptyThumbnailClass()})},t.prototype.resizeContainingFieldTable=function(){var e=l.$$(this.element).closest(o.Component.computeCssClassNameForType("FieldTable"));if(null!=e){c.get(e).updateToggleHeight()}},t.prototype.setEmptyThumbnailClass=function(){l.$$(this.img).addClass(this.options.noThumbnailClass)},t.ID="Thumbnail",t.doExport=function(){h.exportGlobally({Thumbnail:t})},t.options={noThumbnailClass:r.ComponentOptions.buildStringOption({defaultValue:"coveo-no-thumbnail"}),clickable:r.ComponentOptions.buildBooleanOption({defaultValue:!1})},t.parent=s.ResultLink,t}(o.Component);t.Thumbnail=f,f.options=d.extend({},s.ResultLink.options,f.options),u.Initialization.registerAutoCreateComponent(f)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(5),a=n(10),u=n(1),l=n(9),c=n(12),p=n(2),d=n(0),h=n(3);n(487);var f=function(e){function t(n,i,o,u){var l=e.call(this,n,t.ID,o)||this;return l.element=n,l.options=i,l.bindings=o,l._window=u,l._window=l._window||window,l.options=r.ComponentOptions.initComponentOptions(n,t,i),s.Assert.exists(n),s.Assert.exists(l.options),l.notifications=[],l.bind.onRootElement(a.QueryEvents.querySuccess,l.handleProcessNewQueryResults),l}return i(t,e),t.prototype.handleProcessNewQueryResults=function(e){var t=this;s.Assert.exists(e),s.Assert.exists(e.results),u.$$(this.element).empty(),this.notifications.length=0;var n=!1;if(void 0===e.results.triggers)return void u.$$(this.element).toggleClass("coveo-visible",n);this.executeTriggers(e.results.triggers,"notify",function(e){t.usageAnalytics.logCustomEvent(l.analyticsActionCauseList.triggerNotify,{notification:e.content},t.element),t.notifications.push(e.content),t.element.appendChild(u.$$("div",{className:"coveo-trigger-notify"},e.content).el),n=!0}),this.executeTriggers(e.results.triggers,"redirect",function(e){t.usageAnalytics.logCustomEvent(l.analyticsActionCauseList.triggerRedirect,{redirectedTo:e.content},t.element),t._window.location.replace(e.content)},!0),this.executeTriggers(e.results.triggers,"query",function(e){t.queryStateModel.set(c.QueryStateModel.attributesEnum.q,e.content),t.queryController.executeQuery({beforeExecuteQuery:function(){t.usageAnalytics.logCustomEvent(l.analyticsActionCauseList.triggerQuery,{query:e.content},t.element)}})},!0),this.executeTriggers(e.results.triggers,"execute",function(n){try{var i=t._window[""+n.content.name];if("function"==typeof i){var o=d.object(d.map(n.content.params,function(e,t){return["param"+(t+1),e]}));o.element=t.element,t.usageAnalytics.logCustomEvent(l.analyticsActionCauseList.triggerExecute,{executed:n.content.name},t.element),i.apply(t._window,[o])}else t.logger.error("A trigger tried to call the function '"+n.content.name+"', which doesn't exist.",t,e.query,n)}catch(i){t.logger.error("A trigger called the function '"+n.content.name+"', which threw an error.",t,e.query,n)}}),u.$$(this.element).toggleClass("coveo-visible",n)},t.prototype.executeTriggers=function(e,t,n,i){void 0===i&&(i=!1);var o=d.filter(e,function(e){return e.type==t}),r=d.take(o,i?1:Number.MAX_VALUE);d.each(r,n)},t.ID="Triggers",t.options={},t.doExport=function(){h.exportGlobally({Triggers:t})},t}(o.Component);t.Triggers=f,p.Initialization.registerAutoCreateComponent(f)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(365);var o=n(0),r=n(37),s=n(10),a=n(3),u=n(5),l=n(7),c=n(17),p=n(1),d=n(14),h=n(13),f=n(9),m=n(6),y=n(8),g=n(2),v=n(47),b=n(58),C=n(488),S=function(e){function t(n,i,o){var a=e.call(this,n,t.ID,o)||this;return a.element=n,a.options=i,a.bindings=o,a.previouslySelected=[],a.groupByRequestValues=[],a.isSticky=!1,a.shouldTriggerQuery=!0,a.options=y.ComponentOptions.initComponentOptions(n,t,i),a.element.title=a.options.title,a.buildContent(),(new c.AccessibleButton).withElement(a.element).withClickAction(function(e){return a.handleClick(e)}).withEnterKeyboardAction(function(e){return a.handleKeyboardSelect(e)}).withBlurAction(function(e){return a.handleBlur(e)}).withLabel(a.options.title).build(),a.bind.onRootElement(r.BreadcrumbEvents.populateBreadcrumb,function(e){return a.handlePopulateBreadcrumb(e)}),a.bind.onRootElement(r.BreadcrumbEvents.clearBreadcrumb,function(){return a.handleClearBreadcrumb()}),a.bind.onRootElement(s.QueryEvents.buildingQuery,function(e){return a.handleBuildingQuery(e)}),a.bind.onRootElement(s.QueryEvents.doneBuildingQuery,function(e){return a.handleDoneBuildingQuery(e)}),a.bind.onRootElement(s.QueryEvents.querySuccess,function(e){return a.handleQuerySuccess(e)}),a}return i(t,e),t.prototype.getValueContainer=function(){return this.valueContainer},t.prototype.getValueCaption=function(e){var t=e;return o.contains(o.keys(this.options.valueCaption),e)?(t=this.options.valueCaption[t]||t,l.l(t)):v.FacetUtils.tryToGetTranslatedCaption(this.options.field.toString(),t)},t.prototype.getSelectedCaptions=function(){var e=this;return o.map(this.getSelectedValues(),function(t){return e.getValueCaption(t)})},t.prototype.toggleContainer=function(){p.$$(this.valueContainer).hasClass("coveo-simplefilter-value-container-expanded")?this.closeContainer():this.openContainer()},t.prototype.selectValue=function(e,t){var n=this;void 0===t&&(t=!0),o.each(this.checkboxes,function(i){var o=n.getValueCaption(i.label);i.label!=e&&o!=e||i.checkbox.select(t)})},t.prototype.deselectValue=function(e){var t=this;o.each(this.checkboxes,function(n){var i=t.getValueCaption(n.label);n.label!=e&&i!=e||n.checkbox.reset()})},t.prototype.toggleValue=function(e){var t=this;o.each(this.checkboxes,function(n){var i=t.getValueCaption(n.label);n.label!=e&&i!=e||n.checkbox.toggle()})},t.prototype.resetSimpleFilter=function(){var e=this;o.each(this.checkboxes,function(t){t.checkbox.isSelected()&&e.deselectValue(t.label)})},t.prototype.openContainer=function(){p.$$(this.element).addClass("coveo-simplefilter-value-container-expanded"),this.valueContainer.addClass("coveo-simplefilter-value-container-expanded"),this.refreshValueContainer(),this.isSticky=!0,this.backdrop.hasClass("coveo-dropdown-background-active")||this.showBackdrop()},t.prototype.closeContainer=function(){p.$$(this.element).removeClass("coveo-simplefilter-value-container-expanded"),this.valueContainer.removeClass("coveo-simplefilter-value-container-expanded"),this.backdrop.hasClass("coveo-dropdown-background-active")&&this.hideBackdrop(),0==this.getSelectedLabeledCheckboxes().length&&(this.isSticky=!1)},t.prototype.getSelectedValues=function(){return o.map(this.getSelectedLabeledCheckboxes(),function(e){return e.label})},t.prototype.handleClick=function(e){e.stopPropagation(),e.target==this.element&&this.toggleContainer()},t.prototype.handleKeyboardSelect=function(e){e.target==this.element?this.toggleContainer():this.toggleValue(p.$$(e.target).text())},t.prototype.handleBlur=function(e){var n=e.relatedTarget;n&&(p.$$(n).parent(m.Component.computeCssClassName(t))||this.closeContainer())},t.prototype.handleValueToggle=function(e){var t=this.getSelectedValues();this.circleElement.text(t.length.toString()),this.circleElement.removeClass("coveo-simplefilter-circle-hidden"),1==t.length?(this.setDisplayedTitle(this.getValueCaption(t[0])),this.element.title=this.getValueCaption(t[0])):(this.setDisplayedTitle(this.options.title),this.element.title=this.options.title,t.length<1&&this.circleElement.addClass("coveo-simplefilter-circle-hidden")),0==t.length&&(this.isSticky=!1);var n=e.isSelected()?f.analyticsActionCauseList.simpleFilterSelectValue:f.analyticsActionCauseList.simpleFilterDeselectValue;this.usageAnalytics.logSearchEvent(n,{simpleFilterTitle:this.options.title,simpleFilterSelectedValue:e.label,simpleFilterField:this.options.field}),this.shouldTriggerQuery&&this.queryController.executeQuery()},t.prototype.createCheckbox=function(e){var t=this,n=new b.Checkbox(function(){t.handleValueToggle(n)},this.getValueCaption(e));return n.getElement().title=l.l(e),p.$$(n.getElement()).setAttribute("tabindex","0"),{checkbox:n,label:e}},t.prototype.createCheckboxes=function(){var e=this;this.previouslySelected.length>0?(this.checkboxes=o.map(this.previouslySelected,function(t){return e.createCheckbox(t)}),o.each(this.checkboxes,function(t){e.previouslySelected.indexOf(t.label)>=0&&e.selectValue(t.label,!1)})):void 0!=this.options.values?this.checkboxes=o.map(this.options.values,function(t){return e.createCheckbox(t)}):void 0!=this.groupByRequestValues&&(this.checkboxes=o.map(this.groupByRequestValues,function(t){return e.createCheckbox(t)})),o.each(this.checkboxes,function(t){e.valueContainer.append(t.checkbox.getElement())}),this.checkboxes.length>0&&p.$$(p.$$(this.checkboxes[this.checkboxes.length-1].checkbox.getElement()).find(".coveo-checkbox-button")).on("blur",function(){e.closeContainer()})},t.prototype.createValueContainer=function(){this.valueContainer=p.$$("div",{className:"coveo-simplefilter-value-container"})},t.prototype.buildContent=function(){this.createValueContainer(),this.element.appendChild(this.buildSelect()),this.element.appendChild(this.valueContainer.el),this.findOrCreateWrapper().append(this.element),this.createBackdrop()},t.prototype.buildSelect=function(){var e=p.$$("span",{className:"coveo-simplefilter-select"});return this.selectTitle=p.$$("span",{className:"coveo-simplefilter-selecttext"},this.getValueCaption(this.options.title)),e.append(this.selectTitle.el),e.append(this.buildCircleElement()),e.append(this.buildSvgToggleUpIcon()),e.el},t.prototype.buildSvgToggleUpIcon=function(){var e=p.$$("span",{className:"coveo-simplefilter-toggle-svg-container"},h.SVGIcons.icons.arrowDown).el;return d.SVGDom.addClassToSVGInContainer(e,"coveo-simplefilter-toggle-down-svg"),e},t.prototype.buildCircleElement=function(){return this.circleElement=p.$$("span",{className:"coveo-simplefilter-circle coveo-simplefilter-circle-hidden"},this.getSelectedLabeledCheckboxes().length.toString()),this.circleElement.el},t.prototype.createBackdrop=function(){var e=this,t=p.$$(this.root).find(".coveo-dropdown-background");null==t?(this.backdrop=p.$$("div",{className:"coveo-dropdown-background"}),this.root.appendChild(this.backdrop.el)):this.backdrop=p.$$(t),this.backdrop.on("click",function(){return e.closeContainer()})},t.prototype.handlePopulateBreadcrumb=function(e){var t=this;if(this.getSelectedLabeledCheckboxes().length>0){var n=p.$$("div",{className:"coveo-simplefilter-breadcrumb"}),i=p.$$("span",{className:"coveo-simplefilter-breadcrumb-title"},this.options.title);n.append(i.el);var r=p.$$("span",{className:"coveo-simplefilter-breadcrumb-values"});n.append(r.el),o.each(this.getSelectedLabeledCheckboxes(),function(e){var n=p.$$("span",{className:"coveo-simplefilter-breadcrumb-value"},t.getValueCaption(e.label));r.append(n.el);var i=p.$$("span",{className:"coveo-simplefilter-breadcrumb-clear"},h.SVGIcons.icons.checkboxHookExclusionMore);d.SVGDom.addClassToSVGInContainer(i.el,"coveo-simplefilter-breadcrumb-clear-svg"),n.append(i.el),n.el.title=t.getValueCaption(e.label),p.$$(n).on("click",function(){return t.handleRemoveFromBreadcrumb(e)})}),e.breadcrumbs.push({element:n.el})}},t.prototype.handleRemoveFromBreadcrumb=function(e){e.checkbox.reset(),this.refreshValueContainer()},t.prototype.handleClearBreadcrumb=function(){this.shouldTriggerQuery=!1,this.resetSimpleFilter(),this.shouldTriggerQuery=!0},t.prototype.handleQuerySuccess=function(e){e.results.results.length>0?this.findOrCreateWrapper().removeClass("coveo-no-results"):this.findOrCreateWrapper().addClass("coveo-no-results"),void 0==this.options.values&&(this.groupByBuilder.groupBy(e),this.groupByRequestValues=this.groupByBuilder.getValuesFromGroupBy(),this.refreshValueContainer(),p.$$(this.element).hasClass("coveo-simplefilter-value-container-expanded")||(this.isSticky=!1))},t.prototype.handleBuildingQuery=function(e){u.Assert.exists(e),u.Assert.exists(e.queryBuilder);var t=this.getSelectedValues();t.length>0&&e.queryBuilder.advancedExpression.addFieldExpression(this.options.field.toString(),"==",t)},t.prototype.handleDoneBuildingQuery=function(e){void 0==this.options.values&&(u.Assert.exists(e),u.Assert.exists(e.queryBuilder),this.previouslySelected=this.getSelectedValues(),this.groupByBuilder=new C.SimpleFilterValues(this,this.options),this.groupByBuilder.handleDoneBuildingQuery(e))},t.prototype.getSelectedLabeledCheckboxes=function(){return o.filter(this.checkboxes,function(e){return e.checkbox.isSelected()})},t.prototype.setDisplayedTitle=function(e){this.selectTitle.text(this.getValueCaption(e))},t.prototype.showBackdrop=function(){this.backdrop.addClass("coveo-dropdown-background-active")},t.prototype.hideBackdrop=function(){this.backdrop.removeClass("coveo-dropdown-background-active")},t.prototype.findOrCreateWrapper=function(){if(null==p.$$(this.root).find(".coveo-simplefilter-header-wrapper")){var e=p.$$("div",{className:"coveo-simplefilter-header-wrapper"});return e.insertBefore(this.element),e}var e=p.$$(this.root).find(".coveo-simplefilter-header-wrapper");return p.$$(e)},t.prototype.refreshValueContainer=function(){this.isSticky||(this.valueContainer.empty(),this.createCheckboxes()),0!=this.checkboxes.length||this.isSticky?p.$$(this.element).removeClass("coveo-simplefilter-empty"):p.$$(this.element).addClass("coveo-simplefilter-empty"),p.$$(this.circleElement).text(this.getSelectedLabeledCheckboxes().length.toString())},t.ID="SimpleFilter",t.doExport=function(){a.exportGlobally({SimpleFilter:t})},t.options={maximumNumberOfValues:y.ComponentOptions.buildNumberOption({defaultValue:5,min:0}),values:y.ComponentOptions.buildListOption(),field:y.ComponentOptions.buildFieldOption({required:!0}),title:y.ComponentOptions.buildStringOption({defaultValue:l.l("NoTitle")}),valueCaption:y.ComponentOptions.buildJsonOption()},t}(m.Component);t.SimpleFilter=S,g.Initialization.registerAutoCreateComponent(S)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(7),a=n(132),u=n(102),l=n(3),c=n(0),p=n(1),d=n(2),h=function(e){function t(n,i,o){var a=e.call(this,n,t.ID,o)||this;return a.element=n,a.options=i,a.rangeValues=[{start:u(0).toDate(),end:u().endOf("day").toDate(),label:s.l("AllDates"),endInclusive:!1},{start:u().startOf("day").subtract(1,"day").toDate(),end:u().endOf("day").toDate(),label:s.l("WithinLastDay"),endInclusive:!1},{start:u().startOf("day").subtract(1,"week").toDate(),end:u().endOf("day").toDate(),label:s.l("WithinLastWeek"),endInclusive:!1},{start:u().startOf("day").subtract(1,"month").toDate(),end:u().endOf("day").toDate(),label:s.l("WithinLastMonth"),endInclusive:!1},{start:u().startOf("day").subtract(1,"year").toDate(),end:u().endOf("day").toDate(),label:s.l("WithinLastYear"),endInclusive:!1}],a.options=r.ComponentOptions.initComponentOptions(n,t,i),a.buildFacet(),a}return i(t,e),t.prototype.isCurrentlyDisplayed=function(){return!!p.$$(this.element).isVisible()&&!this.disabled},Object.defineProperty(t.prototype,"ranges",{get:function(){return this.rangeValues},set:function(e){this.rangeValues=e,this.buildFacet()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"facet",{get:function(){return this.facetRange},enumerable:!0,configurable:!0}),t.prototype.buildFacet=function(){this.destroyFacet(),this.facetRangeElement=p.$$("div"),p.$$(this.element).append(this.facetRangeElement.el),this.facetRange=new a.FacetRange(this.facetRangeElement.el,{field:this.options.field,title:this.options.title,ranges:this.rangeValues,availableSorts:["custom"],customSort:c.pluck(this.rangeValues,"label"),id:this.options.id}),this.facetRange.isCurrentlyDisplayed=this.isCurrentlyDisplayed},t.prototype.destroyFacet=function(){this.facetRangeElement&&this.facetRangeElement.remove(),delete this.facetRange},t.ID="TimespanFacet",t.options={title:r.ComponentOptions.buildStringOption({defaultValue:s.l("LastUpdated")}),field:r.ComponentOptions.buildFieldOption({defaultValue:"@date"}),id:r.ComponentOptions.buildStringOption({postProcessing:function(e,t){return e||t.field}})},t.doExport=function(){l.exportGlobally({TimespanFacet:t})},t}(o.Component);t.TimespanFacet=h,d.Initialization.registerAutoCreateComponent(h)},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(49),s=n(3);n(489);var a=function(e){function t(n,i,o){var s=e.call(this,n,t.ID,o)||this;return s.element=n,s.options=i,s.bindings=o,s.options=r.ComponentOptions.initComponentOptions(n,t,i),s.bind.onRootElement(r.ResultListEvents.newResultDisplayed,function(e){var t=s.buildBadge(e.result,e.item);t&&s.appendBadge(t,e.item)}),s}return i(t,e),t.prototype.buildBadge=function(e,t){if(!this.shouldShowABadge(e,t))return null;var n=r.$$("div",{className:this.getClassName(e)});return this.applyTagline(e,n),this.applyColor(e,n),n},t.prototype.appendBadge=function(e,t){this.isCardLayout(t)?this.addBadgeToCardLayout(e,t):r.$$(t).prepend(e.el)},t.prototype.addBadgeToCardLayout=function(e,t){var n;null==t.parentElement?(n=r.$$("div",{className:"coveo-promoted-result-badge-container-card-layout"}),n.insertBefore(t)):n=r.$$(t.parentElement),n.append(e.el),n.append(t)},t.prototype.applyColor=function(e,t){this.isFeatured(e)&&this.options.colorForFeaturedResults&&(t.el.style.backgroundColor=this.options.colorForFeaturedResults),this.isRecommended(e)&&this.options.colorForRecommendedResults&&(t.el.style.backgroundColor=this.options.colorForRecommendedResults)},t.prototype.applyTagline=function(e,t){if(this.isFeatured(e)&&this.options.showBadgeForFeaturedResults&&t.text(this.options.captionForFeatured),this.isRecommended(e)&&this.options.showBadgeForRecommendedResults)return t.text(this.options.captionForRecommended)},t.prototype.isFeatured=function(e){return e.isTopResult},t.prototype.isRecommended=function(e){return e.isRecommendation&&!e.isTopResult},t.prototype.isTableLayout=function(e){return r.$$(e).hasClass("coveo-table-layout")},t.prototype.isCardLayout=function(e){return r.$$(e).hasClass("coveo-card-layout")},t.prototype.getClassName=function(e){return"coveo-promoted-result-badge coveo-"+(this.isFeatured(e)?"featured":"recommended")+"-result-badge"},t.prototype.shouldShowABadge=function(e,t){return!this.isTableLayout(t)&&(!(!this.isFeatured(e)||!this.options.showBadgeForFeaturedResults)||!(!this.isRecommended(e)||!this.options.showBadgeForRecommendedResults))},t.ID="PromotedResultsBadge",t.doExport=function(){s.exportGlobally({PromotedResultsBadge:t})},t.options={showBadgeForFeaturedResults:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),showBadgeForRecommendedResults:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),captionForRecommended:r.ComponentOptions.buildLocalizedStringOption({defaultValue:r.l("Recommended"),depend:"showBadgeForRecommendedResults"}),captionForFeatured:r.ComponentOptions.buildLocalizedStringOption({defaultValue:r.l("Featured"),depend:"showBadgeForFeaturedResults"}),colorForFeaturedResults:r.ComponentOptions.buildColorOption({depend:"showBadgeForFeaturedResults"}),colorForRecommendedResults:r.ComponentOptions.buildColorOption({depend:"showBadgeForRecommendedResults"})},t}(o.Component);t.PromotedResultsBadge=a,r.Initialization.registerAutoCreateComponent(a)},function(e,t,n){"use strict";e.exports=n(229).polyfill()},function(e,t,n){(function(t,n){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.4+314e4831 */ !function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function i(e){return"function"==typeof e}function o(e){Q=e}function r(e){U=e}function s(){return void 0!==B?function(){B(u)}:a()}function a(){var e=setTimeout;return function(){return e(u,1)}}function u(){for(var e=0;e1)for(var n=1;n-1?t:e}function h(e,t){t=t||{};var n=t.body;if(e instanceof h){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),i=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(o))}}),t}function m(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),i=n.shift().trim();if(i){var o=n.join(":").trim();t.append(i,o)}}),t}function y(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var g={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(g.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},C=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,i){e=t(e),i=n(i);var o=this.map[e];this.map[e]=o?o+","+i:i},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,i){this.map[t(e)]=n(i)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),i(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),i(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),i(e)},g.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var S=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},p.call(h.prototype),p.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];y.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=h,e.Response=y,e.fetch=function(e,t){return new Promise(function(n,i){var o=new h(e,t),r=new XMLHttpRequest;r.onload=function(){var e={status:r.status,statusText:r.statusText,headers:m(r.getAllResponseHeaders()||"")};e.url="responseURL"in r?r.responseURL:e.headers.get("X-Request-URL");var t="response"in r?r.response:r.responseText;n(new y(t,e))},r.onerror=function(){i(new TypeError("Network request failed"))},r.ontimeout=function(){i(new TypeError("Network request failed"))},r.open(o.method,o.url,!0),"include"===o.credentials&&(r.withCredentials=!0),"responseType"in r&&g.blob&&(r.responseType="blob"),o.headers.forEach(function(e,t){r.setRequestHeader(t,e)}),r.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";var i=n(109),o=n(241),r=n(242),s=function(){function e(){}return e.prototype.init=function(e,t){if(void 0===e)throw new Error("You must pass your token when you call 'init'");if("string"==typeof e)t=t||i.Endpoints.default,this.client=new i.Client({token:e,endpoint:t});else{if("object"!=typeof e||void 0===e.sendEvent)throw new Error("You must pass either your token or a valid object when you call 'init'");this.client=e}},e.prototype.send=function(e,t){if(void 0===this.client)throw new Error("You must call init before sending an event");switch(t=o.default({},{hash:window.location.hash},t),e){case"pageview":return void this.client.sendViewEvent({location:window.location.toString(),referrer:document.referrer,language:document.documentElement.lang,title:document.title,contentIdKey:r.popFromObject(t,"contentIdKey"),contentIdValue:r.popFromObject(t,"contentIdValue"),contentType:r.popFromObject(t,"contentType"),anonymous:r.popFromObject(t,"anonymous"),customData:t});default:throw new Error("Event type: '"+e+"' not implemented")}},e.prototype.onLoad=function(e){if(void 0===e)throw new Error("You must pass a function when you call 'onLoad'");e()},e}();t.SimpleAPI=s;var a=new s;t.SimpleAnalytics=function(e){for(var t=[],n=1;n0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]=n.numOfAttempts,!l||c)throw a;return s*=n.timeMultiple,[3,6];case 6:return[3,1];case 7:throw new Error("Something went wrong.")}})})}function o(e){var t=s({},l,e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}function r(e){return new Promise(function(t){return setTimeout(t,e)})}var s=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]=0&&a.splice(o,1),null==n.querySelector(".coveo-modal-container")&&r(n,"coveo-modal-opened"),l.parentNode&&l.parentNode.removeChild(l),!0}return!1},d=i(t,p),h=d.header,f=d.closeIcon;c.appendChild(h),c.appendChild(o(t,e)),f.addEventListener("click",function(){p()}),l.addEventListener("click",function(){p()});var m=function(e){27==e.keyCode&&-1!=n.className.indexOf("coveo-modal-opened")&&(p(),document.removeEventListener("keyup",m))};document.addEventListener("keyup",m);var y,g=function(e,t){var n=document.createElement("button");n.className="coveo-btn",n.textContent=e,n.addEventListener("click",function(){return p(t)}),y.appendChild(n)};return null!=t.buttons&&(y=document.createElement("footer"),y.className="coveo-modal-footer",c.appendChild(y),t.buttons&s.OK&&g("Ok",s.OK),t.buttons&s.APPLY&&g("Apply",s.APPLY),t.buttons&s.YES&&g("Yes",s.YES),t.buttons&s.NO&&g("No",s.NO),t.buttons&s.CANCEL&&g("Cancel",s.CANCEL)),a.push(p),null!=t.className&&(u.className+=" "+t.className),{modalBox:u,wrapper:c,buttons:y,content:c,overlay:l,close:p}}function n(e){void 0===e&&(e=!1);for(var t=0;a.length>t;){a[t](0,e)||t++}}function i(e,t){var n=document.createElement("header");if(n.className="coveo-modal-header",null!=e.title){var i=document.createElement("h1");n.appendChild(i),e.title instanceof HTMLElement?i.appendChild(e.title):i.innerHTML=e.title,!0===e.titleClose&&i.addEventListener("click",function(){return t()})}var o=document.createElement("span");o.className="coveo-small-close",n.appendChild(o);return o.innerHTML='\n \n \n \n \n ',{header:n,closeIcon:o}}function o(e,t){var n=document.createElement("div");return n.className="coveo-modal-body coveo-mod-header-paddding coveo-mod-form-top-bottom-padding",n.appendChild(t),n}function r(e,t){e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(\\s|\\b)","g"),"$1")}!function(e){e[e.OK=1]="OK",e[e.APPLY=2]="APPLY",e[e.YES=4]="YES",e[e.NO=8]="NO",e[e.CANCEL=16]="CANCEL"}(e.BUTTON||(e.BUTTON={}));var s=e.BUTTON,a=[];e.open=t,e.close=n}(e.ModalBox||(e.ModalBox={}))}(n||(n={})),e.exports=n.ModalBox},function(e,t){!function(){"use strict";var e,t,n="undefined",i="string",o=self.navigator,r=String,s=Object.prototype.hasOwnProperty,a={},u={},l=/^\s*application\/(?:vnd\.oftn\.|x-)?l10n\+json\s*(?:$|;)/i,c="locale",p="defaultLocale",d="toLocaleString",h="toLowerCase",f=Array.prototype.indexOf||function(e){for(var t=this.length,n=0;t>n;n++)if(n in this&&this[n]===e)return n;return-1},m=function(t){var n=new e;return n.open("GET",t,!1),n.send(null),200!==n.status?(setTimeout(function(){var e=new Error("Unable to load localization data: "+t);throw e.name="Localization Error",e},0),{}):JSON.parse(n.responseText)},y=r[d]=function(e){if(arguments.length>0&&"number"!=typeof e)if(typeof e===i)y(m(e));else if(!1===e)u={};else{var t,n,o;for(t in e)if(s.call(e,t)){if(n=e[t],t=t[h](),t in u&&!1!==n||(u[t]={}),!1===n)continue;if(typeof n===i){if(0!==r[c][h]().indexOf(t)){t in a||(a[t]=[]),a[t].push(n);continue}n=m(n)}for(o in n)s.call(n,o)&&(u[t][o]=n[o])}}return Function.prototype[d].apply(r,arguments)},g=function(e){for(var t,n=a[e],i=0,o=n.length;o>i;i++)t={},t[e]=m(n[i]),y(t);delete a[e]},v=r.prototype[d]=function(){var e,n=t,i=r[n?p:c],o=i[h]().split("-"),s=o.length,l=this.valueOf();t=!1;do{if(e=o.slice(0,s).join("-"),e in a&&g(e),e in u&&l in u[e])return u[e][l]}while(s-- >1);return!n&&r[p]?(t=!0,v.call(l)):l};if(typeof XMLHttpRequest===n&&typeof ActiveXObject!==n){var b=ActiveXObject;e=function(){try{return new b("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new b("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new b("Msxml2.XMLHTTP")}catch(e){}throw new Error("XMLHttpRequest not supported by this browser.")}}else e=XMLHttpRequest;if(r[p]=r[p]||"",r[c]=o&&(o.language||o.userLanguage)||"",typeof document!==n)for(var C,S=document.getElementsByTagName("link"),w=S.length;w--;){var x=S[w],_=(x.getAttribute("rel")||"")[h]().split(/\s+/);l.test(x.type)&&(-1!==f.call(_,"localizations")?y(x.getAttribute("href")):-1!==f.call(_,"localization")&&(C={},C[(x.getAttribute("hreflang")||"")[h]()]=x.getAttribute("href"),y(C)))}}(),e.exports=window.String.toLocaleString},function(e,t,n){/*! globalize - v0.1.1 - 2013-04-30 * https://github.com/jquery/globalize * Copyright 2013 ; Licensed MIT */ var i=function(t,n){var o,r,s,a,u,l,c,p,d,h,f,m,y,g,v,b,C,S,w,x,_,E,O,A;return o=function(e){return new o.prototype.init(e)},e.exports=o,o.cultures={},o.prototype={constructor:o,init:function(e){return this.cultures=o.cultures,this.cultureSelector=e,this}},o.prototype.init.prototype=o.prototype,o.cultures.default={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}},o.cultures.default.calendar=o.cultures.default.calendars.standard,o.cultures.en=o.cultures.default,o.cultureSelector="en",r=/^0x[a-f0-9]+$/i,s=/^[+\-]?infinity$/i,a=/^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/,u=/^\s+|\s+$/g,l=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},c=function(e,t){return e.substr(e.length-t.length)===t},p=function(){var e,t,i,o,r,s,a=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},u=2),"object"==typeof a||h(a)||(a={});l>u;u++)if(null!=(e=arguments[u]))for(t in e)i=a[t],o=e[t],a!==o&&(c&&o&&(f(o)||(r=d(o)))?(r?(r=!1,s=i&&d(i)?i:[]):s=i&&f(i)?i:{},a[t]=p(c,s,o)):o!==n&&(a[t]=o));return a},d=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},h=function(e){return"[object Function]"===Object.prototype.toString.call(e)},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},m=function(e,t){return 0===e.indexOf(t)},y=function(e){return(e+"").replace(u,"")},g=function(e){return isNaN(e)?NaN:Math[0>e?"ceil":"floor"](e)},v=function(e,t,n){var i;for(i=e.length;t>i;i+=1)e=n?"0"+e:e+"0";return e},b=function(e,t){for(var n=0,i=!1,o=0,r=e.length;r>o;o++){var s=e.charAt(o);switch(s){case"'":i?t.push("'"):n++,i=!1;break;case"\\":i&&t.push("\\"),i=!i;break;default:t.push(s),i=!1}}return n},C=function(e,t){t=t||"F";var n,i=e.patterns,o=t.length;if(1===o){if(!(n=i[t]))throw"Invalid date format string '"+t+"'.";t=n}else 2===o&&"%"===t.charAt(0)&&(t=t.charAt(1));return t},S=function(e,t,n){function i(e,t){var n,i=e+"";return t>1&&t>i.length?(n=y[t-2]+i,n.substr(n.length-t,t)):n=i}function o(e,t){if(m)return m[t];switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate();default:throw"Invalid part value "+t}}var r,s=n.calendar,a=s.convert;if(!t||!t.length||"i"===t){if(n&&n.name.length)if(a)r=S(e,s.patterns.F,n);else{var u=new Date(e.getTime()),l=_(e,s.eras);u.setFullYear(E(e,s,l)),r=u.toLocaleString()}else r=""+e;return r}var c=s.eras,p="s"===t;t=C(s,t),r=[];var d,h,f,m,y=["0","00","000"],g=/([^d]|^)(d|dd)([^d]|$)/g,v=0,w=x();for(!p&&a&&(m=a.fromGregorian(e));;){var O=w.lastIndex,A=w.exec(t),T=t.slice(O,A?A.index:t.length);if(v+=b(T,r),!A)break;if(v%2)r.push(A[0]);else{var R=A[0],M=R.length;switch(R){case"ddd":case"dddd":var I=3===M?s.days.namesAbbr:s.days.names;r.push(I[e.getDay()]);break;case"d":case"dd":h=!0,r.push(i(o(e,2),M));break;case"MMM":case"MMMM":var F=o(e,1);r.push(s.monthsGenitive&&function(){return h||f?h:(h=g.test(t),f=!0,h)}()?s.monthsGenitive[3===M?"namesAbbr":"names"][F]:s.months[3===M?"namesAbbr":"names"][F]);break;case"M":case"MM":r.push(i(o(e,1)+1,M));break;case"y":case"yy":case"yyyy":F=m?m[0]:E(e,s,_(e,c),p),4>M&&(F%=100),r.push(i(F,M));break;case"h":case"hh":d=e.getHours()%12,0===d&&(d=12),r.push(i(d,M));break;case"H":case"HH":r.push(i(e.getHours(),M));break;case"m":case"mm":r.push(i(e.getMinutes(),M));break;case"s":case"ss":r.push(i(e.getSeconds(),M));break;case"t":case"tt":F=12>e.getHours()?s.AM?s.AM[0]:" ":s.PM?s.PM[0]:" ",r.push(1===M?F.charAt(0):F);break;case"f":case"ff":case"fff":r.push(i(e.getMilliseconds(),3).substr(0,M));break;case"z":case"zz":d=e.getTimezoneOffset()/60,r.push((0>=d?"+":"-")+i(Math.floor(Math.abs(d)),M));break;case"zzz":d=e.getTimezoneOffset()/60,r.push((0>=d?"+":"-")+i(Math.floor(Math.abs(d)),2)+":"+i(Math.abs(e.getTimezoneOffset()%60),2));break;case"g":case"gg":s.eras&&r.push(s.eras[_(e,c)].name);break;case"/":r.push(s["/"]);break;default:throw"Invalid date format pattern '"+R+"'."}}}return r.join("")},function(){var e;e=function(e,t,n){var i=n.groupSizes,o=i[0],r=1,s=Math.pow(10,t),a=Math.round(e*s)/s;isFinite(a)||(a=e),e=a;var u=e+"",l="",c=u.split(/e/i),p=c.length>1?parseInt(c[1],10):0;u=c[0],c=u.split("."),u=c[0],l=c.length>1?c[1]:"",p>0?(l=v(l,p,!1),u+=l.slice(0,p),l=l.substr(p)):0>p&&(p=-p,u=v(u,p+1,!0),l=u.slice(-p,u.length)+l,u=u.slice(0,-p)),l=t>0?n["."]+(l.length>t?l.slice(0,t):v(l,t)):"";for(var d=u.length-1,h=n[","],f="";d>=0;){if(0===o||o>d)return u.slice(0,d+1)+(f.length?h+f+l:l);f=u.slice(d-o+1,d+1)+(f.length?h+f:""),d-=o,i.length>r&&(o=i[r],r++)}return u.slice(0,d+1)+h+f+l},w=function(t,n,i){if(!isFinite(t))return 1/0===t?i.numberFormat.positiveInfinity:t===-1/0?i.numberFormat.negativeInfinity:i.numberFormat.NaN;if(!n||"i"===n)return i.name.length?t.toLocaleString():""+t;n=n||"D";var o,r=i.numberFormat,s=Math.abs(t),a=-1;n.length>1&&(a=parseInt(n.slice(1),10));var u,l=n.charAt(0).toUpperCase();switch(l){case"D":o="n",s=g(s),-1!==a&&(s=v(""+s,a,!0)),0>t&&(s="-"+s);break;case"N":u=r;case"C":u=u||r.currency;case"P":u=u||r.percent,o=0>t?u.pattern[0]:u.pattern[1]||"n",-1===a&&(a=u.decimals),s=e(s*("P"===l?100:1),a,u);break;default:throw"Bad number format specifier: "+l}for(var c=/n|\$|-|%/g,p="";;){var d=c.lastIndex,h=c.exec(o);if(p+=o.slice(d,h?h.index:o.length),!h)break;switch(h[0]){case"n":p+=s;break;case"$":p+=r.currency.symbol;break;case"-":/[1-9]/.test(s)&&(p+=r["-"]);break;case"%":p+=r.percent.symbol}}return p}}(),x=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},_=function(e,t){if(!t)return 0;for(var n,i=e.getTime(),o=0,r=t.length;r>o;o++)if(null===(n=t[o].start)||i>=n)return o;return 0},E=function(e,t,n,i){var o=e.getFullYear();return!i&&t.eras&&(o-=t.eras[n].offset),o},function(){var e,t,n,i,o,r,s;e=function(e,t){if(100>t){var n=new Date,i=_(n),o=E(n,e,i),r=e.twoDigitYearMax;r="string"==typeof r?(new Date).getFullYear()%100+parseInt(r,10):r,(t+=o-o%100)>r&&(t-=100)}return t},t=function(e,t,n){var i,o=e.days,a=e._upperDays;return a||(e._upperDays=a=[s(o.names),s(o.namesAbbr),s(o.namesShort)]),t=r(t),n?-1===(i=l(a[1],t))&&(i=l(a[2],t)):i=l(a[0],t),i},n=function(e,t,n){var i=e.months,o=e.monthsGenitive||e.months,a=e._upperMonths,u=e._upperMonthsGen;a||(e._upperMonths=a=[s(i.names),s(i.namesAbbr)],e._upperMonthsGen=u=[s(o.names),s(o.namesAbbr)]),t=r(t);var c=l(n?a[1]:a[0],t);return 0>c&&(c=l(n?u[1]:u[0],t)),c},i=function(e,t){var n=e._parseRegExp;if(n){var i=n[t];if(i)return i}else e._parseRegExp=n={};for(var o,r=C(e,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),s=["^"],a=[],u=0,l=0,c=x();null!==(o=c.exec(r));){var p=r.slice(u,o.index);if(u=c.lastIndex,(l+=b(p,s))%2)s.push(o[0]);else{var d,h=o[0],f=h.length;switch(h){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":d="(\\D+)";break;case"tt":case"t":d="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":d="(\\d{"+f+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":d="(\\d\\d?)";break;case"zzz":d="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":d="([+-]?\\d\\d?)";break;case"/":d="(\\/)";break;default:throw"Invalid date format pattern '"+h+"'."}d&&s.push(d),a.push(o[0])}}b(r.slice(u),s),s.push("$");var m=s.join("").replace(/\s+/g,"\\s+"),y={regExp:m,groups:a};return n[t]=y},o=function(e,t,n){return t>e||e>n},r=function(e){return e.split(" ").join(" ").toUpperCase()},s=function(e){for(var t=[],n=0,i=e.length;i>n;n++)t[n]=r(e[n]);return t},O=function(r,s,a){r=y(r);var u=a.calendar,l=i(u,s),c=RegExp(l.regExp).exec(r);if(null===c)return null;for(var p,d=l.groups,h=null,f=null,g=null,v=null,b=null,C=0,S=0,w=0,x=0,_=null,E=!1,O=0,A=d.length;A>O;O++){var T=c[O+1];if(T){var R=d[O],M=R.length,I=parseInt(T,10);switch(R){case"dd":case"d":if(v=I,o(v,1,31))return null;break;case"MMM":case"MMMM":if(g=n(u,T,3===M),o(g,0,11))return null;break;case"M":case"MM":if(g=I-1,o(g,0,11))return null;break;case"y":case"yy":case"yyyy":if(f=4>M?e(u,I):I,o(f,0,9999))return null;break;case"h":case"hh":if(C=I,12===C&&(C=0),o(C,0,11))return null;break;case"H":case"HH":if(C=I,o(C,0,23))return null;break;case"m":case"mm":if(S=I,o(S,0,59))return null;break;case"s":case"ss":if(w=I,o(w,0,59))return null;break;case"tt":case"t":if(!(E=u.PM&&(T===u.PM[0]||T===u.PM[1]||T===u.PM[2]))&&(!u.AM||T!==u.AM[0]&&T!==u.AM[1]&&T!==u.AM[2]))return null;break;case"f":case"ff":case"fff":if(x=I*Math.pow(10,3-M),o(x,0,999))return null;break;case"ddd":case"dddd":if(b=t(u,T,3===M),o(b,0,6))return null;break;case"zzz":var F=T.split(/:/);if(2!==F.length)return null;if(p=parseInt(F[0],10),o(p,-12,13))return null;var $=parseInt(F[1],10);if(o($,0,59))return null;_=60*p+(m(T,"-")?-$:$);break;case"z":case"zz":if(p=I,o(p,-12,13))return null;_=60*p;break;case"g":case"gg":var D=T;if(!D||!u.eras)return null;D=y(D.toLowerCase());for(var P=0,N=u.eras.length;N>P;P++)if(D===u.eras[P].name.toLowerCase()){h=P;break}if(null===h)return null}}}var k,L=new Date,V=u.convert;if(k=V?V.fromGregorian(L)[0]:L.getFullYear(),null===f?f=k:u.eras&&(f+=u.eras[h||0].offset),null===g&&(g=0),null===v&&(v=1),V){if(null===(L=V.toGregorian(f,g,v)))return null}else{if(L.setFullYear(f,g,v),L.getDate()!==v)return null;if(null!==b&&L.getDay()!==b)return null}if(E&&12>C&&(C+=12),L.setHours(C,S,w,x),null!==_){var B=L.getMinutes()-(_+L.getTimezoneOffset());L.setHours(L.getHours()+parseInt(B/60,10),B%60)}return L}}(),A=function(e,t,n){var i,o=t["-"],r=t["+"];switch(n){case"n -":o=" "+o,r=" "+r;case"n-":c(e,o)?i=["-",e.substr(0,e.length-o.length)]:c(e,r)&&(i=["+",e.substr(0,e.length-r.length)]);break;case"- n":o+=" ",r+=" ";case"-n":m(e,o)?i=["-",e.substr(o.length)]:m(e,r)&&(i=["+",e.substr(r.length)]);break;case"(n)":m(e,"(")&&c(e,")")&&(i=["-",e.substr(1,e.length-2)])}return i||["",e]},o.prototype.findClosestCulture=function(e){return o.findClosestCulture.call(this,e)},o.prototype.format=function(e,t,n){return o.format.call(this,e,t,n)},o.prototype.localize=function(e,t){return o.localize.call(this,e,t)},o.prototype.parseInt=function(e,t,n){return o.parseInt.call(this,e,t,n)},o.prototype.parseFloat=function(e,t,n){return o.parseFloat.call(this,e,t,n)},o.prototype.culture=function(e){return o.culture.call(this,e)},o.addCultureInfo=function(e,t,n){var i={},o=!1;"string"!=typeof e?(n=e,e=this.culture().name,i=this.cultures[e]):"string"!=typeof t?(n=t,o=null==this.cultures[e],i=this.cultures[e]||this.cultures.default):(o=!0,i=this.cultures[t]),this.cultures[e]=p(!0,{},i,n),o&&(this.cultures[e].calendar=this.cultures[e].calendars.standard)},o.findClosestCulture=function(e){var t;if(!e)return this.findClosestCulture(this.cultureSelector)||this.cultures.default;if("string"==typeof e&&(e=e.split(",")),d(e)){var n,i,o=this.cultures,r=e,s=r.length,a=[];for(i=0;s>i;i++){e=y(r[i]);var u,l=e.split(";");n=y(l[0]),1===l.length?u=1:(e=y(l[1]),0===e.indexOf("q=")?(e=e.substr(2),u=parseFloat(e),u=isNaN(u)?0:u):u=1),a.push({lang:n,pri:u})}for(a.sort(function(e,t){return e.prit.pri?-1:0}),i=0;s>i;i++)if(n=a[i].lang,t=o[n])return t;for(i=0;s>i;i++)for(n=a[i].lang;;){var c=n.lastIndexOf("-");if(-1===c)break;if(n=n.substr(0,c),t=o[n])return t}for(i=0;s>i;i++){n=a[i].lang;for(var p in o){var h=o[p];if(h.language===n)return h}}}else if("object"==typeof e)return e;return t||null},o.format=function(e,t,n){var i=this.findClosestCulture(n);return e instanceof Date?e=S(e,t,i):"number"==typeof e&&(e=w(e,t,i)),e},o.localize=function(e,t){return this.findClosestCulture(t).messages[e]||this.cultures.default.messages[e]},o.parseDate=function(e,t,n){n=this.findClosestCulture(n);var i,o,r;if(t){if("string"==typeof t&&(t=[t]),t.length)for(var s=0,a=t.length;a>s;s++){var u=t[s];if(u&&(i=O(e,u,n)))break}}else{r=n.calendar.patterns;for(o in r)if(i=O(e,r[o],n))break}return i||null},o.parseInt=function(e,t,n){return g(o.parseFloat(e,t,n))},o.parseFloat=function(e,t,n){"number"!=typeof t&&(n=t,t=10);var i=this.findClosestCulture(n),o=NaN,u=i.numberFormat;if(e.indexOf(i.numberFormat.currency.symbol)>-1&&(e=e.replace(i.numberFormat.currency.symbol,""),e=e.replace(i.numberFormat.currency["."],i.numberFormat["."])),e.indexOf(i.numberFormat.percent.symbol)>-1&&(e=e.replace(i.numberFormat.percent.symbol,"")),e=e.replace(/ /g,""),s.test(e))o=parseFloat(e);else if(!t&&r.test(e))o=parseInt(e,16);else{var l=A(e,u,u.pattern[0]),c=l[0],p=l[1];""===c&&"(n)"!==u.pattern[0]&&(l=A(e,u,"(n)"),c=l[0],p=l[1]),""===c&&"-n"!==u.pattern[0]&&(l=A(e,u,"-n"),c=l[0],p=l[1]),c=c||"+";var d,h,f=p.indexOf("e");0>f&&(f=p.indexOf("E")),0>f?(h=p,d=null):(h=p.substr(0,f),d=p.substr(f+1));var m,y,g=u["."],v=h.indexOf(g);0>v?(m=h,y=null):(m=h.substr(0,v),y=h.substr(v+g.length));var b=u[","];m=m.split(b).join("");var C=b.replace(/\u00A0/g," ");b!==C&&(m=m.split(C).join(""));var S=c+m;if(null!==y&&(S+="."+y),null!==d){var w=A(d,u,"-n");S+="e"+(w[0]||"+")+w[1]}a.test(S)&&(o=parseFloat(S))}return o},o.culture=function(e){return e!==n&&(this.cultureSelector=e),this.findClosestCulture(e)||this.cultures.default},i}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(116);t.AnalyticsEndpoint=i.AnalyticsEndpoint;var o=n(67);t.EndpointCaller=o.EndpointCaller;var r=n(108);t.QueryError=r.QueryError},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(34);t.QueryController=i.QueryController;var o=n(117);t.HistoryController=o.HistoryController;var r=n(118);t.LocalStorageHistoryController=r.LocalStorageHistoryController},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(){function e(e,t){this.endpoint=e,this.callOptions=t,this.options=e.options}return e.prototype.getBaseUri=function(){return this.endpoint.getBaseUri()},e.prototype.getBaseAlertsUri=function(){return this.endpoint.getBaseAlertsUri()},e.prototype.getAuthenticationProviderUri=function(e,t,n){return this.endpoint.getAuthenticationProviderUri(e,t,n)},e.prototype.isJsonp=function(){return this.endpoint.isJsonp()},e.prototype.search=function(e,t){return this.endpoint.search(e,this.enrichCallOptions(t))},e.prototype.getExportToExcelLink=function(e,t,n){return this.endpoint.getExportToExcelLink(e,t,this.enrichCallOptions(n))},e.prototype.tagDocument=function(e,t){return this.endpoint.tagDocument(e,this.enrichCallOptions(t))},e.prototype.getQuerySuggest=function(e,t){return this.endpoint.getQuerySuggest(e,this.enrichCallOptions(t))},e.prototype.rateDocument=function(e,t){return this.endpoint.rateDocument(e,this.enrichCallOptions(t))},e.prototype.getRawDataStream=function(e,t,n){return this.endpoint.getRawDataStream(e,t,this.enrichCallOptions(n))},e.prototype.getDocument=function(e,t){return this.endpoint.getDocument(e,this.enrichCallOptions(t))},e.prototype.getDocumentText=function(e,t){return this.endpoint.getDocumentText(e,this.enrichCallOptions(t))},e.prototype.getDocumentHtml=function(e,t){return this.endpoint.getDocumentHtml(e,this.enrichCallOptions(t))},e.prototype.getViewAsHtmlUri=function(e,t){return this.endpoint.getViewAsHtmlUri(e,this.enrichCallOptions(t))},e.prototype.getViewAsDatastreamUri=function(e,t,n){return this.endpoint.getViewAsDatastreamUri(e,t,this.enrichCallOptions(n))},e.prototype.listFieldValuesBatch=function(e,t){return this.endpoint.listFieldValuesBatch(e,this.enrichCallOptions(t))},e.prototype.listFieldValues=function(e,t){return this.endpoint.listFieldValues(e,this.enrichCallOptions(t))},e.prototype.listFields=function(e){return this.endpoint.listFields(this.enrichCallOptions(e))},e.prototype.extensions=function(e){return this.endpoint.extensions(this.enrichCallOptions(e))},e.prototype.follow=function(e){return this.endpoint.follow(e)},e.prototype.listSubscriptions=function(e){return this.endpoint.listSubscriptions(e)},e.prototype.updateSubscription=function(e){return this.endpoint.updateSubscription(e)},e.prototype.deleteSubscription=function(e){return this.endpoint.deleteSubscription(e)},e.prototype.logError=function(e){return this.endpoint.logError(e)},e.prototype.enrichCallOptions=function(e){return i.extend({},e,this.callOptions)},e}();t.SearchEndpointWithDefaultCallOptions=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(26));var i=n(8);t.ComponentOptions=i.ComponentOptions,t.ComponentOptionsType=i.ComponentOptionsType;var o=n(6);t.Component=o.Component;var r=n(27);t.BaseComponent=r.BaseComponent;var s=n(35);t.RootComponent=s.RootComponent;var a=n(36);t.QueryBuilder=a.QueryBuilder;var u=n(55);t.ExpressionBuilder=u.ExpressionBuilder;var l=n(2);t.Initialization=l.Initialization;var c=n(2);t.CoveoJQuery=c.Initialization;var p=n(151);t.initCoveoJQuery=p.initCoveoJQuery},function(e,t,n){var i;!function(){"use strict";/** * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. * * @codingstandard ftlabs-jsv2 * @copyright The Financial Times Limited [All Rights Reserved] * @license MIT License (see LICENSE.txt) */ function o(e,t){var n;if(t=t||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=t.touchBoundary||10,this.layer=e,this.tapDelay=t.tapDelay||200,this.tapTimeout=t.tapTimeout||700,!o.notNeeded(e)){for(var i=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],r=this,a=0,u=i.length;a=0,s=navigator.userAgent.indexOf("Android")>0&&!r,a=/iP(ad|hone|od)/.test(navigator.userAgent)&&!r,u=a&&/OS 4_\d(_\d)?/.test(navigator.userAgent),l=a&&/OS [6-7]_\d/.test(navigator.userAgent),c=navigator.userAgent.indexOf("BB10")>0;o.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(a&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},o.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!s;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},o.prototype.sendClick=function(e,t){var n,i;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),i=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},o.prototype.determineEventType=function(e){return s&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},o.prototype.focus=function(e){var t;a&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},o.prototype.updateScrollParent=function(e){var t,n;if(!(t=e.fastClickScrollParent)||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},o.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},o.prototype.onTouchStart=function(e){var t,n,i;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],a){if(i=window.getSelection(),i.rangeCount&&!i.isCollapsed)return!0;if(!u){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTimen||Math.abs(t.pageY-this.touchStartY)>n},o.prototype.onTouchMove=function(e){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},o.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},o.prototype.onTouchEnd=function(e){var t,n,i,o,r,c=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,l&&(r=e.changedTouches[0],c=document.elementFromPoint(r.pageX-window.pageXOffset,r.pageY-window.pageYOffset)||c,c.fastClickScrollParent=this.targetElement.fastClickScrollParent),"label"===(i=c.tagName.toLowerCase())){if(t=this.findControl(c)){if(this.focus(c),s)return!1;c=t}}else if(this.needsFocus(c))return e.timeStamp-n>100||a&&window.top!==window&&"input"===i?(this.targetElement=null,!1):(this.focus(c),this.sendClick(c,e),a&&"select"===i||(this.targetElement=null,e.preventDefault()),!1);return!(!a||u||!(o=c.fastClickScrollParent)||o.fastClickLastScrollTop===o.scrollTop)||(this.needsClick(c)||(e.preventDefault(),this.sendClick(c,e)),!1)},o.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},o.prototype.onMouse=function(e){return!this.targetElement||(!!e.forwardedTouchEvent||(!e.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1))))},o.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},o.prototype.destroy=function(){var e=this.layer;s&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},o.notNeeded=function(e){var t,n,i;if(void 0===window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!s)return!0;if(t=document.querySelector("meta[name=viewport]")){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(c&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(-1!==t.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction||(!!(+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]>=27&&(t=document.querySelector("meta[name=viewport]"))&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))||("none"===e.style.touchAction||"manipulation"===e.style.touchAction))},o.attach=function(e,t){return new o(e,t)},void 0!==(i=function(){return o}.call(t,n,t,e))&&(e.exports=i)}()},function(e,t,n){var i,o;!function(r){/** * This script gives you the zone info key representing your device's time zone setting. * * @name jsTimezoneDetect * @version 1.0.6 * @author Jon Nylander * @license MIT License - https://bitbucket.org/pellepim/jstimezonedetect/src/default/LICENCE.txt * * For usage and examples, visit: * http://pellepim.bitbucket.org/jstz/ * * Copyright (c) Jon Nylander */ var s=function(){"use strict";var e={DAY:864e5,HOUR:36e5,MINUTE:6e4,SECOND:1e3,BASELINE_YEAR:2014,MAX_SCORE:864e6,AMBIGUITIES:{"America/Denver":["America/Mazatlan"],"Europe/London":["Africa/Casablanca"],"America/Chicago":["America/Mexico_City"],"America/Asuncion":["America/Campo_Grande","America/Santiago"],"America/Montevideo":["America/Sao_Paulo","America/Santiago"],"Asia/Beirut":["Asia/Amman","Asia/Jerusalem","Europe/Helsinki","Asia/Damascus","Africa/Cairo","Asia/Gaza","Europe/Minsk"],"Pacific/Auckland":["Pacific/Fiji"],"America/Los_Angeles":["America/Santa_Isabel"],"America/New_York":["America/Havana"],"America/Halifax":["America/Goose_Bay"],"America/Godthab":["America/Miquelon"],"Asia/Dubai":["Asia/Yerevan"],"Asia/Jakarta":["Asia/Krasnoyarsk"],"Asia/Shanghai":["Asia/Irkutsk","Australia/Perth"],"Australia/Sydney":["Australia/Lord_Howe"],"Asia/Tokyo":["Asia/Yakutsk"],"Asia/Dhaka":["Asia/Omsk"],"Asia/Baku":["Asia/Yerevan"],"Australia/Brisbane":["Asia/Vladivostok"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Majuro":["Asia/Kamchatka","Pacific/Fiji"],"Pacific/Tongatapu":["Pacific/Apia"],"Asia/Baghdad":["Europe/Minsk","Europe/Moscow"],"Asia/Karachi":["Asia/Yekaterinburg"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"]}},t=function(e){var t=-e.getTimezoneOffset();return null!==t?t:0},n=function(){var n=t(new Date(e.BASELINE_YEAR,0,2)),i=t(new Date(e.BASELINE_YEAR,5,2)),o=n-i;return o<0?n+",1":o>0?i+",1,s":n+",0"},i=function(){var e,t;if("undefined"!=typeof Intl&&void 0!==Intl.DateTimeFormat&&void 0!==(e=Intl.DateTimeFormat())&&void 0!==e.resolvedOptions)return t=e.resolvedOptions().timeZone,t&&(t.indexOf("/")>-1||"UTC"===t)?t:void 0},o=function(e){for(var t=new Date(e,0,1,0,0,1,0).getTime(),n=new Date(e,12,31,23,59,59).getTime(),i=t,o=new Date(i).getTimezoneOffset(),s=null,a=null;io&&(a=u),o=l),i+=864e5}return!(!s||!a)&&{s:r(s).getTime(),e:r(a).getTime()}},r=function t(n,i,o){void 0===i&&(i=e.DAY,o=e.HOUR);for(var r=new Date(n.getTime()-i).getTime(),s=n.getTime()+i,a=new Date(r).getTimezoneOffset(),u=r,l=null;u=i.rules[r].s&&t[r].e<=i.rules[r].e)){o="N/A";break}if(o=0,o+=Math.abs(t[r].s-i.rules[r].s),o+=Math.abs(i.rules[r].e-t[r].e),o>e.MAX_SCORE){o="N/A";break}}return o=a(t,n,o,i)}(o[l]);"N/A"!==p&&(i[c.name]=p)}for(var d in i)if(i.hasOwnProperty(d))for(var h=0;h'},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t){e.exports=''},function(e,t,n){var i,o;!function(r,s){i=s,void 0!==(o="function"==typeof i?i.call(t,n,t,e):i)&&(e.exports=o)}(0,function(){function e(t){return"string"==typeof t?t.replace(/[^A-Za-z0-9]/g,function(t){return e.characters[t]||t}):t}return e.characters={"Á":"A","Ä‚":"A","Ắ":"A","Ặ":"A","Ằ":"A","Ẳ":"A","Ẵ":"A","Ǎ":"A","Â":"A","Ấ":"A","Ậ":"A","Ầ":"A","Ẩ":"A","Ẫ":"A","Ä":"A","Çž":"A","Ȧ":"A","Ç ":"A","Ạ":"A","È€":"A","À":"A","Ả":"A","È‚":"A","Ä€":"A","Ä„":"A","Ã…":"A","Ǻ":"A","Ḁ":"A","Ⱥ":"A","Ã":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ḃ":"B","Ḅ":"B","Ɓ":"B","Ḇ":"B","Ƀ":"B","Æ‚":"B","Ć":"C","ÄŒ":"C","Ç":"C","Ḉ":"C","Ĉ":"C","ÄŠ":"C","Ƈ":"C","È»":"C","ÄŽ":"D","Ḑ":"D","Ḓ":"D","Ḋ":"D","Ḍ":"D","ÆŠ":"D","Ḏ":"D","Dz":"D","Ç…":"D","Đ":"D","Æ‹":"D","DZ":"DZ","Ç„":"DZ","É":"E","Ä”":"E","Äš":"E","Ȩ":"E","Ḝ":"E","Ê":"E","Ế":"E","Ệ":"E","Ề":"E","Ể":"E","Ễ":"E","Ḙ":"E","Ë":"E","Ä–":"E","Ẹ":"E","È„":"E","È":"E","Ẻ":"E","Ȇ":"E","Ä’":"E","Ḗ":"E","Ḕ":"E","Ę":"E","Ɇ":"E","Ẽ":"E","Ḛ":"E","Ꝫ":"ET","Ḟ":"F","Æ‘":"F","Ç´":"G","Äž":"G","Ǧ":"G","Ä¢":"G","Äœ":"G","Ä ":"G","Æ“":"G","Ḡ":"G","Ǥ":"G","Ḫ":"H","Èž":"H","Ḩ":"H","Ĥ":"H","â±§":"H","Ḧ":"H","Ḣ":"H","Ḥ":"H","Ħ":"H","Í":"I","Ĭ":"I","Ǐ":"I","ÃŽ":"I","Ï":"I","Ḯ":"I","İ":"I","Ị":"I","Ȉ":"I","ÃŒ":"I","Ỉ":"I","ÈŠ":"I","Ī":"I","Ä®":"I","Æ—":"I","Ĩ":"I","Ḭ":"I","Ꝺ":"D","Ꝼ":"F","Ᵹ":"G","êž‚":"R","êž„":"S","Ꞇ":"T","Ꝭ":"IS","Ä´":"J","Ɉ":"J","Ḱ":"K","Ǩ":"K","Ķ":"K","Ⱪ":"K","Ꝃ":"K","Ḳ":"K","Ƙ":"K","Ḵ":"K","Ꝁ":"K","Ꝅ":"K","Ĺ":"L","Ƚ":"L","Ľ":"L","Ä»":"L","Ḽ":"L","Ḷ":"L","Ḹ":"L","â± ":"L","Ꝉ":"L","Ḻ":"L","Ä¿":"L","â±¢":"L","Lj":"L","Ł":"L","LJ":"LJ","Ḿ":"M","á¹€":"M","Ṃ":"M","â±®":"M","Ń":"N","Ň":"N","Å…":"N","Ṋ":"N","Ṅ":"N","Ṇ":"N","Ǹ":"N","Ɲ":"N","Ṉ":"N","È ":"N","Ç‹":"N","Ñ":"N","ÇŠ":"NJ","Ó":"O","ÅŽ":"O","Ç‘":"O","Ô":"O","Ố":"O","Ộ":"O","á»’":"O","á»”":"O","á»–":"O","Ö":"O","Ȫ":"O","È®":"O","Ȱ":"O","Ọ":"O","Ő":"O","ÈŒ":"O","Ã’":"O","Ỏ":"O","Æ ":"O","Ớ":"O","Ợ":"O","Ờ":"O","Ở":"O","á» ":"O","ÈŽ":"O","Ꝋ":"O","Ꝍ":"O","ÅŒ":"O","á¹’":"O","Ṑ":"O","ÆŸ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Õ":"O","Ṍ":"O","Ṏ":"O","Ȭ":"O","Æ¢":"OI","Ꝏ":"OO","Ɛ":"E","Ɔ":"O","È¢":"OU","á¹”":"P","á¹–":"P","Ꝓ":"P","Ƥ":"P","Ꝕ":"P","â±£":"P","Ꝑ":"P","Ꝙ":"Q","Ꝗ":"Q","Å”":"R","Ř":"R","Å–":"R","Ṙ":"R","Ṛ":"R","Ṝ":"R","Ȑ":"R","È’":"R","Ṟ":"R","ÉŒ":"R","Ɽ":"R","Ꜿ":"C","ÆŽ":"E","Åš":"S","Ṥ":"S","Å ":"S","Ṧ":"S","Åž":"S","Åœ":"S","Ș":"S","á¹ ":"S","á¹¢":"S","Ṩ":"S","ß":"ss","Ť":"T","Å¢":"T","á¹°":"T","Èš":"T","Ⱦ":"T","Ṫ":"T","Ṭ":"T","Ƭ":"T","á¹®":"T","Æ®":"T","Ŧ":"T","Ɐ":"A","Ꞁ":"L","Æœ":"M","É…":"V","Ꜩ":"TZ","Ú":"U","Ŭ":"U","Ç“":"U","Û":"U","á¹¶":"U","Ü":"U","Ç—":"U","Ç™":"U","Ç›":"U","Ç•":"U","á¹²":"U","Ụ":"U","Ű":"U","È”":"U","Ù":"U","Ủ":"U","Ư":"U","Ứ":"U","á»°":"U","Ừ":"U","Ử":"U","á»®":"U","È–":"U","Ū":"U","Ṻ":"U","Ų":"U","Å®":"U","Ũ":"U","Ṹ":"U","á¹´":"U","Ꝟ":"V","á¹¾":"V","Ʋ":"V","á¹¼":"V","ê ":"VY","Ẃ":"W","Å´":"W","Ẅ":"W","Ẇ":"W","Ẉ":"W","Ẁ":"W","â±²":"W","Ẍ":"X","Ẋ":"X","Ý":"Y","Ŷ":"Y","Ÿ":"Y","Ẏ":"Y","á»´":"Y","Ỳ":"Y","Ƴ":"Y","á»¶":"Y","Ỿ":"Y","Ȳ":"Y","ÉŽ":"Y","Ỹ":"Y","Ź":"Z","Ž":"Z","Ẑ":"Z","Ⱬ":"Z","Å»":"Z","Ẓ":"Z","Ȥ":"Z","Ẕ":"Z","Ƶ":"Z","IJ":"IJ","Å’":"OE","á´€":"A","ᴁ":"AE","Ê™":"B","á´ƒ":"B","á´„":"C","á´…":"D","á´‡":"E","ꜰ":"F","É¢":"G","Ê›":"G","Êœ":"H","ɪ":"I","ʁ":"R","á´Š":"J","á´‹":"K","ÊŸ":"L","á´Œ":"L","ᴍ":"M","É´":"N","ᴏ":"O","ɶ":"OE","ᴐ":"O","á´•":"OU","á´˜":"P","Ê€":"R","á´Ž":"N","á´™":"R","ꜱ":"S","á´›":"T","â±»":"E","á´š":"R","á´œ":"U","á´ ":"V","á´¡":"W","ʏ":"Y","á´¢":"Z","á":"a","ă":"a","ắ":"a","ặ":"a","ằ":"a","ẳ":"a","ẵ":"a","ÇŽ":"a","â":"a","ấ":"a","ậ":"a","ầ":"a","ẩ":"a","ẫ":"a","ä":"a","ÇŸ":"a","ȧ":"a","Ç¡":"a","ạ":"a","ȁ":"a","à ":"a","ả":"a","ȃ":"a","ā":"a","Ä…":"a","ᶏ":"a","ẚ":"a","Ã¥":"a","Ç»":"a","ḁ":"a","â±¥":"a","ã":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ḃ":"b","ḅ":"b","É“":"b","ḇ":"b","ᵬ":"b","á¶€":"b","Æ€":"b","ƃ":"b","ɵ":"o","ć":"c","č":"c","ç":"c","ḉ":"c","ĉ":"c","É•":"c","Ä‹":"c","ƈ":"c","ȼ":"c","ď":"d","ḑ":"d","ḓ":"d","È¡":"d","ḋ":"d","ḍ":"d","É—":"d","á¶‘":"d","ḏ":"d","áµ­":"d","ᶁ":"d","Ä‘":"d","É–":"d","ÆŒ":"d","ı":"i","È·":"j","ÉŸ":"j","Ê„":"j","dz":"dz","dž":"dz","é":"e","Ä•":"e","Ä›":"e","È©":"e","ḝ":"e","ê":"e","ế":"e","ệ":"e","ề":"e","ể":"e","á»…":"e","ḙ":"e","ë":"e","Ä—":"e","ẹ":"e","È…":"e","è":"e","ẻ":"e","ȇ":"e","Ä“":"e","ḗ":"e","ḕ":"e","ⱸ":"e","Ä™":"e","á¶’":"e","ɇ":"e","ẽ":"e","ḛ":"e","ꝫ":"et","ḟ":"f","Æ’":"f","áµ®":"f","á¶‚":"f","ǵ":"g","ÄŸ":"g","ǧ":"g","Ä£":"g","ĝ":"g","Ä¡":"g","É ":"g","ḡ":"g","ᶃ":"g","Ç¥":"g","ḫ":"h","ÈŸ":"h","ḩ":"h","Ä¥":"h","ⱨ":"h","ḧ":"h","ḣ":"h","ḥ":"h","ɦ":"h","ẖ":"h","ħ":"h","Æ•":"hv","í":"i","Ä­":"i","ǐ":"i","î":"i","ï":"i","ḯ":"i","ị":"i","ȉ":"i","ì":"i","ỉ":"i","È‹":"i","Ä«":"i","į":"i","á¶–":"i","ɨ":"i","Ä©":"i","ḭ":"i","ꝺ":"d","ꝼ":"f","áµ¹":"g","ꞃ":"r","êž…":"s","ꞇ":"t","ꝭ":"is","ǰ":"j","ĵ":"j","ʝ":"j","ɉ":"j","ḱ":"k","Ç©":"k","Ä·":"k","ⱪ":"k","ꝃ":"k","ḳ":"k","Æ™":"k","ḵ":"k","á¶„":"k","ꝁ":"k","ꝅ":"k","ĺ":"l","Æš":"l","ɬ":"l","ľ":"l","ļ":"l","ḽ":"l","È´":"l","ḷ":"l","ḹ":"l","ⱡ":"l","ꝉ":"l","ḻ":"l","Å€":"l","É«":"l","á¶…":"l","É­":"l","Å‚":"l","lj":"lj","Å¿":"s","ẜ":"s","ẛ":"s","ẝ":"s","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ᵯ":"m","ᶆ":"m","Å„":"n","ň":"n","ņ":"n","ṋ":"n","ȵ":"n","á¹…":"n","ṇ":"n","ǹ":"n","ɲ":"n","ṉ":"n","Æž":"n","áµ°":"n","ᶇ":"n","ɳ":"n","ñ":"n","ÇŒ":"nj","ó":"o","ŏ":"o","Ç’":"o","ô":"o","ố":"o","á»™":"o","ồ":"o","ổ":"o","á»—":"o","ö":"o","È«":"o","ȯ":"o","ȱ":"o","ọ":"o","Å‘":"o","ȍ":"o","ò":"o","ỏ":"o","Æ¡":"o","á»›":"o","ợ":"o","ờ":"o","ở":"o","ỡ":"o","ȏ":"o","ꝋ":"o","ꝍ":"o","ⱺ":"o","ō":"o","ṓ":"o","ṑ":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","õ":"o","ṍ":"o","ṏ":"o","È­":"o","Æ£":"oi","ꝏ":"oo","É›":"e","á¶“":"e","É”":"o","á¶—":"o","È£":"ou","ṕ":"p","á¹—":"p","ꝓ":"p","Æ¥":"p","áµ±":"p","ᶈ":"p","ꝕ":"p","áµ½":"p","ꝑ":"p","ꝙ":"q","Ê ":"q","É‹":"q","ꝗ":"q","Å•":"r","Å™":"r","Å—":"r","á¹™":"r","á¹›":"r","ṝ":"r","È‘":"r","ɾ":"r","áµ³":"r","È“":"r","ṟ":"r","ɼ":"r","áµ²":"r","ᶉ":"r","ɍ":"r","ɽ":"r","ↄ":"c","ꜿ":"c","ɘ":"e","É¿":"r","Å›":"s","á¹¥":"s","Å¡":"s","á¹§":"s","ÅŸ":"s","ŝ":"s","È™":"s","ṡ":"s","á¹£":"s","ṩ":"s","Ê‚":"s","áµ´":"s","á¶Š":"s","È¿":"s","É¡":"g","á´‘":"o","á´“":"o","ᴝ":"u","Å¥":"t","Å£":"t","á¹±":"t","È›":"t","ȶ":"t","ẗ":"t","ⱦ":"t","ṫ":"t","á¹­":"t","Æ­":"t","ṯ":"t","áµµ":"t","Æ«":"t","ʈ":"t","ŧ":"t","ᵺ":"th","ɐ":"a","á´‚":"ae","ǝ":"e","áµ·":"g","É¥":"h","Ê®":"h","ʯ":"h","á´‰":"i","Êž":"k","ꞁ":"l","ɯ":"m","ɰ":"m","á´”":"oe","ɹ":"r","É»":"r","ɺ":"r","â±¹":"r","ʇ":"t","ÊŒ":"v","ʍ":"w","ÊŽ":"y","ꜩ":"tz","ú":"u","Å­":"u","Ç”":"u","û":"u","á¹·":"u","ü":"u","ǘ":"u","Çš":"u","Çœ":"u","Ç–":"u","á¹³":"u","ụ":"u","ű":"u","È•":"u","ù":"u","á»§":"u","ư":"u","ứ":"u","á»±":"u","ừ":"u","á»­":"u","ữ":"u","È—":"u","Å«":"u","á¹»":"u","ų":"u","á¶™":"u","ů":"u","Å©":"u","á¹¹":"u","á¹µ":"u","ᵫ":"ue","ꝸ":"um","â±´":"v","ꝟ":"v","ṿ":"v","Ê‹":"v","á¶Œ":"v","â±±":"v","á¹½":"v","ꝡ":"vy","ẃ":"w","ŵ":"w","ẅ":"w","ẇ":"w","ẉ":"w","ẁ":"w","â±³":"w","ẘ":"w","ẍ":"x","ẋ":"x","ᶍ":"x","ý":"y","Å·":"y","ÿ":"y","ẏ":"y","ỵ":"y","ỳ":"y","Æ´":"y","á»·":"y","ỿ":"y","ȳ":"y","ẙ":"y","ɏ":"y","ỹ":"y","ź":"z","ž":"z","ẑ":"z","Ê‘":"z","ⱬ":"z","ż":"z","ẓ":"z","È¥":"z","ẕ":"z","áµ¶":"z","á¶Ž":"z","ʐ":"z","ƶ":"z","É€":"z","ff":"ff","ffi":"ffi","ffl":"ffl","fi":"fi","fl":"fl","ij":"ij","Å“":"oe","st":"st","ₐ":"a","â‚‘":"e","áµ¢":"i","â±¼":"j","â‚’":"o","áµ£":"r","ᵤ":"u","áµ¥":"v","â‚“":"x","Ё":"YO","Й":"I","Ц":"TS","У":"U","К":"K","Е":"E","Н":"N","Г":"G","Ш":"SH","Щ":"SCH","З":"Z","Ð¥":"H","Ъ":"'","Ñ‘":"yo","й":"i","ц":"ts","у":"u","к":"k","е":"e","н":"n","г":"g","ш":"sh","щ":"sch","з":"z","Ñ…":"h","ÑŠ":"'","Ф":"F","Ы":"I","Ð’":"V","А":"a","П":"P","Ð ":"R","О":"O","Л":"L","Д":"D","Ж":"ZH","Э":"E","Ñ„":"f","Ñ‹":"i","в":"v","а":"a","п":"p","Ñ€":"r","о":"o","л":"l","д":"d","ж":"zh","э":"e","Я":"Ya","Ч":"CH","С":"S","М":"M","И":"I","Т":"T","Ь":"'","Б":"B","Ю":"YU","я":"ya","ч":"ch","с":"s","м":"m","и":"i","Ñ‚":"t","ÑŒ":"'","б":"b","ÑŽ":"yu"},e})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(){function e(){}return e.evaluateFieldsToMatch=function(e,t){var n=!0;return i.each(e,function(e){var o=!1;e.values?i.each(e.values,function(n){o||(o=t.raw[e.field]&&t.raw[e.field].toLowerCase()==n.toLowerCase())}):o=null!=t.raw[e.field],n=n&&o}),n},e}();t.TemplateFieldsEvaluator=o},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(10),r=n(33),s=n(25),a=n(1),u=n(58),l=n(50),c=function(){function e(e,t,n,i){var s=this;this.debugInstance=e,this.element=t,this.onSearch=n,this.infoToDebug=i,this.debug=!1,this.enableQuerySyntax=!1,this.highlightRecommendation=!1,this.requestAllFields=!1,this.widgets=[],this.widgets.push(this.buildEnabledHighlightRecommendation()),this.widgets.push(this.buildEnableDebugCheckbox()),this.widgets.push(this.buildEnableQuerySyntaxCheckbox()),this.widgets.push(this.buildRequestAllFieldsCheckbox()),this.widgets.push(this.buildSearch()),this.moveTo(t),a.$$(this.root).on(r.ResultListEvents.newResultDisplayed,function(e,t){return s.handleNewResultDisplayed(t)}),a.$$(this.root).on(o.QueryEvents.doneBuildingQuery,function(e,t){return s.handleDoneBuildingQuery(t)})}return e.prototype.moveTo=function(e){i.each(this.widgets,function(t){return e.appendChild(t)}),this.element=e},e.prototype.setSearch=function(e){this.onSearch=e},e.prototype.setNewInfoToDebug=function(e){this.infoToDebug=e},Object.defineProperty(e.prototype,"bindings",{get:function(){return this.debugInstance.bindings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this.debugInstance.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryOptions",{get:function(){return{closeModalBox:!1,origin:this.debugInstance}},enumerable:!0,configurable:!0}),e.prototype.handleNewResultDisplayed=function(e){null!=e.item&&e.result.isRecommendation&&this.highlightRecommendation&&a.$$(e.item).addClass("coveo-is-recommendation")},e.prototype.handleDoneBuildingQuery=function(e){e.queryBuilder.enableDebug=this.debug||e.queryBuilder.enableDebug,this.requestAllFields&&(e.queryBuilder.fieldsToInclude=void 0,e.queryBuilder.includeRequiredFields=!1)},e.prototype.buildSearch=function(){var e=this,t=new l.TextInput(function(t){var n=t.getValue().toLowerCase();e.onSearch(n)},"Search in debug");return this.search=t.build(),this.search},e.prototype.buildEnableDebugCheckbox=function(){var e=this,t=new u.Checkbox(function(t){e.debug=t.isSelected(),e.bindings.queryController.executeQuery(e.queryOptions),e.search.querySelector("input").value=""},"Enable query debug");return this.debug&&t.select(),t.build()},e.prototype.buildEnableQuerySyntaxCheckbox=function(){var e=this,t=new u.Checkbox(function(t){e.enableQuerySyntax=t.isSelected(),e.bindings.componentOptionsModel.set(s.COMPONENT_OPTIONS_ATTRIBUTES.SEARCH_BOX,{enableQuerySyntax:e.enableQuerySyntax}),e.bindings.queryController.executeQuery(e.queryOptions)},"Enable query syntax in search box");return this.enableQuerySyntax&&t.select(),t.build()},e.prototype.buildRequestAllFieldsCheckbox=function(){var e=this,t=new u.Checkbox(function(t){e.requestAllFields=t.isSelected(),e.bindings.queryController.executeQuery(e.queryOptions)},"Request all fields available");return this.requestAllFields&&t.select(),t.build()},e.prototype.buildEnabledHighlightRecommendation=function(){var e=this,t=new u.Checkbox(function(t){e.highlightRecommendation=t.isSelected(),e.bindings.queryController.executeQuery(e.queryOptions)},"Highlight recommendation");return this.highlightRecommendation&&t.select(),t.build()},e}();t.DebugHeader=c},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),o=n(0),r=function(){function e(e){this.bindings=e}return e.prototype.generateDebugInfoForResult=function(e){var t=this;return{result:e,fields:function(){return t.buildFieldsSection(e)},rankingInfo:function(){return t.buildRankingInfoSection(e)}}},e.prototype.fetchFields=function(){var e=this;return null==this.fields?this.bindings.queryController.getEndpoint().listFields().then(function(t){return e.fields={},t.forEach(function(t){e.fields[t.name]=t}),e.fields}):Promise.resolve(this.fields)},e.prototype.buildRankingInfoSection=function(e){return e.rankingInfo&&this.parseRankingInfo(e.rankingInfo)},e.prototype.parseWeights=function(e){var t=e.match(/(\w+(?:\s\w+)*): ([-0-9]+)/g);return o.object(o.map(t,function(e){var t=e.match(/^(\w+(?:\s\w+)*): ([-0-9]+)$/);return[t[1],Number(t[2])]}))},e.prototype.buildFieldsSection=function(e){return this.fetchFields().then(function(t){var n={};return o.each(e.raw,function(e,i){var r=t["@"+i];null==r&&i.match(/^sys/)&&(r=t["@"+i.substr(3)]),null==r?n["@"+i]=e:"Date"==r.fieldType?n["@"+i]=new Date(e):r.splitGroupByField&&o.isString(e)?n["@"+i]=e.split(/\s*;\s*/):n["@"+i]=e}),n})},e.prototype.parseRankingInfo=function(e){var t=this,n={};if(e){var r=/Document weights:\n((?:.)*?)\n+/g.exec(e),s=/Terms weights:\n((?:.|\n)*)\n+/g.exec(e),a=/Total weight: ([0-9]+)/g.exec(e);if(r&&r[1]&&(n["Document weights"]=this.parseWeights(r[1])),a&&a[1]&&(n["Total weight"]=Number(a[1])),s&&s[1]){var u=i.StringUtils.match(s[1],/((?:[^:]+: [0-9]+, [0-9]+; )+)\n((?:\w+: [0-9]+; )+)/g);n["Terms weights"]=o.object(o.map(u,function(e){var n=o.object(o.map(i.StringUtils.match(e[1],/([^:]+): ([0-9]+), ([0-9]+); /g),function(e){return[e[1],{Correlation:Number(e[2]),"TF-IDF":Number(e[3])}]})),r=t.parseWeights(e[2]);return[o.keys(n).join(", "),{terms:n,Weights:r}]}))}}return n},e}();t.DebugForResult=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(11),r=n(10),s=n(0),a=n(26),u=function(){function e(){}return e.isAutoLayoutAdjustable=function(e){return"isCurrentlyDisplayed"in e},e.initializeAutoLayoutAdjustment=function(e,t){var n=this;if(this.autoLayoutAdjustmentComponent.has(e)||this.autoLayoutAdjustmentComponent.set(e,[]),this.autoLayoutAdjustmentComponent.get(e).push(t),!this.autoLayoutAdjustmentHandlers.has(e)){var o="coveo-no-visible-facet",s=function(){return i.$$(e).on(r.QueryEvents.deferredQuerySuccess,function(){var t=n.findColumn(e),r=n.findDropdownHeader(e);n.everyStandardComponentsAreInvisible(e)&&n.columnsDoesNotContainVisibleCustomElement(t)?(t&&i.$$(t).addClass(o),r&&i.$$(r).addClass(o)):(t&&i.$$(t).removeClass(o),r&&i.$$(r).removeClass(o))})};s(),this.autoLayoutAdjustmentHandlers.set(e,s)}},e.columnsDoesNotContainVisibleCustomElement=function(e){var t=this;if(!e)return!0;var n=i.$$(e).children(),o=["coveo-facet-header-filter-by-container","coveo-topSpace","coveo-bottomSpace"];return s.every(n,function(e){if(null!=s.find(o,function(t){return i.$$(e).hasClass(t)}))return!0;try{var n=a.get(e);if(n&&t.isAutoLayoutAdjustable(n))return!0}catch(e){}return!i.$$(e).isVisible()})},e.everyStandardComponentsAreInvisible=function(e){var t=this.autoLayoutAdjustmentComponent.get(e);return s.every(t,function(e){return!e.isCurrentlyDisplayed()})},e.findDropdownHeader=function(e){return i.$$(e).find(".coveo-facet-dropdown-header")},e.findColumn=function(e){var t=i.$$(e).find(".coveo-facet-column");if(!t){new o.Logger("ResponsiveFacets").info("No element with class coveo-facet-column. Facet column auto layout adjustment cannot be enabled")}return t},e.autoLayoutAdjustmentComponent=new Map,e.autoLayoutAdjustmentHandlers=new Map,e}();t.FacetColumnAutoLayoutAdjustment=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=n(27),r=function(){function e(e){this.componentsFetcher=e}return e.prototype.handleFacetValueState=function(e){var t=o.BaseComponent.getComponentRef("Facet"),n=t?this.componentsFetcher(t.ID):[],i=e.fv,r=new s(e,i,n),u=new a(e,i),l=Object.keys(i),c=l.filter(function(e){return i[e]&&i[e].length>0}).filter(function(e){return!r.tryTransform(e,i[e])});u.transform(c)},e}();t.FacetValueStateHandler=r;var s=function(){function e(e,t,n){this.queryState=e,this.facetValueState=t,this.allFacets=n}return e.prototype.tryTransform=function(e,t){var n=this,o=this.allFacets.filter(function(t){return t.options.field==e});return o.length>0&&(delete this.facetValueState[e],o.forEach(function(e){return n.queryState[i.QueryStateModel.getFacetId(e.options.id)]=t}),!0)},e}(),a=function(){function e(e,t){this.queryState=e,this.facetValueState=t}return e.prototype.transform=function(e){var t=this,n=e.map(function(e){return t.facetValueIntoQuery(e)});n.length>0&&(this.queryState[i.QueryStateModel.attributesEnum.hq]=n.join(" AND "))},e.prototype.facetValueIntoQuery=function(e){var t=this.facetValueState[e];return delete this.facetValueState[e],e+'=="'+t+'"'},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(306);var i=n(1),o=n(10),r=n(148),s=n(7),a=function(){function e(e){this.root=e,this.initAriaLiveEl(),this.appendToRoot(),this.addQueryEventListeners()}return e.prototype.updateText=function(e){i.$$(this.ariaLiveEl).text(e)},e.prototype.appendToRoot=function(){this.root.appendChild(this.ariaLiveEl)},e.prototype.initAriaLiveEl=function(){this.ariaLiveEl=i.$$("div",{"aria-live":"polite",className:"coveo-visible-to-screen-reader-only"}).el},e.prototype.addQueryEventListeners=function(){var e=this,t=i.$$(this.root);t.on(o.QueryEvents.querySuccess,function(t,n){return e.onQuerySuccess(n)}),t.on(o.QueryEvents.queryError,function(t,n){return e.onQueryError(n)})},e.prototype.onQuerySuccess=function(e){var t=this.messageForResultCount(e);this.updateText(t)},e.prototype.messageForResultCount=function(e){return e.results.results.length?r.QuerySummaryUtils.message(this.root,e):this.noResultMessage(e.query.q)},e.prototype.noResultMessage=function(e){var t=s.l("noResultFor","${query}"),n=escape(e);return r.QuerySummaryUtils.replaceQueryTags(t,n)},e.prototype.onQueryError=function(e){var t=s.l("QueryException",e.error.message);this.updateText(t)},e}();t.AriaLive=a},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(1),r=n(0),s=n(2),a=n(86),u=function(){function e(){}return e.findDOMElementsToIgnore=function(e,t){var n=this,i=[];return r.each(t,function(t){var s=n.findDOMElementsMatchingComponentId(e,t);i=a.Utils.concatWithoutDuplicate(i,s),r.each(s,function(e){var t=o.$$(e).findAll("*");i=a.Utils.concatWithoutDuplicate(i,t)})}),i},e.findDOMElementsToInitialize=function(e,t){var n=this,u=[];return r.each(s.Initialization.getListOfRegisteredComponents(),function(l){var c=[];c=a.Utils.concatWithoutDuplicate(c,n.findDOMElementsMatchingComponentId(e,l));var p=s.Initialization.componentAliases[l];r.each(p,function(t){c=a.Utils.concatWithoutDuplicate(c,n.findDOMElementsMatchingComponentId(e,t))}),o.$$(e).hasClass(i.Component.computeCssClassNameForType(""+l))&&!r.contains(t,e)&&c.push(e),u.push({componentClassId:l,htmlElements:r.difference(c,t)})}),u},e.findDOMElementsMatchingComponentId=function(e,t){var n=i.Component.computeCssClassNameForType(""+t);return o.$$(e).findAll("."+n)},e}();t.InitializationHelper=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(82);t.TemplateHelpers=i.TemplateHelpers;var o=n(73);t.TemplateList=o.TemplateList;var r=n(56);t.TemplateCache=r.TemplateCache;var s=n(77);t.HtmlTemplate=s.HtmlTemplate;var a=n(46);t.UnderscoreTemplate=a.UnderscoreTemplate},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(116),a=n(44),u=n(5),l=n(10),c=n(25),p=n(1),d=n(15),h=n(4),f=n(76),m=n(123),y=n(310),g=n(9),v=n(149),b=n(0),C=n(3),S=n(78),w=n(88),x=n(113),_=function(e){function t(n,i,s){void 0===i&&(i={});var a=e.call(this,n,t.ID,s)||this;if(a.element=n,a.options=i,a.bindings=s,a.options=r.ComponentOptions.initComponentOptions(n,t,i),a.setupAccessToken(),null==a.accessToken)return a.logger.error("Analytics component could not resolve any access token"),a.logger.error('Either provide a analytics token : data-option-token="an-authentication-token" on the Analytics element, or configure a default SearchEndpoint',a.element),a;if(a.options.token=a.accessToken.token,a.accessToken.subscribeToRenewal(function(e){return a.client.endpoint.endpointCaller.options.accessToken=e}),a.initializeAnalyticsClient(),u.Assert.exists(a.client),a.bind.onRootElement(l.QueryEvents.buildingQuery,function(e){return a.handleBuildingQuery(e)}),a.bind.onRootElement(l.QueryEvents.queryError,function(e){return a.handleQueryError(e)}),!a.componentOptionsModel){var h=p.$$(n).find("."+o.Component.computeCssClassName(c.ComponentOptionsModel));h&&(a.componentOptionsModel=h[o.Component.computeCssClassName(c.ComponentOptionsModel)])}if(a.componentOptionsModel){a.componentOptionsModel.set(c.ComponentOptionsModel.attributesEnum.searchHub,a.options.searchHub);var f=a.componentOptionsModel.getEventName(d.Model.eventTypes.changeOne+c.ComponentOptionsModel.attributesEnum.searchHub);a.bind.onRootElement(f,function(e){return a.handleSearchHubChanged(e)})}return a}return i(t,e),t.doExport=function(){C.exportGlobally({PendingSearchEvent:S.PendingSearchEvent,PendingSearchAsYouTypeSearchEvent:w.PendingSearchAsYouTypeSearchEvent,analyticsActionCauseList:g.analyticsActionCauseList,NoopAnalyticsClient:f.NoopAnalyticsClient,LiveAnalyticsClient:m.LiveAnalyticsClient,MultiAnalyticsClient:y.MultiAnalyticsClient,Analytics:t})},t.prototype.logSearchEvent=function(e,t){this.client.logSearchEvent(e,t)},t.prototype.logSearchAsYouType=function(e,t){this.client.logSearchAsYouType(e,t)},t.prototype.logCustomEvent=function(e,t,n,i){void 0===n&&(n=this.element),this.client.logCustomEvent(e,t,n,i)},t.prototype.logClickEvent=function(e,t,n,i){void 0===i&&(i=this.element),this.client.logClickEvent(e,t,n,i)},t.prototype.setOriginContext=function(e){this.client.setOriginContext(e)},t.prototype.initializeAnalyticsEndpoint=function(){return new s.AnalyticsEndpoint({accessToken:this.accessToken,serviceUrl:this.options.endpoint,organization:this.options.organization})},t.prototype.initializeAnalyticsClient=function(){if(h.Utils.isNonEmptyString(this.options.endpoint)){var e=this.initializeAnalyticsEndpoint(),t=void 0;this.root&&this.element&&(t=this.root.contains(this.element)?this.root:this.element);var n=p.$$(this.root).hasClass(o.Component.computeCssClassNameForType("Recommendation"));this.instantiateAnalyticsClient(e,t,n)}else this.client=new f.NoopAnalyticsClient},t.prototype.instantiateAnalyticsClient=function(e,t,n){this.client=n?new v.RecommendationAnalyticsClient(e,t,this.options.user,this.options.userDisplayName,this.options.anonymous,this.options.splitTestRunName,this.options.splitTestRunVersion,this.options.searchHub,this.options.sendToCloud,this.getBindings()):new m.LiveAnalyticsClient(e,t,this.options.user,this.options.userDisplayName,this.options.anonymous,this.options.splitTestRunName,this.options.splitTestRunVersion,this.options.searchHub,this.options.sendToCloud)},t.prototype.setupAccessToken=function(){this.trySetupAccessTokenFromOptions(),null==this.accessToken&&this.trySetupAccessTokenFromDefaultSearchEndpoint()},t.prototype.trySetupAccessTokenFromOptions=function(){null!=this.options.token&&(this.accessToken=new x.AccessToken(this.options.token,this.options.renewAccessToken))},t.prototype.trySetupAccessTokenFromDefaultSearchEndpoint=function(){var e=this;this.defaultEndpoint&&(this.accessToken=this.defaultEndpoint.accessToken,this.options.token=this.defaultEndpoint.accessToken.token,this.defaultEndpoint.accessToken.subscribeToRenewal(function(t){e.options.token=t,e.initializeAnalyticsClient()})),!this.options.organization&&this.defaultEndpoint&&(this.options.organization=this.defaultEndpoint.options.queryStringArguments.workgroup)},Object.defineProperty(t.prototype,"defaultEndpoint",{get:function(){return this.searchInterface.options.endpoint||a.SearchEndpoint.endpoints.default||b.find(a.SearchEndpoint.endpoints,function(e){return null!=e})},enumerable:!0,configurable:!0}),t.prototype.handleBuildingQuery=function(e){u.Assert.exists(e),e.queryBuilder.searchHub=this.options.searchHub},t.prototype.handleSearchHubChanged=function(e){this.options.searchHub=e.value},t.prototype.handleQueryError=function(e){u.Assert.exists(e),this.client.logCustomEvent(g.analyticsActionCauseList.queryError,{query:e.query.q,aq:e.query.aq,cq:e.query.cq,dq:e.query.dq,errorType:e.error.type,errorMessage:e.error.message},this.element)},t.create=function(e,n,i){var r=o.Component.computeSelectorForType(t.ID),s=[];return s=s.concat(p.$$(e).findAll(r)),p.$$(e).hasClass(o.Component.computeCssClassNameForType("Recommendation"))||(s=this.ignoreElementsInsideRecommendationInterface(s)),s.push(p.$$(e).closest(o.Component.computeCssClassName(t))),p.$$(e).is(r)&&s.push(e),s=b.compact(s),1==s.length?t.getClient(s[0],n,i):s.length>1?new y.MultiAnalyticsClient(b.map(s,function(e){return t.getClient(e,n,i)})):new f.NoopAnalyticsClient},t.ignoreElementsInsideRecommendationInterface=function(e){return b.filter(e,function(e){return void 0===p.$$(e).closest(o.Component.computeCssClassNameForType("Recommendation"))})},t.getClient=function(e,n,i){var r=o.Component.get(e,t,!0);return r instanceof t?r.client:new t(e,n,i).client},t.ID="Analytics",t.options={user:r.ComponentOptions.buildStringOption(),userDisplayName:r.ComponentOptions.buildStringOption(),token:r.ComponentOptions.buildStringOption(),endpoint:r.ComponentOptions.buildStringOption({defaultValue:s.AnalyticsEndpoint.DEFAULT_ANALYTICS_URI}),anonymous:r.ComponentOptions.buildBooleanOption({defaultValue:!1}),searchHub:r.ComponentOptions.buildStringOption({defaultValue:"default"}),splitTestRunName:r.ComponentOptions.buildStringOption(),splitTestRunVersion:r.ComponentOptions.buildStringOption(),sendToCloud:r.ComponentOptions.buildBooleanOption({defaultValue:!0}),organization:r.ComponentOptions.buildStringOption()},t}(o.Component);t.Analytics=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(){function e(e){void 0===e&&(e=[]),this.analyticsClients=e,this.isContextual=!1,this.endpoint=i.first(this.analyticsClients).endpoint}return e.prototype.isActivated=function(){return i.some(this.analyticsClients,function(e){return e.isActivated()})},e.prototype.getCurrentEventCause=function(){return i.find(i.map(this.analyticsClients,function(e){return e.getCurrentEventCause()}),function(e){return null!=e})},e.prototype.getCurrentEventMeta=function(){return i.find(i.map(this.analyticsClients,function(e){return e.getCurrentEventMeta()}),function(e){return null!=e})},e.prototype.logSearchEvent=function(e,t){i.each(this.analyticsClients,function(n){return n.logSearchEvent(e,t)})},e.prototype.logSearchAsYouType=function(e,t){i.each(this.analyticsClients,function(n){return n.logSearchEvent(e,t)})},e.prototype.logClickEvent=function(e,t,n,o){return Promise.all(i.map(this.analyticsClients,function(i){return i.logClickEvent(e,t,n,o)})).then(function(e){return i.first(e)})},e.prototype.logCustomEvent=function(e,t,n){return Promise.all(i.map(this.analyticsClients,function(i){return i.logCustomEvent(e,t,n)})).then(function(e){return i.first(e)})},e.prototype.getTopQueries=function(e){var t=this;return Promise.all(i.map(this.analyticsClients,function(t){return t.getTopQueries(e)})).then(function(n){return t.mergeTopQueries(n,e.pageSize)})},e.prototype.getCurrentVisitIdPromise=function(){return i.first(this.analyticsClients).getCurrentVisitIdPromise()},e.prototype.getCurrentVisitId=function(){return i.first(this.analyticsClients).getCurrentVisitId()},e.prototype.sendAllPendingEvents=function(){i.each(this.analyticsClients,function(e){return e.sendAllPendingEvents()})},e.prototype.warnAboutSearchEvent=function(){i.each(this.analyticsClients,function(e){return e.warnAboutSearchEvent()})},e.prototype.cancelAllPendingEvents=function(){i.each(this.analyticsClients,function(e){return e.cancelAllPendingEvents()})},e.prototype.getPendingSearchEvent=function(){return i.first(this.analyticsClients).getPendingSearchEvent()},e.prototype.setOriginContext=function(e){i.each(this.analyticsClients,function(t){return t.setOriginContext(e)})},e.prototype.mergeTopQueries=function(e,t){return void 0===t&&(t=5),i.chain(e).flatten().first(t).value()},e}();t.MultiAnalyticsClient=o},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("ChatterLikedBy",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["sflikedby","sflikedbyid","clickableuri","sffeeditemid"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("ChatterPostAttachment",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["sfcontentversionid","sffeeditemid","sfcontentfilename","sftitle","sf_title"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("ChatterPostedBy",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["sfcreatedby","sfcreatedbyid","sffeeditemid","sfuserid","sfinsertedbyid","sfparentid","sfparentname"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("ChatterTopic",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["coveochatterfeedtopics"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("Icon",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["objecttype","filetype"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("PrintableUri",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["parents"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("Quickview",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["urihash","collection","source","author","date"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("ResultLink",t.fields)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2);t.fields=["outlookformacuri","outlookuri","connectortype","urihash","collection","source","author"],t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("FollowItem",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["urihash"];t.registerFields=i},function(e,t,n){"use strict";function i(){o.Initialization.registerComponentFields("Thumbnail",r)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=["outlookformacuri","outlookuri","connectortype","urihash","collection","source"];t.registerFields=i},function(e,t,n){"use strict";function i(e){if(void 0==window.Coveo?window.Coveo=e:o.each(o.keys(e),function(t){window.Coveo[t]=e[t]}),void 0==window.__extends){var t=function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};window.__extends=t}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.swapVar=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function n(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function i(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},pe))}}function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function r(e,t){if(1!==e.nodeType)return[];var n=getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function a(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=r(e),n=t.overflow,i=t.overflowX;return/(auto|scroll|overlay)/.test(n+t.overflowY+i)?e:a(s(e))}function u(e){return 11===e?me:10===e?ye:me||ye}function l(e){if(!e)return document.documentElement;for(var t=u(10)?document.body:null,n=e.offsetParent;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(n.nodeName)&&"static"===r(n,"position")?l(n):n:e?e.ownerDocument.documentElement:document.documentElement}function c(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||l(e.firstElementChild)===e)}function p(e){return null!==e.parentNode?p(e.parentNode):e}function d(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,o=n?t:e,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s=r.commonAncestorContainer;if(e!==s&&t!==s||i.contains(o))return c(s)?s:l(s);var a=p(e);return a.host?d(a.host,t):d(e,p(t).host)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var o=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||o)[n]}return e[n]}function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=h(t,"top"),o=h(t,"left"),r=n?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=o*r,e.right+=o*r,e}function m(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+i+"Width"],10)}function y(e,t,n,i){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],u(10)?n["offset"+e]+i["margin"+("Height"===e?"Top":"Left")]+i["margin"+("Height"===e?"Bottom":"Right")]:0)}function g(){var e=document.body,t=document.documentElement,n=u(10)&&getComputedStyle(t);return{height:y("Height",e,t,n),width:y("Width",e,t,n)}}function v(e){return Ce({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};try{if(u(10)){t=e.getBoundingClientRect();var n=h(e,"top"),i=h(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s="HTML"===e.nodeName?g():{},a=s.width||e.clientWidth||o.right-o.left,l=s.height||e.clientHeight||o.bottom-o.top,c=e.offsetWidth-a,p=e.offsetHeight-l;if(c||p){var d=r(e);c-=m(d,"x"),p-=m(d,"y"),o.width-=c,o.height-=p}return v(o)}function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=u(10),o="HTML"===t.nodeName,s=b(e),l=b(t),c=a(e),p=r(t),d=parseFloat(p.borderTopWidth,10),h=parseFloat(p.borderLeftWidth,10);n&&"HTML"===t.nodeName&&(l.top=Math.max(l.top,0),l.left=Math.max(l.left,0));var m=v({top:s.top-l.top-d,left:s.left-l.left-h,width:s.width,height:s.height});if(m.marginTop=0,m.marginLeft=0,!i&&o){var y=parseFloat(p.marginTop,10),g=parseFloat(p.marginLeft,10);m.top-=d-y,m.bottom-=d-y,m.left-=h-g,m.right-=h-g,m.marginTop=y,m.marginLeft=g}return(i&&!n?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(m=f(m,t)),m}function S(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=C(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),s=t?0:h(n),a=t?0:h(n,"left");return v({top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:r})}function w(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===r(e,"position")||w(s(e)))}function x(e){if(!e||!e.parentElement||u())return document.documentElement;for(var t=e.parentElement;t&&"none"===r(t,"transform");)t=t.parentElement;return t||document.documentElement}function _(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},u=o?x(e):d(e,t);if("viewport"===i)r=S(u,o);else{var l=void 0;"scrollParent"===i?(l=a(s(t)),"BODY"===l.nodeName&&(l=e.ownerDocument.documentElement)):l="window"===i?e.ownerDocument.documentElement:i;var c=C(l,u,o);if("HTML"!==l.nodeName||w(u))r=c;else{var p=g(),h=p.height,f=p.width;r.top+=c.top-c.marginTop,r.bottom=h+c.top,r.left+=c.left-c.marginLeft,r.right=f+c.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function E(e){return e.width*e.height}function O(e,t,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=_(n,i,r,o),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},u=Object.keys(a).map(function(e){return Ce({key:e},a[e],{area:E(a[e])})}).sort(function(e,t){return t.area-e.area}),l=u.filter(function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight}),c=l.length>0?l[0].key:u[0].key,p=e.split("-")[1];return c+(p?"-"+p:"")}function A(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C(n,i?x(t):d(t,n),i)}function T(e){var t=getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function R(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function M(e,t,n){n=n.split("-")[0];var i=T(e),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",u=r?"height":"width",l=r?"width":"height";return o[s]=t[s]+t[u]/2-i[u]/2,o[a]=n===a?t[a]-i[l]:t[R(a)],o}function I(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function F(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=I(e,function(e){return e[t]===n});return e.indexOf(i)}function $(e,t,n){return(void 0===n?e:e.slice(0,F(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=v(t.offsets.popper),t.offsets.reference=v(t.offsets.reference),t=n(t,e))}),t}function D(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=A(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=O(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=$(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function P(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function N(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;ia[f]&&(e.offsets.popper[d]+=u[d]+m-a[f]),e.offsets.popper=v(e.offsets.popper);var y=u[d]+u[c]/2-m/2,g=r(e.instance.popper),b=parseFloat(g["margin"+p],10),C=parseFloat(g["border"+p+"Width"],10),S=y-e.offsets.popper[d]-b-C;return S=Math.max(Math.min(a[c]-m,S),0),e.arrowElement=i,e.offsets.arrow=(n={},be(n,d,Math.round(S)),be(n,h,""),n),e}function X(e){return"end"===e?"start":"start"===e?"end":e}function Z(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=we.indexOf(e),i=we.slice(n+1).concat(we.slice(0,n));return t?i.reverse():i}function ee(e,t){if(P(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=_(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],o=R(i),r=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case xe.FLIP:s=[i,o];break;case xe.CLOCKWISE:s=Z(i);break;case xe.COUNTERCLOCKWISE:s=Z(i,!0);break;default:s=t.behavior}return s.forEach(function(a,u){if(i!==a||s.length===u+1)return e;i=e.placement.split("-")[0],o=R(i);var l=e.offsets.popper,c=e.offsets.reference,p=Math.floor,d="left"===i&&p(l.right)>p(c.left)||"right"===i&&p(l.left)p(c.top)||"bottom"===i&&p(l.top)p(n.right),m=p(l.top)p(n.bottom),g="left"===i&&h||"right"===i&&f||"top"===i&&m||"bottom"===i&&y,v=-1!==["top","bottom"].indexOf(i),b=!!t.flipVariations&&(v&&"start"===r&&h||v&&"end"===r&&f||!v&&"start"===r&&m||!v&&"end"===r&&y);(d||g||b)&&(e.flipped=!0,(d||g)&&(i=s[u+1]),b&&(r=X(r)),e.placement=i+(r?"-"+r:""),e.offsets.popper=Ce({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=$(e.instance.modifiers,e,"flip"))}),e}function te(e){var t=e.offsets,n=t.popper,i=t.reference,o=e.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",u=s?"left":"top",l=s?"width":"height";return n[a]r(i[a])&&(e.offsets.popper[u]=r(i[a])),e}function ne(e,t,n,i){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return v(a)[t]/100*r}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}function ie(e,t,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),a=s.indexOf(I(s,function(e){return-1!==e.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==a?[s.slice(0,a).concat([s[a].split(u)[0]]),[s[a].split(u)[1]].concat(s.slice(a+1))]:[s];return l=l.map(function(e,i){var o=(1===i?!r:r)?"height":"width",s=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)},[]).map(function(e){return ne(e,o,t,n)})}),l.forEach(function(e,t){e.forEach(function(n,i){H(n)&&(o[t]+=n*("-"===e[i-1]?-1:1))})}),o}function oe(e,t){var n=t.offset,i=e.placement,o=e.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],u=void 0;return u=H(+n)?[+n,0]:ie(n,r,s,a),"left"===a?(r.top+=u[0],r.left-=u[1]):"right"===a?(r.top+=u[0],r.left+=u[1]):"top"===a?(r.left+=u[0],r.top-=u[1]):"bottom"===a&&(r.left+=u[0],r.top+=u[1]),e.popper=r,e}function re(e,t){var n=t.boundariesElement||l(e.instance.popper);e.instance.reference===n&&(n=l(n));var i=N("transform"),o=e.instance.popper.style,r=o.top,s=o.left,a=o[i];o.top="",o.left="",o[i]="";var u=_(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=r,o.left=s,o[i]=a,t.boundaries=u;var c=t.priority,p=e.offsets.popper,d={primary:function(e){var n=p[e];return p[e]u[e]&&!t.escapeWithReference&&(i=Math.min(p[n],u[e]-("right"===e?p.width:p.height))),be({},n,i)}};return c.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";p=Ce({},p,d[t](e))}),e.offsets.popper=p,e}function se(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var o=e.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),u=a?"left":"top",l=a?"width":"height",c={start:be({},u,r[u]),end:be({},u,r[u]+r[l]-s[l])};e.offsets.popper=Ce({},s,c[i])}return e}function ae(e){if(!K(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=I(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right=0){pe=1;break}var he=le&&window.Promise,fe=he?n:i,me=le&&!(!window.MSInputMethodContext||!document.documentMode),ye=le&&/MSIE 10/.test(navigator.userAgent),ge=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ve=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};ge(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=fe(this.update.bind(this)),this.options=Ce({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Ce({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){i.options.modifiers[t]=Ce({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return Ce({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return ve(e,[{key:"update",value:function(){return D.call(this)}},{key:"destroy",value:function(){return k.call(this)}},{key:"enableEventListeners",value:function(){return Q.call(this)}},{key:"disableEventListeners",value:function(){return j.call(this)}}]),e}();Oe.Utils=("undefined"!=typeof window?window:e).PopperUtils,Oe.placements=Se,Oe.Defaults=Ee,t.default=Oe}.call(t,n(63))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(){function e(t,n){this.element=n,this.element.addClass("coveo-"+t+"-dropdown-header"),this.element.addClass(e.DEFAULT_CSS_CLASS_NAME)}return e.prototype.open=function(){this.element.addClass(e.ACTIVE_HEADER_CSS_CLASS_NAME)},e.prototype.close=function(){this.element.removeClass(e.ACTIVE_HEADER_CSS_CLASS_NAME)},e.prototype.cleanUp=function(){this.element.detach()},e.prototype.hide=function(){i.$$(this.element).addClass("coveo-hidden")},e.prototype.show=function(){i.$$(this.element).removeClass("coveo-hidden")},e.DEFAULT_CSS_CLASS_NAME="coveo-dropdown-header",e.ACTIVE_HEADER_CSS_CLASS_NAME="coveo-dropdown-header-active",e}();t.ResponsiveDropdownHeader=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(325),o=n(4),r=n(9),s=n(1),a=n(29),u=function(){function e(e,t,n,i){this.facet=e,this.facetValue=t,this.onSelect=n,this.onExclude=i}return e.prototype.build=function(){return this.renderer=new i.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?r.analyticsActionCauseList.omniboxFacetUnexclude:r.analyticsActionCauseList.facetUnexclude:this.isOmnibox?r.analyticsActionCauseList.omniboxFacetExclude:r.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 n;this.facetValue.excluded?(n=this.isOmnibox?r.analyticsActionCauseList.omniboxFacetUnexclude:r.analyticsActionCauseList.facetUnexclude,this.facet.unexcludeValue(this.facetValue)):(n=this.facetValue.selected?this.isOmnibox?r.analyticsActionCauseList.omniboxFacetDeselect:r.analyticsActionCauseList.facetDeselect:this.isOmnibox?r.analyticsActionCauseList.omniboxFacetSelect:r.analyticsActionCauseList.facetSelect,this.facet.toggleSelectValue(this.facetValue)),this.onSelect?this.facet.triggerNewQuery(function(){return t.onSelect(t,n)}):this.facet.triggerNewQuery(function(){return t.facet.usageAnalytics.logSearchEvent(n,t.getAnalyticsFacetMeta())})},e.prototype.handleExcludeClick=function(e){this.facet.keepDisplayedValuesNextTime=e.displayNextTime&&!this.facet.options.useAnd,this.toggleExcludeWithUA()},e.prototype.handleEventForExcludedValueElement=function(e){var t=this,n=function(n){return e.pinFacet&&t.facet.pinFacetPosition(),e.omniboxObject&&t.omniboxCloseEvent(e.omniboxObject),t.handleSelectValue(e),!1};s.$$(this.renderer.label).on("click",function(e){e.stopPropagation(),n()}),s.$$(this.renderer.stylishCheckbox).on("keydown",a.KeyboardUtils.keypressAction([a.KEYBOARD.SPACEBAR,a.KEYBOARD.ENTER],n))},e.prototype.handleEventForValueElement=function(e){var t=this,n=function(n){e.omniboxObject&&t.omniboxCloseEvent(e.omniboxObject),t.handleExcludeClick(e),t.facet&&t.facet.facetSearch&&t.facet.facetSearch.dismissSearchResults&&t.facet.facetSearch.dismissSearchResults(),n.stopPropagation(),n.preventDefault()};s.$$(this.renderer.excludeIcon).on("click",n),s.$$(this.renderer.excludeIcon).on("keydown",a.KeyboardUtils.keypressAction([a.KEYBOARD.SPACEBAR,a.KEYBOARD.ENTER],n));var i=function(n){e.pinFacet&&t.facet.pinFacetPosition(),s.$$(t.renderer.checkbox).trigger("change"),n.preventDefault()};s.$$(this.renderer.label).on("click",i),s.$$(this.renderer.stylishCheckbox).on("keydown",a.KeyboardUtils.keypressAction([a.KEYBOARD.SPACEBAR,a.KEYBOARD.ENTER],i))},e.prototype.handleEventForCheckboxChange=function(e){var t=this;s.$$(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.getAnalyticsFacetMeta=function(){return{facetId:this.facet.options.id,facetValue:this.facetValue.value,facetTitle:this.facet.options.title}},e}();t.ValueElement=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(4),r=n(7),s=n(6),a=n(0),u=n(13),l=n(14),c=function(){function e(e,t){this.facet=e,this.facetValue=t}return e.prototype.withNo=function(e){return a.isArray(e)?a.each(e,function(e){e&&i.$$(e).detach()}):e&&i.$$(e).detach(),this},e.prototype.build=function(){return this.buildListItem(),this.initAndAppendLabel(),this.initAndAppendExcludeIcon(),this.setCssClassOnListValueElement(),this.addAccessibilityAttributesToTargetElement(),this},e.prototype.setCssClassOnListValueElement=function(){i.$$(this.listItem).toggleClass("coveo-selected",this.facetValue.selected),i.$$(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=i.$$("div",{title:r.l("Exclude",this.facet.getValueCaption(this.facetValue)),className:"coveo-facet-value-exclude",tabindex:0}).el;return this.addFocusAndBlurEventListeners(e),e.innerHTML=u.SVGIcons.icons.checkboxHookExclusionMore,l.SVGDom.addClassToSVGInContainer(e,"coveo-facet-value-exclude-svg"),e},e.prototype.buildValueComputedField=function(){var e=this.facetValue.getFormattedComputedField(this.facet.options.computedFieldFormat);if(o.Utils.isNonEmptyString(e)){var t=i.$$("span",{className:"coveo-facet-value-computed-field"}).el;return i.$$(t).text(e),t}},e.prototype.buildValueCheckbox=function(){var e=i.$$("input",{type:"checkbox"}).el;return this.facetValue.selected?e.setAttribute("checked","checked"):e.removeAttribute("checked"),this.facetValue.excluded?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled"),s.Component.pointElementsToDummyForm(e),e},e.prototype.buildValueStylishCheckbox=function(){var e=i.$$("div",{className:"coveo-facet-value-checkbox",tabindex:0}).el;return e.innerHTML=u.SVGIcons.icons.checkboxHookExclusionMore,l.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)?i.$$("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 i.$$("div",{className:"coveo-facet-value-icon coveo-icon "+this.facet.options.field.substr(1)+" "+this.facetValue.value}).el},e.prototype.buildValueCaption=function(){var e=i.$$("span",{className:"coveo-facet-value-caption",title:this.caption,"data-original-value":this.facetValue.value}).el;return i.$$(e).text(this.caption),e},e.prototype.buildValueCount=function(){if(o.Utils.isNonEmptyString(this.count)){var e=i.$$("span",{className:"coveo-facet-value-count"}).el;return i.$$(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;i.$$(e).on("focus",function(){return i.$$(t.listItem).addClass("coveo-focused")}),i.$$(e).on("blur",function(){return i.$$(t.listItem).removeClass("coveo-focused")})},e.prototype.buildListItem=function(){this.listItem=i.$$("li",{className:"coveo-facet-value coveo-facet-selectable"}).el,this.listItem.setAttribute("data-value",this.facetValue.value)},e.prototype.initAndAppendLabel=function(){this.label=i.$$("label",{className:"coveo-facet-value-label"}).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;i.$$(this.excludeIcon).on("mouseover",function(){i.$$(e.listItem).addClass("coveo-facet-value-will-exclude")}),i.$$(this.excludeIcon).on("mouseout",function(){i.$$(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),i.$$(this.label).addClass("coveo-with-computed-field")))},e.prototype.initAndAppendFacetValueLabelWrapper=function(){this.facetValueLabelWrapper=i.$$("div",{className:"coveo-facet-value-label-wrapper"}).el,this.initAndAppendCheckbox(),this.initAndAppendStylishCheckbox(),this.initAndAppendValueCount(),this.initAndAppendValueCaption(),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","heading"),e.setAttribute("aria-level","3")},Object.defineProperty(e.prototype,"ariaLabel",{get:function(){var e=this.facetValue.selected?"UnselectValueWithResultCount":"SelectValueWithResultCount",t=r.l("ResultCount",this.count);return""+r.l(e,this.caption,t)},enumerable:!0,configurable:!0}),e}();t.ValueElementRenderer=c},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0}),n(377);var o=n(0),r=n(16),s=n(12),a=n(7),u=n(22),l=n(1),c=n(38),p=n(70),d=n(14),h=n(13),f=n(4),m=n(9),y=n(327),g=n(17),v=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.sorts=t,i.facet=n,i.customSortDirectionChange=!1,i.onDocumentClick=function(){return i.close()},i.enabledSortsIgnoreRenderBecauseOfPairs=[],i.filterDuplicateForRendering(),i}return i(t,e),t.prototype.build=function(){var e=this;this.buildSettingsButton(),this.buildSettingsPopup(),f.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(),f.Utils.isNonEmptyArray(this.enabledSorts)?(this.settingsPopup.appendChild(this.sortSection.element),o.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),n=this.facet.queryStateModel.get(this.excludedStateAttribute),i=this.facet.queryStateModel.get(this.operatorStateAttribute);if(!f.Utils.isNullOrUndefined(e)&&f.Utils.isEmptyArray(t)&&f.Utils.isEmptyArray(n)&&!f.Utils.isNonEmptyString(i)){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(){l.$$(this.settingsPopup).detach()},t.prototype.open=function(){var e=this;p.PopupUtils.positionPopup(this.settingsPopup,this.settingsButton,this.facet.root,this.getPopupAlignment(),this.facet.root),this.hideSection&&this.showSection&&(l.$$(this.hideSection).toggle(!l.$$(this.facet.element).hasClass("coveo-facet-collapsed")),l.$$(this.showSection).toggle(l.$$(this.facet.element).hasClass("coveo-facet-collapsed"))),this.facet.options.enableSettingsFacetState&&l.$$(this.clearStateSection).toggle(!f.Utils.isNullOrUndefined(this.facetStateLocalStorage.load())),o.each(this.enabledSorts,function(t,n){e.activeSort.name==t.name.toLowerCase()?e.selectItem(e.getSortItem(t.name)):e.unselectItem(e.getSortItem(t.name))})},t.prototype.getSortItem=function(e){return o.find(this.sortSection.sortItems,function(t){return l.$$(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=l.$$("div",{className:"coveo-facet-header-settings"}).el,this.settingsButton.innerHTML=h.SVGIcons.icons.more,d.SVGDom.addClassToSVGInContainer(this.settingsButton,"coveo-facet-settings-more-svg"),this.hideElementOnMouseEnterLeave(this.settingsButton),(new g.AccessibleButton).withElement(this.settingsButton).withLabel(a.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,n=function(){return t.closeTimeout=window.setTimeout(function(){return t.close()},300)},i=function(){return clearTimeout(t.closeTimeout)};l.$$(e).on("mouseleave",n),l.$$(e).on("mouseenter",i)},t.prototype.buildSettingsPopup=function(){this.settingsPopup=l.$$("div",{className:"coveo-facet-settings-popup"}).el,this.hideElementOnMouseEnterLeave(this.settingsPopup)},t.prototype.buildSortSection=function(){var e=this.buildSection("coveo-facet-settings-section-sort"),t=this.buildIcon("coveo-facet-settings-section-sort-svg",h.SVGIcons.icons.sort),n=this.buildItems(),i=document.createElement("div");l.$$(i).addClass("coveo-facet-settings-section-sort-title"),l.$$(i).text(a.l("SortBy")+" :"),n.appendChild(i);var r=this.buildSortSectionItems();return o.each(r,function(e){n.appendChild(e)}),e.appendChild(t),e.appendChild(n),{element:e,sortItems:r}},t.prototype.buildSortSectionItems=function(){var e=this,t=o.map(this.enabledSorts,function(t){if(!o.contains(e.enabledSortsIgnoreRenderBecauseOfPairs,t)){var n=e.buildItem(a.l(t.label),t.description);return l.$$(n).on("click",function(n){return e.handleClickSortButton(n,t)}),l.$$(n).setAttribute("data-sort-name",t.name.toLowerCase().replace("ascending|descending","")),n}});return t=o.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=o.filter(this.enabledSorts,function(e){return e.directionToggle});return o.filter(t,function(t){return void 0!=o.findWhere(e.enabledSorts,{name:t.relatedSort})}).length>0},t.prototype.buildDirectionSection=function(){var e=this,t=this.buildAscendingOrDescendingSection("Ascending"),n=this.buildIcon("coveo-facet-settings-section-direction-ascending-svg",h.SVGIcons.icons.ascending),i=this.buildIcon("coveo-facet-settings-section-direction-descending-svg",h.SVGIcons.icons.descending),o=this.buildItems(),r=this.buildAscendingOrDescending("Ascending");o.appendChild(r),t.appendChild(n),t.appendChild(o),l.$$(t).on("click",function(t){return e.handleDirectionClick(t,"ascending")});var s=this.buildAscendingOrDescendingSection("Descending"),a=this.buildItems(),u=this.buildAscendingOrDescending("Descending");return a.appendChild(u),s.appendChild(i),s.appendChild(a),l.$$(s).on("click",function(t){return e.handleDirectionClick(t,"descending")}),this.activeSort.directionToggle?this.selectItem(this.getItems(t)[0]):(l.$$(t).addClass("coveo-facet-settings-disabled"),l.$$(s).addClass("coveo-facet-settings-disabled")),[t,s]},t.prototype.buildSaveStateSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-save-state"),n=this.buildIcon("coveo-facet-settings-section-save-state-svg",h.SVGIcons.icons.dropdownMore),i=this.buildItems();this.facetStateLocalStorage=new c.LocalStorageUtils("facet-state-"+this.facet.options.id),this.includedStateAttribute=s.QueryStateModel.getFacetId(this.facet.options.id),this.excludedStateAttribute=s.QueryStateModel.getFacetId(this.facet.options.id,!1),this.operatorStateAttribute=s.QueryStateModel.getFacetOperator(this.facet.options.id);var o=document.createElement("div");return l.$$(o).addClass("coveo-facet-settings-item"),o.setAttribute("title",a.l("SaveFacetState")),l.$$(o).text(a.l("SaveFacetState")),i.appendChild(o),t.appendChild(n),t.appendChild(i),l.$$(t).on("click",function(t){return e.handleSaveStateClick()}),t},t.prototype.buildClearStateSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-clear-state"),n=this.buildIcon("coveo-facet-settings-section-clear-state-svg",h.SVGIcons.icons.dropdownLess),i=this.buildItems(),o=this.buildItem(a.l("ClearFacetState"));return i.appendChild(o),t.appendChild(n),t.appendChild(i),l.$$(t).on("click",function(t){return e.handleClearStateClick()}),t},t.prototype.buildHideSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-hide"),n=this.buildIcon("coveo-facet-settings-section-hide-svg",h.SVGIcons.icons.facetCollapse),i=this.buildItems(),o=this.buildItem(a.l("Collapse"));return i.appendChild(o),t.appendChild(n),t.appendChild(i),l.$$(t).on("click",function(t){e.facet.facetHeader.collapseFacet(),e.close()}),t},t.prototype.buildShowSection=function(){var e=this,t=this.buildSection("coveo-facet-settings-section-show"),n=this.buildIcon("coveo-facet-settings-section-show-svg",h.SVGIcons.icons.facetExpand),i=this.buildItems(),o=this.buildItem(a.l("Expand"));return i.appendChild(o),t.appendChild(n),t.appendChild(i),l.$$(t).on("click",function(t){e.facet.facetHeader.expandFacet(),e.close()}),t},t.prototype.buildIcon=function(e,t){if(e&&t){var n=l.$$("div",{className:"coveo-icon-container"},t);return d.SVGDom.addClassToSVGInContainer(n.el,e),n.el}return l.$$("div",{className:"coveo-icon"}).el},t.prototype.buildAscendingOrDescending=function(e){var t=this.buildItem(a.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),l.$$("div",{className:"coveo-facet-settings-item",title:t},o.escape(e)).el},t.prototype.buildItems=function(){var e=document.createElement("div");return l.$$(e).addClass("coveo-facet-settings-items"),e},t.prototype.buildSection=function(e){var t=document.createElement("div");return l.$$(t).addClass(["coveo-facet-settings-section",e]),t},t.prototype.handleSettingsButtonClick=function(e){e.stopPropagation(),f.Utils.isNullOrUndefined(this.settingsPopup.parentElement)?this.open():this.close()},t.prototype.handleClickSortButton=function(e,n){this.activeSort!=n&&this.activeSort.relatedSort!=n.name&&(this.activeSort=n,n.directionToggle&&o.contains(this.enabledSorts,t.availableSorts[this.activeSort.relatedSort])?this.activateDirectionSection():this.disableDirectionSection(),this.selectItem(e.target),this.closePopupAndUpdateSort())},t.prototype.handleDirectionClick=function(e,n){var i=this;l.$$(e.target.parentElement.parentElement).hasClass("coveo-facet-settings-disabled")||-1!=this.activeSort.name.indexOf(n)||(this.activeSort=t.availableSorts[this.activeSort.relatedSort],o.each(this.directionSection,function(e){i.unselectSection(e)}),this.selectItem(e.target),"custom"==this.activeSort.name&&this.customSortDirection!=n&&(this.customSortDirection=n,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(m.analyticsActionCauseList.facetClearAll,{facetId:e.facet.options.id,facetTitle:e.facet.options.title})})},t.prototype.addOnNukeHandler=function(){var e=this;l.$$(this.facet.root).on(r.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 n;return o.each(e,function(e){n||(n=o.find(t.getItems(e),function(e){return-1!=t.activeSort.name.indexOf(e.getAttribute("data-direction"))}))}),n||(n=e[0]),n},t.prototype.activateDirectionSection=function(){var e=this;o.each(this.directionSection,function(t){l.$$(t).removeClass("coveo-facet-settings-disabled"),l.$$(t).find(".coveo-facet-settings-item").removeAttribute("aria-disabled"),e.unselectSection(t)}),this.selectItem(this.getCurrentDirectionItem())},t.prototype.disableDirectionSection=function(){var e=this;o.each(this.directionSection,function(t){l.$$(t).addClass("coveo-facet-settings-disabled"),l.$$(t).find(".coveo-facet-settings-item").setAttribute("aria-disabled","true"),e.unselectSection(t)})},t.prototype.getItems=function(e){return l.$$(e).findAll(".coveo-facet-settings-item")},t.prototype.unselectSection=function(e){o.each(this.getItems(e),function(e){l.$$(e).removeClass("coveo-selected")})},t.prototype.selectItem=function(e){e&&l.$$(e).addClass("coveo-selected")},t.prototype.unselectItem=function(e){e&&l.$$(e).removeClass("coveo-selected")},t.prototype.getPopupAlignment=function(){return{horizontal:u.DeviceUtils.isMobileDevice()?p.PopupHorizontalAlignment.CENTER:p.PopupHorizontalAlignment.INNERLEFT,vertical:p.PopupVerticalAlignment.BOTTOM}},t.prototype.filterDuplicateForRendering=function(){var e=this;o.each(this.enabledSorts,function(t,n){if(null!=t.relatedSort)for(var i=n+1;i=0?i:0,t>=i&&n<=o},e.prototype.getDropdownHeaderLabel=function(){var t,n="."+u.Component.computeCssClassNameForType("Facet")+", ."+u.Component.computeCssClassNameForType("FacetSlider");return y.each(s.$$(this.coveoRoot.find(".coveo-facet-column")).findAll(n),function(e){var n;n=(s.$$(e).hasClass(u.Component.computeCssClassNameForType("Facet")),u.Component.get(e)),!t&&n.options.dropdownHeaderLabel&&(t=n.options.dropdownHeaderLabel)}),t||(t=r.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=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(7),r=n(9);n(370);var s=n(13),a=n(14),u=n(17),l=function(){function e(e){this.options=e,this.element=document.createElement("div"),i.$$(this.element).addClass("coveo-facet-header")}return e.prototype.build=function(){var e=i.$$("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=i.$$("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),i.$$(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&&(i.$$(this.collapseElement).hide(),i.$$(this.expandElement).show()),i.$$(this.options.facetElement).addClass("coveo-facet-collapsed")},e.prototype.expandFacet=function(){this.collapseElement&&this.expandElement&&(i.$$(this.expandElement).hide(),i.$$(this.collapseElement).show()),i.$$(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&&i.$$(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"),i.$$(this.iconElement).addClass(e),this.iconElement},e.prototype.buildWaitAnimation=function(){return this.waitElement=i.$$("div",{className:"coveo-facet-header-wait-animation"},s.SVGIcons.icons.loading).el,a.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=i.$$("span",{className:"coveo-"+(this.options.facet.options.useAnd?"and":"or")},s.SVGIcons.icons.orAnd);a.SVGDom.addClassToSVGInContainer(t.el,"coveo-or-and-svg");var n=i.$$("div",{className:"coveo-facet-header-operator",title:o.l("SwitchTo",this.options.facet.options.useAnd?o.l("Or"):o.l("And"))});return n.append(t.el),i.$$(n).on("click",function(){return e.handleOperatorClick()}),n.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",n=this.options.facet.options.useAnd?"OR":"AND";this.options.facet.triggerNewQuery(function(){return e.options.facet.usageAnalytics.logSearchEvent(r.analyticsActionCauseList.facetToggle,{facetId:e.options.facet.options.id,facetOperatorBefore:n,facetOperatorAfter:t,facetTitle:e.options.title})})}},e.prototype.buildTitle=function(){var e=i.$$("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=i.$$("div",{className:"coveo-facet-header-eraser"},s.SVGIcons.icons.mainClear);return a.SVGDom.addClassToSVGInContainer(t.el,"coveo-facet-header-eraser-svg"),(new u.AccessibleButton).withElement(t.el).withLabel(o.l("Reset")).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(r.analyticsActionCauseList.facetClearAll,{facetId:e.options.id,facetTitle:e.options.title}),e.queryController.executeQuery()},e}();t.FacetHeader=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(13),r=n(14),s=n(6),a=n(7),u=n(154),l=n(70),c=n(371),p=n(0),d=function(){function e(e){var t=this;this.facetSearch=e,this.searchBarIsAnimating=!1,this.triggeredScroll=!1,this.facetSearchUserInputHandler=new c.FacetSearchUserInputHandler(this.facetSearch),this.searchResults=i.$$("ul",{className:"coveo-facet-search-results"}).el,i.$$(this.searchResults).on("scroll",function(){return t.handleScrollEvent()}),i.$$(this.searchResults).hide()}return e.prototype.build=function(e){var t=this;this.search=document.createElement("div"),i.$$(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=i.$$("div",{className:"coveo-facet-search-clear",title:a.l("Clear",a.l("Search"))},o.SVGIcons.icons.checkboxHookExclusionMore).el,r.SVGDom.addClassToSVGInContainer(this.clear,"coveo-facet-search-clear-svg"),this.clear.style.display="none",this.search.appendChild(this.clear);var n=document.createElement("div");return i.$$(n).addClass("coveo-facet-search-middle"),this.search.appendChild(n),this.input=this.buildInputElement(),s.Component.pointElementsToDummyForm(this.input),n.appendChild(this.input),i.$$(this.input).on("keyup",function(e){t.facetSearchUserInputHandler.handleKeyboardEvent(e)}),i.$$(this.clear).on("click",function(t){e&&e()}),i.$$(this.input).on("focus",function(e){t.handleFacetSearchFocus()}),this.detectSearchBarAnimation(),this.search},e.prototype.showFacetSearchWaitingAnimation=function(){this.magnifier&&i.$$(this.magnifier).hide(),i.$$(this.wait).show()},e.prototype.getValueInInputForFacetSearch=function(){return this.input.value.trim()},e.prototype.hideFacetSearchWaitingAnimation=function(){i.$$(this.magnifier).show(),i.$$(this.wait).hide()},e.prototype.detectSearchBarAnimation=function(){var e=this;u.EventsUtils.addPrefixedEvent(this.search,"AnimationStart",function(t){"grow"==t.animationName&&(e.searchBarIsAnimating=!0)}),u.EventsUtils.addPrefixedEvent(this.search,"AnimationEnd",function(t){"grow"==t.animationName&&(e.searchBarIsAnimating=!1)})},e.prototype.positionSearchResults=function(t,n,o){var r=this;if(null!=this.searchResults){t.appendChild(this.searchResults),this.searchResults.style.display="block",this.searchResults.style.width=n-e.FACET_SEARCH_PADDING+"px","none"==i.$$(this.searchResults).css("display")&&(this.searchResults.style.display="");"none"==i.$$(this.search).css("display")||this.searchBarIsAnimating?("none"==i.$$(this.searchResults).css("display")&&(this.searchResults.style.display=""),u.EventsUtils.addPrefixedEvent(this.search,"AnimationEnd",function(){r.positionPopUp(o,t),u.EventsUtils.removePrefixedEvent(r.search,"AnimationEnd",r)})):this.positionPopUp(o,t)}},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")},e.prototype.moveCurrentResultDown=function(){var e=this.currentResult.el.nextElementSibling;e||(e=p.first(this.searchResults.children)),this.setAsCurrentResult(i.$$(e)),this.highlightAndShowCurrentResultWithKeyboard()},e.prototype.moveCurrentResultUp=function(){var e=this.currentResult.el.previousElementSibling;e||(e=p.last(this.searchResults.children)),this.setAsCurrentResult(i.$$(e)),this.highlightAndShowCurrentResultWithKeyboard()},e.prototype.highlightCurrentQueryInSearchResults=function(e){this.facetSearch.getCaptions().forEach(function(t){t.innerHTML=i.$$(t).text().replace(e,'$1')})},e.prototype.appendToSearchResults=function(e){this.searchResults.appendChild(e),this.setupFacetSearchResultsEvents(e)},e.prototype.focus=function(){this.input.focus(),this.handleFacetSearchFocus()},e.prototype.highlightAndShowCurrentResultWithKeyboard=function(){this.currentResult.addClass("coveo-facet-search-current-result"),this.triggeredScroll=!0,this.searchResults.scrollTop=this.currentResult.el.offsetTop},e.prototype.handleFacetSearchFocus=function(){null==this.facetSearch.currentlyDisplayedResults&&this.facetSearch.displayNewValues()},e.prototype.setupFacetSearchResultsEvents=function(e){var t=this;i.$$(e).on("mousemove",function(){t.setAsCurrentResult(i.$$(e))});var n=!1,o=!1;i.$$(e).on("mousedown",function(){return o=!1}),i.$$(e).on("mousemove",function(){return o=!0}),i.$$(e).on("touchmove",function(){return n=!0}),i.$$(e).on("mouseup touchend",function(){n||o||setTimeout(function(){t.facetSearch.dismissSearchResults()},0),n=!1,o=!1})},e.prototype.hideSearchResultsElement=function(){i.$$(this.searchResults).hide(),i.$$(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,i.$$(e).addClass("coveo-facet-search-magnifier"),r.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,i.$$(e).addClass("coveo-facet-search-wait-animation"),r.SVGDom.addClassToSVGInContainer(e,"coveo-facet-search-wait-animation-svg"),e},e.prototype.buildInputElement=function(){return i.$$("input",{className:"coveo-facet-search-input",type:"test",autocapitalize:"off",autocorrect:"off","aria-label":a.l("Search")}).el},e.prototype.positionPopUp=function(e,t){l.PopupUtils.positionPopup(this.searchResults,e,t,{horizontal:l.PopupHorizontalAlignment.CENTER,vertical:l.PopupVerticalAlignment.BOTTOM})},e.prototype.handleScrollEvent=function(){this.triggeredScroll?this.triggeredScroll=!1:this.facetSearchUserInputHandler.handleFacetSearchResultsScroll()},e.FACET_SEARCH_PADDING=40,e}();t.FacetSearchElement=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(375);var i=n(0),o=n(5),r=n(17),s=n(1),a=n(14),u=n(13),l=n(9),c=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,n=e.caption,i=e.clear;return t.append(n.el),t.append(i.el),t},e.prototype.getBreadcrumbTooltip=function(){var e=[this.facet.getValueCaption(this.facetValue),this.facetValue.getFormattedCount(),this.facetValue.getFormattedComputedField(this.facet.options.computedFieldFormat)];return i.compact(e).join(" ")},e.prototype.buildElements=function(){return{container:this.buildContainer(),clear:this.buildClear(),caption:this.buildCaption()}},e.prototype.buildContainer=function(){var e=this,t=s.$$("div",{className:"coveo-facet-breadcrumb-value"});return t.toggleClass("coveo-selected",this.facetValue.selected),t.toggleClass("coveo-excluded",this.facetValue.excluded),(new r.AccessibleButton).withElement(t).withLabel(this.getBreadcrumbTooltip()).withSelectAction(function(){return e.selectAction()}).build(),t},e.prototype.buildClear=function(){var e=s.$$("span",{className:"coveo-facet-breadcrumb-clear"},u.SVGIcons.icons.checkboxHookExclusionMore);return a.SVGDom.addClassToSVGInContainer(e.el,"coveo-facet-breadcrumb-clear-svg"),e},e.prototype.buildCaption=function(){var e=s.$$("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,facetValue:e.facetValue.value,facetTitle:e.facet.options.title})})},e}();t.BreadcrumbValueElement=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(23),o=n(0),r=n(5),s=n(7),a=n(1),u=function(){function e(e,t,n){this.facet=e,this.facetValues=t,this.breadcrumbValueElementKlass=n,this.setExpandedAndCollapsed(),this.elem=a.$$("div",{className:"coveo-facet-breadcrumb"}).el;var i=a.$$("span");i.addClass("coveo-facet-breadcrumb-title"),i.text(this.facet.options.title+":"),this.elem.appendChild(i.el),this.valueContainer=a.$$("span",{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(a.$$(this.elem).findAll(".coveo-facet-breadcrumb-value"),function(e){return a.$$(e).text()}).join(", "):""},e.prototype.buildExpanded=function(){var e=this;o.each(this.expanded,function(t,n){var i=new e.breadcrumbValueElementKlass(e.facet,t).build();e.valueContainer.appendChild(i.el)})},e.prototype.buildCollapsed=function(){var e=this,t=o.filter(this.collapsed,function(e){return e.selected}).length,n=o.filter(this.collapsed,function(e){return e.excluded}).length;r.Assert.check(t+n==this.collapsed.length);var u=a.$$("div",{className:"coveo-facet-breadcrumb-value"}),l=a.$$("span",{className:"coveo-facet-breadcrumb-multi-count"});l.text(s.l("NMore",i.format(t+n,"n0"))),u.append(l.el);var c=o.map(this.collapsed,function(t){return new e.breadcrumbValueElementKlass(e.facet,t)}),p=o.map(c,function(e){return e.getBreadcrumbTooltip()});u.el.setAttribute("title",p.join("\n")),u.on("click",function(){var e=[];o.each(c,function(t){e.push(t.build().el)}),o.each(e,function(e){a.$$(e).insertBefore(u.el)}),u.detach()}),this.valueContainer.appendChild(u.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=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(62),o=n(1),r=n(4),s=n(16),a=n(125),u=n(9),l=n(7),c=n(5),p=n(91),d=n(19),h=n(92),f=n(24),m=n(18),y=n(90),g=n(155);n(376);var v=n(0),b=n(331),C=function(){function e(e,t,n){var r=this;this.facet=e,this.facetSearchValuesListKlass=t,this.root=n,this.moreValuesToFetch=!0,this.lastSearchWasEmpty=!0,this.facetSearchElement=new b.FacetSearchElement(this),this.onResize=v.debounce(function(){r.facet instanceof i.Facet&&r.facet.searchInterface instanceof m.SearchInterface&&r.shouldPositionSearchResults()&&r.positionSearchResults()},250),this.onDocumentClick=function(e){r.handleClickElsewhere(e)},window.addEventListener("resize",this.onResize),document.addEventListener("click",function(e){return r.onDocumentClick(e)}),o.$$(e.root).on(s.InitializationEvents.nuke,function(){return r.handleNuke()})}return e.prototype.build=function(){return this.buildBaseSearch()},e.prototype.positionSearchResults=function(e){void 0===e&&(e=this.search),this.facetSearchElement.positionSearchResults(this.root,this.facet.element.clientWidth,e)},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(n){t.facet.usageAnalytics.logCustomEvent(u.analyticsActionCauseList.facetSearch,{facetId:t.facet.options.id,facetTitle:t.facet.options.title},t.facet.root),t.facet.logger.debug("Received field values",n),t.processNewFacetSearchResults(n,e),t.facetSearchElement.hideFacetSearchWaitingAnimation(),t.facetSearchPromise=void 0}).catch(function(e){return r.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.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.performSelectActionOnCurrentSearchResult(),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()},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(){r.Utils.exists(this.facetSearchTimeout)&&(clearTimeout(this.facetSearchTimeout),this.facetSearchTimeout=void 0),r.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){c.Assert.exists(e),e=new g.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()):t.fetchMore?this.moreValuesToFetch=!1:(this.facetSearchElement.hideSearchResultsElement(),o.$$(this.search).addClass("coveo-facet-search-no-results"))},e.prototype.rebuildSearchResults=function(e,t){var n=this;c.Assert.exists(e),t.fetchMore||o.$$(this.searchResults).empty();var i=document.createElement("li");r.Utils.isNonEmptyString(t.valueToSearch)&&(o.$$(i).addClass(["coveo-facet-selectable","coveo-facet-search-selectable","coveo-facet-search-select-all"]),o.$$(i).text(l.l("SelectAll")),o.$$(i).on("click",function(){return n.selectAllValuesMatchingSearch()}),this.facetSearchElement.appendToSearchResults(i));var s=v.map(e,function(e){return p.FacetValue.create(e)});v.each(new this.facetSearchValuesListKlass(this.facet,h.FacetValueElement).build(s),function(e){n.facetSearchElement.appendToSearchResults(e)}),this.currentlyDisplayedResults?this.currentlyDisplayedResults=this.currentlyDisplayedResults.concat(v.pluck(s,"value")):this.currentlyDisplayedResults=v.pluck(s,"value"),v.each(o.$$(this.searchResults).findAll(".coveo-facet-selectable"),function(e){o.$$(e).addClass("coveo-facet-search-selectable")})},e.prototype.buildParamsForNormalSearch=function(){var e=new a.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 a.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("("+d.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.performSelectActionOnCurrentSearchResult=function(){var e=o.$$(this.searchResults).find(".coveo-facet-search-current-result");c.Assert.check(void 0!=e);var t=o.$$(e).find('input[type="checkbox"]');void 0!=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");c.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 a.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 n=v.map(t,function(t){var n=e.facet.values.get(t.value);return r.Utils.exists(n)||(n=p.FacetValue.create(t)),n.selected=!0,n.excluded=!1,n});e.facet.processFacetSearchAllResultsSelected(n)}),this.dismissSearchResults()},e}();t.FacetSearch=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(){function e(e,t){this.facet=e,this.facetValueElementKlass=t}return e.prototype.build=function(e){var t=this,n=i.map(e,function(e){return i.find(t.facet.values.getAll(),function(t){return t.value==e.value})||e});return i.map(n,function(e){return new t.facetValueElementKlass(t.facet,e,t.facet.keepDisplayedValuesNextTime).build().renderer.listItem})},e}();t.FacetSearchValuesList=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(92),o=n(1),r=n(91),s=n(4),a=n(47),u=n(155),l=n(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 r.FacetValue?t=e.value:(e=s.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 n=this.getValuesToBuildWith(),i=e,r=document.createDocumentFragment();l.each(n,function(e,n,o){if(t.facetValueShouldBeRemoved(e))t.facet.values.remove(e.value),i+=1;else if(n'+e.slice(i,o)+""+e.slice(o)},e.prototype.logAnalyticsEvent=function(e,t){var n=i.pluck(this.facetValues,"value");e.facet.usageAnalytics.logSearchEvent(t,{query:this.omniboxObject.completeQueryExpression.word,facetId:e.facet.options.id,facetTitle:e.facet.options.title,facetValue:e.facetValue.value,suggestions:n.join(";"),suggestionRanking:i.indexOf(n,e.facetValue.value)})},e}();t.OmniboxValuesList=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){this.func=e,this.id=t,this.grammar=n}return e.prototype.parse=function(e,t){return this.func(e,t,this)},e.prototype.toString=function(){return this.id},e}();t.ExpressionFunction=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(40),o=function(){function e(e,t){if(this.parts=e,this.id=t,0==e.length)throw new Error(JSON.stringify(t)+" should have at least 1 parts")}return e.prototype.parse=function(e,t){for(var n,o=[],r=e,s=0;s0&&r.all(t,function(t){return t.input==e.input})?[this]:t},t.prototype.clean=function(e){if(null!=e||!this.isSuccess()){e=r.rest(e||r.last(this.getBestExpect()).path(this));var t=r.first(e);return null==t?new o.Result(null,this.expression,this.input):new o.Result([t.clean(r.rest(e))],this.expression,this.input)}return new o.Result(r.map(this.result.subResults,function(e){return e.clean()}),this.expression,this.input)},t}(o.Result);t.OptionResult=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(40),o=n(344),r=n(158),s=n(0),a=function(){function e(e,t,n,i){this.ref=e,this.occurrence=t,this.id=n,this.grammar=i}return e.prototype.parse=function(e,t){var n=this.grammar.getExpression(this.ref);if(null==n)throw new Error("Expression not found:"+this.ref);return"?"==this.occurrence||null==this.occurrence?this.parseOnce(e,t,n):this.parseMany(e,t,n)},e.prototype.parseOnce=function(e,t,n){var a=n.parse(e,t),u=a.isSuccess();return u||"?"!=this.occurrence?new o.RefResult([a],this,e,u?null:a):t?0==e.length?new o.RefResult([],this,e,a):s.all(a.getBestExpect(),function(e){return e.expression==r.ExpressionEndOfInput})?new o.RefResult([new i.Result(null,r.ExpressionEndOfInput,e)],this,e,a):a:new o.RefResult([],this,e,null)},e.prototype.parseMany=function(e,t,n){var a,u,l=[],c=e;do{a=n.parse(c,!1),(u=a.isSuccess())&&(l.push(a),c=c.substr(a.getLength()))}while(u&&a.input!=c);var p=s.isNumber(this.occurrence)?this.occurrence:"+"==this.occurrence?1:0;if(l.length0){var d=s.last(l);a=n.parse(d.input,!0),a.isSuccess()?l[l.length-1]=a:(l.push(new i.Result(null,r.ExpressionEndOfInput,d.input.substr(d.getLength()))),a=n.parse(d.input.substr(d.getLength()),!0))}else if(0!=e.length){var h=new i.Result(null,r.ExpressionEndOfInput,e);return new o.RefResult([h],this,e,a)}return new o.RefResult(l,this,e,a)},e.prototype.toString=function(){return this.id},e}();t.ExpressionRef=a},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(40),r=n(0),s=function(e){function t(t,n,i,o){var s=e.call(this,t,n,i)||this;return s.expression=n,s.input=i,r.last(t)!=o&&(s.failAttempt=o,null!=s.failAttempt&&(s.failAttempt.parent=s)),s}return i(t,e),t.prototype.getExpect=function(){var t=e.prototype.getExpect.call(this);return null!=this.failAttempt?t.concat(this.failAttempt.getExpect()):t},t.prototype.clean=function(t){if(null!=this.failAttempt&&(null!=t||!this.isSuccess())){t=t||r.last(this.getBestExpect()).path(this);var n=r.first(t);if(null!=n&&n==this.failAttempt){var i=r.last(this.subResults),s=r.map(null!=i&&i.isSuccess()?this.subResults:r.initial(this.subResults),function(e){return e.clean()});return s.push(n.clean(r.rest(t))),new o.Result(s,this.expression,this.input)}}return e.prototype.clean.call(this,t)},t}(o.Result);t.RefResult=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(40),o=n(40),r=function(){function e(e,t,n){this.value=e,this.id=t}return e.prototype.parse=function(e,t){var n=e.match(this.value);null!=n&&0!=n.index&&(n=null);var r=new i.Result(null!=n?n[0]:null,this,e);return r.isSuccess()&&t&&e.length>r.value.length?new o.EndOfInputResult(r):r},e.prototype.toString=function(){return this.id},e}();t.ExpressionRegExp=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(159);t.NestedQuery={basicExpressions:["NestedQuery"],grammars:{NestedQuery:"[[NestedField][OptionalSpaces][Expressions]]",NestedField:"[[Field]]",FieldValue:["NestedQuery"]},include:[i.Field]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(93);t.Date={grammars:{Date:"[DateYear]/[DateMonth]/[DateDay]",DateYear:/([0-9]{4})/,DateMonth:/(1[0-2]|0?[1-9])/,DateDay:/([1-2][0-9]|3[0-1]|0?[1-9])/,DateRange:"[Date][Spaces?]..[Spaces?][Date]",DateRelative:["DateRelativeNegative","DateRelativeTerm"],DateRelativeTerm:/now|today|yesterday/,DateRelativeNegative:"[DateRelativeTerm][DateRelativeNegativeRef]",DateRelativeNegativeRef:/([\-\+][0-9]+(s|m|h|d|mo|y))/},include:[i.Basic]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(93);t.QueryExtension={basicExpressions:["QueryExtension"],grammars:{QueryExtension:"$[QueryExtensionName]([QueryExtensionArguments])",QueryExtensionName:/\w+/,QueryExtensionArguments:"[QueryExtensionArgumentList*][QueryExtensionArgument]",QueryExtensionArgumentList:"[QueryExtensionArgument][Spaces?],[Spaces?]",QueryExtensionArgument:"[QueryExtensionArgumentName]:[Spaces?][QueryExtensionArgumentValue]",QueryExtensionArgumentName:/\w+/,QueryExtensionArgumentValue:["SingleQuoted","Expressions"]},include:[i.Basic]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubExpression={basicExpressions:["SubExpression"],grammars:{SubExpression:"([Expressions])"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),r=n(29),s=n(7),a=function(){function e(e,t,n){this.onchange=t,this.magicBox=n,this.hasFocus=!1,this.underlay=document.createElement("div"),this.underlay.className="magic-box-underlay",this.highlightContainer=document.createElement("span"),this.highlightContainer.className="magic-box-highlight-container",this.underlay.appendChild(this.highlightContainer),this.ghostTextContainer=document.createElement("span"),this.ghostTextContainer.className="magic-box-ghost-text",this.underlay.appendChild(this.ghostTextContainer),this.input=i.$$(e).find("input"),this.input?e.insertBefore(this.underlay,this.input):(this.input=document.createElement("input"),e.appendChild(this.underlay),e.appendChild(this.input)),this.setupHandler(),this.addAccessibilitiesProperties()}return e.prototype.updateInput=function(){this.input.value!=this.result.input&&(this.input.value=this.result.input,this.hasFocus&&this.setCursor(this.getValue().length))},e.prototype.updateHighlight=function(){i.$$(this.highlightContainer).empty(),this.highlightContainer.appendChild(this.result.toHtmlElement())},e.prototype.updateWordCompletion=function(){i.$$(this.ghostTextContainer).empty(),this.ghostTextContainer.innerHTML="",null!=this.wordCompletion&&this.ghostTextContainer.appendChild(document.createTextNode(this.wordCompletion.substr(this.result.input.length)))},e.prototype.updateScroll=function(e){var t=this;void 0===e&&(e=!0);var n=function(){t.underlay.clientWidth0&&this.element.contains(n[0])&&this.processMouseSelection(n[0])},e.prototype.handleMouseOut=function(e){var t=i.$$(e.target),n=t.parents(this.options.selectableClass);if(e.relatedTarget){var o=i.$$(e.relatedTarget).parents(this.options.selectableClass);t.hasClass(this.options.selectedClass)&&!i.$$(e.relatedTarget).hasClass(this.options.selectableClass)?this.removeSelectedStatus(t.el):0==o.length&&n.length>0&&this.removeSelectedStatus(n[0])}else t.hasClass(this.options.selectedClass)?this.removeSelectedStatus(t.el):n.length>0&&this.removeSelectedStatus(n[0])},e.prototype.moveDown=function(){return this.returnMoved(this.move("down"))},e.prototype.moveUp=function(){return this.returnMoved(this.move("up"))},e.prototype.selectAndReturnKeyboardFocusedElement=function(){var e=this.keyboardFocusedSuggestion;return null!=e&&(i.$$(e).trigger("keyboardSelect"),this.keyboardFocusedSuggestion=null),e},e.prototype.mergeSuggestions=function(e,t){var n,i=this,r=[],s=!0;e=o.compact(e);var a=this.pendingSuggestion=new Promise(function(t,u){o.each(e,function(e){var t=!1;setTimeout(function(){t=!0,s=!1},i.options.timeout),e.then(function(e){!t&&e&&(r=r.concat(e))})});var l=function(){s&&(n&&clearTimeout(n),0==r.length?t([]):a==i.pendingSuggestion||null==i.pendingSuggestion?t(r.sort(function(e,t){return t.index-e.index})):u("new request queued")),s=!1};0==e.length&&l(),void 0==e&&l(),n=setTimeout(function(){l()},i.options.timeout),Promise.all(e).then(function(){return l()})});a.then(function(e){return t&&t(e),i.updateSuggestions(e),e}).catch(function(){return null})},e.prototype.updateSuggestions=function(e){var t=this;i.$$(this.element).empty(),this.element.className="magic-box-suggestions";var n=this.buildSuggestionsContainer();i.$$(this.element).append(n.el),o.each(e,function(i){var r=i.dom?t.modifyDomFromExistingSuggestion(i.dom):t.createDomFromSuggestion(i);r.setAttribute("id","magic-box-suggestion-"+o.indexOf(e,i)),r.setAttribute("role","option"),r.setAttribute("aria-selected","false"),r.suggestion=i,n.append(r.el)}),this.hasSuggestions=e.length>0,i.$$(this.element).toggleClass("magic-box-hasSuggestion",this.hasSuggestions),i.$$(this.magicBoxContainer).setAttribute("aria-expanded",this.hasSuggestions.toString())},e.prototype.processKeyboardSelection=function(e){this.addSelectedStatus(e),this.keyboardFocusedSuggestion=e,i.$$(this.inputManager.input).setAttribute("aria-activedescendant",i.$$(e).getAttribute("id"))},e.prototype.processMouseSelection=function(e){this.addSelectedStatus(e),this.keyboardFocusedSuggestion=null},e.prototype.buildSuggestionsContainer=function(){return i.$$("div",{id:"coveo-magicbox-suggestions",role:"listbox"})},e.prototype.createDomFromSuggestion=function(e){var t=i.$$("div",{className:"magic-box-suggestion "+this.options.selectableClass});if(t.on("click",function(){e.onSelect()}),t.on("keyboardSelect",function(){e.onSelect()}),e.html)return t.el.innerHTML=e.html,t;if(e.text)return t.text(e.text),t;if(e.separator){t.addClass("magic-box-suggestion-seperator");var n=i.$$("div",{className:"magic-box-suggestion-seperator-label"},e.separator);return t.append(n.el),t}return t},e.prototype.modifyDomFromExistingSuggestion=function(e){this.removeSelectedStatus(e);var t=i.$$(e).find("."+this.options.selectableClass);return this.removeSelectedStatus(t),i.$$(e)},e.prototype.move=function(e){var t=i.$$(this.element).find("."+this.options.selectedClass),n=i.$$(this.element).findAll("."+this.options.selectableClass),r=o.indexOf(n,t),s="up"==e?r-1:r+1;s<-1&&(s=n.length-1),s>n.length&&(s=0);var a=n[s];return a?this.processKeyboardSelection(a):(this.keyboardFocusedSuggestion=null,this.inputManager.input.removeAttribute("aria-activedescendant")),a},e.prototype.returnMoved=function(e){if(null!=e){if(e.suggestion)return e.suggestion;if(e["no-text-suggestion"])return null;if(e instanceof HTMLElement)return{text:i.$$(e).text()}}return null},e.prototype.addSelectedStatus=function(e){for(var t=this.element.getElementsByClassName(this.options.selectedClass),n=0;n "+JSON.stringify(n[t])+")");a.each(e,function(e){n[t].push(e)})}else n[t]=e})}function o(){for(var e=[],t=0;t\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
'},t.prototype.instantiateToElement=function(e){var t=this;return new Promise(function(n,i){var o=document.createElement("div");o.innerHTML=t.instantiateToString(e),n(o)})},t}(o.Template);t.DefaultRecommendationTemplate=r},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),r=n(73),s=n(0),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defaultTemplate='\n \n ',t.defaultRoledTemplates={"table-header":'Link\n Excerpt\n Date',"table-footer":"Link\n Excerpt\n Date"},t}return i(t,e),t.prototype.instantiateRoleToString=function(e){var t=s.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,n=s.find(this.templates,function(t){return t.role===e});if(n)return n.instantiateToElement(void 0,{});var i=new o.Template(function(){return t.defaultRoledTemplates[e]});return i.layout="table",i.instantiateToElement(void 0)},t.prototype.getFallbackTemplate=function(){var e=this;return new o.Template(function(){return e.defaultTemplate})},t.prototype.hasTemplateWithRole=function(e){return s.find(this.templates,function(t){return t.role===e})},t}(r.TemplateList);t.TableTemplate=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.cancelLastAction="cancelLastAction",e}();t.QuerySummaryEvents=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(65),o=n(1),r=n(0),s=function(){function e(e,t,n){this.structure=e,this.onSelect=t,this.onTabPress=n}return e.prototype.buildOmniboxElement=function(e,t){var n;if(0!=e.length){if(n=o.$$("div").el,this.structure.header){var i=this.buildElementHeader();n.appendChild(i)}var s=this.buildRowElements(e,t);r.each(s,function(e){n.appendChild(e)})}return n},e.prototype.buildElementHeader=function(){return o.$$("div",void 0,this.structure.header.template({headerTitle:this.structure.header.title})).el},e.prototype.buildRowElements=function(e,t){var n=this,s=[];return r.each(e,function(e){var r=o.$$("div",void 0,n.structure.row({rawValue:e.value,data:i.DomUtils.highlightElement(e.value,t.completeQueryExpression.word)})).el;o.$$(r).on("click",function(){n.onSelect.call(n,e.value,t)}),o.$$(r).on("keyboardSelect",function(){n.onSelect.call(n,e.value,t)}),o.$$(r).on("tabSelect",function(){n.onTabPress.call(n,e.value,t)}),s.push(r)}),s},e}();t.SuggestionForOmnibox=s},function(e,t){},function(e,t,n){"use strict";function i(){var e,t=E.Component.getComponentRef("ResultList");if(t&&(e=t.resultCurrentlyBeingRendered),!e){var n=E.Component.getComponentRef("Quickview");n&&(e=n.resultCurrentlyBeingRendered)}return e}function o(){var e=i();if(e)return e.termsToHighlight}function r(){var e=i();if(e)return e.phrasesToHighlight}function s(e,t){return h.Utils.isNonEmptyArray(_.keys(e))||h.Utils.isNonEmptyArray(_.keys(t))}var a=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n/g,">")}),u.TemplateHelpers.registerTemplateHelper("loadTemplates",function(e,t){void 0===t&&(t=!0);var n,o="",r=i(),s=!1,a=e;return _.each(e,function(e,t,i){"default"==e&&(n=t)}),void 0!=n&&(a=_.omit(e,n)),_.each(a,function(e,n,i){s&&t||(s=s||e,o+=u.TemplateHelpers.getHelper("loadTemplate")(n,e,r))}),s||void 0==n||(o+=u.TemplateHelpers.getHelper("loadTemplate")(n,!0,r)),o});var D=["B","KB","MB","GB","TB","PB","EB"];u.TemplateHelpers.registerFieldHelper("size",function(e,t){for(var n=parseInt(e,10),i=null!=t&&null!=t.precision?t.precision:2,o=null!=t&&null!=t.base?t.base:0;n>1024&&o+1=n?1:i(e)}}}function l(e){return function(t,n){var i=e(t=+t,n=+n);return function(e){return e<=0?t:e>=1?n:i(e)}}}function c(e,t,n,i){var o=e[0],r=e[1],s=t[0],a=t[1];return r2?p:c,r=s=null,i}function i(t){return(r||(r=o(d,h,m?u(e):e,f)))(+t)}var o,r,s,d=H,h=H,f=Q.a,m=!1;return i.invert=function(e){return(s||(s=o(h,d,a,m?l(t):t)))(+e)},i.domain=function(e){return arguments.length?(d=L.call(e,j),n()):d.slice()},i.range=function(e){return arguments.length?(h=V.call(e),n()):h.slice()},i.rangeRound=function(e){return h=V.call(e),f=Q.r,n()},i.clamp=function(e){return arguments.length?(m=!!e,n()):m},i.interpolate=function(e){return arguments.length?(f=e,n()):f},n()}function f(e){var t=e.domain;return e.ticks=function(e){var n=t();return Object(P.B)(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){return z(t(),e,n)},e.nice=function(n){null==n&&(n=10);var i,o=t(),r=0,s=o.length-1,a=o[r],u=o[s];return u0?(a=Math.floor(a/i)*i,u=Math.ceil(u/i)*i,i=Object(P.z)(a,u,n)):i<0&&(a=Math.ceil(a*i)/i,u=Math.floor(u*i)/i,i=Object(P.z)(a,u,n)),i>0?(o[r]=Math.floor(a/i)*i,o[s]=Math.ceil(u/i)*i,t(o)):i<0&&(o[r]=Math.ceil(a*i)/i,o[s]=Math.floor(u*i)/i,t(o)),e},e}function m(){var e=h(a,Q.m);return e.copy=function(){return d(e,m())},f(e)}function y(){function e(e){return+e}var t=[0,1];return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=L.call(n,j),e):t.slice()},e.copy=function(){return y().domain(t)},f(e)}function g(e,t){return(t=Math.log(t/e))?function(n){return Math.log(n/e)/t}:U(t)}function v(e,t){return e<0?function(n){return-Math.pow(-t,n)*Math.pow(-e,1-n)}:function(n){return Math.pow(t,n)*Math.pow(e,1-n)}}function b(e){return isFinite(e)?+("1e"+e):e<0?0:e}function C(e){return 10===e?b:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function S(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function w(e){return function(t){return-e(-t)}}function x(){function e(){return o=S(i),r=C(i),n()[0]<0&&(o=w(o),r=w(r)),t}var t=h(g,v).domain([1,10]),n=t.domain,i=10,o=S(10),r=C(10);return t.base=function(t){return arguments.length?(i=+t,e()):i},t.domain=function(t){return arguments.length?(n(t),e()):n()},t.ticks=function(e){var t,s=n(),a=s[0],u=s[s.length-1];(t=u0){for(;du)break;m.push(p)}}else for(;d=1;--c)if(!((p=l*c)u)break;m.push(p)}}else m=Object(P.B)(d,h,Math.min(h-d,f)).map(r);return t?m.reverse():m},t.tickFormat=function(e,n){if(null==n&&(n=10===i?".0e":","),"function"!=typeof n&&(n=Object(q.a)(n)),e===1/0)return n;null==e&&(e=10);var s=Math.max(1,i*e/t.ticks().length);return function(e){var t=e/r(Math.round(o(e)));return t*i0?o[t-1]:n[0],t=o?[r[o-1],i]:[r[t-1],r[t]]},e.copy=function(){return T().domain([n,i]).range(s)},f(e)}function R(){function e(e){if(e<=e)return n[Object(P.b)(t,e,0,i)]}var t=[.5],n=[0,1],i=1;return e.domain=function(o){return arguments.length?(t=V.call(o),i=Math.min(t.length,n.length-1),e):t.slice()},e.range=function(o){return arguments.length?(n=V.call(o),i=Math.min(t.length,n.length-1),e):n.slice()},e.invertExtent=function(e){var i=n.indexOf(e);return[t[i-1],t[i]]},e.copy=function(){return R().domain(t).range(n)},e}function M(e){return new Date(e)}function I(e){return e instanceof Date?+e:+new Date(+e)}function F(e,t,n,i,o,r,s,u,l){function c(a){return(s(a)1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return fe.h=360*e-100,fe.s=1.5-1.5*t,fe.l=.8-.9*t,fe+""},ye=$(re("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ge=$(re("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ve=$(re("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),be=$(re("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));n.d(t,"scaleBand",function(){return o}),n.d(t,"scalePoint",function(){return s}),n.d(t,"scaleIdentity",function(){return y}),n.d(t,"scaleLinear",function(){return m}),n.d(t,"scaleLog",function(){return x}),n.d(t,"scaleOrdinal",function(){return i}),n.d(t,"scaleImplicit",function(){return B}),n.d(t,"scalePow",function(){return E}),n.d(t,"scaleSqrt",function(){return O}),n.d(t,"scaleQuantile",function(){return A}),n.d(t,"scaleQuantize",function(){return T}),n.d(t,"scaleThreshold",function(){return R}),n.d(t,"scaleTime",function(){return ie}),n.d(t,"scaleUtc",function(){return oe}),n.d(t,"schemeCategory10",function(){return se}),n.d(t,"schemeCategory20b",function(){return ae}),n.d(t,"schemeCategory20c",function(){return ue}),n.d(t,"schemeCategory20",function(){return le}),n.d(t,"interpolateCubehelixDefault",function(){return pe}),n.d(t,"interpolateRainbow",function(){return me}),n.d(t,"interpolateWarm",function(){return de}),n.d(t,"interpolateCool",function(){return he}),n.d(t,"interpolateViridis",function(){return ye}),n.d(t,"interpolateMagma",function(){return ge}),n.d(t,"interpolateInferno",function(){return ve}),n.d(t,"interpolatePlasma",function(){return be}),n.d(t,"scaleSequential",function(){return D})},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(492),o=n(0),r=function(){function e(e,t,n,i){this.element=e,this.categoryFacetTemplates=t,this.categoryValue=n,this.categoryFacet=i,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 n=this.categoryValue.path.concat([e.value]),o={value:e.value,count:e.numberOfResults,path:n},r=new i.CategoryValue(this.categoryValue.listRoot,o,this.categoryFacetTemplates,this.categoryFacet);return r.render(t),this.children.push(r),r},e}();t.CategoryChildrenValueRenderer=r},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(29),o=function(){function e(e){this.facetSearch=e}return e.prototype.handleKeyboardEvent=function(e){switch(e.which){case i.KEYBOARD.ENTER:this.facetSearch.keyboardNavigationEnterPressed(e);break;case i.KEYBOARD.DELETE:this.facetSearch.keyboardNavigationDeletePressed&&this.facetSearch.keyboardNavigationDeletePressed(e);break;case i.KEYBOARD.ESCAPE:this.facetSearch.dismissSearchResults();break;case i.KEYBOARD.DOWN_ARROW:this.facetSearch.facetSearchElement.moveCurrentResultDown();break;case i.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)11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},S={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},w=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},x=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"},_=function(e,t,n){var i=new Date(n,0,1);return''+Math.ceil(((new Date(n,t,e)-i)/864e5+i.getDay()+1)/7)+""},E=function(e,t,n,i){return''+(t?e.reverse():e).join("")+""},O=function(e){return""+e.join("")+""},A=function(e){var t,n=[];for(e.showWeekNumber&&n.push(""),t=0;t<7;t++)n.push(''+w(e,t,!0)+"");return""+(e.isRTL?n.reverse():n).join("")+""},T=function(e,t,n,i,o,r){var s,a,u,l,c,d=e._o,h=n===d.minYear,f=n===d.maxYear,m='
',y=!0,g=!0;for(u=[],s=0;s<12;s++)u.push('");for(l='
'+d.i18n.months[i]+'
",p(d.yearRange)?(s=d.yearRange[0],a=d.yearRange[1]+1):(s=n-d.yearRange,a=1+n+d.yearRange),u=[];s=d.minYear&&u.push('");return c='
'+n+d.yearSuffix+'
",d.showMonthAfterYear?m+=c+l:m+=l+c,h&&(0===i||d.minMonth>=i)&&(y=!1),f&&(11===i||d.maxMonth<=i)&&(g=!1),0===t&&(m+='"),t===e._o.numberOfMonths-1&&(m+='"),m+="
"},R=function(e,t,n){return''+A(e)+O(t)+"
"},M=function(s){var a=this,l=a.config(s);a._onMouseDown=function(e){if(a._v){e=e||window.event;var t=e.target||e.srcElement;if(t)if(u(t,"is-disabled")||(!u(t,"pika-button")||u(t,"is-empty")||u(t.parentNode,"is-disabled")?u(t,"pika-prev")?a.prevMonth():u(t,"pika-next")&&a.nextMonth():(a.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),l.bound&&o(function(){a.hide(),l.blurFieldOnSelect&&l.field&&l.field.blur()},100))),u(t,"pika-select"))a._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},a._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;t&&(u(t,"pika-select-month")?a.gotoMonth(t.value):u(t,"pika-select-year")&&a.gotoYear(t.value))},a._onKeyChange=function(e){if(e=e||window.event,a.isVisible())switch(e.keyCode){case 13:case 27:l.field&&l.field.blur();break;case 37:e.preventDefault(),a.adjustDate("subtract",1);break;case 38:a.adjustDate("subtract",7);break;case 39:a.adjustDate("add",1);break;case 40:a.adjustDate("add",7)}},a._onInputChange=function(n){var i;n.firedBy!==a&&(l.parse?i=l.parse(l.field.value,l.format):t?(i=e(l.field.value,l.format,l.formatStrict),i=i&&i.isValid()?i.toDate():null):i=new Date(Date.parse(l.field.value)),d(i)&&a.setDate(i),a._v||a.show())},a._onInputFocus=function(){a.show()},a._onInputClick=function(){a.show()},a._onInputBlur=function(){var e=i.activeElement;do{if(u(e,"pika-single"))return}while(e=e.parentNode);a._c||(a._b=o(function(){a.hide()},50)),a._c=!1},a._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,i=t;if(t){!n&&u(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),r(t,"change",a._onChange)));do{if(u(i,"pika-single")||i===l.trigger)return}while(i=i.parentNode);a._v&&t!==l.trigger&&i!==l.trigger&&a.hide()}},a.el=i.createElement("div"),a.el.className="pika-single"+(l.isRTL?" is-rtl":"")+(l.theme?" "+l.theme:""),r(a.el,"mousedown",a._onMouseDown,!0),r(a.el,"touchend",a._onMouseDown,!0),r(a.el,"change",a._onChange),l.keyboardInput&&r(i,"keydown",a._onKeyChange),l.field&&(l.container?l.container.appendChild(a.el):l.bound?i.body.appendChild(a.el):l.field.parentNode.insertBefore(a.el,l.field.nextSibling),r(l.field,"change",a._onInputChange),l.defaultDate||(t&&l.field.value?l.defaultDate=e(l.field.value,l.format).toDate():l.defaultDate=new Date(Date.parse(l.field.value)),l.setDefaultDate=!0));var c=l.defaultDate;d(c)?l.setDefaultDate?a.setDate(c,!0):a.gotoDate(c):a.gotoDate(new Date),l.bound?(this.hide(),a.el.className+=" is-bound",r(l.trigger,"click",a._onInputClick),r(l.trigger,"focus",a._onInputFocus),r(l.trigger,"blur",a._onInputBlur)):this.show()};return M.prototype={config:function(e){this._o||(this._o=v({},S,!0));var t=v(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,d(t.minDate)||(t.minDate=!1),d(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(n){return n=n||this._o.format,d(this._d)?this._o.toString?this._o.toString(this._d,n):t?e(this._d).format(n):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,i){t&&e.isMoment(n)&&this.setDate(n.toDate(),i)},getDate:function(){return d(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",b(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),d(e)){var n=this._o.minDate,i=this._o.maxDate;d(n)&&ei&&(e=i),this._d=new Date(e.getTime()),y(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),b(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(d(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),i=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=e.getTime();i.setMonth(i.getMonth()+1),i.setDate(i.getDate()-1),t=o=r&&(this._y=r,!isNaN(a)&&this._m>a&&(this._m=a)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l'+T(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+"";this.el.innerHTML=u,n.bound&&"hidden"!==n.field.type&&o(function(){n.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,o,r,s,a,u,l,c;if(!this._o.container){if(this.el.style.position="absolute",e=this._o.trigger,t=e,n=this.el.offsetWidth,o=this.el.offsetHeight,r=window.innerWidth||i.documentElement.clientWidth,s=window.innerHeight||i.documentElement.clientHeight,a=window.pageYOffset||i.body.scrollTop||i.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)c=e.getBoundingClientRect(),u=c.left+window.pageXOffset,l=c.bottom+window.pageYOffset;else for(u=t.offsetLeft,l=t.offsetTop+t.offsetHeight;t=t.offsetParent;)u+=t.offsetLeft,l+=t.offsetTop;(this._o.reposition&&u+n>r||this._o.position.indexOf("right")>-1&&u-n+e.offsetWidth>0)&&(u=u-n+e.offsetWidth),(this._o.reposition&&l+o>s+a||this._o.position.indexOf("top")>-1&&l-o-e.offsetHeight>0)&&(l=l-o-e.offsetHeight),this.el.style.left=u+"px",this.el.style.top=l+"px"}},render:function(e,t,n){var i=this._o,o=new Date,r=m(e,t),s=new Date(e,t,1).getDay(),a=[],u=[];y(o),i.firstDay>0&&(s-=i.firstDay)<0&&(s+=7);for(var l=0===t?11:t-1,c=11===t?0:t+1,p=0===t?e-1:e,f=11===t?e+1:e,v=m(p,l),b=r+s,C=b;C>7;)C-=7;b+=7-C;for(var S=!1,w=0,O=0;w=r+s,$=w-s+1,D=t,P=e,N=i.startRange&&g(i.startRange,A),k=i.endRange&&g(i.endRange,A),L=i.startRange&&i.endRange&&i.startRangei.maxDate||i.disableWeekends&&h(A)||i.disableDayFn&&i.disableDayFn(A);F&&(w0&&"@"==e[0],n=t?e.substr(1):e,i=n.toLowerCase();return this.getFields().then(function(t){var n=o.chain(t).map(function(e){var t=e.length>0&&"@"==e[0];return{index:e.toLowerCase().indexOf(i),field:t?e:"@"+e}}).filter(function(t){return-1!=t.index&&t.field.length>e.length}).sortBy("index").map(function(e){return e.field}).value();return n=o.first(n,5)})},e.prototype.fieldValues=function(e,t){return this.omnibox.queryController.getEndpoint().listFieldValues({pattern:".*"+t+".*",patternType:"RegularExpression",sortCriteria:"occurrences",field:"@"+e,maximumNumberOfValues:5}).then(function(e){return o.chain(e).map(function(e){return{index:e.value.toLowerCase().indexOf(t),value:e.value}}).filter(function(e){return e.value.length>t.length}).sortBy("index").map(function(e){return e.value.replace(/ /g,"Â ")}).value()})},e.prototype.simpleFieldNames=function(e){var t=e,n=t.toLowerCase();return this.getFields().then(function(t){var i=o.chain(t).map(function(e){return{index:e.toLowerCase().indexOf(n),field:e+":"}}).filter(function(t){return-1!=t.index&&t.field.length>e.length}).sortBy("index").map(function(e){return e.field}).value();return i=o.first(i,5)})},e.INDEX=64,e}();t.FieldAddon=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(31),o=n(1),r=n(4),s=n(0),a=function(){function e(e){var t=this;this.omnibox=e,this.omnibox.bind.on(this.omnibox.element,i.OmniboxEvents.populateOmniboxSuggestions,function(e){s.each(t.getSuggestion(),function(t){e.suggestions.push(t)})})}return e.prototype.getSuggestion=function(){if(0==this.omnibox.magicBox.getText().length)return null;var e=this.buildPopulateOmniboxEventArgs();return o.$$(this.omnibox.root).trigger(i.OmniboxEvents.populateOmnibox,e),this.rowsToSuggestions(e.rows)},e.prototype.getCurrentQueryExpression=function(){var e=this.omnibox.getCursor(),t=this.omnibox.getText(),n=t.length,i=e,o=e;for(" "==t[i]&&i--;i>0&&" "!=t[i];)i--;for(;ot.length}).sortBy("index").pluck("extension").value();return n=o.first(n,5)})},e.prototype.attributeNames=function(e,t,n){return this.getExtensions().then(function(i){var r=o.find(i,function(t){return t.name==e});return null==r?[]:o.filter(o.difference(r.argumentNames,n),function(e){return 0==e.indexOf(t)})})},e.prototype.hash=function(){},e.INDEX=62,e}();t.QueryExtensionAddon=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(25),r=n(31),s=n(19),a=n(356),u=n(0),l=function(){function e(e){var t=this;this.omnibox=e,this.cache=new a.SuggestionsCache,i.$$(this.omnibox.element).on(r.OmniboxEvents.populateOmniboxSuggestions,function(e,n){n.suggestions.push(t.getSuggestion())})}return e.suggestiontHtml=function(e){return e.highlighted.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,function(e,t,n,o){var r="";n&&(r="coveo-omnibox-hightlight"),o&&(r="coveo-omnibox-hightlight2");var s;return s=r?i.$$("span",{className:r}):i.$$("span"),s.text(t||n||o),s.el.outerHTML})},e.isPartialMatch=function(e){var t=s.StringUtils.match(e.highlighted,/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g),n=u.find(t,function(e){return null!=e[1]});return null==n||u.every(u.last(t,u.indexOf(t,n)-t.length),function(e){return null!=e[1]})},e.prototype.getSuggestion=function(){var e=this,t=this.omnibox.magicBox.getText();return this.cache.getSuggestions(t,function(){return e.getQuerySuggest(t)})},e.prototype.getQuerySuggest=function(t){var n={q:t},i=String.locale,r=this.omnibox.getBindings().componentOptionsModel.get(o.ComponentOptionsModel.attributesEnum.searchHub),s=this.omnibox.getBindings().searchInterface.options.pipeline,a=this.omnibox.options.enableSearchAsYouType,l=this.omnibox.getBindings().searchInterface.getQueryContext();return i&&(n.locale=i),r&&(n.searchHub=r),s&&(n.pipeline=s),l&&(n.context=l),n.enableWordCompletion=a,this.omnibox.queryController.getEndpoint().getQuerySuggest(n).then(function(t){var n=t.completions;return u.map(n,function(t,i){return{html:e.suggestiontHtml(t),text:t.expression,index:e.INDEX-i/n.length,partial:e.isPartialMatch(t),executableConfidence:t.executableConfidence}})})},e.INDEX=60,e}();t.QuerySuggestAddon=l;var c=function(){function e(){}return e.prototype.getSuggestion=function(){return Promise.resolve([])},e}();t.VoidQuerySuggestAddon=c},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(79),o=n(18),r=n(98),s=n(1),a=n(6),u=n(11),l=function(){function e(e,t,n,i){this.coveoRoot=e,this.ID=t,this.searchInterface=a.Component.get(this.coveoRoot.el,o.SearchInterface,!1),this.currentMode="large"}return e.init=function(t,n,o){if(!s.$$(t).find("."+a.Component.computeCssClassName(r.ResultList))){return void new u.Logger("ResponsiveDefaultResultTemplate").trace("No ResultLayout component found : Cannot instantiate ResponsiveResultLayout")}i.ResponsiveComponentsManager.register(e,s.$$(t),r.ResultList.ID,n,o)},e.prototype.registerComponent=function(e){return e instanceof r.ResultList&&(this.resultList=e,!0)},e.prototype.handleResizeEvent=function(){var e=this,t=this.resultList.queryController.getLastResults();this.needSmallMode()?(s.$$(this.resultList.options.resultContainer).addClass("coveo-card-layout-container"),s.$$(this.resultList.options.resultContainer).removeClass("coveo-list-layout-container"),"small"!=this.currentMode&&(t&&this.resultList.buildResults(t).then(function(t){e.resultList.renderResults(t)}),this.currentMode="small")):(s.$$(this.resultList.options.resultContainer).removeClass("coveo-card-layout-container"),s.$$(this.resultList.options.resultContainer).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=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(){function e(e,t){this.searchInterface=t,this.resultContainerElement=i.$$(e)}return e.prototype.empty=function(){this.searchInterface.detachComponentsInside(this.resultContainerElement.el),this.resultContainerElement.el.innerHTML=""},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 i.$$(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},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(163),r=n(1),s=n(0),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getEndFragment=function(e){var t=this;return new Promise(function(n){if(!s.isEmpty(e)){if(t.resultListOptions.enableInfiniteScroll){var i=r.$$(t.resultListOptions.resultContainer).findAll(".coveo-card-layout-padding");s.each(i,function(e){return r.$$(e).remove()})}var o=document.createDocumentFragment();s.times(3,function(){return o.appendChild(r.$$("div",{className:"coveo-card-layout coveo-card-layout-padding"}).el)}),n(o)}n(null)})},t}(o.ResultListRenderer);t.ResultListCardRenderer=a},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]="+l.DateUtils.dateForQuery(i):""},t}(o.DateInput);t.InTheLastDateInput=c},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(167),r=n(100),s=n(7),a=n(1),u=n(30),l=n(57),c=function(e){function t(t){var n=e.call(this,s.l("Between"),t)||this;return n.root=t,n.firstDatePicker=new r.DatePicker(n.onChange.bind(n)),n.secondDatePicker=new r.DatePicker(n.onChange.bind(n)),n}return i(t,e),t.prototype.reset=function(){this.firstDatePicker.reset(),this.secondDatePicker.reset()},t.prototype.build=function(){e.prototype.build.call(this);var t=a.$$("fieldset",{className:"coveo-advanced-search-date-input"});return t.el.disabled=!0,t.append(this.firstDatePicker.getElement()),t.append(this.buildAnd()),t.append(this.secondDatePicker.getElement()),this.element.appendChild(t.el),this.element},t.prototype.getValue=function(){var e=this.firstDatePicker.getDateValue(),t=this.secondDatePicker.getDateValue(),n=this.firstDatePicker.getValue(),i=this.secondDatePicker.getValue(),o="";if(this.isSelected()){if(e&&t){if(l.TimeSpan.fromDates(u.DateUtils.convertFromJsonDateIfNeeded(e),u.DateUtils.convertFromJsonDateIfNeeded(i)).getMilliseconds()<0)throw s.l("QueryExceptionInvalidDate")}n&&(o+="(@date>="+n+")"),i&&(o+="(@date<="+i+")")}return o},t.prototype.buildAnd=function(){var e=a.$$("div",{className:"coveo-advanced-search-and"});return e.text(s.l("And").toLowerCase()),e.el},t}(o.DateInput);t.BetweenDateInput=c},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(47),s=n(1),a=n(36),u=n(52),l=n(168),c=function(e){function t(t,n,i,o){var r=e.call(this,t,o)||this;return r.inputName=t,r.fieldName=n,r.endpoint=i,r.root=o,r}return i(t,e),t.prototype.reset=function(){this.dropDown.reset()},t.prototype.build=function(){var t=this,n=s.$$(e.prototype.build.call(this));return this.buildFieldSelect().then(function(){n.append(t.dropDown.getElement())}),this.element=n.el,this.element},t.prototype.getValue=function(){var e=this.dropDown?this.dropDown.getValue():"",t=new a.QueryBuilder;return e?(t.advancedExpression.addFieldExpression(this.fieldName,"==",[e]),t.build().aq):""},t.prototype.buildFieldSelect=function(){var e=this;return this.endpoint.listFieldValues({field:this.fieldName,maximumNumberOfValues:50}).then(function(t){var n=[""];o.each(t,function(e){n.push(e.value)}),e.dropDown=new u.Dropdown(e.onChange.bind(e),n,function(t){return r.FacetUtils.tryToGetTranslatedCaption(e.fieldName,t)},e.inputName)})},t}(l.DocumentInput);t.SimpleFieldInput=c},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(52),r=n(50),s=n(1),a=n(168),u=n(36),l=function(e){function t(t,n,i){var o=e.call(this,t,i)||this;return o.inputName=t,o.fieldName=n,o.root=i,o}return i(t,e),t.prototype.reset=function(){this.mode.reset(),this.input.reset()},t.prototype.build=function(){var t=s.$$(e.prototype.build.call(this));return this.mode=new o.Dropdown(this.onChange.bind(this),["Contains","DoesNotContain","Matches"],void 0,this.inputName),t.append(this.mode.getElement()),this.input=new r.TextInput(this.onChange.bind(this),this.inputName),t.append(this.input.getElement()),this.element=t.el,this.element},t.prototype.getValue=function(){var e=this.input.getValue(),t=new u.QueryBuilder;if(e)switch(this.mode.getValue()){case"Contains":return t.advancedExpression.addFieldExpression(this.fieldName,"=",[e]),t.build().aq;case"DoesNotContain":return t.advancedExpression.addFieldExpression(this.fieldName,"<>",[e]),t.build().aq;default:return t.advancedExpression.addFieldExpression(this.fieldName,"==",[e]),t.build().aq}return""},t}(a.DocumentInput);t.AdvancedFieldInput=l},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),r=n(1),s=n(36),a=n(52),u=n(84),l=n(168),c=function(e){function t(t){var n=e.call(this,"Size",t)||this;return n.root=t,n}return i(t,e),t.prototype.reset=function(){this.modeSelect.reset(),this.sizeInput.reset()},t.prototype.build=function(){var n=r.$$(e.prototype.build.call(this)),i=r.$$("div",{className:"coveo-size-input-mode-section"});return this.modeSelect=new a.Dropdown(this.onChange.bind(this),t.modes,void 0,o.l("Size")),this.modeSelect.setId("coveo-size-input-mode"),i.append(this.modeSelect.getElement()),this.sizeInput=new u.NumericSpinner(this.onChange.bind(this),void 0,void 0,o.l("SizeValue")),i.append(this.sizeInput.getElement()),this.sizeSelect=new a.Dropdown(this.onChange.bind(this),t.sizes,void 0,o.l("UnitMeasurement")),this.sizeSelect.setId("coveo-size-input-select"),i.append(this.sizeSelect.getElement()),n.append(i.el),this.element=n.el,this.element},t.prototype.getValue=function(){var e=this.getSizeInBytes(),t=new s.QueryBuilder;if(e)switch(this.modeSelect.getValue()){case"AtLeast":return t.advancedExpression.addFieldExpression("@size",">=",[this.getSizeInBytes().toString()]),t.build().aq;default:return t.advancedExpression.addFieldExpression("@size","<=",[this.getSizeInBytes().toString()]),t.build().aq}return""},t.prototype.getSizeInBytes=function(){var e=this.sizeInput.getFloatValue();switch(this.sizeSelect.getValue()){case"KB":return 1024*e;case"MB":return e*Math.pow(1024,2);default:return e}},t.modes=["AtLeast","AtMost"],t.sizes=["KB","MB","Bytes"],t}(l.DocumentInput);t.SizeInput=c},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.openCardOverlay="openCardOverlay",e.closeCardOverlay="closeCardOverlay",e}();t.CardOverlayEvents=i},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.prototype.getPosition=function(){return new Promise(function(e,t){navigator.geolocation.getCurrentPosition(function(t){e({latitude:t.coords.latitude,longitude:t.coords.longitude})},function(e){t(e)})})},e}();t.NavigatorPositionProvider=i},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{u(i.next(e))}catch(e){r(e)}}function a(e){try{u(i.throw(e))}catch(e){r(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((i=i.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){function n(e){return function(t){return i([e,t])}}function i(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,r&&(s=r[2&n[0]?"return":n[0]?"throw":"next"])&&!(s=s.call(r,n[1])).done)return s;switch(r=0,s&&(n=[0,s.value]),n[0]){case 0:case 1:s=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,r=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]=",[r]):r==i&&s!=o?n.addFieldExpression(this.facet.options.field,"<=",[s]):this.addFilterExpressionWithOuterBoundsIncluded(e,t,n)},e.prototype.putGroupByForGraphIntoQueryBuilder=function(e){this.graphGroupByQueriesIndex=e.groupByRequests.length;var t=this.createBasicGroupByRequest();this.facet.isSimpleSliderConfig?(t.rangeValues=this.createRangeValuesForGraphUsingStartAndEnd(),t.generateAutomaticRanges=!1):t.generateAutomaticRanges=!0;var n=this.computeOurFilterExpression(this.facet.getSliderBoundaryForQuery());this.processQueryOverride(n,t,e),t.sortCriteria="nosort",t.maximumNumberOfValues=this.facet.options.graph.steps,this.addExpressionToExcludeInvalidDates(t),e.groupByRequests.push(t)},e.prototype.putGroupByForSliderIntoQueryBuilder=function(e){this.lastGroupByRequestIndex=e.groupByRequests.length;var t=this.putGroupByBasicSliderIntoQueryBuilder(e);this.putGroupByForFullRangeSliderIntoQueryBuilder(e,t)},e.prototype.processQueryOverride=function(e,t,n){if(void 0!=e){var i=n.computeCompleteExpressionPartsExcept(e);t.queryOverride=i.basic,t.advancedQueryOverride=i.advanced,t.constantQueryOverride=i.constant,void 0==t.advancedQueryOverride?t.advancedQueryOverride=this.facet.options.queryOverride||"@uri":t.advancedQueryOverride+=this.facet.options.queryOverride?" "+this.facet.options.queryOverride:""}else if(null!=this.facet.options.queryOverride){var o=n.computeCompleteExpression();t.queryOverride=(null!=o?o+" ":"")+this.facet.options.queryOverride}},e.prototype.createRangeValuesForGraphUsingStartAndEnd=function(){var e=this.getFormattedStartAndEnd(),t=e.start,n=e.end,i={start:t,end:n,endInclusive:!0,label:"Slider"};return void 0==this.facet.options.graph.steps&&(this.facet.options.graph.steps=10),this.facet.options.dateField&&isNaN(this.facet.options.start)&&(this.facet.options.start=new Date(this.facet.options.start).getTime()),this.facet.options.dateField&&isNaN(this.facet.options.end)&&(this.facet.options.end=new Date(this.facet.options.end).getTime()),void 0!=this.rangeValuesForGraphToUse?this.usePrebuiltRange(i):this.buildRange(i)},e.prototype.usePrebuiltRange=function(e){return o.map(this.rangeValuesForGraphToUse,function(t){return{start:t.start,end:t.end,endInclusive:e.endInclusive,label:e.label}})},e.prototype.buildRange=function(e){var t=this,n=this.facet.options.start,i=(this.facet.options.end-this.facet.options.start)/this.facet.options.graph.steps;return o.map(o.range(0,this.facet.options.graph.steps,1),function(o){var r=n+o*i,s=n+(o+1)*i;return t.facet.options.dateField&&(r=t.getISOFormat(r),s=t.getISOFormat(s)),{endInclusive:e.endInclusive,label:e.label,start:r,end:s}})},e.prototype.getFormattedStartAndEnd=function(){var e=this.facet.options.start,t=this.facet.options.end;return this.facet.options.dateField&&(e=this.getISOFormat(e),t=this.getISOFormat(t)),{start:e,end:t}},e.prototype.getISOFormat=function(e){if(e){isNaN(e)||(e=Number(e));var t=new Date(e);return l.DateUtils.isValid(t)||(t=new Date(this.getBrowserCompatibleFormat(e)),l.DateUtils.isValid(t))?t.toISOString():void this.facet.logger.error("Cannot parse this date format.",e,new Date(e))}},e.prototype.getFilterDateFormat=function(e){return e?this.getISOFormat(e).replace("T","@").replace(".000Z","").replace(/-/g,"/"):void 0},e.prototype.getBrowserCompatibleFormat=function(e){return e.replace("@","T").replace(/\//g,"-")},e.prototype.putGroupByForFullRangeSliderIntoQueryBuilder=function(e,t){this.lastGroupByRequestForFullRangeIndex=e.groupByRequests.length;var n=o.clone(t);delete n.queryOverride,delete n.advancedQueryOverride,this.facet.options.queryOverride&&(n.advancedQueryOverride=this.facet.options.queryOverride),this.addExpressionToExcludeInvalidDates(n),e.groupByRequests.push(n)},e.prototype.putGroupByBasicSliderIntoQueryBuilder=function(e){var t=1;this.facet.hasAGraph()&&(t=this.facet.options.graph.steps);var n;this.facet.isSimpleSliderConfig&&(n=[i({},this.getFormattedStartAndEnd(),{label:"slider",endInclusive:!1})]);var o=this.createBasicGroupByRequest();o.maximumNumberOfValues=t,o.sortCriteria="nosort",o.generateAutomaticRanges=!this.facet.isSimpleSliderConfig,o.rangeValues=n;var r=this.computeOurFilterExpression(this.facet.getSliderBoundaryForQuery());return this.processQueryOverride(r,o,e),this.addExpressionToExcludeInvalidDates(o),e.groupByRequests.push(o),o},e.prototype.addExpressionToExcludeInvalidDates=function(e){if(this.facet.options.dateField){var t=new u.QueryBuilder;t.expression.addFieldExpression(this.facet.options.field,">",[this.getFilterDateFormat(new Date(0))]),e.constantQueryOverride?e.constantQueryOverride+=" "+t.expression.build():e.constantQueryOverride=t.expression.build()}},e}();t.FacetSliderQueryController=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(427),o=n(364),r=n(23),s=n(0),a=n(104),u=n(11),l=n(22),c=n(1),p=n(4);t.MAX_NUMBER_OF_STEPS=100;var d=function(){function e(e,t,n){var i=this;if(this.element=e,this.options=t,this.root=n,this.steps=[],this.options.dateField&&(this.options.start=new Date(this.options.start).getTime(),this.options.end=new Date(this.options.end).getTime()),void 0==this.options.rounded&&(this.options.rounded=0),(this.options.steps||this.options.getSteps)&&this.buildSteps(),this.options.graph&&(this.sliderGraph=new g(this)),this.sliderLine=new h(this),s.each(this.sliderLine.build(),function(e){i.element.appendChild(e)}),this.options.rangeSlider)this.sliderRange=new m(this),s.each(this.sliderRange.build(),function(e){i.element.appendChild(e)});else{this.sliderButton=new f(this,1);var o=this.sliderButton.build();c.$$(o).addClass("coveo-no-range-button"),this.element.appendChild(o),this.sliderLine.setActiveWidth(this.sliderButton)}this.sliderCaption=new y(this),this.element.appendChild(this.sliderCaption.build())}return e.prototype.onMoving=function(){this.options.rangeSlider?(this.sliderRange.setBoundary(),this.sliderLine.setActiveWidth(this.sliderRange.firstButton,this.sliderRange.secondButton)):(this.setButtonBoundary(),this.sliderLine.setActiveWidth(this.sliderButton)),this.options.graph&&this.sliderGraph.draw(),this.displayCaption()},e.prototype.initializeState=function(e){void 0===e&&(e=[this.options.start,this.options.end]),this.currentValues=e,this.options.rangeSlider?(this.sliderRange.initializeSliderRangeState(e),this.sliderLine.setActiveWidth(this.sliderRange.firstButton,this.sliderRange.secondButton)):(void 0==e?this.sliderButton.toEnd():this.sliderButton.setValue(e[1]),this.setButtonBoundary(),this.sliderLine.setActiveWidth(this.sliderButton)),this.displayCaption()},e.prototype.getPosition=function(){return this.options.rangeSlider?this.sliderRange.getPosition():[0,this.sliderButton.getPosition()]},e.prototype.getPercentPosition=function(){return this.options.rangeSlider?this.sliderRange.getPercentPosition():[0,this.sliderButton.getPercent()]},e.prototype.getValues=function(){return void 0!=this.currentValues?this.currentValues:this.options.rangeSlider?this.sliderRange.getValue():[this.options.start,this.sliderButton.getValue()]},e.prototype.getCaptionFromValue=function(e){return this.sliderCaption.getCaptionFromValues(e)},e.prototype.getCaption=function(){return this.sliderCaption.getCaption()},e.prototype.setValues=function(e){void 0!=e&&(e[0]=Math.max(e[0],this.options.start),e[1]=Math.min(e[1],this.options.end)),this.currentValues=e,this.options.rangeSlider?(this.sliderRange.setValue(e),this.sliderLine.setActiveWidth(this.sliderRange.firstButton,this.sliderRange.secondButton)):(this.sliderButton.setValue(e[1]),this.sliderLine.setActiveWidth(this.sliderButton)),this.displayCaption()},e.prototype.drawGraph=function(e){this.sliderGraph&&this.sliderGraph.draw(e)},e.prototype.setButtonBoundary=function(){this.sliderButton.leftBoundary=0,this.sliderButton.rightBoundary=this.element.clientWidth},e.prototype.displayCaption=function(){void 0!=this.options.valueCaption?this.sliderCaption.setFromString(this.options.valueCaption(this.getValues())):void 0!=this.options.percentCaption?this.sliderCaption.setFromString(this.options.percentCaption(this.getPercentPosition())):void 0!=this.options.displayAsPercent&&void 0!=this.options.displayAsPercent.separator&&this.options.displayAsPercent.enable?this.sliderCaption.setAsPercent():this.sliderCaption.setAsValue()},e.prototype.buildSteps=function(){if(this.options.getSteps)this.steps=this.options.getSteps(this.options.start,this.options.end);else{this.options.steps>t.MAX_NUMBER_OF_STEPS&&(new u.Logger(this).warn("Maximum number of steps for slider is "+t.MAX_NUMBER_OF_STEPS+" for performance reason"),this.options.steps=t.MAX_NUMBER_OF_STEPS);var e=(this.options.end-this.options.start)/Math.max(1,this.options.steps);if(e>0)for(var n=this.options.start,i=0;n<=this.options.end&&i<=t.MAX_NUMBER_OF_STEPS;)this.steps.push(n),n+=e,i++;else this.steps.push(this.options.start),this.steps.push(this.options.end)}},e}();t.Slider=d;var h=function(){function e(e){this.slider=e}return e.prototype.build=function(){return this.backGround=c.$$("div",{className:"coveo-slider-line coveo-background"}).el,this.activePart=c.$$("div",{className:"coveo-slider-line coveo-active"}).el,[this.backGround,this.activePart]},e.prototype.setActiveWidth=function(e,t){if(this.slider.options.rangeSlider){var n=100*(t.getPercent()-e.getPercent());this.activePart.style.width=n+"%",this.activePart.style.left=100*e.getPercent()+"%",this.activePart.style.right=100*t.getPercent()+"%"}else{var n=100*e.getPercent();this.activePart.style.width=n+"%"}},e}(),f=function(){function e(e,t){this.slider=e,this.which=t,this.eventMouseDown=l.DeviceUtils.isMobileDevice()?"touchstart":"mousedown",this.eventMouseMove=l.DeviceUtils.isMobileDevice()?"touchmove":"mousemove",this.eventMouseUp=l.DeviceUtils.isMobileDevice()?"touchend":"mouseup"}return e.prototype.build=function(){return this.element=c.$$("div",{className:"coveo-slider-button"}).el,this.bindEvents(),this.element.CoveoSliderButton=this,this.element},e.prototype.toBeginning=function(){this.element.style.left="0%"},e.prototype.toEnd=function(){this.element.style.left="100%"},e.prototype.setValue=function(e){var t=this.fromValueToPercent(e);this.element.style.left=Math.round(100*t)+"%"},e.prototype.getPosition=function(){var e=this.element.style.left;return-1!=e.indexOf("%")?parseFloat(e)/100*this.slider.element.clientWidth:parseFloat(e)},e.prototype.getPercent=function(e){return void 0===e&&(e=this.getPosition()),0==this.slider.element.clientWidth?0:+(e/this.slider.element.clientWidth).toFixed(2)},e.prototype.getValue=function(){return this.getPercent()*(this.slider.options.end-this.slider.options.start)+this.slider.options.start},e.prototype.fromValueToPercent=function(e){return 1-(this.slider.options.end-e)/(this.slider.options.end-this.slider.options.start)},e.prototype.fromPositionToValue=function(e){var t=this.getPercent(e);return this.slider.options.start+t*(this.slider.options.end-this.slider.options.start)},e.prototype.fromValueToPosition=function(e){var t=this.fromValueToPercent(e);return this.slider.element.clientWidth*t},e.prototype.bindEvents=function(){var e=this;c.$$(this.element).on(this.eventMouseDown,function(t){e.handleStartSlide(t)});var t=this.slider.options.document||document;t.addEventListener(this.eventMouseMove,function(t){"touchmove"==e.eventMouseMove&&e.isMouseDown&&t.preventDefault(),e.handleMoving(t)}),t.addEventListener(this.eventMouseUp,function(){e.handleEndSlide()})},e.prototype.getUserSelect=function(){return void 0!==document.body.style.msUserSelect?"msUserSelect":void 0!==document.body.style.webkitUserSelect?"webkitUserSelect":void 0!==document.body.style.MozUserSelect?"MozUserSelect":"userSelect"},e.prototype.handleStartSlide=function(e){var t=this.getMousePosition(e);this.isMouseDown=!0,this.startPositionX=t.x,this.lastElementLeft=parseInt(this.element.style.left,10)/100*this.slider.element.clientWidth,this.origUserSelect=document.body.style[this.getUserSelect()],this.origCursor=document.body.style.cursor,document.body.style[this.getUserSelect()]="none",document.body.style.cursor="pointer",c.$$(this.element).addClass("coveo-active"),c.$$(this.element).trigger(a.SliderEvents.startSlide,{button:this,slider:this.slider}),e.stopPropagation()},e.prototype.handleMoving=function(e){this.isMouseDown&&(this.slider.onMoving(),this.updatePosition(e),this.handleButtonNearEnd(),c.$$(this.element).trigger(a.SliderEvents.duringSlide,{button:this,slider:this.slider}))},e.prototype.handleEndSlide=function(){this.isMouseDown&&(document.body.style[this.getUserSelect()]=this.origUserSelect,document.body.style.cursor=this.origCursor,c.$$(this.element).removeClass("coveo-active"),c.$$(this.element).trigger(a.SliderEvents.endSlide,{button:this,slider:this.slider})),this.isMouseDown=!1},e.prototype.handleButtonNearEnd=function(){0==this.which&&(void 0==this.origZIndex&&(this.origZIndex=this.element.style.zIndex||"1"),this.currentPos>90?this.element.style.zIndex=this.origZIndex+1:this.element.style.zIndex=this.origZIndex)},e.prototype.getMousePosition=function(e){var t=0,n=0;return e.touches&&e.touches[0]?(t=e.touches[0].pageX,n=e.touches[0].pageY):e.pageX&&e.pageY?(t=e.pageX,n=e.pageY):e.clientX&&e.clientY&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),{x:t,y:n}},e.prototype.updatePosition=function(e){var t,n=this.getMousePosition(e),i=n.x-this.startPositionX;if(this.currentPos=this.lastElementLeft+i,this.slider.options.steps||this.slider.options.getSteps){var o=this.snapToStep(i);this.currentPos=o.position,t=o.value}this.currentPos=Math.max(this.leftBoundary,this.currentPos),this.currentPos=Math.min(this.rightBoundary,this.currentPos),this.currentPos=100*this.getPercent(this.currentPos),this.currentPos=Math.min(this.currentPos,100),this.currentPos=Math.max(this.currentPos,0),this.element.style.left=Math.round(this.currentPos)+"%",this.slider.options.steps||this.slider.options.getSteps?this.slider.currentValues[this.which]=t:this.slider.currentValues[this.which]=this.getValue()},e.prototype.snapToStep=function(e){var t=this,n=s.map(this.slider.steps,function(e,n){return Math.abs(t.currentPos-t.fromValueToPosition(t.slider.steps[n]))}),i=s.map(this.slider.steps,function(e,n){return Math.abs(t.rightBoundary-t.fromValueToPosition(t.slider.steps[n]))}),o=s.map(this.slider.steps,function(e,n){return Math.abs(t.leftBoundary-t.fromValueToPosition(t.slider.steps[n]))}),r=s.min(n),a=s.min(i),u=s.min(o),l=this.slider.steps[s.indexOf(n,r)],c=this.slider.steps[s.indexOf(i,a)],p=this.slider.steps[s.indexOf(o,u)];return l=Math.min(l,c),l=Math.max(l,p),{position:this.fromValueToPosition(l),value:l}},e}();t.SliderButton=f;var m=function(){function e(e){this.slider=e,this.firstButton=new f(e,0),this.secondButton=new f(e,1)}return e.prototype.build=function(){var e=this.firstButton.build(),t=this.secondButton.build();return c.$$(t).addClass("coveo-range-button"),[e,t]},e.prototype.initializeSliderRangeState=function(e){void 0==e?(this.firstButton.toBeginning(),this.secondButton.toEnd()):(this.firstButton.setValue(e[0]),this.secondButton.setValue(e[1])),this.setBoundary()},e.prototype.setValue=function(e){this.firstButton.setValue(e[0]),this.secondButton.setValue(e[1])},e.prototype.setBoundary=function(){this.firstButton.leftBoundary=0,this.firstButton.rightBoundary=this.secondButton.getPosition(),this.secondButton.leftBoundary=this.firstButton.getPosition(),this.secondButton.rightBoundary=this.slider.element.clientWidth},e.prototype.getPosition=function(){return[this.firstButton.getPosition(),this.secondButton.getPosition()]},e.prototype.getPercentPosition=function(){return[this.firstButton.getPercent(),this.secondButton.getPercent()]},e.prototype.getValue=function(){return[this.firstButton.getValue(),this.secondButton.getValue()]},e}(),y=function(){function e(e){this.slider=e,this.separator="-",this.unitSign="",this.slider.options.displayAsPercent&&this.slider.options.displayAsPercent.enable?this.separator=void 0!=this.slider.options.displayAsPercent.separator?this.slider.options.displayAsPercent.separator:this.separator:this.slider.options.displayAsValue&&this.slider.options.displayAsValue.enable&&(this.separator=void 0!=this.slider.options.displayAsValue.separator?this.slider.options.displayAsValue.separator:this.separator,this.unitSign=void 0!=this.slider.options.displayAsValue.unitSign?this.slider.options.displayAsValue.unitSign:this.unitSign)}return e.prototype.build=function(){return this.caption=c.$$("div",{className:"coveo-slider-caption"}).el,this.caption},e.prototype.getCaption=function(){return c.$$(this.caption).text()},e.prototype.getCaptionFromValues=function(e){return this.getValueCaption(e)},e.prototype.getCaptionFromValuesAsPercent=function(e){return this.getValueCaption(e)},e.prototype.setAsValue=function(){c.$$(this.caption).text(this.getValueCaption())},e.prototype.setAsPercent=function(){var e=this.slider.getPercentPosition();c.$$(this.caption).text([(100*e[0]).toFixed(this.slider.options.rounded),"%",this.separator,(100*e[1]).toFixed(this.slider.options.rounded),"%"].join(" "))},e.prototype.setFromString=function(e){c.$$(this.caption).text(e)},e.prototype.getValueCaption=function(e){void 0===e&&(e=this.slider.getValues());var t=e[0],n=e[1];if(this.slider.options.dateField){var i=new Date(t),o=new Date(n);i.setHours(0,0,0,0),o.setHours(0,0,0,0),t=r.format(i,this.slider.options.dateFormat||"MMM dd, yyyy"),n=r.format(o,this.slider.options.dateFormat||"MMM dd, yyyy"),this.unitSign=""}else t=t.toFixed(this.slider.options.rounded),n=n.toFixed(this.slider.options.rounded);return[t,this.unitSign,this.separator,n,this.unitSign].join(" ")},e}(),g=function(){function e(e){this.slider=e,this.svg=i.select(e.element).append("svg").append("g"),this.x=o.scaleBand(),this.y=o.scaleLinear(),this.slider.options.graph.margin=p.Utils.extendDeep({top:20,right:0,left:0,bottom:20},this.slider.options.graph.margin||{}),this.slider.options.graph.animationDuration=this.slider.options.graph.animationDuration||500,this.slider.options.graph.steps=this.slider.options.graph.steps||10,this.buildTooltip()}return e.prototype.draw=function(e){if(void 0===e&&(e=this.oldData),e){e!=this.oldData&&(e=this.modifyPossibleSinglePointDataIntoValidRange(e));var t=this.slider.element.offsetWidth,n=this.slider.element.offsetHeight,i=t-this.slider.options.graph.margin.left-this.slider.options.graph.margin.right,o=n-this.slider.options.graph.margin.top-this.slider.options.graph.margin.bottom;if(!isNaN(i)&&i>=0&&!isNaN(o)&&o>=0){this.applyTransformOnSvg(i,o),this.setXAndYRange(i,o),this.setXAndYDomain(e);var r=this.svg.selectAll(".coveo-bar").data(e),s=this.slider.getValues();this.renderGraphBars(r,i,o,s),this.setGraphBarsTransition(r,o,s)}this.oldData=e}},e.prototype.buildTooltip=function(){this.tooltip=c.$$("div",{className:"coveo-slider-tooltip"}).el,this.tooltipArrow=c.$$("div",{className:"coveo-slider-tooltip-arrow"}).el,this.tooltipCaption=c.$$("span",{className:"coveo-caption"}).el,this.tooltipCount=c.$$("span",{className:"coveo-count"}).el,c.$$(this.tooltip).append(this.tooltipArrow),c.$$(this.tooltip).append(this.tooltipCaption),c.$$(this.tooltip).append(this.tooltipCount),c.$$(this.tooltip).hide(),c.$$(this.slider.element).append(this.tooltip)},e.prototype.modifyPossibleSinglePointDataIntoValidRange=function(e){var t=this;return s.map(e,function(e){if(e.start==e.end){var n=(t.slider.options.end-t.slider.options.start)/t.slider.options.graph.steps;e.start=Math.round(e.start-n/2),e.end=Math.round(e.end+n/2)}return e})},e.prototype.setXAndYRange=function(e,t){this.x.range([0,e]),this.x.padding(.2),this.y.range([t-this.slider.options.graph.margin.top,0])},e.prototype.setXAndYDomain=function(e){this.padGraphWithEmptyData(e),this.x.domain(s.map(e,function(e){return e.start})),this.y.domain([0,i.max(e,function(e){return e.y})])},e.prototype.padGraphWithEmptyData=function(e){var t=e[0].end-e[0].start;this.padBeginningOfGraphWithEmptyData(e,t),this.padEndOfGraphWithEmptyData(e,t)},e.prototype.padBeginningOfGraphWithEmptyData=function(e,t){if(e[0].start>this.slider.options.start&&e[0].start>t)for(var n=e[0].start-this.slider.options.start,i=Math.round(n/t),o=e[0].start,r=i;r>0;r--)e.unshift({start:o-t,end:o,y:0}),o-=t},e.prototype.padEndOfGraphWithEmptyData=function(e,t){var n=e.length-1;if(e[n].end=e[0]&&t.end<=e[1]?"coveo-active":e[0]==this.slider.options.start&&0==n?"coveo-active":e[1]==this.slider.options.end&&n==this.slider.options.graph.steps-1?"coveo-active":""},e.prototype.setTooltip=function(e,t){c.$$(this.tooltipCaption).text(this.slider.getCaptionFromValue([e.start,e.end])),c.$$(this.tooltipCount).text(e.y.toString()),c.$$(this.tooltip).show();var n=this.x(e.start)-50,i=this.x.bandwidth()/2,o=50+i-5;this.tooltip.style.left=n+"px",this.tooltip.style.top=this.y(e.y)-t+"px",this.tooltipArrow.style.left=o+"px";var r=this.tooltip.getBoundingClientRect(),s=new c.Win(window).width();if(r.right>s-20){var a=s-r.right-20;this.tooltip.style.left=n+a+"px",this.tooltipArrow.style.left=o-a+"px"}},e.prototype.getFunctionForX=function(){var e=this;return function(t){return e.x(t.start)}},e.prototype.getFunctionForY=function(){var e=this;return function(t){return e.y(t.y)}},e.prototype.getFunctionForHeight=function(e){var t=this;return function(n){return e-t.y(n.y)}},e.prototype.getFunctionForClass=function(e){var t=this;return function(n,i){return"coveo-bar "+t.getBarClass(e,n,i)}},e.prototype.getFunctionForClick=function(){var e=this;return function(t,n){c.$$(e.slider.element).trigger(a.SliderEvents.graphValueSelected,{start:t.start,end:t.end,value:t.y})}},e.prototype.getFunctionForMouseOver=function(e){var t=this;return function(n){return t.setTooltip(n,e)}},e.prototype.getFunctionForMouseOut=function(){var e=this;return function(){return c.$$(e.tooltip).hide()}},e}()},function(e,t,n){"use strict";function i(e){return"translate("+(e+.5)+",0)"}function o(e){return"translate(0,"+(e+.5)+")"}function r(e){return function(t){return+e(t)}}function s(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function a(){return!this.__axis}function u(e,t){function n(n){var i=null==l?t.ticks?t.ticks.apply(t,u):t.domain():l,o=null==c?t.tickFormat?t.tickFormat.apply(t,u):Sa:c,g=Math.max(p,0)+h,v=t.range(),b=+v[0]+.5,C=+v[v.length-1]+.5,S=(t.bandwidth?s:r)(t.copy()),w=n.selection?n.selection():n,x=w.selectAll(".domain").data([null]),_=w.selectAll(".tick").data(i,t).order(),E=_.exit(),O=_.enter().append("g").attr("class","tick"),A=_.select("line"),T=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),_=_.merge(O),A=A.merge(O.append("line").attr("stroke","#000").attr(m+"2",f*p)),T=T.merge(O.append("text").attr("fill","#000").attr(m,f*g).attr("dy",e===wa?"0em":e===_a?"0.71em":"0.32em")),n!==w&&(x=x.transition(n),_=_.transition(n),A=A.transition(n),T=T.transition(n),E=E.transition(n).attr("opacity",Oa).attr("transform",function(e){return isFinite(e=S(e))?y(e):this.getAttribute("transform")}),O.attr("opacity",Oa).attr("transform",function(e){var t=this.parentNode.__axis;return y(t&&isFinite(t=t(e))?t:S(e))})),E.remove(),x.attr("d",e===Ea||e==xa?"M"+f*d+","+b+"H0.5V"+C+"H"+f*d:"M"+b+","+f*d+"V0.5H"+C+"V"+f*d),_.attr("opacity",1).attr("transform",function(e){return y(S(e))}),A.attr(m+"2",f*p),T.attr(m,f*g).text(o),w.filter(a).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===xa?"start":e===Ea?"end":"middle"),w.each(function(){this.__axis=S})}var u=[],l=null,c=null,p=6,d=6,h=3,f=e===wa||e===Ea?-1:1,m=e===Ea||e===xa?"x":"y",y=e===wa||e===_a?i:o;return n.scale=function(e){return arguments.length?(t=e,n):t},n.ticks=function(){return u=Ca.call(arguments),n},n.tickArguments=function(e){return arguments.length?(u=null==e?[]:Ca.call(e),n):u.slice()},n.tickValues=function(e){return arguments.length?(l=null==e?null:Ca.call(e),n):l&&l.slice()},n.tickFormat=function(e){return arguments.length?(c=e,n):c},n.tickSize=function(e){return arguments.length?(p=d=+e,n):p},n.tickSizeInner=function(e){return arguments.length?(p=+e,n):p},n.tickSizeOuter=function(e){return arguments.length?(d=+e,n):d},n.tickPadding=function(e){return arguments.length?(h=+e,n):h},n}function l(e){return u(wa,e)}function c(e){return u(xa,e)}function p(e){return u(_a,e)}function d(e){return u(Ea,e)}function h(){for(var e,t=0,n=arguments.length,i={};t=0&&(n=e.slice(i+1),e=e.slice(0,i)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}function y(e,t){for(var n,i=0,o=e.length;it?1:e>=t?0:NaN}function O(e){return function(){this.removeAttribute(e)}}function A(e){return function(){this.removeAttributeNS(e.space,e.local)}}function T(e,t){return function(){this.setAttribute(e,t)}}function R(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function M(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function I(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function F(e){return function(){this.style.removeProperty(e)}}function $(e,t,n){return function(){this.style.setProperty(e,t,n)}}function D(e,t,n){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function P(e,t){return e.style.getPropertyValue(t)||ou(e).getComputedStyle(e,null).getPropertyValue(t)}function N(e){return function(){delete this[e]}}function k(e,t){return function(){this[e]=t}}function L(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function V(e){return e.trim().split(/^|\s+/)}function B(e){return e.classList||new Q(e)}function Q(e){this._node=e,this._names=V(e.getAttribute("class")||"")}function U(e,t){for(var n=B(e),i=-1,o=t.length;++i=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function ue(e){return function(){var t=this.__on;if(t){for(var n,i=0,o=-1,r=t.length;i=0&&t._call.call(null,e),t=t._next;--Vu}function Me(){Hu=(ju=zu.now())+qu,Vu=Bu=0;try{Re()}finally{Vu=0,Fe(),Hu=0}}function Ie(){var e=zu.now(),t=e-ju;t>Uu&&(qu-=t,ju=e)}function Fe(){for(var e,t,n=Pu,i=1/0;n;)n._call?(i>n._time&&(i=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Pu=t);Nu=e,$e(i)}function $e(e){if(!Vu){Bu&&(Bu=clearTimeout(Bu));e-Hu>24?(e<1/0&&(Bu=setTimeout(Me,e-zu.now()-qu)),Qu&&(Qu=clearInterval(Qu))):(Qu||(ju=zu.now(),Qu=setInterval(Ie,Uu)),Vu=1,Wu(Me))}}function De(e,t){var n=Ne(e,t);if(n.state>Xu)throw new Error("too late; already scheduled");return n}function Pe(e,t){var n=Ne(e,t);if(n.state>el)throw new Error("too late; already started");return n}function Ne(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ke(e,t,n){function i(e){n.state=Zu,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(i){var l,c,p,d;if(n.state!==Zu)return s();for(l in u)if(d=u[l],d.name===n.name){if(d.state===tl)return Gu(o);d.state===nl?(d.state=ol,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete u[l]):+l=0&&(e=e.slice(0,t)),!e||"start"===e})}function tt(e,t,n){var i,o,r=et(t)?De:Pe;return function(){var s=r(this,e),a=s.on;a!==i&&(o=(i=a).copy()).on(t,n),s.on=o}}function nt(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function it(e,t){var n,i,o;return function(){var r=P(this,e),s=(this.style.removeProperty(e),P(this,e));return r===s?null:r===n&&s===i?o:o=t(n=r,i=s)}}function ot(e){return function(){this.style.removeProperty(e)}}function rt(e,t,n){var i,o;return function(){var r=P(this,e);return r===n?null:r===i?o:o=t(i=r,n)}}function st(e,t,n){var i,o,r;return function(){var s=P(this,e),a=n(this);return null==a&&(this.style.removeProperty(e),a=P(this,e)),s===a?null:s===i&&a===o?r:r=t(i=s,o=a)}}function at(e,t,n){function i(){var i=this,o=t.apply(i,arguments);return o&&function(t){i.style.setProperty(e,o(t),n)}}return i._value=t,i}function ut(e){return function(){this.textContent=e}}function lt(e){return function(){var t=e(this);this.textContent=null==t?"":t}}function ct(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function pt(e){return wu().transition(e)}function dt(){return++Tl}function ht(e){return+e}function ft(e){return e*e}function mt(e){return e*(2-e)}function yt(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function gt(e){return e*e*e}function vt(e){return--e*e*e+1}function bt(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}function Ct(e){return 1-Math.cos(e*Dl)}function St(e){return Math.sin(e*Dl)}function wt(e){return(1-Math.cos($l*e))/2}function xt(e){return Math.pow(2,10*e-10)}function _t(e){return 1-Math.pow(2,-10*e)}function Et(e){return((e*=2)<=1?Math.pow(2,10*e-10):2-Math.pow(2,10-10*e))/2}function Ot(e){return 1-Math.sqrt(1-e*e)}function At(e){return Math.sqrt(1- --e*e)}function Tt(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}function Rt(e){return 1-Mt(1-e)}function Mt(e){return(e=+e)Math.abs(e[1]-k[1])?w=!0:S=!0),k=e,C=!0,oc(),o()}function o(){var e;switch(v=k[0]-N[0],b=k[1]-N[1],E){case sc:case rc:O&&(v=Math.max(I-c,Math.min($-f,v)),p=c+v,m=f+v),A&&(b=Math.max(F-d,Math.min(D-y,b)),h=d+b,g=y+b);break;case ac:O<0?(v=Math.max(I-c,Math.min($-c,v)),p=c+v,m=f):O>0&&(v=Math.max(I-f,Math.min($-f,v)),p=c,m=f+v),A<0?(b=Math.max(F-d,Math.min(D-d,b)),h=d+b,g=y):A>0&&(b=Math.max(F-y,Math.min(D-y,b)),h=d,g=y+b);break;case uc:O&&(p=Math.max(I,Math.min($,c-v*O)),m=Math.max(I,Math.min($,f+v*O))),A&&(h=Math.max(F,Math.min(D,d-b*A)),g=Math.max(F,Math.min(D,y+b*A)))}m0&&(c=p-v),A<0?y=g-b:A>0&&(d=h-b),E=sc,B.attr("cursor",dc.selection),o());break;default:return}oc()}function u(){switch(vu.keyCode){case 16:P&&(S=w=P=!1,o());break;case 18:E===uc&&(O<0?f=m:O>0&&(c=p),A<0?y=g:A>0&&(d=h),E=ac,o());break;case 32:E===sc&&(vu.altKey?(O&&(f=m-v*O,c=p+v*O),A&&(y=g-b*A,d=h+b*A),E=uc):(O<0?f=m:O>0&&(c=p),A<0?y=g:A>0&&(d=h),E=ac),B.attr("cursor",dc[_]),o());break;default:return}oc()}if(vu.touches){if(vu.changedTouches.length=(r=(m+g)/2))?m=r:g=r,(c=n>=(s=(y+v)/2))?y=s:v=s,o=h,!(h=h[p=c<<1|l]))return o[p]=f,e;if(a=+e._x.call(null,h.data),u=+e._y.call(null,h.data),t===a&&n===u)return f.next=h,o?o[p]=f:e._root=f,e;do{o=o?o[p]=new Array(4):e._root=new Array(4),(l=t>=(r=(m+g)/2))?m=r:g=r,(c=n>=(s=(y+v)/2))?y=s:v=s}while((p=c<<1|l)==(d=(u>=s)<<1|a>=r));return o[d]=h,o[p]=f,e}function tn(e){var t,n,i,o,r=e.length,s=new Array(r),a=new Array(r),u=1/0,l=1/0,c=-1/0,p=-1/0;for(n=0;nc&&(c=i),op&&(p=o));for(c1?0:e<-1?nd:Math.acos(e)}function vn(e){return e>1?id:e<-1?-id:Math.asin(e)}function bn(e){return(e=yd(e/2))*e}function Cn(){}function Sn(e,t){e&&Sd.hasOwnProperty(e.type)&&Sd[e.type](e,t)}function wn(e,t,n){var i,o=-1,r=e.length-n;for(t.lineStart();++o=0?1:-1,o=i*n,r=pd(t),s=yd(t),a=Ap*s,u=Op*r+a*pd(o),l=a*i*yd(o);xd.add(cd(l,u)),Ep=e,Op=r,Ap=s}function Tn(e){return[cd(e[1],e[0]),vn(e[2])]}function Rn(e){var t=e[0],n=e[1],i=pd(n);return[i*pd(t),i*yd(t),yd(n)]}function Mn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function In(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Fn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function $n(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Dn(e){var t=vd(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Pn(e,t){Np.push(kp=[Tp=e,Mp=e]),tIp&&(Ip=t)}function Nn(e,t){var n=Rn([e*ad,t*ad]);if(Pp){var i=In(Pp,n),o=[i[1],-i[0],0],r=In(o,i);Dn(r),r=Tn(r);var s,a=e-Fp,u=a>0?1:-1,l=r[0]*sd*u,c=ud(a)>180;c^(u*FpIp&&(Ip=s):(l=(l+360)%360-180,c^(u*FpIp&&(Ip=t))),c?eUn(Tp,Mp)&&(Mp=e):Un(e,Mp)>Un(Tp,Mp)&&(Tp=e):Mp>=Tp?(eMp&&(Mp=e)):e>Fp?Un(Tp,e)>Un(Tp,Mp)&&(Mp=e):Un(e,Mp)>Un(Tp,Mp)&&(Tp=e)}else Np.push(kp=[Tp=e,Mp=e]);tIp&&(Ip=t),Pp=n,Fp=e}function kn(){Td.point=Nn}function Ln(){kp[0]=Tp,kp[1]=Mp,Td.point=Pn,Pp=null}function Vn(e,t){if(Pp){var n=e-Fp;Ad.add(ud(n)>180?n+(n>0?360:-360):n)}else $p=e,Dp=t;Ed.point(e,t),Nn(e,t)}function Bn(){Ed.lineStart()}function Qn(){Vn($p,Dp),Ed.lineEnd(),ud(Ad)>td&&(Tp=-(Mp=180)),kp[0]=Tp,kp[1]=Mp,Pp=null}function Un(e,t){return(t-=e)<0?t+360:t}function jn(e,t){return e[0]-t[0]}function Hn(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tnd?e-rd:e<-nd?e+rd:e,t]}function ni(e,t,n){return(e%=rd)?t||n?$d(oi(e),ri(t,n)):oi(e):t||n?ri(t,n):ti}function ii(e){return function(t,n){return t+=e,[t>nd?t-rd:t<-nd?t+rd:t,n]}}function oi(e){var t=ii(e);return t.invert=ii(-e),t}function ri(e,t){function n(e,t){var n=pd(t),a=pd(e)*n,u=yd(e)*n,l=yd(t),c=l*i+a*o;return[cd(u*r-c*s,a*i-l*o),vn(c*r+u*s)]}var i=pd(e),o=yd(e),r=pd(t),s=yd(t);return n.invert=function(e,t){var n=pd(t),a=pd(e)*n,u=yd(e)*n,l=yd(t),c=l*r-u*s;return[cd(u*r+l*s,a*i+c*o),vn(c*i-a*o)]},n}function si(e,t,n,i,o,r){if(n){var s=pd(t),a=yd(t),u=i*n;null==o?(o=t+i*rd,r=t-u/2):(o=ai(s,o),r=ai(s,r),(i>0?or)&&(o+=i*rd));for(var l,c=o;i>0?c>r:c1}function pi(e,t){return((e=e.x)[0]<0?e[1]-id-td:id-e[1])-((t=t.x)[0]<0?t[1]-id-td:id-t[1])}function di(e){var t,n=NaN,i=NaN,o=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(r,s){var a=r>0?nd:-nd,u=ud(r-n);ud(u-nd)0?id:-id),e.point(o,i),e.lineEnd(),e.lineStart(),e.point(a,i),e.point(r,i),t=0):o!==a&&u>=nd&&(ud(n-o)td?ld((yd(t)*(r=pd(i))*yd(n)-yd(i)*(o=pd(t))*yd(e))/(o*r*s)):(t+i)/2}function fi(e,t,n,i){var o;if(null==e)o=n*id,i.point(-nd,o),i.point(0,o),i.point(nd,o),i.point(nd,0),i.point(nd,-o),i.point(0,-o),i.point(-nd,-o),i.point(-nd,0),i.point(-nd,o);else if(ud(e[0]-t[0])>td){var r=e[0]0)do{l.point(0===c||3===c?e:n,c>1?i:t)}while((c=(c+a+4)%4)!==p);else l.point(r[0],r[1])}function s(i,o){return ud(i[0]-e)0?0:3:ud(i[0]-n)0?2:1:ud(i[1]-t)0?1:0:o>0?3:2}function a(e,t){return u(e.x,t.x)}function u(e,t){var n=s(e,1),i=s(t,1);return n!==i?n-i:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function u(e,t){o(e,t)&&O.point(e,t)}function l(){for(var t=0,n=0,o=y.length;ni&&(p-r)*(i-s)>(d-s)*(e-r)&&++t:d<=i&&(p-r)*(i-s)<(d-s)*(e-r)&&--t;return t}function c(){O=A,m=[],y=[],E=!0}function p(){var e=l(),t=E&&e,n=(m=Object(ba.n)(m)).length;(t||n)&&(s.polygonStart(),t&&(s.lineStart(),r(null,null,1,s),s.lineEnd()),n&&Yd(m,a,e,r,s),s.polygonEnd()),O=s,m=y=g=null}function d(){T.point=f,y&&y.push(g=[]),_=!0,x=!1,S=w=NaN}function h(){m&&(f(v,b),C&&x&&A.rejoin(),m.push(A.result())),T.point=u,x&&O.lineEnd()}function f(r,s){var a=o(r,s);if(y&&g.push([r,s]),_)v=r,b=s,C=a,_=!1,a&&(O.lineStart(),O.point(r,s));else if(a&&x)O.point(r,s);else{var u=[S=Math.max(ih,Math.min(nh,S)),w=Math.max(ih,Math.min(nh,w))],l=[r=Math.max(ih,Math.min(nh,r)),s=Math.max(ih,Math.min(nh,s))];th(u,l,e,t,n,i)?(x||(O.lineStart(),O.point(u[0],u[1])),O.point(l[0],l[1]),a||O.lineEnd(),E=!1):a&&(O.lineStart(),O.point(r,s),E=!1)}S=r,w=s,x=a}var m,y,g,v,b,C,S,w,x,_,E,O=s,A=Wd(),T={point:u,lineStart:d,lineEnd:h,polygonStart:c,polygonEnd:p};return T}}function yi(){sh.point=vi,sh.lineEnd=gi}function gi(){sh.point=sh.lineEnd=Cn}function vi(e,t){e*=ad,t*=ad,Dd=e,Pd=yd(t),Nd=pd(t),sh.point=bi}function bi(e,t){e*=ad,t*=ad;var n=yd(t),i=pd(t),o=ud(e-Dd),r=pd(o),s=yd(o),a=i*s,u=Nd*n-Pd*i*r,l=Pd*n+Nd*i*r;rh.add(cd(vd(a*a+u*u),l)),Dd=e,Pd=n,Nd=i}function Ci(e,t){return!(!e||!dh.hasOwnProperty(e.type))&&dh[e.type](e,t)}function Si(e,t){return 0===ch(e,t)}function wi(e,t){var n=ch(e[0],e[1]);return ch(e[0],t)+ch(t,e[1])<=n+td}function xi(e,t){return!!Jd(e.map(_i),Ei(t))}function _i(e){return e=e.map(Ei),e.pop(),e}function Ei(e){return[e[0]*ad,e[1]*ad]}function Oi(e,t,n){var i=Object(ba.s)(e,t-td,n).concat(t);return function(e){return i.map(function(t){return[e,t]})}}function Ai(e,t,n){var i=Object(ba.s)(e,t-td,n).concat(t);return function(e){return i.map(function(t){return[t,e]})}}function Ti(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return Object(ba.s)(dd(r/y)*y,o,y).map(d).concat(Object(ba.s)(dd(l/g)*g,u,g).map(h)).concat(Object(ba.s)(dd(i/f)*f,n,f).filter(function(e){return ud(e%y)>td}).map(c)).concat(Object(ba.s)(dd(a/m)*m,s,m).filter(function(e){return ud(e%g)>td}).map(p))}var n,i,o,r,s,a,u,l,c,p,d,h,f=10,m=f,y=90,g=360,v=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(h(u).slice(1),d(o).reverse().slice(1),h(l).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],l=+t[0][1],u=+t[1][1],r>o&&(t=r,r=o,o=t),l>u&&(t=l,l=u,u=t),e.precision(v)):[[r,l],[o,u]]},e.extentMinor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],a=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),a>s&&(t=a,a=s,s=t),e.precision(v)):[[i,a],[n,s]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],g=+t[1],e):[y,g]},e.stepMinor=function(t){return arguments.length?(f=+t[0],m=+t[1],e):[f,m]},e.precision=function(t){return arguments.length?(v=+t,c=Oi(a,s,90),p=Ai(i,n,v),d=Oi(l,u,90),h=Ai(r,o,v),e):v},e.extentMajor([[-180,-90+td],[180,90-td]]).extentMinor([[-180,-80-td],[180,80+td]])}function Ri(){return Ti()()}function Mi(){vh.point=Ii}function Ii(e,t){vh.point=Fi,kd=Vd=e,Ld=Bd=t}function Fi(e,t){gh.add(Bd*e-Vd*t),Vd=e,Bd=t}function $i(){Fi(kd,Ld)}function Di(e,t){ewh&&(wh=e),txh&&(xh=t)}function Pi(e,t){Oh+=e,Ah+=t,++Th}function Ni(){Ph.point=ki}function ki(e,t){Ph.point=Li,Pi(jd=e,Hd=t)}function Li(e,t){var n=e-jd,i=t-Hd,o=vd(n*n+i*i);Rh+=o*(jd+e)/2,Mh+=o*(Hd+t)/2,Ih+=o,Pi(jd=e,Hd=t)}function Vi(){Ph.point=Pi}function Bi(){Ph.point=Ui}function Qi(){ji(Qd,Ud)}function Ui(e,t){Ph.point=ji,Pi(Qd=jd=e,Ud=Hd=t)}function ji(e,t){var n=e-jd,i=t-Hd,o=vd(n*n+i*i);Rh+=o*(jd+e)/2,Mh+=o*(Hd+t)/2,Ih+=o,o=Hd*e-jd*t,Fh+=o*(jd+e),$h+=o*(Hd+t),Dh+=3*o,Pi(jd=e,Hd=t)}function Hi(e){this._context=e}function qi(e,t){jh.point=zi,Lh=Bh=e,Vh=Qh=t}function zi(e,t){Bh-=e,Qh-=t,Uh.add(vd(Bh*Bh+Qh*Qh)),Bh=e,Qh=t}function Wi(){this._string=[]}function Gi(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Yi(e){return function(t){var n=new Ki;for(var i in e)n[i]=e[i];return n.stream=t,n}}function Ki(){}function Ji(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),wd(n,e.stream(Eh)),t(Eh.result()),null!=i&&e.clipExtent(i),e}function Xi(e,t,n){return Ji(e,function(n){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],r=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),s=+t[0][0]+(i-r*(n[1][0]+n[0][0]))/2,a=+t[0][1]+(o-r*(n[1][1]+n[0][1]))/2;e.scale(150*r).translate([s,a])},n)}function Zi(e,t,n){return Xi(e,[[0,0],t],n)}function eo(e,t,n){return Ji(e,function(n){var i=+t,o=i/(n[1][0]-n[0][0]),r=(i-o*(n[1][0]+n[0][0]))/2,s=-o*n[0][1];e.scale(150*o).translate([r,s])},n)}function to(e,t,n){return Ji(e,function(n){var i=+t,o=i/(n[1][1]-n[0][1]),r=-o*n[0][0],s=(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([r,s])},n)}function no(e){return Yi({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function io(e,t){function n(i,o,r,s,a,u,l,c,p,d,h,f,m,y){var g=l-i,v=c-o,b=g*g+v*v;if(b>4*t&&m--){var C=s+d,S=a+h,w=u+f,x=vd(C*C+S*S+w*w),_=vn(w/=x),E=ud(ud(w)-1)t||ud((g*R+v*M)/b-.5)>.3||s*d+a*h+u*f2?e[2]%360*ad:0,o()):[S*sd,w*sd,x*sd]},t.precision=function(e){return arguments.length?(R=Yh(i,T=e*e),r()):vd(T)},t.fitExtent=function(e,n){return Xi(t,e,n)},t.fitSize=function(e,n){return Zi(t,e,n)},t.fitWidth=function(e,n){return eo(t,e,n)},t.fitHeight=function(e,n){return to(t,e,n)},function(){return s=e.apply(this,arguments),t.invert=s.invert&&n,o()}}function ao(e){var t=0,n=nd/3,i=so(e),o=i(t,n);return o.parallels=function(e){return arguments.length?i(t=e[0]*ad,n=e[1]*ad):[t*sd,n*sd]},o}function uo(e){function t(e,t){return[e*n,yd(t)/n]}var n=pd(e);return t.invert=function(e,t){return[e/n,vn(t*n)]},t}function lo(e,t){function n(e,t){var n=vd(r-2*o*yd(t))/o;return[n*yd(e*=o),s-n*pd(e)]}var i=yd(e),o=(i+yd(t))/2;if(ud(o)0?t<-id+td&&(t=-id+td):t>id-td&&(t=id-td);var n=r/md(yo(t),o);return[n*yd(o*e),r-n*pd(o*e)]}var i=pd(e),o=e===t?yd(e):fd(i/pd(t))/fd(yo(t)/yo(e)),r=i*md(yo(e),o)/o;return o?(n.invert=function(e,t){var n=r-t,i=gd(o)*vd(e*e+n*n);return[cd(e,ud(n))/o*gd(n),2*ld(md(r/i,1/o))-id]},n):fo}function vo(e,t){return[e,t]}function bo(e,t){function n(e,t){var n=r-t,i=o*e;return[n*yd(i),r-n*pd(i)]}var i=pd(e),o=e===t?yd(e):(i-pd(t))/(t-e),r=i/o+e;return ud(o)=0;)t+=n[i].value;else t=1;e.value=t}function Do(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),o=null;for(e=n.pop(),t=i.pop();e===t;)o=e,e=n.pop(),t=i.pop();return o}function Po(e,t){var n,i,o,r,s,a=new Bo(e),u=+e.value&&(a.value=e.value),l=[a];for(null==t&&(t=ko);n=l.pop();)if(u&&(n.value=+n.data.value),(o=t(n.data))&&(s=o.length))for(n.children=new Array(s),r=s-1;r>=0;--r)l.push(i=n.children[r]=new Bo(o[r])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(Vo)}function No(){return Po(this).eachBefore(Lo)}function ko(e){return e.children}function Lo(e){e.data=e.data.data}function Vo(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Bo(e){this.data=e,this.depth=this.height=0,this.parent=null}function Qo(e){for(var t,n,i=e.length;i;)n=Math.random()*i--|0,t=e[i],e[i]=e[n],e[n]=t;return e}function Uo(e,t){var n,i;if(qo(t,e))return[t];for(n=0;n0&&n*n>i*i+o*o}function qo(e,t){for(var n=0;nn*n+i*i}function Xo(e){var t=e._,n=e.next._,i=t.r+n.r,o=(t.x*n.r+n.x*t.r)/i,r=(t.y*n.r+n.y*t.r)/i;return o*o+r*r}function Zo(e){this._=e,this.next=null,this.previous=null}function er(e){if(!(o=e.length))return 0;var t,n,i,o,r,s,a,u,l,c,p;if(t=e[0],t.x=0,t.y=0,!(o>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(o>2))return t.r+n.r;Ko(n,t,i=e[2]),t=new Zo(t),n=new Zo(n),i=new Zo(i),t.next=i.previous=n,n.next=t.previous=i,i.next=n.previous=t;e:for(a=3;a=0;)t=o[r],t.z+=n,t.m+=n,n+=t.s+(i+=t.c)}function mr(e,t,n){return e.a.parent===t.parent?e.a:n}function yr(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function gr(e){for(var t,n,i,o,r,s=new yr(e,0),a=[s];t=a.pop();)if(i=t._.children)for(t.children=new Array(r=i.length),o=r-1;o>=0;--o)a.push(n=t.children[o]=new yr(i[o],o)),n.parent=t;return(s.parent=new yr(null,0)).children=[s],s}function vr(e,t,n,i,o,r){for(var s,a,u,l,c,p,d,h,f,m,y,g=[],v=t.children,b=0,C=0,S=v.length,w=t.value;bd&&(d=a),y=c*c*m,(h=Math.max(d/y,y/p))>f){c-=a;break}f=h}g.push(s={value:c,dice:u1&&Yf(e[n[i-2]],e[n[i-1]],e[o])<=0;)--i;n[i++]=o}return n.slice(0,i)}function Sr(e){this._size=e,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function wr(e){if(!e._start)try{xr(e)}catch(t){if(e._tasks[e._ended+e._active-1])Er(e,t);else if(!e._data)throw t}}function xr(e){for(;e._start=e._waiting&&e._active=0;)if((n=e._tasks[i])&&(e._tasks[i]=null,n.abort))try{n.abort()}catch(t){}e._active=NaN,Or(e)}function Or(e){if(!e._active&&e._call){var t=e._data;e._data=void 0,e._call(e._error,t)}}function Ar(e){if(null==e)e=1/0;else if(!((e=+e)>=1))throw new Error("invalid concurrency");return new Sr(e)}function Tr(e){return function(t,n){e(null==t?n:null)}}function Rr(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Mr(e,t){return function(n){return e(n.responseText,t)}}function Ir(e){return e>1?0:e<-1?Am:Math.acos(e)}function Fr(e){return e>=1?Tm:e<=-1?-Tm:Math.asin(e)}function $r(e){return e.innerRadius}function Dr(e){return e.outerRadius}function Pr(e){return e.startAngle}function Nr(e){return e.endAngle}function kr(e){return e&&e.padAngle}function Lr(e,t,n,i,o,r,s,a){var u=n-e,l=i-t,c=s-o,p=a-r,d=(c*(t-r)-p*(e-o))/(p*u-c*l);return[e+d*u,t+d*l]}function Vr(e,t,n,i,o,r,s){var a=e-n,u=t-i,l=(s?r:-r)/Em(a*a+u*u),c=l*u,p=-l*a,d=e+c,h=t+p,f=n+c,m=i+p,y=(d+f)/2,g=(h+m)/2,v=f-d,b=m-h,C=v*v+b*b,S=o-r,w=d*m-f*h,x=(b<0?-1:1)*Em(wm(0,S*S*C-w*w)),_=(w*b-v*x)/C,E=(-w*v-b*x)/C,O=(w*b+v*x)/C,A=(-w*v+b*x)/C,T=_-y,R=E-g,M=O-y,I=A-g;return T*T+R*R>M*M+I*I&&(_=O,E=A),{cx:_,cy:E,x01:-c,y01:-p,x11:_*(o/S-1),y11:E*(o/S-1)}}function Br(e){this._context=e}function Qr(e){return e[0]}function Ur(e){return e[1]}function jr(e){this._curve=e}function Hr(e){function t(t){return new jr(e(t))}return t._curve=e,t}function qr(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(Hr(e)):t()._curve},e}function zr(e){return e.source}function Wr(e){return e.target}function Gr(e){function t(){var t,a=Qm.call(arguments),u=n.apply(this,a),l=i.apply(this,a);if(s||(s=t=Mc()),e(s,+o.apply(this,(a[0]=u,a)),+r.apply(this,a),+o.apply(this,(a[0]=l,a)),+r.apply(this,a)),t)return s=null,t+""||null}var n=zr,i=Wr,o=Qr,r=Ur,s=null;return t.source=function(e){return arguments.length?(n=e,t):n},t.target=function(e){return arguments.length?(i=e,t):i},t.x=function(e){return arguments.length?(o="function"==typeof e?e:vm(+e),t):o},t.y=function(e){return arguments.length?(r="function"==typeof e?e:vm(+e),t):r},t.context=function(e){return arguments.length?(s=null==e?null:e,t):s},t}function Yr(e,t,n,i,o){e.moveTo(t,n),e.bezierCurveTo(t=(t+i)/2,n,t,o,i,o)}function Kr(e,t,n,i,o){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+o)/2,i,n,i,o)}function Jr(e,t,n,i,o){var r=Bm(t,n),s=Bm(t,n=(n+o)/2),a=Bm(i,n),u=Bm(i,o);e.moveTo(r[0],r[1]),e.bezierCurveTo(s[0],s[1],a[0],a[1],u[0],u[1])}function Xr(){return Gr(Yr)}function Zr(){return Gr(Kr)}function es(){var e=Gr(Jr);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}function ts(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ns(e){this._context=e}function is(e){this._context=e}function os(e){this._context=e}function rs(e,t){this._basis=new ns(e),this._beta=t}function ss(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function as(e,t){this._context=e,this._k=(1-t)/6}function us(e,t){this._context=e,this._k=(1-t)/6}function ls(e,t){this._context=e,this._k=(1-t)/6}function cs(e,t,n){var i=e._x1,o=e._y1,r=e._x2,s=e._y2;if(e._l01_a>Om){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,o=(o*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Om){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);r=(r*l+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*l+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(i,o,r,s,e._x2,e._y2)}function ps(e,t){this._context=e,this._alpha=t}function ds(e,t){this._context=e,this._alpha=t}function hs(e,t){this._context=e,this._alpha=t}function fs(e){this._context=e}function ms(e){return e<0?-1:1}function ys(e,t,n){var i=e._x1-e._x0,o=t-e._x1,r=(e._y1-e._y0)/(i||o<0&&-0),s=(n-e._y1)/(o||i<0&&-0),a=(r*o+s*i)/(i+o);return(ms(r)+ms(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(a))||0}function gs(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function vs(e,t,n){var i=e._x0,o=e._y0,r=e._x1,s=e._y1,a=(r-i)/3;e._context.bezierCurveTo(i+a,o+a*t,r-a,s-a*n,r,s)}function bs(e){this._context=e}function Cs(e){this._context=new Ss(e)}function Ss(e){this._context=e}function ws(e){return new bs(e)}function xs(e){return new Cs(e)}function _s(e){this._context=e}function Es(e){var t,n,i=e.length-1,o=new Array(i),r=new Array(i),s=new Array(i);for(o[0]=0,r[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)o[t]=(s[t]-o[t+1])/r[t];for(r[i-1]=(e[i]+o[i-1])/2,t=0;t0)){if(r/=f,f<0){if(r0){if(r>h)return;r>d&&(d=r)}if(r=i-u,f||!(r<0)){if(r/=f,f<0){if(r>h)return;r>d&&(d=r)}else if(f>0){if(r0)){if(r/=m,m<0){if(r0){if(r>h)return;r>d&&(d=r)}if(r=o-l,m||!(r<0)){if(r/=m,m<0){if(r>h)return;r>d&&(d=r)}else if(m>0){if(r0||h<1)||(d>0&&(e[0]=[u+d*f,l+d*m]),h<1&&(e[1]=[u+h*f,l+h*m]),!0)}}}}}function Us(e,t,n,i,o){var r=e[1];if(r)return!0;var s,a,u=e[0],l=e.left,c=e.right,p=l[0],d=l[1],h=c[0],f=c[1],m=(p+h)/2,y=(d+f)/2;if(f===d){if(m=i)return;if(p>h){if(u){if(u[1]>=o)return}else u=[m,n];r=[m,o]}else{if(u){if(u[1]1)if(p>h){if(u){if(u[1]>=o)return}else u=[(n-a)/s,n];r=[(o-a)/s,o]}else{if(u){if(u[1]=i)return}else u=[t,s*t+a];r=[i,s*i+a]}else{if(u){if(u[0]Uy||Math.abs(o[0][1]-o[1][1])>Uy)||delete Ly[r]}function Hs(e){return Ny[e.index]={site:e,halfedges:[]}}function qs(e,t){var n=e.site,i=t.left,o=t.right;return n===o&&(o=i,i=n),o?Math.atan2(o[1]-i[1],o[0]-i[0]):(n===i?(i=t[1],o=t[0]):(i=t[0],o=t[1]),Math.atan2(i[0]-o[0],o[1]-i[1]))}function zs(e,t){return t[+(t.left!==e.site)]}function Ws(e,t){return t[+(t.left===e.site)]}function Gs(){for(var e,t,n,i,o=0,r=Ny.length;oUy||Math.abs(m-d)>Uy)&&(u.splice(a,0,Ly.push(Vs(s,h,Math.abs(f-e)Uy?[e,Math.abs(p-e)Uy?[Math.abs(d-i)Uy?[n,Math.abs(p-n)Uy?[Math.abs(d-t)=-jy)){var h=u*u+l*l,f=c*c+p*p,m=(p*h-l*f)/d,y=(u*f-c*h)/d,g=By.pop()||new Ks;g.arc=e,g.site=o,g.x=m+s,g.y=(g.cy=y+a)+Math.sqrt(m*m+y*y),e.circle=g;for(var v=null,b=ky._;b;)if(g.yUy)a=a.L;else{if(!((o=r-ra(a,s))>Uy)){i>-Uy?(t=a.P,n=a):o>-Uy?(t=a,n=a.N):t=n=a;break}if(!a.R){t=a;break}a=a.R}Hs(e);var u=ea(e);if(Py.insert(t,u),t||n){if(t===n)return Xs(t),n=ea(t.site),Py.insert(u,n),u.edge=n.edge=Ls(t.site,u.site),Js(t),void Js(n);if(!n)return void(u.edge=Ls(t.site,u.site));Xs(t),Xs(n);var l=t.site,c=l[0],p=l[1],d=e[0]-c,h=e[1]-p,f=n.site,m=f[0]-c,y=f[1]-p,g=2*(d*y-h*m),v=d*d+h*h,b=m*m+y*y,C=[(y*v-h*b)/g+c,(d*b-m*v)/g+p];Bs(n.edge,l,f,C),u.edge=Ls(l,e,null,C),n.edge=Ls(e,f,null,C),Js(t),Js(n)}}function oa(e,t){var n=e.site,i=n[0],o=n[1],r=o-t;if(!r)return i;var s=e.P;if(!s)return-1/0;n=s.site;var a=n[0],u=n[1],l=u-t;if(!l)return a;var c=a-i,p=1/r-1/l,d=c/l;return p?(-d+Math.sqrt(d*d-2*p*(c*c/(-2*l)-u+l/2+o-r/2)))/p+i:(i+a)/2}function ra(e,t){var n=e.N;if(n)return oa(n,t);var i=e.site;return i[1]===t?i[0]:1/0}function sa(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function aa(e,t){return t[1]-e[1]||t[0]-e[0]}function ua(e,t){var n,i,o,r=e.sort(aa).pop();for(Ly=[],Ny=new Array(e.length),Py=new Vy,ky=new Vy;;)if(o=Dy,r&&(!o||r[1]i?(i+o)/2:Math.min(0,i)||Math.max(0,o),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}Object.defineProperty(t,"__esModule",{value:!0});var ba=n(32),Ca=Array.prototype.slice,Sa=function(e){return e},wa=1,xa=2,_a=3,Ea=4,Oa=1e-6,Aa={value:function(){}};f.prototype=h.prototype={constructor:f,on:function(e,t){var n,i=this._,o=m(e+"",i),r=-1,s=o.length;{if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++r0)for(var n,i,o=new Array(n),r=0;r=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ma.hasOwnProperty(t)?{space:Ma[t],local:e}:e},Fa=function(e){var t=Ia(e);return(t.local?b:v)(t)},$a=function(e){return null==e?C:function(){return this.querySelector(e)}},Da=function(e){"function"!=typeof e&&(e=$a(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o=C&&(C=b+1);!(v=y[C])&&++C=0;)(i=o[r])&&(s&&s!==i.nextSibling&&s.parentNode.insertBefore(i,s),s=i);return this},Ka=function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=E);for(var n=this._groups,i=n.length,o=new Array(i),r=0;r1?this.each((null==t?F:"function"==typeof t?D:$)(e,t,null==n?"":n)):P(this.node(),e)},su=function(e,t){return arguments.length>1?this.each((null==t?N:"function"==typeof t?L:k)(e,t)):this.node()[e]};Q.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var au=function(e,t){var n=V(e+"");if(arguments.length<2){for(var i=B(this.node()),o=-1,r=n.length;++ob}y.mouse("drag")}function i(){xu(vu.view).on("mousemove.drag mouseup.drag",null),be(vu.view,c),Fu(),y.mouse("end")}function o(){if(d.apply(this,arguments)){var e,t,n=vu.changedTouches,i=h.apply(this,arguments),o=n.length;for(e=0;eel&&n.stateZu&&n.name===t)return new ct([[e]],ec,t,+i)}return null},nc=function(e){return function(){return e}},ic=function(e,t,n){this.target=e,this.type=t,this.selection=n},oc=function(){vu.preventDefault(),vu.stopImmediatePropagation()},rc={name:"drag"},sc={name:"space"},ac={name:"handle"},uc={name:"center"},lc={name:"x",handles:["e","w"].map(Dt),input:function(e,t){return e&&[[e[0],t[0][1]],[e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},cc={name:"y",handles:["n","s"].map(Dt),input:function(e,t){return e&&[[t[0][0],e[0]],[t[1][0],e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},pc={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Dt),input:function(e){return e},output:function(e){return e}},dc={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},hc={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},fc={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mc={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yc={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1},gc=function(){return Ut(pc)},vc=Math.cos,bc=Math.sin,Cc=Math.PI,Sc=Cc/2,wc=2*Cc,xc=Math.max,_c=function(){function e(e){var r,s,a,u,l,c,p=e.length,d=[],h=Object(ba.s)(p),f=[],m=[],y=m.groups=new Array(p),g=new Array(p*p);for(r=0,l=-1;++l1e-6)if(Math.abs(c*a-u*l)>1e-6&&o){var d=n-r,h=i-s,f=a*a+u*u,m=d*d+h*h,y=Math.sqrt(f),g=Math.sqrt(p),v=o*Math.tan((Ac-Math.acos((f+p-m)/(2*y*g)))/2),b=v/g,C=v/y;Math.abs(b-1)>1e-6&&(this._+="L"+(e+b*l)+","+(t+b*c)),this._+="A"+o+","+o+",0,0,"+ +(c*d>l*h)+","+(this._x1=e+C*a)+","+(this._y1=t+C*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,i,o,r){e=+e,t=+t,n=+n;var s=n*Math.cos(i),a=n*Math.sin(i),u=e+s,l=t+a,c=1^r,p=r?i-o:o-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(p<0&&(p=p%Tc+Tc),p>Rc?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=Ac)+","+c+","+(this._x1=e+n*Math.cos(o))+","+(this._y1=t+n*Math.sin(o))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var Mc=qt,Ic=function(){function e(){var e,a=Ec.call(arguments),u=t.apply(this,a),l=n.apply(this,a),c=+i.apply(this,(a[0]=u,a)),p=o.apply(this,a)-Sc,d=r.apply(this,a)-Sc,h=c*vc(p),f=c*bc(p),m=+i.apply(this,(a[0]=l,a)),y=o.apply(this,a)-Sc,g=r.apply(this,a)-Sc;if(s||(s=e=Mc()),s.moveTo(h,f),s.arc(0,0,c,p,d),p===y&&d===g||(s.quadraticCurveTo(0,0,m*vc(y),m*bc(y)),s.arc(0,0,m,y,g)),s.quadraticCurveTo(0,0,h,f),s.closePath(),e)return s=null,e+""||null}var t=zt,n=Wt,i=Gt,o=Yt,r=Kt,s=null;return e.radius=function(t){return arguments.length?(i="function"==typeof t?t:Oc(+t),e):i},e.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:Oc(+t),e):o},e.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Oc(+t),e):r},e.source=function(n){return arguments.length?(t=n,e):t},e.target=function(t){return arguments.length?(n=t,e):n},e.context=function(t){return arguments.length?(s=null==t?null:t,e):s},e},Fc=n(95),$c={},Dc={},Pc=34,Nc=10,kc=13,Lc=function(e){function t(e,t){var i,o,r=n(e,function(e,n){if(i)return i(e,n-1);o=e,i=t?Xt(e,t):Jt(e)});return r.columns=o||[],r}function n(e,t){function n(){if(l)return Dc;if(c)return c=!1,$c;var t,n,i=s;if(e.charCodeAt(i)===Pc){for(;s++=r?l=!0:(n=e.charCodeAt(s++))===Nc?c=!0:n===kc&&(c=!0,e.charCodeAt(s)===Nc&&++s),e.slice(i+1,t-1).replace(/""/g,'"')}for(;se||e>o||i>t||t>r))return this;var s,a,u=o-n,l=this._root;switch(a=(t<(i+r)/2)<<1|e<(n+o)/2){case 0:do{s=new Array(4),s[a]=l,l=s}while(u*=2,o=n+u,r=i+u,e>o||t>r);break;case 1:do{s=new Array(4),s[a]=l,l=s}while(u*=2,n=o-u,r=i+u,n>e||t>r);break;case 2:do{s=new Array(4),s[a]=l,l=s}while(u*=2,o=n+u,i=r-u,e>o||i>t);break;case 3:do{s=new Array(4),s[a]=l,l=s}while(u*=2,n=o-u,i=r-u,n>e||i>t)}this._root&&this._root.length&&(this._root=l)}return this._x0=n,this._y0=i,this._x1=o,this._y1=r,this},ep=function(){var e=[];return this.visit(function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)}),e},tp=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},np=function(e,t,n,i,o){this.node=e,this.x0=t,this.y0=n,this.x1=i,this.y1=o},ip=function(e,t,n){var i,o,r,s,a,u,l,c=this._x0,p=this._y0,d=this._x1,h=this._y1,f=[],m=this._root;for(m&&f.push(new np(m,c,p,d,h)),null==n?n=1/0:(c=e-n,p=t-n,d=e+n,h=t+n,n*=n);u=f.pop();)if(!(!(m=u.node)||(o=u.x0)>d||(r=u.y0)>h||(s=u.x1)=g)<<1|e>=y)&&(u=f[f.length-1],f[f.length-1]=f[f.length-1-l],f[f.length-1-l]=u)}else{var v=e-+this._x.call(null,m.data),b=t-+this._y.call(null,m.data),C=v*v+b*b;if(C=(a=(f+y)/2))?f=a:y=a,(c=s>=(u=(m+g)/2))?m=u:g=u,t=h,!(h=h[p=c<<1|l]))return this;if(!h.length)break;(t[p+1&3]||t[p+2&3]||t[p+3&3])&&(n=t,d=p)}for(;h.data!==e;)if(i=h,!(h=h.next))return this;return(o=h.next)&&delete h.next,i?(o?i.next=o:delete i.next,this):t?(o?t[p]=o:delete t[p],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(n?n[d]=h:this._root=h),this):(this._root=o,this)},rp=function(){return this._root},sp=function(){var e=0;return this.visit(function(t){if(!t.length)do{++e}while(t=t.next)}),e},ap=function(e){var t,n,i,o,r,s,a=[],u=this._root;for(u&&a.push(new np(u,this._x0,this._y0,this._x1,this._y1));t=a.pop();)if(!e(u=t.node,i=t.x0,o=t.y0,r=t.x1,s=t.y1)&&u.length){var l=(i+r)/2,c=(o+s)/2;(n=u[3])&&a.push(new np(n,l,c,r,s)),(n=u[2])&&a.push(new np(n,i,c,l,s)),(n=u[1])&&a.push(new np(n,l,o,r,c)),(n=u[0])&&a.push(new np(n,i,o,l,c))}return this},up=function(e){var t,n=[],i=[];for(this._root&&n.push(new np(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var r,s=t.x0,a=t.y0,u=t.x1,l=t.y1,c=(s+u)/2,p=(a+l)/2;(r=o[0])&&n.push(new np(r,s,a,c,p)),(r=o[1])&&n.push(new np(r,c,a,u,p)),(r=o[2])&&n.push(new np(r,s,p,c,l)),(r=o[3])&&n.push(new np(r,c,p,u,l))}i.push(t)}for(;t=i.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},lp=function(e){return arguments.length?(this._x=e,this):this._x},cp=function(e){return arguments.length?(this._y=e,this):this._y},pp=sn.prototype=an.prototype;pp.copy=function(){var e,t,n=new an(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=un(i),n;for(e=[{source:i,target:n._root=new Array(4)}];i=e.pop();)for(var o=0;o<4;++o)(t=i.source[o])&&(t.length?e.push({source:t,target:i.target[o]=new Array(4)}):i.target[o]=un(t));return n},pp.add=Xc,pp.addAll=tn,pp.cover=Zc,pp.data=ep,pp.extent=tp,pp.find=ip,pp.remove=op,pp.removeAll=nn,pp.root=rp,pp.size=sp,pp.visit=ap,pp.visitAfter=up,pp.x=lp,pp.y=cp;var dp=function(e){function t(){function e(e,t,n,i,o){var r=e.data,a=e.r,h=p+a;{if(!r)return t>l+h||ic+h||ou.index){var f=l-r.x-r.vx,m=c-r.y-r.vy,y=f*f+m*m;ye.r&&(e.r=e[t].r)}function i(){if(o){var t,n,i=o.length;for(r=new Array(i),t=0;t1?(null==t?p.remove(e):p.set(e,o(t)),r):p.get(e)},find:function(t,n,i){var o,r,s,a,u,l=0,c=e.length;for(null==i?i=1/0:i*=i,l=0;l1?(h.on(e,t),r):h.on(e)}}},gp=function(){function e(e){var t,a=o.length,u=sn(o,hn,fn).visitAfter(n);for(s=e,t=0;t=c)){(e.data!==r||e.next)&&(0===o&&(o=Jc(),h+=o*o),0===u&&(u=Jc(),h+=u*u),h0?1:e<0?-1:0},vd=Math.sqrt,bd=Math.tan,Cd={Feature:function(e,t){Sn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,o=n.length;++itd?Ip=90:Ad<-td&&(Rp=-90),kp[0]=Tp,kp[1]=Mp}},Rd=function(e){var t,n,i,o,r,s,a;if(Ip=Mp=-(Tp=Rp=1/0),Np=[],wd(e,Td),n=Np.length){for(Np.sort(jn),t=1,i=Np[0],r=[i];tUn(i[0],i[1])&&(i[1]=o[1]),Un(o[0],i[1])>Un(i[0],i[1])&&(i[0]=o[0])):r.push(i=o);for(s=-1/0,n=r.length-1,t=0,i=r[n];t<=n;i=o,++t)o=r[t],(a=Un(i[1],o[0]))>s&&(s=a,Tp=o[0],Mp=i[1])}return Np=kp=null,Tp===1/0||Rp===1/0?[[NaN,NaN],[NaN,NaN]]:[[Tp,Rp],[Mp,Ip]]},Md={sphere:Cn,point:qn,lineStart:Wn,lineEnd:Kn,polygonStart:function(){Md.lineStart=Jn,Md.lineEnd=Xn},polygonEnd:function(){Md.lineStart=Wn,Md.lineEnd=Kn}},Id=function(e){Lp=Vp=Bp=Qp=Up=jp=Hp=qp=zp=Wp=Gp=0,wd(e,Md);var t=zp,n=Wp,i=Gp,o=t*t+n*n+i*i;return o<1e-12&&(t=jp,n=Hp,i=qp,Vp2?e[2]*ad:0),t.invert=function(t){return t=e.invert(t[0]*ad,t[1]*ad),t[0]*=sd,t[1]*=sd,t},t},zd=function(){function e(e,t){n.push(e=i(e,t)),e[0]*=sd,e[1]*=sd}function t(){var e=o.apply(this,arguments),t=r.apply(this,arguments)*ad,u=s.apply(this,arguments)*ad;return n=[],i=ni(-e[0]*ad,-e[1]*ad,0).invert,si(a,t,u,1),e={type:"Polygon",coordinates:[n]},n=i=null,e}var n,i,o=Fd([0,0]),r=Fd(90),s=Fd(6),a={point:e};return t.center=function(e){return arguments.length?(o="function"==typeof e?e:Fd([+e[0],+e[1]]),t):o},t.radius=function(e){return arguments.length?(r="function"==typeof e?e:Fd(+e),t):r},t.precision=function(e){return arguments.length?(s="function"==typeof e?e:Fd(+e),t):s},t},Wd=function(){var e,t=[];return{point:function(t,n){e.push([t,n])},lineStart:function(){t.push(e=[])},lineEnd:Cn,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},Gd=function(e,t){return ud(e[0]-t[0])=0;--r)o.point((c=l[r])[0],c[1]);else i(d.x,d.p.x,-1,o);d=d.p}d=d.o,l=d.z,h=!h}while(!d.v);o.lineEnd()}}},Kd=wp(),Jd=function(e,t){var n=t[0],i=t[1],o=[yd(n),-pd(n),0],r=0,s=0;Kd.reset();for(var a=0,u=e.length;a=0?1:-1,_=x*w,E=_>nd,O=f*C;if(Kd.add(cd(O*x*yd(_),m*S+O*pd(_))),r+=E?w+x*rd:w,E^d>=n^v>=n){var A=In(Rn(p),Rn(g));Dn(A);var T=In(o,A);Dn(T);var R=(E^w>=0?-1:1)*vn(T[2]);(i>R||i===R&&(A[0]||A[1]))&&(s+=E^w>=0?1:-1)}}return(r<-td||r0){for(v||(o.polygonStart(),v=!0),o.lineStart(),e=0;e1&&2&r&&s.push(s.pop().concat(s.shift())),h.push(s.filter(ci))}var d,h,f,m=t(o),y=Wd(),g=t(y),v=!1,b={point:r,lineStart:a,lineEnd:u,polygonStart:function(){b.point=l,b.lineStart=c,b.lineEnd=p,h=[],d=[]},polygonEnd:function(){b.point=r,b.lineStart=a,b.lineEnd=u,h=Object(ba.n)(h);var e=Jd(d,i);h.length?(v||(o.polygonStart(),v=!0),Yd(h,pi,e,n,o)):e&&(v||(o.polygonStart(),v=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),v&&(o.polygonEnd(),v=!1),h=d=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};return b}},Zd=Xd(function(){return!0},di,fi,[-nd,-id]),eh=function(e){function t(t,n,i,o){si(o,e,a,i,t,n)}function n(e,t){return pd(e)*pd(t)>s}function i(e){var t,i,s,a,c;return{lineStart:function(){a=s=!1,c=1},point:function(p,d){var h,f=[p,d],m=n(p,d),y=u?m?0:r(p,d):m?r(p+(p<0?nd:-nd),d):0;if(!t&&(a=s=m)&&e.lineStart(),m!==s&&(!(h=o(t,f))||Gd(t,h)||Gd(f,h))&&(f[0]+=td,f[1]+=td,m=n(f[0],f[1])),m!==s)c=0,m?(e.lineStart(),h=o(f,t),e.point(h[0],h[1])):(h=o(t,f),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(l&&t&&u^m){var g;y&i||!(g=o(f,t,!0))||(c=0,u?(e.lineStart(),e.point(g[0][0],g[0][1]),e.point(g[1][0],g[1][1]),e.lineEnd()):(e.point(g[1][0],g[1][1]),e.lineEnd(),e.lineStart(),e.point(g[0][0],g[0][1])))}!m||t&&Gd(t,f)||e.point(f[0],f[1]),t=f,s=m,i=y},lineEnd:function(){s&&e.lineEnd(),t=null},clean:function(){return c|(a&&s)<<1}}}function o(e,t,n){var i=Rn(e),o=Rn(t),r=[1,0,0],a=In(i,o),u=Mn(a,a),l=a[0],c=u-l*l;if(!c)return!n&&e;var p=s*u/c,d=-s*l/c,h=In(r,a),f=$n(r,p);Fn(f,$n(a,d));var m=h,y=Mn(f,m),g=Mn(m,m),v=y*y-g*(Mn(f,f)-1);if(!(v<0)){var b=vd(v),C=$n(m,(-y-b)/g);if(Fn(C,f),C=Tn(C),!n)return C;var S,w=e[0],x=t[0],_=e[1],E=t[1];x0^C[1]<(ud(C[0]-w)nd^(w<=C[0]&&C[0]<=x)){var R=$n(m,(-y+b)/g);return Fn(R,f),[C,Tn(R)]}}}function r(t,n){var i=u?e:nd-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}var s=pd(e),a=6*ad,u=s>0,l=ud(s)>td;return Xd(n,i,t,u?[0,-e]:[-nd,e-nd])},th=function(e,t,n,i,o,r){var s,a=e[0],u=e[1],l=t[0],c=t[1],p=0,d=1,h=l-a,f=c-u;if(s=n-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>d)return;s>p&&(p=s)}if(s=o-a,h||!(s<0)){if(s/=h,h<0){if(s>d)return;s>p&&(p=s)}else if(h>0){if(s0)){if(s/=f,f<0){if(s0){if(s>d)return;s>p&&(p=s)}if(s=r-u,f||!(s<0)){if(s/=f,f<0){if(s>d)return;s>p&&(p=s)}else if(f>0){if(s0&&(e[0]=a+p*h,e[1]=u+p*f),d<1&&(t[0]=a+d*h,t[1]=u+d*f),!0}}}}},nh=1e9,ih=-nh,oh=function(){var e,t,n,i=0,o=0,r=960,s=500;return n={stream:function(n){return e&&t===n?e:e=mi(i,o,r,s)(t=n)},extent:function(a){return arguments.length?(i=+a[0][0],o=+a[0][1],r=+a[1][0],s=+a[1][1],e=t=null,n):[[i,o],[r,s]]}}},rh=wp(),sh={sphere:Cn,point:Cn,lineStart:yi,lineEnd:Cn,polygonStart:Cn,polygonEnd:Cn},ah=function(e){return rh.reset(),wd(e,sh),+rh},uh=[null,null],lh={type:"LineString",coordinates:uh},ch=function(e,t){return uh[0]=e,uh[1]=t,ah(lh)},ph={Feature:function(e,t){return Ci(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,o=n.length;++i=.12&&o<.234&&i>=-.425&&i<-.214?l:o>=.166&&o<.234&&i>=-.214&&i<-.115?c:u).invert(e)},e.stream=function(e){return n&&i===e?n:n=co([u.stream(i=e),l.stream(e),c.stream(e)])},e.precision=function(e){return arguments.length?(u.precision(e),l.precision(e),c.precision(e),t()):u.precision()},e.scale=function(t){return arguments.length?(u.scale(t),l.scale(.35*t),c.scale(t),e.translate(u.translate())):u.scale()},e.translate=function(e){if(!arguments.length)return u.translate();var n=u.scale(),i=+e[0],a=+e[1];return o=u.translate(e).clipExtent([[i-.455*n,a-.238*n],[i+.455*n,a+.238*n]]).stream(p),r=l.translate([i-.307*n,a+.201*n]).clipExtent([[i-.425*n+td,a+.12*n+td],[i-.214*n-td,a+.234*n-td]]).stream(p),s=c.translate([i-.205*n,a+.212*n]).clipExtent([[i-.214*n+td,a+.166*n+td],[i-.115*n-td,a+.234*n-td]]).stream(p),t()},e.fitExtent=function(t,n){return Xi(e,t,n)},e.fitSize=function(t,n){return Zi(e,t,n)},e.fitWidth=function(t,n){return eo(e,t,n)},e.fitHeight=function(t,n){return to(e,t,n)},e.scale(1070)},ef=po(function(e){return vd(2/(1+e))});ef.invert=ho(function(e){return 2*vn(e/2)});var tf=function(){return ro(ef).scale(124.75).clipAngle(179.999)},nf=po(function(e){return(e=gn(e))&&e/yd(e)});nf.invert=ho(function(e){return e});var of=function(){return ro(nf).scale(79.4188).clipAngle(179.999)};fo.invert=function(e,t){return[e,2*ld(hd(t))-id]};var rf=function(){return mo(fo).scale(961/rd)},sf=function(){return ao(go).scale(109.5).parallels([30,30])};vo.invert=vo;var af=function(){return ro(vo).scale(152.63)},uf=function(){return ao(bo).scale(131.154).center([0,13.9389])};Co.invert=ho(ld);var lf=function(){return ro(Co).scale(144.049).clipAngle(60)},cf=function(){function e(){return o=r=null,s}var t,n,i,o,r,s,a=1,u=0,l=0,c=1,p=1,d=mh,h=null,f=mh;return s={stream:function(e){return o&&r===e?o:o=d(f(r=e))},postclip:function(o){return arguments.length?(f=o,h=t=n=i=null,e()):f},clipExtent:function(o){return arguments.length?(f=null==o?(h=t=n=i=null,mh):mi(h=+o[0][0],t=+o[0][1],n=+o[1][0],i=+o[1][1]),e()):null==h?null:[[h,t],[n,i]]},scale:function(t){return arguments.length?(d=So((a=+t)*c,a*p,u,l),e()):a},translate:function(t){return arguments.length?(d=So(a*c,a*p,u=+t[0],l=+t[1]),e()):[u,l]},reflectX:function(t){return arguments.length?(d=So(a*(c=t?-1:1),a*p,u,l),e()):c<0},reflectY:function(t){return arguments.length?(d=So(a*c,a*(p=t?-1:1),u,l),e()):p<0},fitExtent:function(e,t){return Xi(s,e,t)},fitSize:function(e,t){return Zi(s,e,t)},fitWidth:function(e,t){return eo(s,e,t)},fitHeight:function(e,t){return to(s,e,t)}}};wo.invert=function(e,t){var n,i=t,o=25;do{var r=i*i,s=r*r;i-=n=(i*(1.007226+r*(.015085+s*(.028874*r-.044475-.005916*s)))-t)/(1.007226+r*(.045255+s*(.259866*r-.311325-.005916*11*s)))}while(ud(n)>td&&--o>0);return[e/(.8707+(r=i*i)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),i]};var pf=function(){return ro(wo).scale(175.295)};xo.invert=ho(vn);var df=function(){return ro(xo).scale(249.5).clipAngle(90+td)};_o.invert=ho(function(e){return 2*ld(e)});var hf=function(){return ro(_o).scale(250).clipAngle(142)};Eo.invert=function(e,t){return[-t,2*ld(hd(e))-id]};var ff=function(){var e=mo(Eo),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90]).scale(159.155)},mf=function(){function e(e){var r,s=0;e.eachAfter(function(e){var n=e.children;n?(e.x=Ao(n),e.y=Ro(n)):(e.x=r?s+=t(e,r):0,e.y=0,r=e)});var a=Io(e),u=Fo(e),l=a.x-t(a,u)/2,c=u.x+t(u,a)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*n,t.y=(e.y-t.y)*i}:function(t){t.x=(t.x-l)/(c-l)*n,t.y=(1-(e.y?t.y/e.y:1))*i})}var t=Oo,n=1,i=1,o=!1;return e.separation=function(n){return arguments.length?(t=n,e):t},e.size=function(t){return arguments.length?(o=!1,n=+t[0],i=+t[1],e):o?null:[n,i]},e.nodeSize=function(t){return arguments.length?(o=!0,n=+t[0],i=+t[1],e):o?[n,i]:null},e},yf=function(){return this.eachAfter($o)},gf=function(e){var t,n,i,o,r=this,s=[r];do{for(t=s.reverse(),s=[];r=t.pop();)if(e(r),n=r.children)for(i=0,o=n.length;i=0;--n)o.push(t[n]);return this},bf=function(e){for(var t,n,i,o=this,r=[o],s=[];o=r.pop();)if(s.push(o),t=o.children)for(n=0,i=t.length;n=0;)n+=i[o].value;t.value=n})},Sf=function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},wf=function(e){for(var t=this,n=Do(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var o=i.length;e!==n;)i.splice(o,0,e),e=e.parent;return i},xf=function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},_f=function(){var e=[];return this.each(function(t){e.push(t)}),e},Ef=function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},Of=function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t};Bo.prototype=Po.prototype={constructor:Bo,count:yf,each:gf,eachAfter:bf,eachBefore:vf,sum:Cf,sort:Sf,path:wf,ancestors:xf,descendants:_f,leaves:Ef,links:Of,copy:No};var Af=Array.prototype.slice,Tf=function(e){for(var t,n,i=0,o=(e=Qo(Af.call(e))).length,r=[];i0)throw new Error("cycle");return r}var t=ur,n=lr;return e.id=function(n){return arguments.length?(t=nr(n),e):t},e.parentId=function(t){return arguments.length?(n=nr(t),e):n},e};yr.prototype=Object.create(Bo.prototype);var Vf=function(){function e(e){var i=gr(e);if(i.eachAfter(t),i.parent.m=-i.z,i.eachBefore(n),u)e.eachBefore(o);else{var l=e,c=e,p=e;e.eachBefore(function(e){e.xc.x&&(c=e),e.depth>p.depth&&(p=e)});var d=l===c?1:r(l,c)/2,h=d-l.x,f=s/(c.x+d+h),m=a/(p.depth||1);e.eachBefore(function(e){e.x=(e.x+h)*f,e.y=e.depth*m})}return e}function t(e){var t=e.children,n=e.parent.children,o=e.i?n[e.i-1]:null;if(t){fr(e);var s=(t[0].z+t[t.length-1].z)/2;o?(e.z=o.z+r(e._,o._),e.m=e.z-s):e.z=s}else o&&(e.z=o.z+r(e._,o._));e.parent.A=i(e,o,e.parent.A||n[0])}function n(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function i(e,t,n){if(t){for(var i,o=e,s=e,a=t,u=o.parent.children[0],l=o.m,c=s.m,p=a.m,d=u.m;a=dr(a),o=pr(o),a&&o;)u=pr(u),s=dr(s),s.a=e,i=a.z+p-o.z-l+r(a._,o._),i>0&&(hr(mr(a,e,n),e,i),l+=i,c+=i),p+=a.m,l+=o.m,d+=u.m,c+=s.m;a&&!dr(s)&&(s.t=a,s.m+=p-c),o&&!pr(u)&&(u.t=o,u.m+=l-d,n=e)}return n}function o(e){e.x*=s,e.y=e.depth*a}var r=cr,s=1,a=1,u=null;return e.separation=function(t){return arguments.length?(r=t,e):r},e.size=function(t){return arguments.length?(u=!1,s=+t[0],a=+t[1],e):u?null:[s,a]},e.nodeSize=function(t){return arguments.length?(u=!0,s=+t[0],a=+t[1],e):u?[s,a]:null},e},Bf=function(e,t,n,i,o){for(var r,s=e.children,a=-1,u=s.length,l=e.value&&(o-n)/e.value;++a1?t:1)},n}(Qf),jf=function(){function e(e){return e.x0=e.y0=0,e.x1=o,e.y1=r,e.eachBefore(t),s=[0],i&&e.eachBefore(Ff),e}function t(e){var t=s[e.depth],i=e.x0+t,o=e.y0+t,r=e.x1-t,d=e.y1-t;r=t-1){var l=u[e];return l.x0=i,l.y0=o,l.x1=s,l.y1=a,void 0}for(var p=c[e],d=n/2+p,h=e+1,f=t-1;h>>1;c[m]a-o){var v=(i*g+s*y)/n;r(e,h,y,i,o,v,a),r(h,t,g,v,o,s,a)}else{var b=(o*g+a*y)/n;r(e,h,y,i,o,s,b),r(h,t,g,i,b,s,a)}}var s,a,u=e.children,l=u.length,c=new Array(l+1);for(c[0]=a=s=0;s1?t:1)},n}(Qf),Wf=function(e){for(var t,n=-1,i=e.length,o=e[i-1],r=0;++n=0;--t)l.push(e[i[r[t]][2]]);for(t=+a;ta!=l>a&&s<(u-n)*(a-i)/(l-i)+n&&(c=!c),u=n,l=i;return c},Xf=function(e){for(var t,n,i=-1,o=e.length,r=e[o-1],s=r[0],a=r[1],u=0;++i1);return e+n*r*Math.sqrt(-2*Math.log(o)/o)}}return n.source=e,n}(tm),om=function e(t){function n(){var e=im.source(t).apply(this,arguments);return function(){return Math.exp(e())}}return n.source=e,n}(tm),rm=function e(t){function n(e){return function(){for(var n=0,i=0;i=200&&n<300||304===n){if(r)try{t=r.call(i,l)}catch(e){return void a.call("error",i,e)}else t=l;a.call("load",i,t)}else a.call("error",i,e)}var i,o,r,s,a=Ta("beforesend","progress","load","error"),u=Object(Fc.c)(),l=new XMLHttpRequest,c=null,p=null,d=0;if("undefined"==typeof XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=n:l.onreadystatechange=function(e){l.readyState>3&&n(e)},l.onprogress=function(e){a.call("progress",i,e)},i={header:function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?u.get(e):(null==t?u.remove(e):u.set(e,t+""),i)},mimeType:function(e){return arguments.length?(o=null==e?null:e+"",i):o},responseType:function(e){return arguments.length?(s=e,i):s},timeout:function(e){return arguments.length?(d=+e,i):d},user:function(e){return arguments.length<1?c:(c=null==e?null:e+"",i)},password:function(e){return arguments.length<1?p:(p=null==e?null:e+"",i)},response:function(e){return r=e,i},get:function(e,t){return i.send("GET",e,t)},post:function(e,t){return i.send("POST",e,t)},send:function(t,n,r){return l.open(t,e,!0,c,p),null==o||u.has("accept")||u.set("accept",o+",*/*"),l.setRequestHeader&&u.each(function(e,t){l.setRequestHeader(t,e)}),null!=o&&l.overrideMimeType&&l.overrideMimeType(o),null!=s&&(l.responseType=s),d>0&&(l.timeout=d),null==r&&"function"==typeof n&&(r=n,n=null),null!=r&&1===r.length&&(r=Tr(r)),null!=r&&i.on("error",r).on("load",function(e){r(null,e)}),a.call("beforesend",i,l),l.send(null==n?null:n),i},abort:function(){return l.abort(),i},on:function(){var e=a.on.apply(a,arguments);return e===a?i:e}},null!=t){if("function"!=typeof t)throw new Error("invalid callback: "+t);return i.get(t)}return i},lm=function(e,t){return function(n,i){var o=um(n).mimeType(e).response(t);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return o.get(i)}return o}},cm=lm("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)}),pm=lm("application/json",function(e){return JSON.parse(e.responseText)}),dm=lm("text/plain",function(e){return e.responseText}),hm=lm("application/xml",function(e){var t=e.responseXML;if(!t)throw new Error("parse error");return t}),fm=function(e,t){return function(n,i,o){arguments.length<3&&(o=i,i=null);var r=um(n).mimeType(e);return r.row=function(e){return arguments.length?r.response(Mr(t,i=e)):i},r.row(i),o?r.get(o):r}},mm=fm("text/csv",Bc),ym=fm("text/tab-separated-values",qc),gm=n(364),vm=function(e){return function(){return e}},bm=Math.abs,Cm=Math.atan2,Sm=Math.cos,wm=Math.max,xm=Math.min,_m=Math.sin,Em=Math.sqrt,Om=1e-12,Am=Math.PI,Tm=Am/2,Rm=2*Am,Mm=function(){function e(){var e,l,c=+t.apply(this,arguments),p=+n.apply(this,arguments),d=r.apply(this,arguments)-Tm,h=s.apply(this,arguments)-Tm,f=bm(h-d),m=h>d;if(u||(u=e=Mc()),pOm)if(f>Rm-Om)u.moveTo(p*Sm(d),p*_m(d)),u.arc(0,0,p,d,h,!m),c>Om&&(u.moveTo(c*Sm(h),c*_m(h)),u.arc(0,0,c,h,d,m));else{var y,g,v=d,b=h,C=d,S=h,w=f,x=f,_=a.apply(this,arguments)/2,E=_>Om&&(o?+o.apply(this,arguments):Em(c*c+p*p)),O=xm(bm(p-c)/2,+i.apply(this,arguments)),A=O,T=O;if(E>Om){var R=Fr(E/c*_m(_)),M=Fr(E/p*_m(_));(w-=2*R)>Om?(R*=m?1:-1,C+=R,S-=R):(w=0,C=S=(d+h)/2),(x-=2*M)>Om?(M*=m?1:-1,v+=M,b-=M):(x=0,v=b=(d+h)/2)}var I=p*Sm(v),F=p*_m(v),$=c*Sm(S),D=c*_m(S);if(O>Om){var P=p*Sm(b),N=p*_m(b),k=c*Sm(C),L=c*_m(C);if(fOm?Lr(I,F,k,L,P,N,$,D):[$,D],B=I-V[0],Q=F-V[1],U=P-V[0],j=N-V[1],H=1/_m(Ir((B*U+Q*j)/(Em(B*B+Q*Q)*Em(U*U+j*j)))/2),q=Em(V[0]*V[0]+V[1]*V[1]);A=xm(O,(c-q)/(H-1)),T=xm(O,(p-q)/(H+1))}}x>Om?T>Om?(y=Vr(k,L,I,F,p,T,m),g=Vr(P,N,$,D,p,T,m),u.moveTo(y.cx+y.x01,y.cy+y.y01),TOm&&w>Om?A>Om?(y=Vr($,D,P,N,c,-A,m),g=Vr(I,F,k,L,c,-A,m),u.lineTo(y.cx+y.x01,y.cy+y.y01),A=c;--p)l.point(y[p],g[p]);l.lineEnd(),l.areaEnd()}m&&(y[t]=+n(d,t,e),g[t]=+o(d,t,e),l.point(i?+i(d,t,e):y[t],r?+r(d,t,e):g[t]))}if(h)return l=null,h+""||null}function t(){return Fm().defined(s).curve(u).context(a)}var n=Qr,i=null,o=vm(0),r=Ur,s=vm(!0),a=null,u=Im,l=null;return e.x=function(t){return arguments.length?(n="function"==typeof t?t:vm(+t),i=null,e):n},e.x0=function(t){return arguments.length?(n="function"==typeof t?t:vm(+t),e):n},e.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:vm(+t),e):i},e.y=function(t){return arguments.length?(o="function"==typeof t?t:vm(+t),r=null,e):o},e.y0=function(t){return arguments.length?(o="function"==typeof t?t:vm(+t),e):o},e.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:vm(+t),e):r},e.lineX0=e.lineY0=function(){return t().x(n).y(o)},e.lineY1=function(){return t().x(n).y(r)},e.lineX1=function(){return t().x(i).y(o)},e.defined=function(t){return arguments.length?(s="function"==typeof t?t:vm(!!t),e):s},e.curve=function(t){return arguments.length?(u=t,null!=a&&(l=u(a)),e):u},e.context=function(t){return arguments.length?(null==t?a=l=null:l=u(a=t),e):a},e},Dm=function(e,t){return te?1:t>=e?0:NaN},Pm=function(e){return e},Nm=function(){function e(e){var a,u,l,c,p,d=e.length,h=0,f=new Array(d),m=new Array(d),y=+o.apply(this,arguments),g=Math.min(Rm,Math.max(-Rm,r.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/d,s.apply(this,arguments)),b=v*(g<0?-1:1);for(a=0;a0&&(h+=p);for(null!=n?f.sort(function(e,t){return n(m[e],m[t])}):null!=i&&f.sort(function(t,n){return i(e[t],e[n])}),a=0,l=h?(g-d*b)/h:0;a0?p*l:0)+b,m[u]={data:e[u],index:a,value:p,startAngle:y,endAngle:c,padAngle:v};return m}var t=Pm,n=Dm,i=null,o=vm(0),r=vm(Rm),s=vm(0);return e.value=function(n){return arguments.length?(t="function"==typeof n?n:vm(+n),e):t},e.sortValues=function(t){return arguments.length?(n=t,i=null,e):n},e.sort=function(t){return arguments.length?(i=t,n=null,e):i},e.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:vm(+t),e):o},e.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:vm(+t),e):r},e.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:vm(+t),e):s},e},km=Hr(Im);jr.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var Lm=function(){return qr(Fm().curve(km))},Vm=function(){var e=$m().curve(km),t=e.curve,n=e.lineX0,i=e.lineX1,o=e.lineY0,r=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return qr(n())},delete e.lineX0,e.lineEndAngle=function(){return qr(i())},delete e.lineX1,e.lineInnerRadius=function(){return qr(o())},delete e.lineY0,e.lineOuterRadius=function(){return qr(r())},delete e.lineY1,e.curve=function(e){return arguments.length?t(Hr(e)):t()._curve},e},Bm=function(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]},Qm=Array.prototype.slice,Um={draw:function(e,t){var n=Math.sqrt(t/Am);e.moveTo(n,0),e.arc(0,0,n,0,Rm)}},jm={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Hm=Math.sqrt(1/3),qm=2*Hm,zm={draw:function(e,t){var n=Math.sqrt(t/qm),i=n*Hm;e.moveTo(0,-n),e.lineTo(i,0),e.lineTo(0,n),e.lineTo(-i,0),e.closePath()}},Wm=Math.sin(Am/10)/Math.sin(7*Am/10),Gm=Math.sin(Rm/10)*Wm,Ym=-Math.cos(Rm/10)*Wm,Km={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),i=Gm*n,o=Ym*n;e.moveTo(0,-n),e.lineTo(i,o);for(var r=1;r<5;++r){var s=Rm*r/5,a=Math.cos(s),u=Math.sin(s);e.lineTo(u*n,-a*n),e.lineTo(a*i-u*o,u*i+a*o)}e.closePath()}},Jm={draw:function(e,t){var n=Math.sqrt(t),i=-n/2;e.rect(i,i,n,n)}},Xm=Math.sqrt(3),Zm={draw:function(e,t){var n=-Math.sqrt(t/(3*Xm));e.moveTo(0,2*n),e.lineTo(-Xm*n,-n),e.lineTo(Xm*n,-n),e.closePath()}},ey=Math.sqrt(3)/2,ty=1/Math.sqrt(12),ny=3*(ty/2+1),iy={draw:function(e,t){var n=Math.sqrt(t/ny),i=n/2,o=n*ty,r=i,s=n*ty+n,a=-r,u=s;e.moveTo(i,o),e.lineTo(r,s),e.lineTo(a,u),e.lineTo(-.5*i-ey*o,ey*i+-.5*o),e.lineTo(-.5*r-ey*s,ey*r+-.5*s),e.lineTo(-.5*a-ey*u,ey*a+-.5*u),e.lineTo(-.5*i+ey*o,-.5*o-ey*i),e.lineTo(-.5*r+ey*s,-.5*s-ey*r),e.lineTo(-.5*a+ey*u,-.5*u-ey*a),e.closePath()}},oy=[Um,jm,zm,Jm,Km,Zm,iy],ry=function(){function e(){var e;if(i||(i=e=Mc()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}var t=vm(Um),n=vm(64),i=null;return e.type=function(n){return arguments.length?(t="function"==typeof n?n:vm(n),e):t},e.size=function(t){return arguments.length?(n="function"==typeof t?t:vm(+t),e):n},e.context=function(t){return arguments.length?(i=null==t?null:t,e):i},e},sy=function(){};ns.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ts(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ts(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var ay=function(e){return new ns(e)};is.prototype={areaStart:sy,areaEnd:sy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ts(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var uy=function(e){return new is(e)};os.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:ts(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var ly=function(e){return new os(e)};rs.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var i,o=e[0],r=t[0],s=e[n]-o,a=t[n]-r,u=-1;++u<=n;)i=u/n,this._basis.point(this._beta*e[u]+(1-this._beta)*(o+i*s),this._beta*t[u]+(1-this._beta)*(r+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var cy=function e(t){function n(e){return 1===t?new ns(e):new rs(e,t)}return n.beta=function(t){return e(+t)},n}(.85);as.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ss(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ss(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var py=function e(t){function n(e){return new as(e,t)}return n.tension=function(t){return e(+t)},n}(0);us.prototype={areaStart:sy,areaEnd:sy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ss(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var dy=function e(t){function n(e){return new us(e,t)}return n.tension=function(t){return e(+t)},n}(0);ls.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ss(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var hy=function e(t){function n(e){return new ls(e,t)}return n.tension=function(t){return e(+t)},n}(0);ps.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:cs(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fy=function e(t){function n(e){return t?new ps(e,t):new as(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);ds.prototype={areaStart:sy,areaEnd:sy,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cs(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var my=function e(t){function n(e){return t?new ds(e,t):new us(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);hs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cs(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var yy=function e(t){function n(e){return t?new hs(e,t):new ls(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);fs.prototype={areaStart:sy,areaEnd:sy,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var gy=function(e){return new fs(e)};bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:vs(this,this._t0,gs(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,vs(this,gs(this,n=ys(this,e,t)),n);break;default:vs(this,this._t0,n=ys(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Cs.prototype=Object.create(bs.prototype)).point=function(e,t){bs.prototype.point.call(this,t,e)},Ss.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,o,r){this._context.bezierCurveTo(t,e,i,n,r,o)}},_s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var i=Es(e),o=Es(t),r=0,s=1;s=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var by=function(e){return new Os(e,.5)},Cy=function(e,t){if((o=e.length)>1)for(var n,i,o,r=1,s=e[t[0]],a=s.length;r=0;)n[t]=t;return n},wy=function(){function e(e){var r,s,a=t.apply(this,arguments),u=e.length,l=a.length,c=new Array(l);for(r=0;r0){for(var n,i,o,r=0,s=e[0].length;r1)for(var n,i,o,r,s,a,u=0,l=e[t[0]].length;u=0?(i[0]=r,i[1]=r+=o):o<0?(i[1]=s,i[0]=s+=o):i[0]=r},Ey=function(e,t){if((n=e.length)>0){for(var n,i=0,o=e[t[0]],r=o.length;i0&&(i=(n=e[t[0]]).length)>0){for(var n,i,o,r=0,s=1;s=a)return null;var u=e-o.site[0],l=t-o.site[1],c=u*u+l*l;do{o=r.cells[i=s],s=null,o.halfedges.forEach(function(n){var i=r.edges[n],a=i.left;if(a!==o.site&&a||(a=i.right)){var u=e-a[0],l=t-a[1],p=u*u+l*l;pT}i.zoom("mouse",g(n(i.that.__zoom,i.mouse[0]=Tu(i.that),i.mouse[1]),i.extent,S))}function t(){o.on("mousemove.zoom mouseup.zoom",null),be(vu.view,i.moved),Wy(),i.end()}if(!f&&m.apply(this,arguments)){var i=r(this,arguments),o=xu(vu.view).on("mousemove.zoom",e,!0).on("mouseup.zoom",t,!0),s=Tu(this),a=vu.clientX,u=vu.clientY;$u(vu.view),da(),i.mouse=[s,this.__zoom.invert(s)],sl(this),i.start()}}function l(){if(m.apply(this,arguments)){var i=this.__zoom,r=Tu(this),s=i.invert(r),a=i.k*(vu.shiftKey?.5:2),u=g(n(t(i,a),r,s),y.apply(this,arguments),S);Wy(),w>0?xu(this).transition().duration(w).call(o,u,r):xu(this).call(e.transform,u)}}function c(){if(m.apply(this,arguments)){var e,t,n,i,o=r(this,arguments),s=vu.changedTouches,a=s.length;for(da(),t=0;t0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]
"),t},t}(o.BreadcrumbValueElement);t.HierarchicalBreadcrumbValueElement=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(338),r=n(440),s=function(e){function t(t,n,i){var o=e.call(this,t,n,i,r.OmniboxHierarchicalValueElement)||this;return o.facet=t,o.facetValues=n,o.omniboxObject=i,o}return i(t,e),t}(o.OmniboxValuesList);t.OmniboxHierarchicalValuesList=s},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(337),r=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.facet=t,o.facetValue=n,o.eventArg=i,o}return i(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=r},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(92),r=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.facet=t,o.facetValue=n,o.keepDisplayedValueNextTime=i,o}return i(t,e),t}(o.FacetValueElement);t.HierarchicalFacetValueElement=r},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),r=function(){function e(e,t){void 0===e&&(e=0),this.previewActive=!1,this.element=t,this.value=e}return e.prototype.getValue=function(){return this.value},e.prototype.getHTML=function(){return this.element},e.prototype.setValue=function(e){this.value=e},e.prototype.setHTML=function(e){this.element=e},e.prototype.addPreview=function(e,t){this.previewActive=!0;var n=i.$$("div",{className:"matrix-results-preview-container"});n.el.style.minWidth=e,n.el.style.maxWidth=t,n.on("click",function(e){e.stopPropagation()}),this.element.appendChild(n.el);var r=i.$$(this.element).findAll(".matrix-results-preview-container");o.each(r,function(e){i.$$(e).hide()})},e.prototype.removePreview=function(){this.previewActive=!1;var e=i.$$(this.element).find(".matrix-results-preview-container");e&&i.$$(e).detach()},e.prototype.updatePreview=function(e){if(this.previewActive){var t=i.$$(this.element).find(".matrix-results-preview-container");t.innerHTML+=e,i.$$(t).show()}},e}();t.Cell=r},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),r=n(1),s=n(23),a=function(e){function t(t,n){var i=e.call(this)||this;return i.computedField=t,i.format=n,i}return i(t,e),t.prototype.instantiateToString=function(e,t){return"
"+s.format(parseInt(e.raw[this.computedField.slice(1)]),this.format)+"
"},t.prototype.instantiateToElement=function(e,t){var n=this;return new Promise(function(t,i){return r.$$("div",void 0,n.instantiateToString(e)).el})},t}(o.Template);t.DefaultMatrixResultPreviewTemplate=a},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),r=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.instantiateToString=function(e){return'
'},t}(o.Template);t.DefaultQuickviewTemplate=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),r=n(49),s=function(){function e(){this.el=this.buildIFrame().el}return Object.defineProperty(e.prototype,"iframeHTMLElement",{get:function(){return this.iframeElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"document",{get:function(){return this.iframeElement.contentWindow.document},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this.document.body},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return this.iframeElement.contentWindow},enumerable:!0,configurable:!0}),e.prototype.isNewQuickviewDocument=function(){var e=i.$$(this.document.head).find("meta[name='generator']");return e&&"pdf2htmlEX"==e.getAttribute("content")},e.prototype.render=function(e){var t=this;return this.quickviewIsClosedByEndUser()?Promise.reject(null):new Promise(function(n,i){t.iframeElement.onload=function(){n(t.iframeElement)},t.addClientSideTweaksToIFrameStyling(e),t.writeToIFrame(e)})},e.prototype.renderError=function(e){var t=this;return this.quickviewIsClosedByEndUser()?Promise.reject(null):new Promise(function(n,o){var s="";switch(e.status){case 400:s=r.l("NoQuickview");break;default:s=r.l("OoopsError")}var a=document.implementation.createHTMLDocument();a.body.style.fontFamily="Arimo, 'Helvetica Neue', Helvetica, Arial, sans-serif",i.$$(a.body).text(s),t.writeToIFrame(a),n(t.iframeElement)})},e.prototype.quickviewIsClosedByEndUser=function(){return null==this.iframeElement.contentDocument},e.prototype.buildIFrame=function(){var e=i.$$("iframe",{sandbox:"allow-same-origin allow-top-navigation",src:"about:blank"});this.iframeElement=e.el;var t=i.$$("div",{className:"coveo-iframeWrapper"});return t.append(e.el),t},e.prototype.writeToIFrame=function(e){this.allowDocumentLinkToEscapeSandbox(e),this.document.open(),this.document.write(e.getElementsByTagName("html")[0].outerHTML),this.document.close()},e.prototype.allowDocumentLinkToEscapeSandbox=function(e){o.each(i.$$(e.body).findAll("a"),function(e){e.setAttribute("target","_top")})},e.prototype.addClientSideTweaksToIFrameStyling=function(e){var t=i.$$("style",{type:"text/css"}).el,n="\n html pre {\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n body, html {\n font-family: Arimo, 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-text-size-adjust: none;\n }\n "+(r.DeviceUtils.isIos()?"\n body, html {\n height: 1px !important;\n min-height: 100%;\n width: 1px !important;\n min-width: 100%;\n overflow: scroll;\n margin: auto\n }\n ":"")+"\n ";r.DeviceUtils.isIos()&&(i.$$(this.iframeElement).setAttribute("scrolling","no"),this.iframeElement.parentElement.style.margin="0 0 5px 5px"),t.appendChild(document.createTextNode(n)),e.head.appendChild(t)},e}();t.QuickviewDocumentIframe=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(){function e(){this.el=this.buildHeader().el}return e.prototype.addWord=function(e){this.el.appendChild(e.el)},e.prototype.buildHeader=function(){return i.$$("div",{className:"coveo-quickview-header"})},e}();t.QuickviewDocumentHeader=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),r=n(457),s=n(171),a=function(){function e(e,t){this.iframe=e,this.result=t,this.words={},this.scanDocument()}return e.prototype.scanDocument=function(){var e=this;o.each(i.$$(this.iframe.body).findAll('[id^="'+s.HIGHLIGHT_PREFIX+'"]'),function(t,n){var i=new r.QuickviewDocumentWord(e.result);i.doCompleteInitialScanForKeywordInDocument(t);var o=e.words[i.indexIdentifier];o?(o.addElement(t),o.occurrence==i.occurrence&&(o.text+=i.text)):e.words[i.indexIdentifier]=i})},e}();t.QuickviewDocumentWords=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(49),r=n(11),s=n(1),a=n(171),u=n(458),l=function(){function e(e){this.result=e,this.count=0,this.elements=[],this.currentNavigationPosition=-1,this.logger=new r.Logger(this)}return e.prototype.addElement=function(e){this.count++,this.elements.push(e)},e.prototype.navigateForward=function(){return this.currentNavigationPosition++,this.currentNavigationPosition>=this.elements.length&&(this.currentNavigationPosition=0),this.highlightNavigation(),this.putElementIntoView(),this.elements[this.currentNavigationPosition]},e.prototype.navigateBackward=function(){return this.currentNavigationPosition--,this.currentNavigationPosition<0&&(this.currentNavigationPosition=this.elements.length-1),this.highlightNavigation(),this.putElementIntoView(),this.elements[this.currentNavigationPosition]},e.prototype.navigateTo=function(e){return this.currentNavigationPosition=e,(this.currentNavigationPosition<0||this.currentNavigationPosition>=this.elements.length)&&(this.currentNavigationPosition=0,this.logger.warn("Invalid position in quickview navigation: "+e)),this.highlightNavigation(),this.elements[this.currentNavigationPosition]},e.prototype.doCompleteInitialScanForKeywordInDocument=function(e){var t=this.parseKeywordIdentifier(e);t&&(this.indexIdentifier=t.keywordIdentifier,this.occurrence=t.keywordOccurrencesInDocument,this.indexTermPart=t.keywordTermPart,this.text=this.getText(e),this.color=new u.QuickviewDocumentWordColor(e.style.backgroundColor),this.addElement(e))},e.prototype.isTaggedWord=function(e){return"coveotaggedword"==e.nodeName.toLowerCase()},e.prototype.highlightNavigation=function(){var e=this,t=this.elements[this.currentNavigationPosition],n=i.without(this.elements,t);t.style.color=this.color.htmlColor,t.style.backgroundColor=this.color.invert(),n.forEach(function(t){t.style.color="",t.style.backgroundColor=e.color.htmlColor})},e.prototype.putElementIntoView=function(){this.elements[this.currentNavigationPosition].scrollIntoView()},e.prototype.getText=function(e){var t=this.getHighlightedInnerText(e);return this.resolveOriginalTerm(t)},e.prototype.resolveOriginalTerm=function(e){var t=this;return this.result&&this.result.termsToHighlight?i.find(i.keys(this.result.termsToHighlight),function(n){var r=o.StringUtils.equalsCaseInsensitive(n,e),s=void 0!=i.find(t.result.termsToHighlight[n],function(t){return o.StringUtils.equalsCaseInsensitive(t,e)});return r||s})||e:e},e.prototype.getHighlightedInnerText=function(e){if(!this.isTaggedWord(e))return s.$$(e).text()||"";var t=s.$$(e).children();return t.length>=1?s.$$(i.first(t)).text()||"":""},e.prototype.parseKeywordIdentifier=function(e){var t=e.id.substr(a.HIGHLIGHT_PREFIX.length+1).match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/);return!t||t.length<=3?null:{keywordIdentifier:t[1],keywordOccurrencesInDocument:parseInt(t[2],10),keywordTermPart:parseInt(t[3],10)}},e}();t.QuickviewDocumentWord=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(106),o=function(){function e(e){this.htmlColor=e;var t=e.match(/\d+/g);t&&(this.r=parseInt(t[0],10),this.g=parseInt(t[1],10),this.b=parseInt(t[2],10))}return e.prototype.invert=function(){return"rgb("+(255-this.r)+", "+(255-this.g)+", "+(255-this.b)+")"},e.prototype.saturate=function(){var e=i.ColorUtils.rgbToHsv(this.r,this.g,this.b);e[1]*=2,e[1]>1&&(e[1]=1);var t=i.ColorUtils.hsvToRgb(e[0],e[1],e[2]);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},e}();t.QuickviewDocumentWordColor=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(){function e(e,t,n){this.word=e,this.previewBar=t,this.iframe=n,this.el=this.render()}return e.prototype.render=function(){var e=i.$$("span",{className:"coveo-term-for-quickview"});return e.append(this.buildName().el),e.append(this.renderArrow("up").el),e.append(this.renderArrow("down").el),e.el.style.backgroundColor=this.word.color.htmlColor,e.el.style.borderColor=this.word.color.saturate(),e.el},e.prototype.buildName=function(){var e=this,t=i.$$("span",{className:"coveo-term-for-quickview-name"},this.word.text+" ("+this.word.count+")");return t.on("click",function(){return e.navigate(!1)}),t},e.prototype.navigate=function(e){var t;if(e?(t=this.word.navigateBackward(),this.previewBar.navigateBackward(this.word)):(t=this.word.navigateForward(),this.previewBar.navigateForward(this.word)),this.iframe.isNewQuickviewDocument()){var n=i.$$(t).closest(".pc");i.$$(n).addClass("opened")}t.scrollIntoView()},e.prototype.renderArrow=function(e){var t=this,n=i.$$("span",{className:"coveo-term-for-quickview-"+e+"-arrow"}),o=i.$$("span",{className:"coveo-term-for-quickview-"+e+"-arrow-icon"});return n.append(o.el),n.on("click",function(){return t.navigate("up"==e)}),n},e}();t.QuickviewDocumentWordButton=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),r=n(11),s=function(){function e(e,t){this.iframe=e,this.words=t,this.wordIndicators=new Map,this.logger=new r.Logger(this),this.renderPreviewBar()}return e.prototype.navigateForward=function(e){var t=this.wordIndicators.get(e);return t?(t.position++,t.position>=t.indicators.length&&(t.position=0),this.highlightNavigation(e),t.indicators[t.position]):(this.logger.warn("Invalid navigation for given word.",e),null)},e.prototype.navigateBackward=function(e){var t=this.wordIndicators.get(e);return t?(t.position--,t.position<0&&(t.position=t.indicators.length-1),this.highlightNavigation(e),t.indicators[t.position]):(this.logger.warn("Invalid navigation for the given word.",e),null)},e.prototype.navigateTo=function(e,t){var n=this.wordIndicators.get(t);return n?(n.position=e,(n.position<0||n.position>=n.indicators.length)&&(this.logger.warn("Invalid navigation for the given position: "+e),n.position=0),this.highlightNavigation(t),n.indicators[n.position]):(this.logger.warn("Invalid navigation for the given word",t),null)},e.prototype.highlightNavigation=function(e){var t=this,n=this.wordIndicators.get(e),i=n.indicators[n.position],r=o.without(n.indicators,i);i.style.backgroundColor=e.color.invert(),i.style.border="1px solid "+e.color.invert(),r.forEach(function(n){return t.defaultStyleColor(n,e)})},e.prototype.renderPreviewBar=function(){var e=this,t=i.$$("div");t.el.style.width="15px",t.el.style.position="fixed",t.el.style.top="0",t.el.style.right="0px",t.el.style.height="100%",this.iframe.body.appendChild(t.el),o.each(this.words.words,function(n){o.each(n.elements,function(i){var o=e.renderWordPositionIndicator(i,n).el;e.wordIndicators.has(n)?e.wordIndicators.get(n).indicators.push(o):e.wordIndicators.set(n,{indicators:[o],position:-1}),t.append(o)}),e.handleOverlappingIndicators(n)})},e.prototype.renderWordPositionIndicator=function(e,t){var n=new i.Doc(this.iframe.document).height(),o=e.getBoundingClientRect().top,r=i.$$("div");return r.el.style.position="absolute",r.el.style.top=o/n*100+"%",r.el.style.width="100%",r.el.style.height="1px",this.defaultStyleColor(r.el,t),r},e.prototype.defaultStyleColor=function(e,t){e.style.border="1px solid "+t.color.saturate(),e.style.backgroundColor=t.color.htmlColor},e.prototype.handleOverlappingIndicators=function(e){for(var t=this.wordIndicators.get(e).indicators,n=0;n '},t}(o.Template);t.DefaultResultAttachmentTemplate=r},function(e,t){},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(21),r=function(e){function t(){return e.call(this)||this}return i(t,e),t.prototype.instantiateToString=function(e){return'
'},t.prototype.getType=function(){return"DefaultFoldingTemplate"},t}(o.Template);t.DefaultFoldingTemplate=r},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(11),r=n(1),s=n(6),a=n(143),u=n(18),l=n(79),c=function(){function e(e,t,n,i){this.coveoRoot=e,this.ID=t,this.searchInterface=s.Component.get(this.coveoRoot.el,u.SearchInterface,!1)}return e.init=function(t,n,i){if(!r.$$(t).find("."+s.Component.computeCssClassName(a.ResultLayoutSelector))){return void new o.Logger("ResponsiveResultLayout").trace("No ResultLayout component found : Cannot instantiate ResponsiveResultLayout")}l.ResponsiveComponentsManager.register(e,r.$$(t),a.ResultLayoutSelector.ID,n,i)},e.prototype.registerComponent=function(e){return e instanceof a.ResultLayoutSelector&&(this.resultLayout=e,!0)},e.prototype.handleResizeEvent=function(){this.needSmallMode()?this.enableAndDisableLayouts(this.resultLayout.options.mobileLayouts):this.needMediumMode()?this.enableAndDisableLayouts(this.resultLayout.options.tabletLayouts):this.enableAndDisableLayouts(this.resultLayout.options.desktopLayouts)},e.prototype.enableAndDisableLayouts=function(e){var t=i.difference(a.ResultLayoutSelector.validLayouts,e),n=i.intersection(a.ResultLayoutSelector.validLayouts,e);this.resultLayout.disableLayouts(t),this.resultLayout.enableLayouts(n)},e.prototype.needSmallMode=function(){switch(this.searchInterface.responsiveComponents.getResponsiveMode()){case"small":return!0;case"auto":return this.coveoRoot.width()<=this.searchInterface.responsiveComponents.getSmallScreenWidth();default:return!1}},e.prototype.needMediumMode=function(){switch(this.searchInterface.responsiveComponents.getResponsiveMode()){case"medium":return!0;case"auto":return this.coveoRoot.width()<=this.searchInterface.responsiveComponents.getMediumScreenWidth();default:return!1}},e}();t.ResponsiveResultLayout=c},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=n(8),s=n(64),a=n(10),u=n(166),l=n(70),c=n(7),p=n(1),d=n(0),h=n(13),f=n(14),m=function(e){function t(n,i,o){var r=e.call(this,n,t.ID,o)||this;return r.element=n,r.options=i,r.bindings=o,r.bind.onRootElement(s.SearchAlertsEvents.searchAlertsCreated,function(e){return r.handleSubscriptionCreated(e)}),r.bind.oneRootElement(s.SearchAlertsEvents.searchAlertsFail,function(e){return r.handleSearchAlertsFail(e)}),r.bind.oneRootElement(s.SearchAlertsEvents.searchAlertsDeleted,function(){return r.close()}),r.bind.oneRootElement(a.QueryEvents.newQuery,function(){return r.close()}),r}return i(t,e),t.prototype.getCssClass=function(){return"coveo-subscriptions-messages"},t.prototype.getFollowQueryMessage=function(e,t){var n=this;void 0===t&&(t=!1);var i={text:[]};p.$$(this.root).trigger(s.SearchAlertsEvents.searchAlertsPopulateMessage,i);var o,r=(t?"
    ":"")+function(){return d.map(i.text,function(e){return e=n.formatMessageArgumentsText(e),(t?"
  • ":"(")+e+(t?"
  • ":")")}).join(" ")}()+(t?"
":"");return e&&0!=i.text.length&&(o=d.escape(e)+" "+r),e&&0==i.text.length&&(o=""+d.escape(e)),e||0==i.text.length||(o=""+r),e||0!=i.text.length||(o=t?c.l("EmptyQuery"):d.unescape(c.l("EmptyQuery"))),o},t.prototype.showMessage=function(e,t,n){var i=this;this.message=p.$$("div",{className:"coveo-subscriptions-messages"}),this.message.el.innerHTML="\n
\n
"+t+"
\n
"+h.SVGIcons.icons.checkboxHookExclusionMore+"
\n
",this.message.toggleClass("coveo-subscriptions-messages-error",n);var o=this.message.find(".coveo-subscriptions-messages-info-close");f.SVGDom.addClassToSVGInContainer(o,"coveo-subscript-messages-info-close-svg"),p.$$(o).on("click",function(){return i.close()}),l.PopupUtils.positionPopup(this.message.el,e.el,this.root,{horizontal:l.PopupHorizontalAlignment.INNERLEFT,vertical:l.PopupVerticalAlignment.BOTTOM,verticalOffset:12,horizontalClip:!0},this.root),this.startCloseDelay(),this.message.on("mouseleave",function(){i.startCloseDelay()}),this.message.on("mouseenter",function(){i.stopCloseDelay()})},t.prototype.formatMessageArgumentsText=function(e){return e=d.isString(e)?d.escape(e):e.lineThrough?''+d.escape(e.value)+"":d.escape(e.value)},t.prototype.handleSubscriptionCreated=function(e){if(this.close(),null!=e.dom)if(e.subscription.type==u.SUBSCRIPTION_TYPE.followQuery){var t=e.subscription.typeConfig;this.showMessage(p.$$(e.dom),c.l("SubscriptionsMessageFollowQuery",this.getFollowQueryMessage(t.query.q,!0)),!1)}else this.showMessage(p.$$(e.dom),c.l("SubscriptionsMessageFollow"),!1)},t.prototype.handleSearchAlertsFail=function(e){this.close(),null!=e.dom&&this.showMessage(p.$$(e.dom),c.l("SearchAlerts_Fail"),!0)},t.prototype.startCloseDelay=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=window.setTimeout(function(){e.close()},this.options.closeDelay)},t.prototype.stopCloseDelay=function(){clearTimeout(this.closeTimeout)},t.prototype.close=function(){null!=this.message&&(clearTimeout(this.closeTimeout),this.message.remove(),this.message=null)},t.ID="SubscriptionsMessages",t.options={closeDelay:r.ComponentOptions.buildNumberOption({defaultValue:2e3,min:0})},t}(o.Component);t.SearchAlertsMessage=m},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(485);var i=n(0),o=n(16),r=n(11),s=n(7),a=n(1),u=n(154),l=n(70),c=n(14),p=n(13),d=n(4),h=n(6),f=n(18),m=n(144),y=n(43),g=n(79),v=n(90),b=function(){function e(e,t){this.coveoRoot=e,this.ID=t,this.dropdownHeaderLabel=this.getDropdownHeaderLabel(),this.searchInterface=h.Component.get(this.coveoRoot.el,f.SearchInterface,!1),this.dropdownContent=this.buildDropdownContent(),this.dropdownHeader=this.buildDropdownHeader(),this.bindDropdownContentEvents(),this.bindDropdownHeaderEvents(),this.tabSection=a.$$(this.coveoRoot.find(".coveo-tab-section")),this.manageTabSwapping(),this.bindNukeEvents(),this.initialTabOrder=this.tabsInTabSection.slice()}return e.init=function(t,n,i){if(this.logger=new r.Logger("ResponsiveTabs"),!a.$$(t).find(".coveo-tab-section"))return void this.logger.info("No element with class coveo-tab-section. Responsive tabs cannot be enabled.");g.ResponsiveComponentsManager.register(e,a.$$(t),m.Tab.ID,n,i)},e.prototype.handleResizeEvent=function(){this.needSmallMode()&&!v.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)?this.changeToSmallMode():!this.needSmallMode()&&v.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)&&this.changeToLargeMode(),this.shouldAddTabsToDropdown()?this.addTabsToDropdown():this.shouldRemoveTabsFromDropdown()&&this.removeTabsFromDropdown(),this.dropdownHeader.hasClass("coveo-dropdown-header-active")&&this.positionPopup()},e.prototype.needSmallMode=function(){if(!this.searchInterface)return this.shouldAutoModeResolveToSmall();switch(this.searchInterface.responsiveComponents.getResponsiveMode()){case"small":case"medium":return!0;case"auto":default:return this.shouldAutoModeResolveToSmall()}},e.prototype.shouldAutoModeResolveToSmall=function(){var e=this.searchInterface?this.searchInterface.responsiveComponents.getMediumScreenWidth():(new y.ResponsiveComponents).getMediumScreenWidth();return this.coveoRoot.width()<=e||(v.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)?this.isLargeFormatOverflowing():this.isOverflowing(this.tabSection.el))},e.prototype.changeToSmallMode=function(){v.ResponsiveComponentsUtils.activateSmallTabs(this.coveoRoot)},e.prototype.changeToLargeMode=function(){this.emptyDropdown(),this.cleanUpDropdown(),v.ResponsiveComponentsUtils.deactivateSmallTabs(this.coveoRoot)},e.prototype.shouldAddTabsToDropdown=function(){return this.isOverflowing(this.tabSection.el)&&v.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)},e.prototype.addTabsToDropdown=function(){var t;if(!this.tabSection.find("."+e.TAB_IN_DROPDOWN_HEADER_CSS_CLASS)){var n=this.tabSection.find(".coveo-facet-dropdown-header");n?this.dropdownHeader.insertBefore(n):this.tabSection.el.appendChild(this.dropdownHeader.el)}for(var i=this.initialTabOrder.length-1;i>=0&&(t=this.initialTabOrder[i],this.tabIsSelected(t)&&i>0&&(t=this.initialTabOrder[--i]),this.addToDropdownIfNeeded(t),this.isOverflowing(this.tabSection.el));i--);},e.prototype.shouldRemoveTabsFromDropdown=function(){return!this.isOverflowing(this.tabSection.el)&&v.ResponsiveComponentsUtils.isSmallTabsActivated(this.coveoRoot)&&!this.isDropdownEmpty()},e.prototype.removeTabsFromDropdown=function(){for(var e,t=this,n=this.tabsInTabDropdown;!this.isOverflowing(this.tabSection.el)&&!this.isDropdownEmpty();)e=n.shift(),this.removeFromDropdownIfNeeded(e),this.fromDropdownToTabSection(a.$$(e));if(this.isOverflowing(this.tabSection.el)){var o=i.filter(this.tabsInTabSection,function(e){return!t.tabIsSelected(e)});this.addToDropdownIfNeeded(o.pop())}this.isDropdownEmpty()&&this.cleanUpDropdown()},e.prototype.emptyDropdown=function(){var e=this;if(!this.isDropdownEmpty()){for(var t=this.tabsInTabDropdown;!this.isDropdownEmpty();){var n=t.shift();this.removeFromDropdownIfNeeded(n)}this.initialTabOrder.forEach(function(t){return e.tabSection.append(t)})}},e.prototype.isLargeFormatOverflowing=function(){var t=a.$$(this.tabSection.el.cloneNode(!0)),n=t.find("."+e.TAB_IN_DROPDOWN_HEADER_CSS_CLASS);n&&t.el.removeChild(n),t.el.style.position="absolute",t.el.style.visibility="hidden",this.isDropdownEmpty()||i.each(this.dropdownContent.findAll(".CoveoTab"),function(e){t.el.appendChild(e.cloneNode(!0))}),t.insertBefore(this.tabSection.el),v.ResponsiveComponentsUtils.deactivateSmallTabs(this.coveoRoot);var o=this.isOverflowing(this.tabSection.el)||this.isOverflowing(t.el);return v.ResponsiveComponentsUtils.activateSmallTabs(this.coveoRoot),t.detach(),o},e.prototype.isOverflowing=function(e){return e.clientWidththis.initialTabOrder.indexOf(t)?e.insertAfter(t):e.insertBefore(t)},e.prototype.getDropdownHeaderLabel=function(){var t;return i.each(a.$$(this.coveoRoot.find(".coveo-tab-section")).findAll("."+h.Component.computeCssClassName(m.Tab)),function(e){var n=h.Component.get(e,m.Tab);!t&&n&&n.options.dropdownHeaderLabel&&(t=n.options.dropdownHeaderLabel)}),t||(t=s.l(e.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE)),t},e.prototype.tabIsSelected=function(e){return a.$$(e).hasClass("coveo-selected")},e.prototype.tabIsInDropdown=function(t){return a.$$(t).hasClass(e.TAB_IN_DROPDOWN_CSS_CLASS)},Object.defineProperty(e.prototype,"tabsInTabSection",{get:function(){var e=this,t=[];return i.each(this.tabSection.children(),function(n){if(d.Utils.isHtmlElement(n)){var i=a.$$(n),o=i.hasClass(h.Component.computeCssClassNameForType(e.ID));!e.tabIsInDropdown(i)&&o&&t.push(i.el)}}),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabsInTabDropdown",{get:function(){return this.dropdownContent?this.dropdownContent.findAll("."+e.TAB_IN_DROPDOWN_CSS_CLASS):[]},enumerable:!0,configurable:!0}),e.DROPDOWN_HEADER_LABEL_DEFAULT_VALUE="More",e.TAB_IN_DROPDOWN_CSS_CLASS="coveo-tab-dropdown",e.TAB_IN_DROPDOWN_HEADER_CSS_CLASS=e.TAB_IN_DROPDOWN_CSS_CLASS+"-header",e}();t.ResponsiveTabs=b},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(365);var i=n(0),o=function(){function e(e,t){this.simpleFilter=e,this.options=t,this.groupByRequestValues=[]}return e.prototype.getValuesFromGroupBy=function(){return this.groupByRequestValues},e.prototype.groupBy=function(e){var t=this;this.groupByRequestValues=[];var n=e.results.groupByResults;n.length>0&&void 0!=this.position&&i.each(n[this.position].values,function(e){t.groupByRequestValues.indexOf(e.lookupValue)<0&&t.groupByRequestValues.push(e.lookupValue)})},e.prototype.handleDoneBuildingQuery=function(e){var t=e.queryBuilder;this.putGroupByIntoQueryBuilder(t)},e.prototype.putGroupByIntoQueryBuilder=function(e){var t=this.createBasicGroupByRequest();e.groupByRequests.push(t),this.position=e.groupByRequests.length-1},e.prototype.createBasicGroupByRequest=function(){return{field:this.options.field,maximumNumberOfValues:this.options.maximumNumberOfValues,injectionDepth:1e3}},e}();t.SimpleFilterValues=o},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(13),r=n(14),s=n(0),a=n(7),u=function(){function e(){this.listRoot=i.$$("ul",{className:"coveo-category-facet-values"}),this.collapseArrow=i.$$("span",{className:"coveo-category-facet-collapse-children"},o.SVGIcons.icons.arrowDown),r.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=i.$$("div",{},this.createListElement(e));return i.$$(t.el.firstChild)},e.prototype.buildAllCategoriesButton=function(){var e=i.$$("span",{className:"coveo-category-facet-all-categories-caption"},a.l("AllCategories"));return i.$$("li",{className:"coveo-category-facet-value coveo-category-facet-all-categories"},this.buildCollapseArrow(),e)},e.prototype.buildEllipsis=function(){var e=i.$$("span",{className:"coveo-category-facet-ellipsis-caption"},"[ ... ]");return i.$$("li",{className:"coveo-category-facet-ellipsis"},e)},e.prototype.buildCollapseArrow=function(){return this.collapseArrow.clone(!0)},e.prototype.createListElement=function(e){return'
  • \n \n
  • "},e}();t.CategoryFacetTemplates=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(366),o=function(){function e(e,t,n){this.element=e,this.path=[],this.categoryChildrenValueRenderer=new i.CategoryChildrenValueRenderer(e,t,this,n),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},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(366),r=n(9),s=n(17),a=n(7),u=function(){function e(e,t,n,i){this.listRoot=e,this.categoryValueDescriptor=t,this.categoryFacetTemplates=n,this.categoryFacet=i,this.isActive=!1,this.element=this.categoryFacetTemplates.buildListElement({value:this.categoryValueDescriptor.value,count:this.categoryValueDescriptor.count}),this.collapseArrow=this.categoryFacetTemplates.buildCollapseArrow(),this.categoryChildrenValueRenderer=new o.CategoryChildrenValueRenderer(this.element,n,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;return this.label=i.$$(this.element.find(".coveo-category-facet-value-label")),this.label.addClass("coveo-selectable"),(new s.AccessibleButton).withElement(this.label).withSelectAction(function(){return e.onSelect()}).withLabel(a.l(this.categoryValueDescriptor.value)+" "+this.categoryValueDescriptor.count).build(),this},e.prototype.showCollapseArrow=function(){if(!this.collapseArrow.el.parentElement){var e=this.element.find("label");i.$$(e).prepend(this.collapseArrow.el)}return this},e.prototype.onSelect=function(){this.pastMaximumDepth()||(this.categoryFacet.logAnalyticsEvent(r.analyticsActionCauseList.categoryFacetSelect,this.path),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=u},function(e,t,n){"use strict";var i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]0&&s[s.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!s||n[1]>s[0]&&n[1]=0&&b.splice(t,1)}function a(e){var t=document.createElement("style");return e.attrs.type="text/css",l(t,e.attrs),r(e,t),t}function u(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",l(t,e.attrs),r(e,t),t}function l(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(e,t){var n,i,o,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var l=v++;n=g||(g=a(t)),i=p.bind(null,n,l,!1),o=p.bind(null,n,l,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),i=h.bind(null,n,t),o=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),i=d.bind(null,n),o=function(){s(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}function p(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=S(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function d(e,t){var n=t.css,i=t.media;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function h(e,t,n){var i=n.css,o=n.sourceMap,r=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||r)&&(i=C(i)),o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([i],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}var f={},m=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),y=function(e){var t={};return function(n){if(void 0===t[n]){var i=e.call(this,n);if(i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[n]=i}return t[n]}}(function(e){return document.querySelector(e)}),g=null,v=0,b=[],C=n(235);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=m()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=o(e,t);return i(n,t),function(e){for(var r=[],s=0;s