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AA,CA5GiB,CAASoC,EAAAA,WA4Q7B,W","sources":["webpack://kvanum/./src/templates/storyblok-entry.js"],"sourcesContent":["import React, { lazy, useEffect, useState } from 'react';\nimport Components from 'src/components.js';\nimport Header from 'components/global/header';\n/* eslint-disable react/prefer-stateless-function */\nimport { graphql } from 'gatsby';\nimport Helmet from 'react-helmet';\n\nconst LazyFooter = lazy(() => import('components/global/footer'));\n\nconst DelayedComponent = ({ children, delay }) => {\n const [show, setShow] = useState(false);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setShow(true);\n }, delay);\n\n return () => clearTimeout(timer);\n }, [delay]);\n\n return show ? children : null;\n};\nclass StoryblokEntry extends React.Component {\n render() {\n const {\n story,\n header,\n footer,\n breadcrumb,\n showrooms,\n cookie,\n language,\n isFurnishingCategory,\n productRegex,\n search,\n general_config,\n ...rest\n } = this.props.pageContext;\n\n const cookieInformationLangCodes = {\n se: 'SV',\n dk: 'DA',\n en: 'EN',\n no: 'NB',\n };\n\n const { data } = this.props;\n const component = story.content.component;\n\n if (component === 'page_start' || component === 'page_scroll') {\n return (\n
\n \n
\n {React.createElement(Components(component), {\n key: story.content._uid,\n blok: story.content,\n name: story.name,\n tags: story.tag_list,\n full_slug: story.full_slug,\n footer,\n showrooms,\n generalConfig: general_config?.content,\n ...rest,\n })}\n
\n {component === 'page_start' && (\n \n \n \n )}\n \n \n \n
\n );\n }\n\n return (\n
\n \n
\n {React.createElement(Components(component), {\n key: story.content._uid,\n blok: component === 'furnishing' ? null : story.content, // Does not send blok if using custom GraphQL data\n name: story.name,\n tags: story.tag_list,\n full_slug: story.full_slug,\n data,\n showrooms:\n component === 'page_showrooms' ||\n component === 'product' ||\n component === 'page'\n ? showrooms\n : null,\n generalConfig: general_config?.content,\n ...rest,\n })}\n
\n \n \n \n \n \n \n
\n );\n }\n}\n\nexport const query = graphql`\n fragment Options on StoryblokEntry {\n options: field_options_array {\n media\n name\n price\n variant_id\n attributes {\n metall\n size\n type\n }\n }\n }\n query PageSpecificDataQueries(\n $isFurnishingProduct: Boolean = false\n $isFurnishingCategory: Boolean = false\n $originalPath: String\n $languageRegex: String\n $productRegex: String\n ) {\n furnishings: allStoryblokEntry(\n filter: {\n field_component: { eq: \"furnishing\" }\n full_slug: { regex: $productRegex }\n }\n sort: { order: DESC, fields: sort_by_date }\n ) @include(if: $isFurnishingCategory) {\n edges {\n node {\n name\n slug\n fullSlug: full_slug\n field_component\n sort_by_date\n shortDescription: field_short_description_string\n images: field_images_array {\n name\n src: filename\n }\n price: field_price_string\n thumbnail: field_thumbnail_object {\n name\n src: filename\n }\n field_color_string\n field_material_string\n field_brand_string\n ...Options\n }\n }\n }\n clonedFurnishings: allStoryblokEntry(\n filter: {\n field_component: { eq: \"furnishing\" }\n field_alternative_page_links_array: {\n elemMatch: { link: { cached_url: { regex: $productRegex } } }\n }\n }\n sort: { order: DESC, fields: sort_by_date }\n ) @include(if: $isFurnishingCategory) {\n edges {\n node {\n name\n slug\n fullSlug: full_slug\n field_component\n sort_by_date\n shortDescription: field_short_description_string\n images: field_images_array {\n name\n src: filename\n }\n price: field_price_string\n thumbnail: field_thumbnail_object {\n name\n src: filename\n }\n field_color_string\n field_material_string\n field_brand_string\n ...Options\n }\n }\n }\n allCategories: allStoryblokEntry(\n filter: { field_component: { eq: \"furnishing_category\" } }\n ) @include(if: $isFurnishingCategory) {\n edges {\n node {\n id\n name\n full_slug\n }\n }\n }\n product: storyblokEntry(full_slug: { regex: $originalPath })\n @include(if: $isFurnishingProduct) {\n name\n slug\n full_slug\n field_component\n images: field_images_array {\n name\n filename\n }\n price: field_price_string\n shortDescription: field_short_description_string\n full_slug\n thumbnail: field_thumbnail_object {\n name\n src: filename\n }\n field_address_string\n brand: field_brand_string\n delivery: field_delivery_string\n description: field_description_string\n specs: field_specs_array {\n title\n text\n }\n specsImage: field_specs_image_object {\n filename\n name\n }\n ...Options\n }\n relatedFurnishings: allStoryblokEntry(\n limit: 6\n filter: {\n field_component: { eq: \"furnishing\" }\n full_slug: { regex: $languageRegex }\n }\n ) @include(if: $isFurnishingProduct) {\n edges {\n node {\n name\n slug\n fullSlug: full_slug\n field_component\n shortDescription: field_short_description_string\n images: field_images_array {\n name\n src: filename\n }\n price: field_price_string\n thumbnail: field_thumbnail_object {\n name\n src: filename\n }\n ...Options\n }\n }\n }\n }\n`;\n\nexport default StoryblokEntry;\n"],"names":["LazyFooter","lazy","DelayedComponent","_ref","children","delay","show","setShow","useState","useEffect","timer","setTimeout","clearTimeout","StoryblokEntry","_React$Component","apply","arguments","_inheritsLoose","prototype","render","story","header","footer","breadcrumb","showrooms","cookie","language","isFurnishingCategory","productRegex","search","general_config","rest","this","props","pageContext","cookieInformationLangCodes","se","dk","en","no","data","component","content","___EmotionJSX","Header","blok","slug","full_slug","id","React","Components","key","_uid","name","tags","tag_list","generalConfig","Helmet","defer","src","type","crumbs"],"sourceRoot":""}