const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NoProductsFoundFi-CSQbFpZO.js","assets/main-BDtKGhFI.js","assets/AssetService-SVtDjug-.js"])))=>i.map(i=>d[i]); import{d as ae,a4 as ie,ah as te,aw as de,a0 as ne,o as s,a as S,w as b,K as F,ap as re,q as h,h as z,n as P,u as R,v as f,I as ce,b as c,l as y,A as se,Z as oe,_ as U,ax as ue,a1 as x,ak as me,a2 as ge,p as k,F as C,e as A,aQ as fe,aR as he,Y as le,r as N,R as ve,T as ke,ab as ye,J as Fe,G as Ne,B as pe,k as be,bd as _e,m as Se,be as Pe,bf as Ve,f as G,O as Ce,W as Ie}from"./main-BDtKGhFI.js";import{P as De}from"./PaginationProgressBar-DQ7eJ3mz.js";import{F as Te}from"./FacetsMenuFi-C8GRmyIH.js";import{d as we,m as qe,t as Ae}from"./factFinderNgFacetFragment-CIrlUR3D.js";import{e as Ue}from"./infinite-loading-vue3-ts.esm-CdJoyCOm.js";import{F as Le,_ as $e,a as Oe,s as Be,t as Re}from"./toFilterInput-BhXUZwu6.js";import{_ as Ee}from"./trackingMixin.vue_vue_type_script_lang-DSHkIFY3.js";import{I as We}from"./IconAttributeItemFi-C2H3gsNW.js";import{_ as xe}from"./catalogAttributesMixin-CL45_ybt.js";import{_ as je}from"./catalogMixin-CPTFZDM8.js";import{_ as He}from"./priceCurrencyMixin-CKEVFsHP.js";var T={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"searchFactFinderNg"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"factFinderChannel"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FactFinderChannel"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"catalogLocale"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CatalogLocale"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"language"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"quantity"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"categoryId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"originalCategoryId"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"FactFinderNgFacetElementInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"masterFilters"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"FactFinderNgFacetElementInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"extraFilters"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"FactFinderNgFacetElementInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeUnselectedFacets"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!0},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"noSearch"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"noFacets"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"noVariants"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"variantsWithoutFamily"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeClaim"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"categoryFacets"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchFactFinderNg"},arguments:[{kind:"Argument",name:{kind:"Name",value:"factFinderChannel"},value:{kind:"Variable",name:{kind:"Name",value:"factFinderChannel"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"language"},value:{kind:"Variable",name:{kind:"Name",value:"language"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"quantity"},value:{kind:"Variable",name:{kind:"Name",value:"quantity"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"categoryId"},value:{kind:"Variable",name:{kind:"Name",value:"categoryId"}}},{kind:"Argument",name:{kind:"Name",value:"originalCategoryId"},value:{kind:"Variable",name:{kind:"Name",value:"originalCategoryId"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"masterFilters"},value:{kind:"Variable",name:{kind:"Name",value:"masterFilters"}}},{kind:"Argument",name:{kind:"Name",value:"extraFilters"},value:{kind:"Variable",name:{kind:"Name",value:"extraFilters"}}},{kind:"Argument",name:{kind:"Name",value:"noSearch"},value:{kind:"Variable",name:{kind:"Name",value:"noSearch"}}},{kind:"Argument",name:{kind:"Name",value:"noVariants"},value:{kind:"Variable",name:{kind:"Name",value:"noVariants"}}},{kind:"Argument",name:{kind:"Name",value:"noFacets"},value:{kind:"Variable",name:{kind:"Name",value:"noFacets"}}},{kind:"Argument",name:{kind:"Name",value:"variantsWithoutFamily"},value:{kind:"Variable",name:{kind:"Name",value:"variantsWithoutFamily"}}},{kind:"Argument",name:{kind:"Name",value:"sid"},value:{kind:"Variable",name:{kind:"Name",value:"sid"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"masters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"masterValuesObject"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"catalogCategoryData"},arguments:[{kind:"Argument",name:{kind:"Name",value:"apiLang"},value:{kind:"Variable",name:{kind:"Name",value:"catalogLocale"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"cacheNullOn404"},value:{kind:"Variable",name:{kind:"Name",value:"variantsWithoutFamily"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"Slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"CategoryName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"CategoryRole"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"CategoryDisplayNamePath"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"MarketingClaim"},name:{kind:"Name",value:"getTextListValue"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"KAT_POS",block:!1}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeClaim"}}}]}]},{kind:"Field",alias:{kind:"Name",value:"imageUrl"},name:{kind:"Name",value:"getMediaUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"outputType"},value:{kind:"StringValue",value:"PP",block:!1}},{kind:"Argument",name:{kind:"Name",value:"nameConvention"},value:{kind:"StringValue",value:"P_G_F, P_G_U",block:!1}}],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"masterProductData"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"variantsWithoutFamily"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"catalogProductData"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"apiLang"},value:{kind:"Variable",name:{kind:"Name",value:"catalogLocale"}}},{kind:"Argument",name:{kind:"Name",value:"cacheNullOn404"},value:{kind:"Variable",name:{kind:"Name",value:"variantsWithoutFamily"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ProductId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ProductName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Attributes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"AttributeKey"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"AttributeName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Unit"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"Slug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"imageUrl"},name:{kind:"Name",value:"getMediaUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"outputType"},value:{kind:"StringValue",value:"PP",block:!1}},{kind:"Argument",name:{kind:"Name",value:"nameConvention"},value:{kind:"StringValue",value:"P_P_F, P_P_U",block:!1}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"ProductPrice"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ProductPriceCurrency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"CategoryDisplayNamePath"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"idString"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"variantCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"totalHits"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"variants"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"skip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"noVariants"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"variantValuesObject"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ImageURL"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ID"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"score"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"totalHits"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"facets"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"skip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"noFacets"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"factFinderNgFacetFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"facetDataUnselected"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeUnselectedFacets"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"factFinderNgFacetFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"categoryFacetsUnselected"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"categoryFacets"},arguments:[{kind:"Argument",name:{kind:"Name",value:"catalogLocale"},value:{kind:"Variable",name:{kind:"Name",value:"catalogLocale"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"categoryFacets"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"text"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"catalogCategoryData"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"CategoryName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"CategoryRole"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"SortOrder"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"imageUrl"},name:{kind:"Name",value:"getMediaUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"outputType"},value:{kind:"StringValue",value:"PP",block:!1}},{kind:"Argument",name:{kind:"Name",value:"nameConvention"},value:{kind:"StringValue",value:"P_G_F",block:!1}}],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalHits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalFamilyHits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"query"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:3215}};T.loc.source={body:`#import "./factFinderNgFacetFragment.gql" query searchFactFinderNg( $factFinderChannel: FactFinderChannel! $baseSiteId: BaseSiteId! $catalogLocale: CatalogLocale! $language: String! $page: Int $quantity: Int $query: String $categoryId: String $originalCategoryId: String $filters: [FactFinderNgFacetElementInput] $masterFilters: [FactFinderNgFacetElementInput] $extraFilters: [FactFinderNgFacetElementInput] $includeUnselectedFacets: Boolean = true $noSearch: Boolean = false $noFacets: Boolean = false $noVariants: Boolean = false $variantsWithoutFamily: Boolean = false $includeClaim: Boolean = false $categoryFacets: Boolean = false $sid: String ) { searchFactFinderNg( factFinderChannel: $factFinderChannel baseSiteId: $baseSiteId language: $language page: $page quantity: $quantity query: $query categoryId: $categoryId originalCategoryId: $originalCategoryId filters: $filters masterFilters: $masterFilters extraFilters: $extraFilters noSearch: $noSearch noVariants: $noVariants noFacets: $noFacets variantsWithoutFamily: $variantsWithoutFamily sid: $sid ) { masters { hits { masterValuesObject { catalogCategoryData( apiLang: $catalogLocale baseSiteId: $baseSiteId cacheNullOn404: $variantsWithoutFamily ) { Slug CategoryName CategoryRole CategoryDisplayNamePath MarketingClaim: getTextListValue(key: "KAT_POS") @include(if: $includeClaim) imageUrl: getMediaUrl(outputType: "PP", nameConvention: "P_G_F, P_G_U") } masterProductData @include(if: $variantsWithoutFamily) { catalogProductData( baseSiteId: $baseSiteId apiLang: $catalogLocale cacheNullOn404: $variantsWithoutFamily ) { ProductId ProductName Attributes { AttributeKey AttributeName Value Unit } Slug imageUrl: getMediaUrl(outputType: "PP", nameConvention: "P_P_F, P_P_U") ProductPrice ProductPriceCurrency CategoryDisplayNamePath } } } idString variantCount score } totalHits } variants { hits @skip(if: $noVariants) { variantValuesObject { ImageURL Slug Name ID } score } totalHits } facets @skip(if: $noFacets) { ...factFinderNgFacetFragment } facetDataUnselected @include(if: $includeUnselectedFacets) { ...factFinderNgFacetFragment } categoryFacetsUnselected categoryFacets(catalogLocale: $catalogLocale, baseSiteId: $baseSiteId) @include(if: $categoryFacets) { text catalogCategoryData { CategoryName CategoryRole Slug SortOrder imageUrl: getMediaUrl(outputType: "PP", nameConvention: "P_G_F") } } totalHits totalFamilyHits query } } `,name:"GraphQL request",locationOffset:{line:1,column:1}};var K={};function Me(e){return e.filter(function(i){if(i.kind!=="FragmentDefinition")return!0;var t=i.name.value;return K[t]?!1:(K[t]=!0,!0)})}T.definitions=T.definitions.concat(Me(we.definitions));function O(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&i.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){O(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){O(n,i)}),e.definitions&&e.definitions.forEach(function(n){O(n,i)})}var H={};(function(){T.definitions.forEach(function(i){if(i.name){var t=new Set;O(i,t),H[i.name.value]=t}})})();function J(e,i){for(var t=0;t<e.definitions.length;t++){var n=e.definitions[t];if(n.name&&n.name.value==i)return n}}function Qe(e,i){var t={kind:e.kind,definitions:[J(e,i)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var n=H[i]||new Set,r=new Set,a=new Set;for(n.forEach(function(l){a.add(l)});a.size>0;){var d=a;a=new Set,d.forEach(function(l){if(!r.has(l)){r.add(l);var o=H[l]||new Set;o.forEach(function(v){a.add(v)})}})}return r.forEach(function(l){var o=J(e,l);o&&t.definitions.push(o)}),t}Qe(T,"searchFactFinderNg");var E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"searchFactFinderNgWebsite"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"factFinderChannel"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FactFinderChannel"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"language"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"page"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"quantity"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"FactFinderNgFacetElementInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"extraFilters"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"FactFinderNgFacetElementInput"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sid"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchFactFinderNgWebsite"},arguments:[{kind:"Argument",name:{kind:"Name",value:"factFinderChannel"},value:{kind:"Variable",name:{kind:"Name",value:"factFinderChannel"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"language"},value:{kind:"Variable",name:{kind:"Name",value:"language"}}},{kind:"Argument",name:{kind:"Name",value:"page"},value:{kind:"Variable",name:{kind:"Name",value:"page"}}},{kind:"Argument",name:{kind:"Name",value:"quantity"},value:{kind:"Variable",name:{kind:"Name",value:"quantity"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"extraFilters"},value:{kind:"Variable",name:{kind:"Name",value:"extraFilters"}}},{kind:"Argument",name:{kind:"Name",value:"noFacets"},value:{kind:"BooleanValue",value:!0}},{kind:"Argument",name:{kind:"Name",value:"noMasters"},value:{kind:"BooleanValue",value:!0}},{kind:"Argument",name:{kind:"Name",value:"sid"},value:{kind:"Variable",name:{kind:"Name",value:"sid"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"variants"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hits"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"variantValuesObject"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"CategoryPathName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Texts"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ImageURL"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"Name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ID"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalHits"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"query"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:794}};E.loc.source={body:`query searchFactFinderNgWebsite( $factFinderChannel: FactFinderChannel! $baseSiteId: BaseSiteId! $language: String! $page: Int $quantity: Int $query: String $filters: [FactFinderNgFacetElementInput] $extraFilters: [FactFinderNgFacetElementInput] $sid: String ) { searchFactFinderNgWebsite( factFinderChannel: $factFinderChannel baseSiteId: $baseSiteId language: $language page: $page quantity: $quantity query: $query filters: $filters extraFilters: $extraFilters noFacets: true noMasters: true sid: $sid ) { variants { hits { variantValuesObject { CategoryPathName Texts ImageURL Slug Name ID } } } totalHits query } } `,name:"GraphQL request",locationOffset:{line:1,column:1}};function B(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var t=e.type;t.kind==="NamedType"&&i.add(t.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(n){B(n,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(n){B(n,i)}),e.definitions&&e.definitions.forEach(function(n){B(n,i)})}var M={};(function(){E.definitions.forEach(function(i){if(i.name){var t=new Set;B(i,t),M[i.name.value]=t}})})();function X(e,i){for(var t=0;t<e.definitions.length;t++){var n=e.definitions[t];if(n.name&&n.name.value==i)return n}}function ze(e,i){var t={kind:e.kind,definitions:[X(e,i)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var n=M[i]||new Set,r=new Set,a=new Set;for(n.forEach(function(l){a.add(l)});a.size>0;){var d=a;a=new Set,d.forEach(function(l){if(!r.has(l)){r.add(l);var o=M[l]||new Set;o.forEach(function(v){a.add(v)})}})}return r.forEach(function(l){var o=X(e,l);o&&t.definitions.push(o)}),t}ze(E,"searchFactFinderNgWebsite");const Ge={key:2,class:"category-item-fi__icon"},Ke=ae({__name:"CategoryItemFi",props:{category:{},filterUrlParams:{}},emits:["toggle"],setup(e,{emit:i}){const t=ie(),n=te(),{sendClickToEventHub:r}=de(),a=n.app.isFite(),d=e,l=i,o=ne(()=>!d.category.enabled||a?void 0:`${n.pages.products().url}${d.category.Slug}${d.filterUrlParams}`),v=u=>{if(!d.category.enabled||u.detail===2)return;if(a){u.preventDefault(),l("toggle",!d.category.selected);return}if(!o.value){console.error("missing category slug");return}const g=t.getters["navigation/productBreadcrumb"].map(W=>W.title);g.unshift("[category]:"),g.push(d.category.name);const p=g.join("/");r({clickSource:"category",familyId:d.category.id,pageTitle:d.category.name,query:p,url:window.location.href},u,o.value)};return(u,m)=>(s(),S(z(F(a)?"radio":"a"),{id:F(a)?`category_${u.category.id}`:null,href:o.value,class:P({"category-item-fi":!0,"category-item-fi--disabled":!u.category.enabled,"category-item-fi--fite":F(a),"category-item-fi--selected":u.category.selected}),checked:F(a)&&u.category.enabled,"data-test":"search-result-category",onClickCapture:oe(v,["stop"])},{default:b(()=>[F(a)?(s(),S(F(re),{key:0,class:"category-item-fi__img",src:u.category.imageUrl,breakpoints:[{mediaWidth:1024,imageWidth:422}],unlimited:353,"aspect-ratio":16/9},null,8,["src"])):h("",!0),(s(),S(z(F(a)?"label":"span"),{for:F(a)?`category_${u.category.id}`:null,class:P(["category-item-fi__category",{"category-item-fi__category--selected":u.category.selected,"category-item-fi__category--disabled":!u.category.enabled}]),"data-test":"search-result-category-name"},{default:b(()=>[R(f(u.category.name),1)]),_:1},8,["for","class"])),F(a)?(s(),S(F(ce),{key:1,icon:u.category.selected?"radio-btn-on":"radio-btn-off",class:P({"category-item-fi__checkbox":!0,"category-item-fi__checkbox--selected":u.category.selected,"category-item-fi__checkbox--disabled":!u.category.enabled})},null,8,["icon","class"])):(s(),c("div",Ge,[y(F(se))]))]),_:1},40,["id","href","class","checked"]))}}),Y=U(Ke,[["__scopeId","data-v-69d792bb"]]),Je={class:"fact-finder-categories__label"},Xe={key:0,class:"md:fi-hidden"},Ye=ae({__name:"FactFinderCategories",props:{categories:{default:()=>[]},filterUrlParams:{default:""}},emits:["toggle"],setup(e){const i=ie(),{isLG:t}=ue(),r=te().app.isFite(),a=x(!1),d=x(!1),l=x(null);me(()=>{d.value=!0});const o=ne(()=>i.getters["layout/getWindowDimensions"]),v=()=>{if(!l.value)return;let u=0;l.value.$el.querySelectorAll(".fact-finder-categories__item").forEach(m=>{u+=m.offsetWidth}),a.value=!t.value&&u>l.value.$el.offsetWidth};return ge(o,()=>v,{deep:!0,immediate:!0}),(u,m)=>(s(),c("div",{class:P({"fact-finder-categories":!0,"fact-finder-categories--is-slider":a.value})},[k("div",Je,f(u.$dict.get("product-List.Facets.Categories.Label")),1),d.value?(s(),c("div",Xe,[y(F(he),{options:{drag:"free",snap:!0,padding:"18px",arrows:!1,autoWidth:!0}},{default:b(()=>[(s(!0),c(C,null,A(u.categories,g=>(s(),S(F(fe),{key:g.id,ref_for:!0,ref_key:"categorySlider",ref:l,class:P({"fact-finder-categories__slide":!0,"fact-finder-categories__slide--fite":F(r)})},{default:b(()=>[y(Y,{category:g,"filter-url-params":u.filterUrlParams,onToggle:p=>u.$emit("toggle",g,p)},null,8,["category","filter-url-params","onToggle"])]),_:2},1032,["class"]))),128))]),_:1})])):h("",!0),k("div",{class:P({"fact-finder-categories__flex":!0,"fact-finder-categories__flex--ssr":!d.value,"fact-finder-categories__flex--fite":F(r)})},[(s(!0),c(C,null,A(u.categories,g=>(s(),S(Y,{key:g.id,category:g,"filter-url-params":u.filterUrlParams,onToggle:p=>u.$emit("toggle",g,p)},null,8,["category","filter-url-params","onToggle"]))),128))],2)],2))}}),Ze=U(Ye,[["__scopeId","data-v-7ce2c878"]]),ea=e=>e.replace(/^[^<]+</,i=>{const t=/ [^ ]{0,15}.{15}$/.exec(i);return t?`...${t[0]}`:i}),j=e=>(e||"").replace(/[<>&]/g,i=>`&#${i.charCodeAt(0)};`),aa={name:"FactFinderItem",components:{ArrowIcon:se,IconAttributeItemFi:We,SsrCloudImageFi:re},mixins:[je,xe,He,le],inject:["getSearchData"],props:{record:{type:Object,required:!0},bestPrice:{type:Object,default:null},filterUrl:{type:String,default:""},showDescription:{type:Boolean,default:!1},type:{type:String,required:!0},recordIdx:{type:Number,required:!0}},setup(){return{breakpoints:[{mediaWidth:369,imageWidth:285},{mediaWidth:479,imageWidth:395},{mediaWidth:767,imageWidth:318}]}},computed:{variant(){var i,t,n;if((t=(i=this.record.masterValuesObject)==null?void 0:i.masterProductData)!=null&&t.catalogProductData){const{ProductId:r,ProductName:a,Slug:d,imageUrl:l,ProductPrice:o,ProductPriceCurrency:v,Attributes:u}=this.record.masterValuesObject.masterProductData.catalogProductData,{bestPrice:m}=this.record.masterValuesObject.masterProductData;return{ID:r,Name:a,ImageURL:l,Slug:d,bestPrice:m,ProductPrice:o,ProductPriceCurrency:v,Attributes:u}}const e=(n=this.record.variantValuesObject)==null?void 0:n[0];return e||(this.type!=="family"&&console.error("record missing variant",this.record,this.type),{})},imageUrl(){var e;return this.isFamily&&(e=this.record.masterValuesObject.catalogCategoryData)!=null&&e.imageUrl?this.record.masterValuesObject.catalogCategoryData.imageUrl:this.isProduct?this.variant.ImageURL:null},href(){const e=[];return(this.isFamily||this.isProduct)&&e.push(this.$fischer.pages.products().url),this.isFamily?e.push(this.record.masterValuesObject.catalogCategoryData.Slug,this.filterUrl):e.push(this.variant.Slug),e.join("")},highlightText(){const e=this.markText(this.record.variantValuesObject[0].Texts);return ea(e)},itemName(){var e;return this.isFamily?((e=this.record.masterValuesObject.catalogCategoryData)==null?void 0:e.CategoryName)||this.record.masterValuesObject.catalogProductData&&this.record.masterValuesObject.masterProductData.catalogProductData.CategoryName:this.record.Name||this.variant.Name||""},highlightName(){return this.isPage?this.markText(this.itemName):j(this.itemName)},isProduct(){var e,i;return this.type==="product"||!!((i=(e=this.record.masterValuesObject)==null?void 0:e.masterProductData)!=null&&i.catalogProductData)},isFamily(){return this.type==="family"&&!this.isProduct},isPage(){return this.type==="page"},uvpPricePrefix(){return this.$dict.get("online-Shop.Product.UVP-Price-Prefix")}},methods:{onClick(e){const{pageSize:i,clickSource:t,query:n,attachBreadcrumb:r}=this.getSearchData();let a;if(r){const l=this.$store.getters["navigation/productBreadcrumb"].map(o=>o.title);l.unshift(n),l.push(this.itemName),a=l.join("/")}else a=n;this.sendClickToEventHub({clickSource:t,familyId:this.isFamily?this.record.idString:void 0,page:Math.floor(i/this.recordIdx),pageSize:i,pageTitle:this.itemName,position:this.recordIdx+1,productId:this.isProduct?this.variant.ID:void 0,productTitle:this.isProduct?this.itemName:null,query:a,score:this.record.score},e,this.href)},markText(e=""){const i=j(e),t=this.$store.getters["search/getQuery"],n=j(t).split(" ").filter(l=>l.length>2);if(!n.length)return i;const r=n.map(l=>l.replace(/[\[\\^$.|?*+()]/g,([o])=>`\\${o}`)),a=new RegExp(r.join("|"),"gi");return i.replace(a,l=>`<mark>${l}</mark>`)}}},ia=["href"],ta={key:0,class:"fact-finder-item__savings"},na=["innerHTML"],ra={key:2,class:"fact-finder-item__article-nr","data-test":"article-number"},sa={key:0,class:"fact-finder-item__description"},la=["cat-id"],da={key:4,class:"fact-finder-item__product-info"},ca={key:1,class:"fact-finder-item__uvp-price"},oa={class:"fact-finder-item__uvp-price-value"},ua={class:"fact-finder-item__uvp-price-vat"},ma={key:0,class:"fact-finder-item__best-price"},ga={key:0,class:"fact-finder-item__stroke-price"},fa={class:"fact-finder-item__best-price-value"},ha={class:"fact-finder-item__best-price-vat"},va={key:5,class:"fact-finder-item__page"},ka=["innerHTML"],ya={key:0,class:"fact-finder-item__path"};function Fa(e,i,t,n,r,a){var v,u,m;const d=N("ssr-cloud-image-fi"),l=N("icon-attribute-item-fi"),o=N("arrow-icon");return s(),c("div",{class:P({"fact-finder-item":!0,"fact-finder-item--fite":e.isFite})},[k("a",{class:"fact-finder-item__tile","data-test":"search-result-item",href:a.href,onClick:i[0]||(i[0]=(...g)=>a.onClick&&a.onClick(...g))},[(u=(v=t.bestPrice)==null?void 0:v.price)!=null&&u.savingsInformation?(s(),c("div",ta,f(e.$dict.get("online-Shop.Product.Savings",[t.bestPrice.price.savingsInformation.savingsInPercent])),1)):h("",!0),a.imageUrl?(s(),S(d,{key:1,src:a.imageUrl,"aspect-ratio":1,unlimited:248,breakpoints:n.breakpoints,alt:a.itemName,class:"fact-finder-item__image",params:"func=fit",trim:"","do-not-replace-url":""},null,8,["src","breakpoints","alt"])):h("",!0),k("div",{class:"fact-finder-item__name","data-test":"search-result-item-name",innerHTML:a.highlightName},null,8,na),a.isProduct?(s(),c("div",ra,f(e.$dict.get("product-List.Table.Article-Number"))+" "+f(a.variant.ID),1)):h("",!0),a.isFamily?(s(),c("div",{key:3,class:P({"fact-finder-item__family":!0,"fact-finder-item__family--has-description":t.showDescription})},[t.showDescription?(s(),c("div",sa,f(t.record.masterValuesObject.catalogCategoryData.MarketingClaim),1)):h("",!0),t.record.variantCount?(s(),c("div",{key:1,"cat-id":a.variant.CategoryPathId,class:"fact-finder-item__family-variants","data-test":"search-result-item-variants-count"},f(e.$dict.get(t.record.variantCount===1?"search.Variants-Singular":"search.Variants-Plural",[t.record.variantCount])),9,la)):h("",!0)],2)):a.isProduct?(s(),c("div",da,[e.isFite?(s(),c(C,{key:0},[e.attributeValue(a.variant.Attributes,"ALTER_AB")?(s(),S(l,{key:0,class:"fact-finder-item__recommended-age",icon:"age",size:1,value:e.attributeValue(a.variant.Attributes,"ALTER_AB"),label:e.attributeName(a.variant.Attributes,"ALTER_AB")},null,8,["value","label"])):h("",!0),a.variant.ProductPrice?(s(),c("div",ca,[k("div",oa,[a.uvpPricePrefix?(s(),c(C,{key:0},[R(f(`${a.uvpPricePrefix} ${e.formatPrice(a.variant.ProductPrice,a.variant.ProductPriceCurrency)}`),1)],64)):(s(),c(C,{key:1},[R(f(e.formatPrice(a.variant.ProductPrice,a.variant.ProductPriceCurrency)),1)],64))]),k("div",ua,f(e.$dict.get("online-Shop.Product.Vat-included")),1)])):h("",!0)],64)):(s(),c(C,{key:1},[t.bestPrice?(s(),c("div",ma,[k("div",null,[t.bestPrice.price.savingsInformation?(s(),c("span",ga,f(t.bestPrice.price.savingsInformation.totalStrokePriceValueFormatted),1)):h("",!0),k("span",fa,f(t.bestPrice.price.valueFormatted),1)]),k("div",ha,f(e.$dict.get("online-Shop.Product.Vat-excluded")),1)])):h("",!0)],64))])):a.isPage?(s(),c("div",va,[k("div",{class:"fact-finder-item__texts",innerHTML:a.highlightText},null,8,ka),(m=t.record.variantValuesObject[0].CategoryPathName)!=null&&m[0]?(s(),c("div",ya,f(e.$dict.get("search.Found-In",[t.record.variantValuesObject[0].CategoryPathName[0].join(" | ")])),1)):h("",!0),y(o,{class:"fact-finder-item__arrow"})])):h("",!0)],8,ia)],2)}const Na=U(aa,[["render",Fa],["__scopeId","data-v-d46ecb0e"]]),pa=ye(()=>Fe(()=>import("./NoProductsFoundFi-CSQbFpZO.js"),__vite__mapDeps([0,1,2]))),ba={name:"FactFinderNoResultsFi",components:{NoProductsFoundFi:pa,RichtextFi:ve,TextInputFi:ke},props:{fields:{type:Object,required:!0},query:{type:String,required:!0},noFilters:{type:Boolean},showResultSuggestion:{type:Boolean},isCategory:Boolean},emits:["new-search"],data(){return{search:""}},methods:{newSearch(){this.$emit("new-search",this.search)}}},_a={key:0,class:"fi-mt-48"},Sa={key:1,class:"fact-finder-no-results-fi"};function Pa(e,i,t,n,r,a){const d=N("no-products-found-fi"),l=N("text-input-fi"),o=N("richtext-fi");return t.isCategory?(s(),c("div",_a,[y(d)])):(s(),c("div",Sa,[t.noFilters?(s(),c("div",{key:0,class:P(["fact-finder-no-results-fi__search",{"fact-finder-no-results-fi__search-full":t.showResultSuggestion}])},[y(l,{modelValue:r.search,"onUpdate:modelValue":i[0]||(i[0]=v=>r.search=v),modelModifiers:{trim:!0},placeholder:e.$dict.get("search.No-Results.Placeholder"),icon:"search",class:"fact-finder-no-results-fi__input",onKeyupEnter:a.newSearch,onIconClicked:a.newSearch},null,8,["modelValue","placeholder","onKeyupEnter","onIconClicked"])],2)):h("",!0),t.showResultSuggestion?h("",!0):(s(),c("div",{key:1,class:P({"fact-finder-no-results-fi__content":!0,"fact-finder-no-results-fi__content--no-filters":t.noFilters})},[y(o,{class:"fact-finder-no-results-fi__suggestions","html-content":t.fields.noResultsSuggestions},null,8,["html-content"])],2))]))}const Va=U(ba,[["render",Pa],["__scopeId","data-v-34738f43"]]);function Z(){return this.isWebsiteSearch?E:T}function ee(e){return this.isWebsiteSearch?e.searchFactFinderNgWebsite:e.searchFactFinderNg}const Ca={name:"SearchFactFinderFi",components:{FacetsMenuFi:Te,FactFinderCategories:Ze,FactFinderFacetFi:Le,FactFinderItemFi:Na,FactFinderNoResultsFi:Va,GridContainerFi:Ne,InfiniteLoading:Ue,LoadingIndicator:pe,PaginationProgressBar:De},mixins:[be,$e,Oe,Ee,le,_e],provide(){return{getSearchData:()=>({query:this.queryPrefix?this.queryPrefix:this.searchFactFinderNg.query,pageSize:this.pageSize,attachBreadcrumb:this.attachBreadcrumb,clickSource:this.clickSource})}},props:{fields:{type:Object,default:()=>({})},categoryPathIdRoot:{type:String,default:null},clickSource:{type:String,required:!0},queryPrefix:{type:String,default:null},isSearchPage:{type:Boolean,default:!1},isWebsiteSearch:{type:Boolean},isActive:Boolean,attachBreadcrumb:Boolean},emits:["total-hits"],data(){return{searchFactFinderNg:{masters:null,variants:null,facets:null,facetDataUnselected:null,query:"",totalHits:null,initializing:!0},searchFactFinderNgBaseFacets:{facets:null},filters:[],page:0,pageSize:15,loadMorePage:0,categoryOverride:null}},computed:{...Se({suggestionsQuery:"search/suggestionsQuery"}),showNoQueryHint(){return this.isSearchPage&&this.trimmedQuery===""},isSuggestionsOpen(){return this.$store.getters["navigation/getShowSearchSuggest"]||this.$store.getters["search/getQueryTrimmed"]!==this.$store.getters["search/suggestionsQuery"]},termToTrack(){var e;return!this.isSearchPage||!this.isActive?null:((e=this.searchFactFinderNg)==null?void 0:e.query)||null},productIds(){var i,t;const e=[];return!this.isWebsiteSearch&&((t=(i=this.searchFactFinderNg)==null?void 0:i.variants)!=null&&t.hits)&&this.searchFactFinderNg.variants.hits.forEach(n=>{var a;const r=(a=n.variantValuesObject)==null?void 0:a[0].ID;r&&e.push(r)}),e},includeClaim(){var e;return!!((e=this.fields.showProductDescription)!=null&&e.value)},isShop(){return this.$fischer.shop.isClosedShop()||this.$fischer.shop.isOnlineShop()},variantHits(){var e;return(e=this.searchFactFinderNg.variants)!=null&&e.hits?this.searchFactFinderNg.variants.hits:[]},typeFilter(){return this.isWebsiteSearch?"page":"product"},trimmedQuery(){return this.isSearchPage?this.query.trim()||"":this.query.trim()||"*"},noFilters(){return this.filters.length===0},totalItems(){var e,i,t;return this.isCategory?(i=(e=this.searchFactFinderNg)==null?void 0:e.masters)==null?void 0:i.totalHits:((t=this.searchFactFinderNg)==null?void 0:t.totalHits)||0},infiniteLoadingAvailable(){return this.totalItems&&this.displayedItems<this.totalItems&&!this.previousPageUrlParam},placeholders(){if(!this.infiniteLoadingAvailable)return[];let e=this.totalItems-this.displayedItems;return e=Math.max(0,e),e=Math.min(250,e),Array.from("x".repeat(e))},query(){return this.categoryPathIdRoot?"":this.$store.getters["search/getQuery"]},categories(){var t,n,r,a,d,l,o,v,u;if(!this.isCategory)return[];const e=(n=(t=this.searchFactFinderNgBaseFacets)==null?void 0:t.categoryFacets)==null?void 0:n.filter(m=>{var g;return((g=m.catalogCategoryData)==null?void 0:g.CategoryRole)==="INTERMEDIATE"}).sort((m,g)=>m.catalogCategoryData.SortOrder-g.catalogCategoryData.SortOrder);if(!e)return[];let i=(r=this.searchFactFinderNg.categoryFacets)==null?void 0:r.map(m=>m.text);if(!(i!=null&&i.length)){const m=(o=(l=(d=(a=this.searchFactFinderNg)==null?void 0:a.masters)==null?void 0:d.hits)==null?void 0:l[0])==null?void 0:o.masterValuesObject;let g;m!=null&&m.catalogCategoryData?g=m.catalogCategoryData.CategoryDisplayNamePath:g=(u=(v=m==null?void 0:m.masterProductData)==null?void 0:v.catalogProductData)==null?void 0:u.CategoryDisplayNamePath,g?i=e.filter(p=>g.includes(p.catalogCategoryData.CategoryName)).map(p=>p.text):(i=[],console.error("Could not find category id"))}return e.map(m=>{var p;const g=this.categoryOverride===m.text;return{id:m.text,name:m.catalogCategoryData.CategoryName,Slug:m.catalogCategoryData.Slug,imageUrl:m.catalogCategoryData.imageUrl,enabled:g||i.includes(m.text)||((p=this.searchFactFinderNg.categoryFacetsUnselected)==null?void 0:p.includes(m.text)),selected:g}})},facets(){var i;const e=qe(this.searchFactFinderNg.facetDataUnselected||[],this.searchFactFinderNg.facets||[],this.searchFactFinderNgBaseFacets.facets||[],this.autoFilters||this.filters);return(i=this.autoFilters)!=null&&i.length&&this.autoFilters.forEach(t=>{e.some(n=>n.associatedFieldName===t.associatedFieldName)||e.push({associatedFieldName:t.associatedFieldName,disabled:!1,hidden:!1,type:"TEXT",name:t.associatedFieldName,unit:"",elements:[{disabled:!1,associatedFieldName:t.associatedFieldName,text:t.fakeValue,name:t.name,selected:!0,selectedBool:!0,absoluteMaxValue:null,absoluteMinValue:null}]})}),e},menuFacets(){return this.facets.map(e=>({...e,elements:e.elements.map(i=>({...i,selected:i.selectedBool,name:i.text}))}))},filterUrlParams(){const e=this.query.trim();return e?`${this.filterUrlParamsNoQuery?`${this.filterUrlParamsNoQuery}&`:"?"}query=${encodeURIComponent(e)}`:this.filterUrlParamsNoQuery},filterUrlParamsNoQuery(){if(this.useAutoFilters)return"";const e=new URLSearchParams,i=this.$fischer.query("tab");i&&e.append("tab",i);const t=this.isWebsiteSearch?"filter":"websitefilter";Object.entries(this.$fischer.query()).forEach(([a,d])=>{a.startsWith(t)&&e.append(a,d)});const n=this.isWebsiteSearch?"websitefilter":"filter";this.filters.forEach(a=>{if(!a.associatedFieldName||a.associatedFieldName==="undefined"){console.error("filter has no associated field name",a);return}e.append(`${n}${a.associatedFieldName}`,Be(a))});const r=e.toString();return r.length===0?"":`?${r}`},graphQlVariables(){let e=[{associatedFieldName:"Type",name:this.typeFilter}];return this.isSearchPage||e.push({associatedFieldName:"Hidden_K",name:"!true"}),{baseSiteId:this.$fischer.baseSiteId(),brand:this.$fischer.brandId(),language:this.$fischer.catalogLocale(),filters:(this.autoFilters||this.filters).map(Re),quantity:this.isCategory?1e5:this.pageSize,query:this.trimmedQuery,navigation:!!this.categoryPathIdRoot,extraFilters:e,categoryId:this.categoryPathIdRoot,catalogLocale:this.$fischer.catalogLocale(),factFinderChannel:this.$fischer.factFinderChannel(),categoryFacets:this.isCategory}},previousPageUrlParam(){const e=this.$fischer.query("page");if(!e)return null;const i=Number(e);if(this.page!==i)return null;const t=i-1;return t?t===1?this.$fischer.uri():`?page=${t}`:null},displayedItems(){var e;return Math.min(this.page*this.pageSize,(e=this.searchFactFinderNg)==null?void 0:e.totalHits)},pagingPercentage(){return 100*this.displayedItems/this.totalItems},familiesCount(){var e;return((e=this.searchFactFinderNg)==null?void 0:e.totalFamilyHits)||null},productsCount(){var e,i;return((i=(e=this.searchFactFinderNg)==null?void 0:e.variants)==null?void 0:i.totalHits)||null},isCategory(){return!!this.$fischer.isCategoryPage()},variantsWithoutFamily(){var e;return!!((e=this.fields.variantsWithoutFamily)!=null&&e.value)},skipSearch(){return this.isSearchPage?this.isSuggestionsOpen||this.showNoQueryHint||this.trimmedQuery==="*":!1}},watch:{query(){this.changeFacet()},"searchFactFinderNg.totalHits":function(i){i!==void 0&&this.$emit("total-hits",i)},termToTrack(e){e&&this.lastTracked!==e&&(this.lastTracked=e,this.sendEvent("search",{searchTerm:e,searchContext:this.isWebsiteSearch?"website":"product"}))}},created(){this.parseUrlParams()},apollo:{searchFactFinderNg:{query:Z,variables(){this.parseUrlParams();const e=this.isWebsiteSearch||this.categoryPathIdRoot||!this.isFite?void 0:[{associatedFieldName:"HasFamily",name:"true"}];return{...this.graphQlVariables,categoryId:this.categoryOverride||this.graphQlVariables.categoryId,masterFilters:e,page:this.pageNonResponsive,noVariants:!!this.categoryPathIdRoot,variantsWithoutFamily:this.variantsWithoutFamily,noFacets:this.pageNonResponsive>1,includeClaim:this.includeClaim,originalCategoryId:this.graphQlVariables.categoryId,sid:this.isCategory?void 0:Pe()}},result({data:e}){var i,t,n;if(this.fetchingMore){const r=this.fetchingMore;this.fetchingMore=!1,setTimeout(r,1e3);return}if(this.$fischer.query("page")||(this.page=1,this.pageNonResponsive=1,(i=this.$refs.infiniteLoadingProducts)!=null&&i.stateChanger&&this.$refs.infiniteLoadingProducts.stateChanger.reset()),(n=(t=e==null?void 0:e.searchFactFinderNg)==null?void 0:t.masters)!=null&&n.hits){const r=e.searchFactFinderNg.masters.hits.map(a=>{var d,l,o;return((d=a.masterValuesObject)==null?void 0:d.catalogCategoryData)||((o=(l=a.masterValuesObject)==null?void 0:l.masterProductData)==null?void 0:o.catalogProductData)});this.trackViewItemList(r)}},update:ee,skip(){return this.skipSearch}},searchFactFinderNgBaseFacets:{query:Z,variables(){return{...this.graphQlVariables,filters:[],query:this.trimmedQuery,includeResults:!1,noSearch:!0,variantsWithoutFamily:this.variantsWithoutFamily,includeUnselectedFacets:!1,accessToken:null}},update:ee,skip(){return this.isWebsiteSearch||this.skipSearch}}},methods:{onToggleCategory(e,i){this.categoryOverride=i?e.id:null},onToggleOpen(e,i,t){i(t)},getBestPrice(e){var n;if(!this.isShop)return null;const i=((n=e==null?void 0:e.variantValuesObject)==null?void 0:n[0])&&e.variantValuesObject[0].ID,t=this.bestPrices[i];return t!==void 0?t:{price:{loading:!0}}},cleanName(e){return Ve(e)},parseUrlParams(){if(this.haveParsedUrlParams)return;this.haveParsedUrlParams=!0;const i=this.isWebsiteSearch===(this.$fischer.query("tab")==="website")?this.getPageParam():1,t=Ae.map(d=>d.toLowerCase()),n=[],r=this.$fischer.query(),a=this.isWebsiteSearch?/^websitefilter(.*)/:/^filter(.*)/;if(Object.keys(r).forEach(d=>{const l=a.exec(d);if(!l)return;const[,o]=l,v=o.toLowerCase();if(!(!o||t.includes(v))){if(/[^~]~~[^~]/.test(o)){const u=/^([0-9.]+)-([0-9.]+)/.exec(r[d]);if(u){n.push({element:{associatedFieldName:o,selectedMinValue:u[1],selectedMaxValue:u[2],selected:!0},value:!0});return}}n.push({element:{associatedFieldName:o,name:r[d],selected:!0},value:!0})}}),!this.categoryPathIdRoot){const d=this.$fischer.query("query");d&&d!==this.query&&(this.$store.dispatch("search/setQuery",{value:d,noShowSuggestions:!0}),this.$store.commit("search/SET_SEARCH_SUGGESTIONS",{suggestions:d,query:d}))}this.changeFacet(...n),this.page=i,this.pageNonResponsive=i},getPageParam(){const e=this.$fischer.query("page");return Number(e)||1},newSearch(e){this.clearAllFacets(),this.$store.dispatch("search/setQuery",e)},async fetchMore({complete:e,loaded:i}={}){var n,r,a,d;if(this.fetchingMore)return;if(this.page*this.pageSize>(((n=this.searchFactFinderNg)==null?void 0:n.totalHits)||0)){e&&e();return}this.fetchingMore=i||(()=>null),this.page+=1;const t=await this.$apollo.queries.searchFactFinderNg.fetchMore({variables:{page:this.page,includeUnselectedFacets:!1}});if((d=(a=(r=t==null?void 0:t.data)==null?void 0:r.searchFactFinderNg)==null?void 0:a.masters)!=null&&d.hits){const l=t.data.searchFactFinderNg.masters.hits.map(o=>o.masterValuesObject.catalogCategoryData).filter(o=>o);this.trackViewItemList(l)}},clearAllFacets(){this.enableAutoFilters(),this.filters=[],this.changeFacet()},changeFacet(...e){this.applyChanges(...e);{let i=this.filterUrlParams;const t=this.$fischer.query("page");t&&(i=i?`${i}&page=${encodeURIComponent(t)}`:`?page=${encodeURIComponent(t)}`);const n=[],r=this.$fischer.query(),a=["filter","query"];Object.entries(r).forEach(([d,l])=>{a.some(o=>d.startsWith(o))||n.push(`${d}=${encodeURIComponent(l)}`)}),n.length&&(this.filterUrlParams?i=`${this.filterUrlParams}&${n.join("&")}`:i=`?${n.join("&")}`),i!==String(window.location.search)&&(window.history.replaceState("","",i||"?"),this.page=1,this.pageNonResponsive=1)}},getPaginationString(e){return this.$dict.get(this.isSearchPage||this.variantsWithoutFamily?"product-List.Pagination.Show-Sum":"product-List.Pagination.Show-Families",e)},masterClicked(e){var i;(i=e==null?void 0:e.masterValuesObject)!=null&&i.catalogCategoryData&&this.trackSelectItem(e.masterValuesObject.catalogCategoryData)}}},Ia={key:0,class:"search-fact-finder-fi__results"},Da={key:0,class:"search-fact-finder-fi__results__filter search-fact-finder-fi__results__filter--categories"},Ta={key:1,class:"search-fact-finder-fi__results__filter search-fact-finder-fi__results__filter--facets"},wa={key:0,class:"facets-selection-fi__value"},qa={key:1,class:"facets-selection-fi__value"},Aa={class:"search-fact-finder-fi__query"},Ua={key:2,class:"fi-col-span-full"},La={class:"search-fact-finder-fi__item-wrapper"},$a={class:"search-fact-finder-fi__item-wrapper-inner"},Oa=["data-test-2","data-test-3"],Ba={key:0},Ra={key:1},Ea={key:2},Wa={class:"search-fact-finder-fi__items"},xa={class:"search-fact-finder-fi__spinner-tile"},ja={key:0,class:"search-fact-finder-fi__pagination"},Ha=["href"],Ma={key:0},Qa={key:1};function za(e,i,t,n,r,a){var Q;const d=N("fact-finder-categories"),l=N("fact-finder-facet-fi"),o=N("facets-menu-fi"),v=N("grid-container-fi"),u=N("fact-finder-no-results-fi"),m=N("loading-indicator"),g=N("fact-finder-item-fi"),p=N("infinite-loading"),W=N("pagination-progress-bar");return s(),c("div",{class:P({"search-fact-finder-fi":!0,"search-fact-finder-fi--website":t.isWebsiteSearch,"search-fact-finder-fi--fite":e.isFite})},[!r.searchFactFinderNg.initializing||a.skipSearch?(s(),c("div",Ia,[G(e.$slots,"heading",{searchFactFinderNg:r.searchFactFinderNg,skipSearch:a.skipSearch},void 0,!0),y(v,{container:!1,"container-sm":"",class:"search-fact-finder-fi__results__filter-container"},{default:b(()=>[!t.isSearchPage&&a.categories.length?(s(),c("div",Da,[y(d,{categories:a.categories,"filter-url-params":a.filterUrlParams,onToggle:a.onToggleCategory},null,8,["categories","filter-url-params","onToggle"])])):h("",!0),a.menuFacets.length&&!a.showNoQueryHint&&!a.skipSearch?(s(),c("div",Ta,[y(o,{facets:a.menuFacets,"allow-clear-all":!e.autoFilters,onChange:a.changeFacet,onClearAllFacets:a.clearAllFacets},{facets:b(({facet:V,open:I,change:L,close:$,toggleOpen:_,idx:D,registerDomElement:w})=>[y(l,{facet:V,open:I,idx:D,"register-dom-element":w,onChange:L,onToggleOpen:q=>a.onToggleOpen(q,_,V),onClose:q=>$(V)},null,8,["facet","open","idx","register-dom-element","onChange","onToggleOpen","onClose"])]),selection:b(({facet:V,element:I})=>[R(f(a.cleanName(V.name))+": ",1),V.type==="FLOAT"||V.type==="INTEGER"?(s(),c("span",wa,f(e.getLocalizedValue(I.selectedMinValue))+" ["+f(V.unit)+"] - "+f(e.getLocalizedValue(I.selectedMaxValue))+" ["+f(V.unit)+"] ",1)):(s(),c("span",qa,f(I.text),1))]),_:1},8,["facets","allow-clear-all","onChange","onClearAllFacets"])])):h("",!0)]),_:1}),y(v,{container:(((Q=r.searchFactFinderNg)==null?void 0:Q.totalHits)||0)===0||a.skipSearch},{default:b(()=>{var V,I,L,$;return[a.showNoQueryHint?(s(),c("div",{key:0,class:P(["search-fact-finder-fi__show-no-query-hint",{"search-fact-finder-fi__show-no-query-hint-no-filters":!a.noFilters}])},[y(v,null,{default:b(()=>[k("div",Aa,f(e.$dict.get("search.Fact-Finder.No-Search-Result.Heading")),1)]),_:1}),y(u,{query:r.searchFactFinderNg.query,fields:t.fields,"no-filters":a.noFilters,"show-result-suggestion":!0,"is-category":a.isCategory,onNewSearch:a.newSearch},null,8,["query","fields","no-filters","is-category","onNewSearch"])],2)):(((V=r.searchFactFinderNg)==null?void 0:V.totalHits)||0)===0||a.skipSearch?(s(),c("div",{key:1,class:P({"fi-col-start-1":!0,"fi-col-end-13":!0,"sm:fi-col-start-3":!0,"sm:fi-col-end-11":!0,"lg:fi-col-start-3":a.noFilters,"lg:fi-col-end-11":a.noFilters,"lg:fi-col-start-5":!a.noFilters,"lg:fi-col-end-9":!a.noFilters})},[y(u,{query:r.searchFactFinderNg.query,fields:t.fields,"no-filters":a.noFilters,"is-category":a.isCategory,onNewSearch:a.newSearch},null,8,["query","fields","no-filters","is-category","onNewSearch"])],2)):(s(),c("div",Ua,[k("div",La,[a.isCategory&&e.$apollo.loading?(s(),S(m,{key:0,variant:"spinnerLocal"})):h("",!0),k("div",$a,[k("div",{class:"search-fact-finder-fi__count","data-test":"fact-finder-count","data-test-2":a.familiesCount?a.familiesCount:null,"data-test-3":a.productsCount?a.productsCount:null},[a.familiesCount&&a.productsCount?(s(),c("span",Ba,f(e.$dict.get("search.Families-And-Variants-Count",[a.familiesCount,a.productsCount])),1)):a.familiesCount?(s(),c("span",Ra,f(e.$dict.get("search.Families-Count",[a.familiesCount])),1)):a.productsCount?(s(),c("span",Ea,f(e.$dict.get("search.Variants-Count",[a.productsCount])),1)):h("",!0)],8,Oa),k("div",Wa,[(s(!0),c(C,null,A((L=(I=r.searchFactFinderNg)==null?void 0:I.masters)!=null&&L.hits?r.searchFactFinderNg.masters.hits:[],(_,D)=>(s(),c(C,{key:_==null?void 0:_.idString},[_?(s(),S(g,{key:0,record:_,"record-idx":D,"filter-url":a.filterUrlParamsNoQuery,"show-description":a.includeClaim,type:"family",onClick:w=>a.masterClicked(_)},null,8,["record","record-idx","filter-url","show-description","onClick"])):h("",!0)],64))),128)),(s(!0),c(C,null,A(a.variantHits,(_,D)=>{var w,q;return s(),S(g,{key:_.variantValuesObject[0].ID,record:_,"record-idx":D+(((q=(w=r.searchFactFinderNg.masters)==null?void 0:w.hits)==null?void 0:q.length)||0),"best-price":a.getBestPrice(_),"filter-url":a.filterUrlParamsNoQuery,"show-description":a.includeClaim,type:t.isWebsiteSearch?"page":"product"},null,8,["record","record-idx","best-price","filter-url","show-description","type"])}),128)),a.isCategory?h("",!0):(s(),c(C,{key:0},[a.infiniteLoadingAvailable&&!e.IS_SSR?(s(),S(p,{key:0,ref:"infiniteLoading",class:"search-fact-finder-fi__spinner",onInfinite:a.fetchMore},{spinner:b(()=>[k("div",xa,[y(m,{variant:"spinnerLocal"})])]),"no-more":b(()=>i[0]||(i[0]=[k("span",null,null,-1)])),"no-results":b(()=>i[1]||(i[1]=[k("span",null,null,-1)])),error:b(()=>i[2]||(i[2]=[k("span",null,null,-1)])),_:1},8,["onInfinite"])):h("",!0),(s(!0),c(C,null,A(a.placeholders,(_,D)=>(s(),c("div",{key:D,class:"search-fact-finder-fi__spinner"},i[3]||(i[3]=[k("div",{class:"search-fact-finder-fi__spinner-tile"},null,-1)])))),128))],64))]),a.isCategory?h("",!0):(s(),c("div",ja,[a.previousPageUrlParam?Ce((s(),c("a",{key:0,href:a.previousPageUrlParam},f(e.$dict.get("search.Previous-Results")),9,Ha)),[[Ie,!1]]):h("",!0),($=r.searchFactFinderNg)!=null&&$.totalHits?(s(),S(W,{key:1,"pagination-page":r.page,"pagination-total":a.totalItems||0,"progressbar-value":a.pagingPercentage,"disabled-state":!!e.$apolloData.loading,"show-more-button":a.displayedItems<a.totalItems,"query-params":a.filterUrlParams,onLoadmore:a.fetchMore},{default:b(()=>[r.page*r.pageSize<=a.totalItems?(s(),c("span",Ma,f(a.getPaginationString([r.page*r.pageSize,a.totalItems])),1)):(s(),c("span",Qa,f(a.getPaginationString([a.totalItems,a.totalItems])),1))]),_:1},8,["pagination-page","pagination-total","progressbar-value","disabled-state","show-more-button","query-params","onLoadmore"])):h("",!0)]))])])]))]}),_:1},8,["container"])])):h("",!0),G(e.$slots,"withResults",{searchFactFinderNg:r.searchFactFinderNg},void 0,!0)],2)}const ri=U(Ca,[["render",za],["__scopeId","data-v-e5225aa0"]]);export{ri as S};