{"version":3,"sources":["webpack:///./src/components/SuitsFor.vue","webpack:///./src/components/SuitsFor.vue?60f1","webpack:///./src/composables/meta.ts","webpack:///./src/services/article.service.ts","webpack:///./src/components/SuitsFor.vue?9073","webpack:///./src/components/Breadcrumbs.vue","webpack:///./src/components/Breadcrumbs.vue?4658","webpack:///./src/composables/canonical.ts","webpack:///./src/components/ArticleCard.vue","webpack:///./src/components/ArticleCard.vue?fae9","webpack:///./src/components/Breadcrumbs.vue?d5da"],"names":["_hoisted_1","key","class","_hoisted_2","_hoisted_3","style","_defineComponent","__name","props","items","showHeader","type","Boolean","iconClasses","headerClasses","setup","__props","_ctx","_cache","_component_Popper","_resolveComponent","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_normalizeClass","_createCommentVNode","_renderList","suit","_createBlock","placement","arrow","id","hover","content","_withCtx","_toDisplayString","name","description","length","default","src","imageSrc","alt","_","__exports__","setMeta","title","document","metaDescription","querySelector","setAttribute","newMetaDescription","createElement","head","appendChild","useMeta","titleRef","ref","descriptionRef","onMounted","value","watchEffect","ArticleService","Api","constructor","apiConfig","super","this","getAllActive","bind","getAll","fetch","add","fetchById","get","then","result","data","articleSlug","dto","post","headers","articleApi","_component_router_link","_createVNode","to","_createTextVNode","filter","x","active","item","path","startsWith","setCanonical","href","address","canonical","metaCanonicalValue","useCanonical","hrefRef","dontUseCanonical","remove","removeCanonical","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","article","heightClass","rootStore","useRootStore","selectedCategory","computed","categories","find","categoryId","getClass","_unref2","_unref","urlSlug","params","slug","custom","navigate","onClick","files","srcset","modelName","isSold","priceDisplay"],"mappings":"4HAGA,MACMA,EAAa,CACjBC,IAAK,EACLC,MAAO,UAEHC,EAAa,CAAC,MAAO,OACrBC,EAAa,CAAEC,MAAO,CAAC,gBAAgB,eAMjBC,gCAAiB,CAC3CC,OAAQ,WACRC,MAAO,CACLC,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0BAAiB8E,EAAQrD,MAAMxB,MAAO,KAExB,IAAhCwF,gBAAOP,GAAkBtF,IACrBX,sBAAcC,6BAAoB,OAAQ2F,EAAa7E,0BAAiB8E,EAAQrD,MAAM2E,cAAe,IACtG9G,6BAAoB,IAAG,QAG9B,GAAI1B,MAET4C,EAAG,GACF,EAAG,CAAC,MAAK,CAAL,IC3GT,MAAMC,EAAc,EAEL,O,yDCLf","file":"js/Article~Articles.7a4fe694.js","sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-549d9aa5\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"col-12\"\n}\nconst _hoisted_2 = [\"src\", \"alt\"]\nconst _hoisted_3 = { style: {\"overflow-wrap\":\"break-word\"} }\n\n\r\n import { SuitsForItem } from '@/types/SuitsForItem';\r\n\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'SuitsFor',\n props: {\n items: null,\n showHeader: { type: Boolean },\n iconClasses: null,\n headerClasses: null\n },\n setup(__props: any) {\n\nconst props = __props as {\r\n items: SuitsForItem[],\r\n showHeader: boolean,\r\n iconClasses: string,\r\n headerClasses: string\r\n }\n\r\n \r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Popper = _resolveComponent(\"Popper\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (props.showHeader)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"h3\", {\n class: _normalizeClass([\"accent-4\", props.headerClasses])\n }, \"Lämpar sig för\", 2)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"suitable-for--icons\", props.iconClasses])\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(props.items, (suit) => {\n return (_openBlock(), _createBlock(_component_Popper, {\n placement: \"bottom\",\n arrow: \"true\",\n key: suit.id,\n hover: \"true\"\n }, {\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_3, _toDisplayString(suit.name) + \" \" + _toDisplayString((suit.description.length ? ' - ' + suit.description : '')), 1)\n ]),\n default: _withCtx(() => [\n _createElementVNode(\"img\", {\n src: `/images/${suit.imageSrc}`,\n alt: `Lämpar sig för: ${suit.name}`\n }, null, 8, _hoisted_2)\n ]),\n _: 2\n }, 1024))\n }), 128))\n ], 2)\n ], 64))\n}\n}\n\n})","import script from \"./SuitsFor.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SuitsFor.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./SuitsFor.vue?vue&type=style&index=0&id=549d9aa5&lang=scss&scoped=true\"\n\nimport exportComponent from \"C:\\\\dev\\\\priv\\\\NGHantverk.Store\\\\NGHantverk.Store.App\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-549d9aa5\"]])\n\nexport default __exports__","import { ref, onMounted, watchEffect } from 'vue';\r\n\r\nexport function setMeta(title: string, description: string) {\r\n document.title = `${title}${(title.length ? ' - ' : '')}NG Hantverk - Upplev äventyret med våra handgjorda och exklusiva knivar och fodral`;\r\n const metaDescription = document.querySelector('meta[name=\"description\"]');\r\n if (metaDescription) {\r\n metaDescription.setAttribute('content', description);\r\n } else {\r\n const newMetaDescription = document.createElement('meta');\r\n newMetaDescription.setAttribute('name', 'description');\r\n newMetaDescription.setAttribute('content', description);\r\n document.head.appendChild(newMetaDescription);\r\n }\r\n}\r\n\r\nexport function useMeta(title: string, description: string) {\r\n const titleRef = ref(title);\r\n const descriptionRef = ref(description);\r\n\r\n onMounted(() => {\r\n setMeta(titleRef.value, descriptionRef.value);\r\n });\r\n\r\n watchEffect(() => {\r\n setMeta(titleRef.value, descriptionRef.value);\r\n });\r\n\r\n return {\r\n title: titleRef,\r\n description: descriptionRef,\r\n };\r\n}","import { AxiosRequestConfig, AxiosResponse } from 'axios';\r\nimport { ArticleViewModel } from '../types/ArticleViewModel';\r\nimport { SaveArticle } from '@/types/SaveArticle';\r\n\r\nimport { Api } from '../utils/api/api';\r\nimport { apiConfig } from '../utils/constants';\r\n\r\nclass ArticleService extends Api {\r\n public constructor(apiConfig: AxiosRequestConfig) {\r\n super(apiConfig);\r\n\r\n this.getAllActive = this.getAllActive.bind(this);\r\n this.getAll = this.getAll.bind(this);\r\n this.fetch = this.fetch.bind(this);\r\n this.add = this.add.bind(this);\r\n this.fetchById = this.fetchById.bind(this);\r\n }\r\n\r\n public getAllActive(): Promise> {\r\n return this.get>(`article/get`)\r\n .then((result: AxiosResponse>) => {\r\n return result.data\r\n });\r\n }\r\n\r\n public getAll(): Promise> {\r\n return this.get>(`admin/article/get`)\r\n .then((result: AxiosResponse>) => {\r\n return result.data\r\n });\r\n }\r\n\r\n public fetch(articleSlug: string): Promise {\r\n return this.get(`article/get/${articleSlug}`)\r\n .then((result: AxiosResponse) => {\r\n return result.data;\r\n })\r\n }\r\n\r\n public fetchById(id: number): Promise {\r\n return this.get(`admin/article/get/${id}`)\r\n .then((result: AxiosResponse) => {\r\n return result.data;\r\n })\r\n }\r\n\r\n public add(dto: FormData): Promise {\r\n return this.post(`admin/article`, dto, {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data'\r\n }\r\n }).then((result: AxiosResponse) => {\r\n return result.data\r\n });\r\n }\r\n}\r\n\r\nexport const articleApi = new ArticleService(apiConfig);","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./SuitsFor.vue?vue&type=style&index=0&id=549d9aa5&lang=scss&scoped=true\"","import { defineComponent as _defineComponent } from 'vue'\nimport { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-04d21c6a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n \"aria-label\": \"breadcrumb\"\n}\nconst _hoisted_2 = { class: \"breadcrumb\" }\nconst _hoisted_3 = { class: \"breadcrumb-item\" }\n\nimport { ref } from 'vue';\r\n import { BreadcrumbItem } from '@/types/BreadcrumbItem';\r\n\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'Breadcrumbs',\n props: {\n items: null\n },\n setup(__props: any) {\n\nconst props = __props as {\r\n items: BreadcrumbItem[]\r\n }\n\r\n \r\n\r\n const items = ref(props.items || []);\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (items.value.length)\n ? (_openBlock(), _createElementBlock(\"nav\", _hoisted_1, [\n _createElementVNode(\"ol\", _hoisted_2, [\n _createElementVNode(\"li\", _hoisted_3, [\n _createVNode(_component_router_link, {\n to: \"/\",\n class: \"accent-3--link accent-3 text-decoration-none\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"Start\")\n ]),\n _: 1\n })\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(items.value.filter(x => !x.active), (item) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n class: \"breadcrumb-item\",\n key: item.path\n }, [\n _createVNode(_component_router_link, {\n to: { path: item.path.startsWith('/') ? item.path : '/' + item.path },\n class: \"accent-3--link accent-3 text-decoration-none\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(item.name), 1)\n ]),\n _: 2\n }, 1032, [\"to\"])\n ]))\n }), 128)),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(props.items.filter(x => x.active), (item) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n class: \"breadcrumb-item active\",\n \"aria-current\": \"page\",\n key: item.path\n }, _toDisplayString(item.name), 1))\n }), 128))\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./Breadcrumbs.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Breadcrumbs.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Breadcrumbs.vue?vue&type=style&index=0&id=04d21c6a&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\dev\\\\priv\\\\NGHantverk.Store\\\\NGHantverk.Store.App\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-04d21c6a\"]])\n\nexport default __exports__","import { ref, onMounted, watchEffect } from 'vue';\r\n\r\nexport function setCanonical(href: string) {\r\n const address = 'https://www.nghantverk.se' + (href.length > 0 ? `/${href}` : href);\r\n const canonical = document.querySelector('link[rel=\"canonical\"]');\r\n\r\n if (canonical) {\r\n canonical.setAttribute('href', address);\r\n } else {\r\n const metaCanonicalValue = document.createElement('link');\r\n metaCanonicalValue.setAttribute('rel', 'canonical');\r\n metaCanonicalValue.setAttribute('href', address);\r\n document.head.appendChild(metaCanonicalValue);\r\n }\r\n}\r\n\r\nexport function removeCanonical() {\r\n const canonical = document.querySelector('link[rel=\"canonical\"]');\r\n if (canonical)\r\n canonical.remove();\r\n}\r\n\r\nexport function useCanonical(href: string) {\r\n const hrefRef = ref(href);\r\n\r\n onMounted(() => {\r\n setCanonical(hrefRef.value);\r\n });\r\n\r\n watchEffect(() => {\r\n setCanonical(hrefRef.value);\r\n });\r\n\r\n return {\r\n href: hrefRef\r\n };\r\n}\r\n\r\nexport function dontUseCanonical() {\r\n removeCanonical();\r\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock } from \"vue\"\n\nconst _hoisted_1 = [\"onClick\"]\nconst _hoisted_2 = { class: \"position-relative\" }\nconst _hoisted_3 = { key: 0 }\nconst _hoisted_4 = [\"srcset\"]\nconst _hoisted_5 = [\"src\", \"alt\"]\nconst _hoisted_6 = [\"alt\"]\nconst _hoisted_7 = {\n key: 2,\n class: \"position-absolute top-0 start-0 m-3\"\n}\nconst _hoisted_8 = {\n key: 0,\n class: \"badge bg-danger\",\n style: {\"font-size\":\"1.5rem\"}\n}\nconst _hoisted_9 = { class: \"card-body p-4\" }\nconst _hoisted_10 = { class: \"text-center\" }\nconst _hoisted_11 = { class: \"fw-bolder\" }\nconst _hoisted_12 = { key: 0 }\nconst _hoisted_13 = { key: 0 }\n\nimport { ref, computed } from 'vue';\r\n import { ArticleViewModel } from '@/types/ArticleViewModel';\r\n import { CategoryViewModel } from '@/types/CategoryViewModel';\r\n import { useRootStore } from '@/store/root.store';\r\n\r\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'ArticleCard',\n props: {\n article: null,\n heightClass: null\n },\n setup(__props: any) {\n\nconst props = __props as { article: ArticleViewModel, heightClass: string }\n\r\n const rootStore = useRootStore();\r\n\r\n \r\n const article = ref(props.article);\r\n\r\n const selectedCategory = computed(() => {\r\n return rootStore.categories.length\r\n ? rootStore.categories.find(x => x.id === article.value.categoryId)\r\n : {} as CategoryViewModel;\r\n });\r\n\r\n function getClass() {\r\n return props.heightClass;\r\n }\r\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createBlock(_component_router_link, {\n to: { name:`Article-${_unref(selectedCategory)?.urlSlug}`, params: { slug: article.value.urlSlug } },\n custom: \"\"\n }, {\n default: _withCtx(({ navigate }) => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"card shadow\", getClass()]),\n onClick: navigate\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n (article.value.files.length)\n ? (_openBlock(), _createElementBlock(\"picture\", _hoisted_3, [\n _createElementVNode(\"source\", {\n srcset: `/images/${article.value.files[0].name}-thumbnail.webp`,\n type: \"image/webp\"\n }, null, 8, _hoisted_4),\n _createElementVNode(\"img\", {\n class: \"card-img-top\",\n src: `/images/${article.value.files[0].name}-thumbnail.jpg`,\n alt: `Bild för ${article.value.modelName} ${article.value.name}`\n }, null, 8, _hoisted_5)\n ]))\n : (_openBlock(), _createElementBlock(\"img\", {\n key: 1,\n class: \"card-img-top\",\n src: \"https://dummyimage.com/465x390/dee2e6/6c757d.jpg\",\n alt: `${article.value.name} - bild`\n }, null, 8, _hoisted_6)),\n (article.value.isSold && article.value.categoryId == 2)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n (article.value.isSold)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_8, \"SÅLD\"))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"h4\", _hoisted_11, [\n (_unref(selectedCategory).id === 2)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_12, _toDisplayString(article.value.modelName) + \" \", 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(_toDisplayString(article.value.name), 1)\n ]),\n (_unref(selectedCategory).id === 2)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_13, _toDisplayString(article.value.priceDisplay), 1))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ], 10, _hoisted_1)\n ]),\n _: 1\n }, 8, [\"to\"]))\n}\n}\n\n})","import script from \"./ArticleCard.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ArticleCard.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Breadcrumbs.vue?vue&type=style&index=0&id=04d21c6a&scoped=true&lang=css\""],"sourceRoot":""}