text: (window.webpackJsonp=window.webpackJsonp||[]).push([[1033],{1300:function(A,e){throw new Error("Module parse failed: Unexpected token (1:10)\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders\n> {\"version\":3,\"file\":\"filters-search.vue_rollup-plugin-vue=script.js\",\"sources\":[\"../../../../../../src/x-modules/facets/components/lists/filters-search.vue?rollup-plugin-vue=script.ts\"],\"sourcesContent\":[\"\\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\\nimport { Filter, isBooleanFilter } from '@empathyco/x-types';\\nimport { mixins } from 'vue-class-component';\\nimport { Component, Prop, Watch } from 'vue-property-decorator';\\nimport { xComponentMixin, XProvide } from '../../../../components';\\nimport { debounce } from '../../../../utils/debounce';\\nimport { normalizeString } from '../../../../utils/normalize';\\nimport { DebouncedFunction, VueCSSClasses } from '../../../../utils/types';\\nimport { facetsXModule } from '../../x-module';\\nimport FiltersInjectionMixin from './filters-injection.mixin';\\n\\n/**\\n * Renders the filters sifted with the input query.\\n *\\n * @public\\n */\\n@Component({\\n  mixins: [xComponentMixin(facetsXModule)]\\n})\\nexport default class FiltersSearch extends mixins(FiltersInjectionMixin) {\\n  /** The debounce time for applying the filter sifting. */\\n  @Prop({ default: 200 })\\n  protected debounceInMs!: number;\\n\\n  protected query = '';\\n  protected setQueryDebounced!: DebouncedFunction<[string]>;\\n\\n  /**\\n   * Set the debounce function for setting the query debounced.\\n   *\\n   * @internal\\n   */\\n  @Watch('debounceInMs', { immediate: true })\\n  updateSetQueryDebounced(): void {\\n    this.setQueryDebounced = debounce(query => {\\n      this.query = query;\\n    }, this.debounceInMs);\\n  }\\n\\n  /**\\n   * Sift the array of filters which matches with the query.\\n   *\\n   * @returns Array of sifted filters.\\n   * @internal\\n   */\\n  @XProvide('filters')\\n  public get siftedFilters(): Filter[] {\\n    const normalizedQuery = normalizeString(this.query);\\n    return this.renderedFilters.filter(\\n      filter => isBooleanFilter(filter) && normalizeString(filter.label).includes(normalizedQuery)\\n    );\\n  }\\n\\n  /**\\n   * Adds the dynamic css classes to the component.\\n   *\\n   * @returns The class to be added to the component.\\n   * @internal\\n   */\\n  protected get cssClasses(): VueCSSClasses {\\n    return {\\n      'x-filters-search--is-sifted': !!this.query\\n    };\\n  }\\n\\n  /**\\n   * Set the query through the debounced function.\\n   *\\n   * @param query - The query to sift filters.\\n   * @internal\\n   */\\n  protected setQuery(query: string): void {\\n    this.setQueryDebounced(query);\\n  }\\n\\n  /**\\n   * Clear the query.\\n   *\\n   * @internal\\n   */\\n  protected clearQuery(): void {\\n    this.query = '';\\n  }\\n}\\n\"],\"names\":[],\"mappings\":\";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;;;;;AAQA;IAA2C,iCAA6B;IAAxE;QAAA,qEAgEC;QA3DW,WAAK,GAAG,EAAE,CAAC;;KA2DtB;;;;;;IAlDC,+CAAuB,GAAvB;QADA,iBAKC;QAHC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,UAAA,KAAK;YACrC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACpB,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;KACvB;IASD,sBAAW,wCAAa;;;;;;;aAAxB;YACE,IAAM,eAAe,GAAG,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpD,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAChC,UAAA,MAAM,IAAI,OAAA,eAAe,CAAC,MAAM,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,GAAA,CAC7F,CAAC;SACH;;;OAAA;IAQD,sBAAc,qCAAU;;;;;;;aAAxB;YACE,OAAO;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