{"version":3,"sources":["webpack:///./infrastructure/presentation/views/shop/FavoriteList.vue?ad3b","webpack:///./infrastructure/presentation/views/shop/FavoriteList.vue?f727","webpack:///./infrastructure/presentation/views/shop/FavoriteList.vue","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?3b30","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?86bc","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue","webpack:///./infrastructure/presentation/assets/static/nothing-found.svg","webpack:///./infrastructure/presentation/components/application/shop/HoverGallery.vue?8901","webpack:///./infrastructure/presentation/views/shop/FavoriteList.vue?91b0"],"names":["n","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","key","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","render","_ctx","_cache","$props","$setup","$data","$options","_component_router_link","_component_HoverGallery","_component_TUIViewer","_component_PaginationDefault","to","name","default","_","favoriteProducts","length","product","index","onClick","$event","goToProductDetail","gallery","imagesUrl","description","formattedDate","lastChange","formatDecoins","decoins","checkProductDecoins","bagIncludes","checkProductIsActive","removeFromBag","addToBag","hasEnoughDecoins","isProductOutOfStock","checkEnough","setButtonText","removeFromFavoriteList","id","pages","currentPage","components","HoverGallery","TUIViewer","PaginationDefault","setup","store","route","getters","bagProducts","Number","query","page","user","balance","loadFavoriteProducts","limit","dispatch","message","console","error","validateStockAndDecoins","productID","value","quantity","stock","dcoins","isActive","Boolean","find","item","remain","inBag","Intl","NumberFormat","format","push","params","__exports__","alt","onMouseover","isHover","onMouseout","src","renderImage","__default__","props","type","Array","required","colorBorder","String","renderIndex","nextImage","url","intervalId","setInterval","clearIn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YxC,MAC9BwC,EAAYxC,MAAQsD,EAChB,SAACb,EAAOc,GAA8B,OAApB,IAA2BD,EAAUb,EAAOc,IAC9D,EAEW,Q,iCCzEf,MAAMtB,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS/E,GAAQ,CAAC,YAAY,qBAE1E,U,qBCTfsG,EAAOC,QAAU,IAA0B,kC,kCCA3C,W,yDCAA","file":"js/chunk-77cb9108.af87a634.js","sourcesContent":["import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, withModifiers as _withModifiers, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-55f1bc4e\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n class: \"view\",\n \"data-view\": \"\"\n}\nconst _hoisted_2 = { class: \"favorite\" }\nconst _hoisted_3 = { class: \"favorite__list\" }\nconst _hoisted_4 = { class: \"favorite__nav\" }\nconst _hoisted_5 = /*#__PURE__*/_createTextVNode(\"decola shop \")\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"/\", -1))\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"lista de favoritos\", -1))\nconst _hoisted_8 = { class: \"favorite__header\" }\nconst _hoisted_9 = { class: \"favorite__name-link\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", null, \"lista de favoritos\", -1))\nconst _hoisted_11 = /*#__PURE__*/_createTextVNode(\" Ir para o carrinho \")\nconst _hoisted_12 = { key: 0 }\nconst _hoisted_13 = { key: 1 }\nconst _hoisted_14 = { class: \"favorite__products\" }\nconst _hoisted_15 = [\"onClick\"]\nconst _hoisted_16 = { class: \"favorite__image\" }\nconst _hoisted_17 = { class: \"favorite__information\" }\nconst _hoisted_18 = { class: \"favorite__titles\" }\nconst _hoisted_19 = { class: \"favorite__description\" }\nconst _hoisted_20 = { class: \"favorite__description\" }\nconst _hoisted_21 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", { class: \"favorite__title--upper\" }, \"Data de adição:\", -1))\nconst _hoisted_22 = { class: \"favorite__decoins\" }\nconst _hoisted_23 = {\n key: 0,\n class: \"favorite__validation-decoins\"\n}\nconst _hoisted_24 = {\n key: 1,\n class: \"favorite__validation-decoins\"\n}\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"favorite__validation\" }, null, -1))\nconst _hoisted_26 = { class: \"favorite__buttons\" }\nconst _hoisted_27 = [\"onClick\"]\nconst _hoisted_28 = [\"onClick\"]\nconst _hoisted_29 = [\"onClick\"]\nconst _hoisted_30 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"line\" }, null, -1))\nconst _hoisted_31 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_HoverGallery = _resolveComponent(\"HoverGallery\")!\n const _component_TUIViewer = _resolveComponent(\"TUIViewer\")!\n const _component_PaginationDefault = _resolveComponent(\"PaginationDefault\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"section\", null, [\n _createElementVNode(\"section\", _hoisted_2, [\n _createElementVNode(\"section\", _hoisted_3, [\n _createElementVNode(\"nav\", _hoisted_4, [\n _createVNode(_component_router_link, {\n to: { name: 'shop' },\n class: \"favorite__link\"\n }, {\n default: _withCtx(() => [\n _hoisted_5\n ]),\n _: 1\n }),\n _hoisted_6,\n _hoisted_7\n ]),\n _createElementVNode(\"header\", _hoisted_8, [\n _createElementVNode(\"div\", _hoisted_9, [\n _hoisted_10,\n _createVNode(_component_router_link, {\n to: { name: 'bag' },\n class: \"favorite__link-bag\"\n }, {\n default: _withCtx(() => [\n _hoisted_11\n ]),\n _: 1\n })\n ]),\n (_ctx.favoriteProducts.length)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_12, \" Veja abaixo os produtos adicionados em sua Lista de Favoritos. \"))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_13, \"Você não possui produtos na Lista de Favoritos.\"))\n ]),\n _createElementVNode(\"ul\", _hoisted_14, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.favoriteProducts, (product, index) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: index,\n class: \"favorite__detail\"\n }, [\n _createElementVNode(\"div\", {\n class: \"favorite__container\",\n onClick: ($event: any) => (_ctx.goToProductDetail(product))\n }, [\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(_component_HoverGallery, {\n gallery: product.imagesUrl\n }, null, 8, [\"gallery\"])\n ]),\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"h2\", null, _toDisplayString(product.name), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"p\", null, [\n _createVNode(_component_TUIViewer, {\n \"model-value\": product.description\n }, null, 8, [\"model-value\"])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_20, [\n _hoisted_21,\n _createElementVNode(\"p\", null, _toDisplayString(_ctx.formattedDate(product.lastChange)), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_22, [\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.formatDecoins(product.decoins)), 1)\n ]),\n (\r\n _ctx.checkProductDecoins(product) &&\r\n _ctx.bagIncludes(product) &&\r\n !_ctx.checkProductIsActive(product)\r\n )\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_23, \" Valor do produto modificado, você não possui decoins suficientes para adquirir este produto. \"))\n : _createCommentVNode(\"\", true),\n (_ctx.checkProductIsActive(product))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_24, \" Produto indisponível. \"))\n : _createCommentVNode(\"\", true),\n _hoisted_25,\n _createElementVNode(\"div\", _hoisted_26, [\n (!_ctx.bagIncludes(product))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: [\n _cache[0] || (_cache[0] = _withModifiers(() => {}, [\"stop\"])),\n ($event: any) => (_ctx.addToBag(product))\n ],\n class: _normalizeClass([\r\n _ctx.hasEnoughDecoins(product) ||\r\n _ctx.isProductOutOfStock(product) ||\r\n !_ctx.checkEnough(product) ||\r\n _ctx.checkProductIsActive(product)\r\n ? 'favorite__button-blocked'\r\n : 'favorite__button-add'\r\n ])\n }, _toDisplayString(_ctx.setButtonText(product)), 11, _hoisted_27))\n : (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n onClick: [\n _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\"])),\n ($event: any) => (_ctx.removeFromBag(product))\n ],\n class: \"favorite__button-remove\"\n }, \" remover do carrinho \", 8, _hoisted_28)),\n _createElementVNode(\"button\", {\n onClick: [\n _cache[2] || (_cache[2] = _withModifiers(() => {}, [\"stop\"])),\n ($event: any) => (_ctx.removeFromFavoriteList(product.id))\n ],\n class: \"favorite__button-active\"\n }, \" remover \", 8, _hoisted_29)\n ])\n ])\n ], 8, _hoisted_15),\n _hoisted_30\n ]))\n }), 128))\n ])\n ])\n ]),\n (_ctx.pages !== 0)\n ? (_openBlock(), _createElementBlock(\"footer\", _hoisted_31, [\n _createVNode(_component_PaginationDefault, {\n \"qt-pages\": _ctx.pages,\n currentPage: _ctx.currentPage,\n \"onUpdate:currentPage\": _cache[3] || (_cache[3] = ($event: any) => ((_ctx.currentPage) = $event))\n }, null, 8, [\"qt-pages\", \"currentPage\"])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}","\r\nimport {\r\n computed,\r\n ComputedRef,\r\n defineComponent,\r\n onBeforeMount,\r\n ref,\r\n Ref,\r\n watch\r\n} from \"vue\";\r\nimport { useStore } from \"vuex\";\r\nimport {\r\n dispatchErrorBox,\r\n dispatchSuccessBox,\r\n formattedDate,\r\n scrollTo\r\n} from \"../../components/mixins\";\r\nimport PaginationDefault from \"../../components/application/shop/PaginationDefault.vue\";\r\nimport { useRoute } from \"vue-router\";\r\nimport router from \"../../../../src/routes\";\r\nimport { Product } from \"../../../../domain/entities/shop/product/product\";\r\nimport { User } from \"../../../../domain/entities/entities\";\r\nimport { RepositoryException } from \"../../../../domain/exceptions/exceptions\";\r\nimport TUIViewer from \"../../components/application/TUIViewer.vue\";\r\nimport HoverGallery from \"../../components/application/shop/HoverGallery.vue\";\r\n\r\nexport default defineComponent({\r\n components: {\r\n HoverGallery,\r\n TUIViewer,\r\n PaginationDefault\r\n },\r\n\r\n setup() {\r\n const store = useStore();\r\n const route = useRoute();\r\n\r\n /** List of products that are in the favorites list. */\r\n const favoriteProducts: ComputedRef> = computed(() => {\r\n return store.getters[\"shop_module/productsInFavoriteList\"];\r\n });\r\n\r\n /** List of products in the cart. */\r\n const bagProducts: ComputedRef> = computed(() => {\r\n return store.getters[\"shop_module/productsInBag\"];\r\n });\r\n\r\n /** Number of pages coming from request. */\r\n const pages: ComputedRef = computed(() => {\r\n return store.getters[\"shop_module/page\"];\r\n });\r\n\r\n /** Variable that gets the current page through the route. */\r\n const currentPage: Ref = ref(Number(route.query.page));\r\n\r\n /** Variable to get the user data. */\r\n const user: ComputedRef = computed(() => {\r\n return store.getters[\"userProfile_module/user\"];\r\n });\r\n\r\n /** Getter of the decoins with the subtraction of the values of the products added in the bag. */\r\n const balance: ComputedRef = computed(() => {\r\n return store.getters[\"shop_module/balance\"];\r\n });\r\n\r\n /** Updates the current page. */\r\n watch(\r\n () => currentPage.value,\r\n async () => {\r\n await router.push({\r\n name: \"favorite\",\r\n query: { page: currentPage.value }\r\n });\r\n await loadFavoriteProducts(currentPage.value, 6);\r\n\r\n /** scroll to the top of view */\r\n scrollTo(0, 0);\r\n }\r\n );\r\n\r\n /** Checks if the current page exists in pagination. When all products are removed from a page the\r\n * user is directed to the first page. */\r\n watch(\r\n () => pages.value,\r\n async () => {\r\n if (currentPage.value > pages.value) {\r\n currentPage.value = 1;\r\n await router.push({\r\n name: \"favorite\",\r\n query: { page: currentPage.value }\r\n });\r\n }\r\n await loadFavoriteProducts(currentPage.value, 6);\r\n }\r\n );\r\n\r\n onBeforeMount(async () => {\r\n try {\r\n await store.dispatch(\"userProfile_module/loadUser\");\r\n await loadFavoriteProducts(currentPage.value, 6);\r\n await store.dispatch(\"shop_module/loadBagProducts\");\r\n await store.dispatch(\r\n \"shop_module/setDecoinsInWallet\",\r\n user.value.dcoins\r\n );\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n });\r\n\r\n /** Loads all the products the user added in the favorites list. */\r\n async function loadFavoriteProducts(\r\n page: number,\r\n limit: number\r\n ): Promise {\r\n try {\r\n await store.dispatch(\"shop_module/loadFavoriteProducts\", {\r\n page: page,\r\n limit: limit\r\n });\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function responsible for validating the user's decoins along with the stock.\r\n * Function used to remove the add to bag button.\r\n * @param product product to validate stock and decoins. */\r\n function validateStockAndDecoins(product: Product): boolean {\r\n if (hasEnoughDecoins(product) && isProductOutOfStock(product)) {\r\n return true;\r\n } else if (!hasEnoughDecoins(product) && isProductOutOfStock(product)) {\r\n return true;\r\n } else if (hasEnoughDecoins(product) && !isProductOutOfStock(product)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** Function to remove products from list favorite. */\r\n async function removeFromFavoriteList(productID: number): Promise {\r\n try {\r\n await store.dispatch(\r\n \"shop_module/removeProductFromFavorites\",\r\n productID\r\n );\r\n await loadFavoriteProducts(currentPage.value, 6);\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function responsible for adding the product to the bag.\r\n * @param product parameter that receives an object of type Product as a variable.\r\n * @see Product */\r\n async function addToBag(product: Product): Promise {\r\n try {\r\n product.quantity = 1;\r\n if (product.stock <= 0) {\r\n return;\r\n } else if (product.decoins > user.value.dcoins) {\r\n return;\r\n } else if (balance.value < product.decoins) {\r\n return;\r\n } else if (product.isActive === false) {\r\n return;\r\n } else {\r\n await store.dispatch(\"shop_module/addToBag\", product);\r\n await dispatchSuccessBox(\"Produto adicionado no seu carrinho!\");\r\n }\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Function to check if the product in the favorites is already in the cart. */\r\n function bagIncludes(product: Product): boolean {\r\n return Boolean(bagProducts.value.find(item => item.id === product.id));\r\n }\r\n\r\n /** Remove the product from the cart within the favorites list. */\r\n async function removeFromBag(product: Product): Promise {\r\n try {\r\n await store.dispatch(\"shop_module/removeFromBag\", product);\r\n } catch (e) {\r\n if (e instanceof RepositoryException) {\r\n await dispatchErrorBox(e.message);\r\n } else {\r\n console.error(e);\r\n await dispatchErrorBox(\"Ocorreu um erro inesperado.\");\r\n }\r\n }\r\n }\r\n\r\n /** Checks if the product that was added to favorites is in stock.*/\r\n function isProductOutOfStock(product: Product): boolean {\r\n return product.stock < 1;\r\n }\r\n\r\n /** Function responsible for validating the user's decoins. If the user does not have enough decoins to buy\r\n * the product, the add button in the bag is blocked. */\r\n function hasEnoughDecoins(product: Product): boolean {\r\n return product.decoins > user.value.dcoins;\r\n }\r\n\r\n /** Function used to control whether for each product added to the bag it is still possible for the user to add\r\n * the other products that are available\r\n * @param product product to do validation. */\r\n function checkEnough(product: Product) {\r\n const remain = balance.value - product.decoins;\r\n const inBag = bagIncludes(product);\r\n\r\n if (product.stock <= 0) {\r\n return true;\r\n }\r\n\r\n if (inBag) {\r\n return true;\r\n }\r\n\r\n if (remain >= 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Function responsible for displaying a label informing the product status. */\r\n function setButtonText(product: Product): string {\r\n if (!checkEnough(product)) {\r\n return \"decoins insuficientes\";\r\n } else if (isProductOutOfStock(product)) {\r\n return \"sem estoque\";\r\n } else {\r\n return \"adicionar no carrinho\";\r\n }\r\n }\r\n\r\n /** Function responsible for formatting the decoins to Brazilian currency. */\r\n function formatDecoins(decoins: number) {\r\n return Intl.NumberFormat(\"pt-br\").format(decoins);\r\n }\r\n\r\n /** Function responsible for checking if the value of the product is greater than the amount of user decoins.\r\n * @param product product to do validation. */\r\n function checkProductDecoins(product: Product): boolean {\r\n return product.decoins > user.value.dcoins;\r\n }\r\n\r\n /** Function responsible for checking if the product was removed from the shop. */\r\n function checkProductIsActive(product: Product): boolean {\r\n return product.isActive === false;\r\n }\r\n\r\n /** Function responsible for redirecting the user to the product details page. */\r\n function goToProductDetail(product: Product): void {\r\n router.push({\r\n name: \"product_detail\",\r\n params: { productID: product.id }\r\n });\r\n }\r\n\r\n return {\r\n favoriteProducts,\r\n pages,\r\n currentPage,\r\n balance,\r\n isProductOutOfStock,\r\n formattedDate,\r\n removeFromFavoriteList,\r\n addToBag,\r\n bagIncludes,\r\n removeFromBag,\r\n hasEnoughDecoins,\r\n validateStockAndDecoins,\r\n checkEnough,\r\n setButtonText,\r\n formatDecoins,\r\n checkProductDecoins,\r\n checkProductIsActive,\r\n goToProductDetail\r\n };\r\n }\r\n});\r\n","import { render } from \"./FavoriteList.vue?vue&type=template&id=55f1bc4e&scoped=true&ts=true\"\nimport script from \"./FavoriteList.vue?vue&type=script&lang=ts\"\nexport * from \"./FavoriteList.vue?vue&type=script&lang=ts\"\n\nimport \"./FavoriteList.vue?vue&type=style&index=0&id=55f1bc4e&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\dev\\\\purple__bee\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-55f1bc4e\"]])\n\nexport default __exports__","import { openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-da81f2f4\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = [\"src\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"img\", {\n alt: \"Foto do produto\",\n class: \"image\",\n onMouseover: _cache[0] || (_cache[0] = ($event: any) => (_ctx.isHover = true)),\n onMouseout: _cache[1] || (_cache[1] = ($event: any) => (_ctx.isHover = false)),\n src: _ctx.renderImage\n }, null, 40, _hoisted_1))\n}","\r\nimport {\r\n computed,\r\n defineComponent,\r\n onMounted,\r\n PropType,\r\n ref,\r\n watch\r\n} from \"vue\";\r\nimport { imagesUrl } from \"../../../../../domain/entities/shop/product/product\";\r\n\r\nconst __default__ = defineComponent({\r\n name: \"HoverGallery\",\r\n props: {\r\n gallery: {\r\n type: Array as PropType,\r\n required: true\r\n },\r\n colorBorder: {\r\n type: String,\r\n default: \"#c4c4c4\"\r\n }\r\n },\r\n setup(props) {\r\n const isHover = ref(false);\r\n const gallery = computed(() => props.gallery);\r\n const renderImage = ref(\"\");\r\n const renderIndex = ref(0);\r\n\r\n onMounted(() => {\r\n if (!gallery.value || !gallery.value[0])\r\n return (renderImage.value = require(\"../../../assets/static/nothing-found.svg\"));\r\n\r\n renderImage.value = gallery.value[0].url;\r\n });\r\n\r\n function nextImage() {\r\n renderIndex.value = renderIndex.value + 1;\r\n\r\n if (gallery?.value[renderIndex.value]?.url)\r\n return (renderImage.value = gallery.value[renderIndex.value].url);\r\n\r\n renderIndex.value = -1;\r\n }\r\n\r\n const intervalId = ref();\r\n watch(\r\n () => isHover.value,\r\n isHover => {\r\n if (isHover) return (intervalId.value = setInterval(nextImage, 950));\r\n\r\n clearInterval(intervalId.value);\r\n },\r\n { immediate: true }\r\n );\r\n\r\n watch(\r\n () => gallery.value,\r\n async () => {\r\n renderImage.value = gallery.value[0].url;\r\n }\r\n );\r\n\r\n return {\r\n renderImage,\r\n isHover\r\n };\r\n }\r\n});\r\n\nimport { useCssVars as _useCssVars } from 'vue'\nconst __injectCSSVars__ = () => {\n_useCssVars(_ctx => ({\n \"1fb69869\": (_ctx.colorBorder)\n}))}\nconst __setup__ = __default__.setup\n__default__.setup = __setup__\n ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\n : __injectCSSVars__\n\nexport default __default__","import { render } from \"./HoverGallery.vue?vue&type=template&id=da81f2f4&scoped=true&ts=true\"\nimport script from \"./HoverGallery.vue?vue&type=script&lang=ts\"\nexport * from \"./HoverGallery.vue?vue&type=script&lang=ts\"\n\nimport \"./HoverGallery.vue?vue&type=style&index=0&id=da81f2f4&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\dev\\\\purple__bee\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-da81f2f4\"]])\n\nexport default __exports__","module.exports = __webpack_public_path__ + \"img/nothing-found.8d0d0b35.svg\";","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./HoverGallery.vue?vue&type=style&index=0&id=da81f2f4&scoped=true&lang=css\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./FavoriteList.vue?vue&type=style&index=0&id=55f1bc4e&scoped=true&lang=css\""],"sourceRoot":""}