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,EAAAA,EAAAA,IAAY1B,EAAKQ,SAASC","sources":["webpack://cashstore-online/./src/gatsby/templates/page.tsx","webpack://cashstore-online/./src/kentico/components/page/data.ts","webpack://cashstore-online/./src/kentico/components/page/index.tsx"],"sourcesContent":["import {graphql} from 'gatsby'\nimport * as IO from 'io-ts'\nimport React from 'react'\nimport {KenticoGlobalScriptData} from '~/kentico/components/global-script'\nimport {KenticoPage, KenticoPageData} from '~/kentico/components/page'\nimport {CookieError} from '~/common/components/cookie-error'\nimport {GatsbyLayout} from '../components/layout'\nimport {useDecode} from '../util'\n\nconst Props = IO.type({\n data: IO.type({\n globalScripts: KenticoGlobalScriptData,\n page: KenticoPageData,\n }),\n})\n\n/** Query from template. */\nexport const query = graphql`\n query($id: String!) {\n page: kontentItemPage(id: {eq: $id}) {\n ...KenticoPage\n }\n ...KenticoGlobalScripts\n }\n`\n\nconst Page = (props: unknown) => {\n const {data} = useDecode(Props, props)\n return (\n <GatsbyLayout contentId={data.page.system.id}>\n <CookieError />\n <KenticoPage {...data} />\n </GatsbyLayout>\n )\n}\n\n/** Page. */\n// eslint-disable-next-line import/no-default-export\nexport default Page\n","import {graphql} from 'gatsby'\nimport * as IO from 'io-ts'\nimport {LinkedItems} from '../../util'\nimport {KenticoBodyItemData} from '../body-item'\nimport {KenticoPageLinkData} from '../page-link'\nimport {KenticoPageScriptData} from '../page-script'\nimport {KenticoSchemaData} from '../schema'\n\n/** Page. */\nexport const KenticoPageData = IO.intersection(\n [\n KenticoPageLinkData,\n IO.type({\n elements: IO.type({\n body: LinkedItems(KenticoBodyItemData),\n canonicalPage: LinkedItems(KenticoPageLinkData),\n description: IO.type({\n value: IO.string,\n }),\n robots: IO.type({\n value: IO.array(\n IO.type({\n codename: IO.string,\n }),\n ),\n }),\n schema: LinkedItems(KenticoSchemaData),\n scripts: LinkedItems(KenticoPageScriptData),\n title: IO.type({\n value: IO.string,\n }),\n }),\n system: IO.type({\n id: IO.string,\n }),\n }),\n ],\n 'KenticoPage',\n)\n\n/** Data type. */\nexport interface KenticoPageData extends IO.TypeOf<typeof KenticoPageData> {}\n\n/** Fragment helper. */\nexport const fragment = graphql`\n fragment KenticoPage on Node {\n ... on kontent_item_page {\n ...KenticoPageLink\n system {\n id\n }\n elements {\n body: body__body {\n nodes: value {\n ...KenticoBodyItem\n }\n }\n canonicalPage: metadata__canonical_page {\n nodes: value {\n ...KenticoPageLink\n }\n }\n description: metadata__description {\n value\n }\n robots: metadata__robots {\n value {\n codename\n }\n }\n scripts: metadata__scripts {\n nodes: value {\n ...KenticoPageScript\n }\n }\n title: metadata__title {\n value\n }\n schema: metadata__schema {\n nodes: value {\n ...KenticoSchema\n }\n }\n }\n }\n }\n`\n","import React from 'react'\nimport {GatsbySEO} from '~/gatsby/components/seo'\nimport {createReplace} from '../../renderer'\nimport {linkedItems} from '../../util'\nimport {KenticoBodyItem} from '../body-item'\nimport {KenticoGlobalScriptData} from '../global-script'\nimport {KenticoPageData} from './data'\n\ninterface Props {\n page: KenticoPageData\n globalScripts: KenticoGlobalScriptData\n}\n\n/** Kentico type data. */\nexport {KenticoPageData}\n\n/**\n * Render page from Kentico data.\n * @return React component\n */\nexport const KenticoPage = ({page, globalScripts}: Props) => (\n <>\n <GatsbySEO\n description={page.elements.description.value}\n globalScripts={globalScripts}\n page={page}\n pageScripts={page.elements.scripts}\n replace={createReplace}\n robots={page.elements.robots}\n schema={linkedItems(page.elements.schema)}\n title={page.elements.title.value}\n />\n <KenticoBodyItem data={linkedItems(page.elements.body)} />\n </>\n)\n"],"names":["Props","IO","data","globalScripts","KenticoGlobalScriptData","page","KenticoPageData","props","useDecode","contentId","system","id","KenticoPageLinkData","elements","body","LinkedItems","KenticoBodyItemData","canonicalPage","description","value","robots","codename","schema","KenticoSchemaData","scripts","KenticoPageScriptData","title","KenticoPage","pageScripts","replace","createReplace","linkedItems"],"sourceRoot":""}