{"version":3,"sources":["redux/actions/productActions.js","redux/actions/compareActions.js","redux/actions/currencyActions.js","redux/reducers/currencyReducer.js","redux/reducers/productReducer.js","redux/reducers/cartReducer.js","redux/reducers/wishlistReducer.js","redux/reducers/compareReducer.js","redux/reducers/rootReducer.js","helpers/scroll-top.js","App.js","serviceWorker.js","index.js","redux/actions/cartActions.js","redux/actions/wishlistActions.js"],"names":["FETCH_PRODUCTS_SUCCESS","fetchProducts","products","dispatch","type","payload","fetchProductsSuccess","ADD_TO_COMPARE","DELETE_FROM_COMPARE","addToCompare","item","addToast","appearance","autoDismiss","deleteFromCompare","SET_CURRENCY","setCurrency","currencyName","axios","get","then","response","rates","data","currencyRate","rate","catch","err","console","log","initState","currencySymbol","currencyReducer","state","action","productReducer","cartReducer","cartItems","product","ADD_TO_CART","undefined","variation","cartItem","filter","id","quantity","cartItemId","uuid","map","selectedProductColor","selectedProductSize","DECREASE_QUANTITY","remainingItems","DELETE_FROM_CART","DELETE_ALL_FROM_CART","wishlistReducer","wishlistItems","ADD_TO_WISHLIST","wishlistItem","DELETE_FROM_WISHLIST","DELETE_ALL_FROM_WISHLIST","compareReducer","compareItems","compareItem","rootReducer","combineReducers","multilanguage","createMultilanguageReducer","currentLanguageCode","currencyData","productData","cartData","wishlistData","compareData","withRouter","props","useEffect","window","scrollTo","children","home","lazy","ShopGridNoSidebar","Product","ShopGridStandard","Wishlist","Compare","ShopGridNoSideBarWithProductLabel","ShopGridFilter","ShopGridTwoColumn","ShopGridFullWidth","ShopGridRightSidebar","ShopListStandard","ShopListFullWidth","ShopListTwoColumn","ProductTabLeft","ProductTabRight","ProductSticky","ProductSlider","ProductFixedImage","BlogStandard","BlogNoSidebar","BlogRightSidebar","BlogDetailsStandard","About","Contact","ShopPhotos","WarrantyConditions","ProductMaintenance","ProductShippingAbroad","WhyUs","MyAccount","LoginRegister","Cart","Checkout","NotFound","connect","loadLanguages","languages","tr","require","en","fn","de","placement","fallback","className","exact","path","component","render","routeProps","key","match","params","Boolean","location","hostname","store","createStore","load","composeWithDevTools","applyMiddleware","thunk","save","ReactDOM","document","getElementById","navigator","serviceWorker","ready","registration","unregister","addToCart","quantityCount","decreaseQuantity","deleteFromCart","deleteAllFromCart","cartItemStock","color","size","stock","single","name","addToWishlist","deleteFromWishlist","deleteAllFromWishlist"],"mappings":"wIAAA,oEAAO,IAAMA,EAAyB,yBAUzBC,EAAgB,SAAAC,GAC3B,OAAO,SAAAC,GACLA,EARyB,SAAAD,GAAQ,MAAK,CACxCE,KAAMJ,EACNK,QAASH,GAMEI,CAAqBJ,O,iCCZlC,wIAAO,IAAMK,EAAiB,iBACjBC,EAAsB,sBAGtBC,EAAe,SAACC,EAAMC,GACjC,OAAO,SAAAR,GACDQ,GACFA,EAAS,2EAA6C,CACpDC,WAAY,UACZC,aAAa,IAGjBV,EAAS,CAAEC,KAAMG,EAAgBF,QAASK,MAKjCI,EAAoB,SAACJ,EAAMC,GACtC,OAAO,SAAAR,GACDQ,GACFA,EAAS,oGAAkD,CACzDC,WAAY,QACZC,aAAa,IAGjBV,EAAS,CAAEC,KAAMI,EAAqBH,QAASK,O,iCCzBnD,0FACaK,EAAe,eAEfC,EAAc,SAAAC,GACzB,OAAO,SAAAd,GACLe,IACGC,IADH,mDAEGC,MAAK,SAAAC,GACJ,IAAMC,EAAQD,EAASE,KAAKD,MACxBE,EAAe,EACnB,IAAK,IAAMC,KAAQH,EACbG,IAASR,IACXO,EAAeF,EAAMG,IAGzBtB,EAAS,CACPC,KAAMW,EACNV,QAAS,CAAEY,eAAcO,qBAG5BE,OAAM,SAAAC,GACLC,QAAQC,IAAI,UAAWF,S,2soBCnBzBG,EAAY,CAChBC,eAAgB,SAChBd,aAAc,MACdO,aAAc,GA6CDQ,EA1CS,WAAgC,IAA/BC,EAA8B,uDAAtBH,EAAWI,EAAW,uCACrD,GAAIA,EAAO9B,OAASW,IAAc,CAChC,IAAME,EAAeiB,EAAO7B,QAAQY,aAEpC,GAAqB,QAAjBA,EACF,OAAO,2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qB,CAAEC,WAAY,QAASC,aAAa,IAEpEV,EAAS,CAAEC,KAAMiD,EAAkBhD,QAASK,MAInCmJ,EAAoB,SAAAlJ,GAC/B,OAAO,SAAAR,GACDQ,GACFA,EAAS,wBAAyB,CAChCC,WAAY,QACZC,aAAa,IAGjBV,EAAS,CAAEC,KAAMkD,MAKRwG,EAAgB,SAACpJ,EAAMqJ,EAAOC,GACzC,OAAItJ,EAAKuJ,MACAvJ,EAAKuJ,MAELvJ,EAAK+B,UACTE,QAAO,SAAAuH,GAAM,OAAIA,EAAOH,QAAUA,KAAO,GACzCC,KAAKrH,QAAO,SAAAuH,GAAM,OAAIA,EAAOC,OAASH,KAAM,GAAGC,Q,gCC7EtD,4MAAO,IAAMxG,EAAkB,kBAClBE,EAAuB,uBACvBC,EAA2B,2BAG3BwG,EAAgB,SAAC1J,EAAMC,GAClC,OAAO,SAAAR,GACDQ,GACFA,EAAS,4CAAkC,CACzCC,WAAY,UACZC,aAAa,IAGjBV,EAAS,CAAEC,KAAMqD,EAAiBpD,QAASK,MAKlC2J,EAAqB,SAAC3J,EAAMC,GACvC,OAAO,SAAAR,GACDQ,GACFA,EAAS,kEAAsC,CAC7CC,WAAY,QACZC,aAAa,IAGjBV,EAAS,CAAEC,KAAMuD,EAAsBtD,QAASK,MAKvC4J,EAAwB,SAAA3J,GACnC,OAAO,SAAAR,GACDQ,GACFA,EAAS,4EAA6C,CACpDC,WAAY,QACZC,aAAa,IAGjBV,EAAS,CAAEC,KAAMwD,Q","file":"static/js/main.8b866874.chunk.js","sourcesContent":["export const FETCH_PRODUCTS_SUCCESS = \"FETCH_PRODUCTS_SUCCESS\";\r\n\r\n// export const GET_PRODUCTS_SUCCESS = \"GET_PRODUCTS_SUCCESS\";\r\n\r\nconst fetchProductsSuccess = products => ({\r\n type: FETCH_PRODUCTS_SUCCESS,\r\n payload: products\r\n});\r\n\r\n// fetch products\r\nexport const fetchProducts = products => {\r\n return dispatch => {\r\n dispatch(fetchProductsSuccess(products));\r\n };\r\n};\r\n\r\n// // get products2\r\n// const getProductsSuccess = products2 => ({\r\n// type: GET_PRODUCTS_SUCCESS,\r\n// payload: products2\r\n// });\r\n\r\n// export function getProducts(categoryId) {\r\n// return function(dispatch) {\r\n// let url = \"http://localhost:53726/api/products/\";\r\n// if (categoryId) {\r\n// url = url + \"getAllActiveProductsByCategoryId/\" + categoryId;\r\n// }else{\r\n// url = url + \"getAllProducts\";\r\n// }\r\n// return fetch(url)\r\n// .then(response => response.json())\r\n// .then(result => dispatch(getProductsSuccess(result)));\r\n// };\r\n// }\r\n","export const ADD_TO_COMPARE = \"ADD_TO_COMPARE\";\r\nexport const DELETE_FROM_COMPARE = \"DELETE_FROM_COMPARE\";\r\n\r\n// add to compare\r\nexport const addToCompare = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Ürün karşılaştırma listenize eklenmiştir.\", {\r\n appearance: \"success\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: ADD_TO_COMPARE, payload: item });\r\n };\r\n};\r\n\r\n// delete from compare\r\nexport const deleteFromCompare = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Ürün karşılaştırma listenizden kaldırılmıştır.\", {\r\n appearance: \"error\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DELETE_FROM_COMPARE, payload: item });\r\n };\r\n};\r\n","import axios from \"axios\";\r\nexport const SET_CURRENCY = \"SET_CURRENCY\";\r\n\r\nexport const setCurrency = currencyName => {\r\n return dispatch => {\r\n axios\r\n .get(`https://api.exchangeratesapi.io/latest?base=TRY`)\r\n .then(response => {\r\n const rates = response.data.rates;\r\n let currencyRate = 0;\r\n for (const rate in rates) {\r\n if (rate === currencyName) {\r\n currencyRate = rates[rate];\r\n }\r\n }\r\n dispatch({\r\n type: SET_CURRENCY,\r\n payload: { currencyName, currencyRate }\r\n });\r\n })\r\n .catch(err => {\r\n console.log(\"Error: \", err);\r\n });\r\n };\r\n};\r\n","import { SET_CURRENCY } from \"../actions/currencyActions\";\r\n\r\nconst initState = {\r\n currencySymbol: \"₺\",\r\n currencyName: \"TRY\",\r\n currencyRate: 1\r\n};\r\n\r\nconst currencyReducer = (state = initState, action) => {\r\n if (action.type === SET_CURRENCY) {\r\n const currencyName = action.payload.currencyName;\r\n\r\n if (currencyName === \"TRY\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"₺\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n\r\n if (currencyName === \"USD\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"$\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n if (currencyName === \"EUR\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"€\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n if (currencyName === \"GBP\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"£\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n }\r\n\r\n return state;\r\n};\r\n\r\nexport default currencyReducer;\r\n","import { FETCH_PRODUCTS_SUCCESS } from \"../actions/productActions\";\r\n// import { GET_PRODUCTS_SUCCESS} from \"../actions/productActions\"\r\n\r\nconst initState = {\r\n products: [],\r\n // products2:[]\r\n};\r\n\r\nconst productReducer = (state = initState, action) => {\r\n if (action.type === FETCH_PRODUCTS_SUCCESS) {\r\n return {\r\n ...state,\r\n products: action.payload\r\n };\r\n }\r\n // else if(action.type === GET_PRODUCTS_SUCCESS){\r\n // return {\r\n // ...state,\r\n // products2: action.payload\r\n // };\r\n // }\r\n\r\n return state;\r\n};\r\n\r\nexport default productReducer;\r\n","import uuid from \"uuid/v4\";\r\nimport {\r\n ADD_TO_CART,\r\n DECREASE_QUANTITY,\r\n DELETE_FROM_CART,\r\n DELETE_ALL_FROM_CART\r\n} from \"../actions/cartActions\";\r\n\r\nconst initState = [];\r\n\r\nconst cartReducer = (state = initState, action) => {\r\n const cartItems = state,\r\n product = action.payload;\r\n\r\n if (action.type === ADD_TO_CART) {\r\n // for non variant products\r\n if (product.variation === undefined) {\r\n const cartItem = cartItems.filter(item => item.id === product.id)[0];\r\n if (cartItem === undefined) {\r\n return [\r\n ...cartItems,\r\n {\r\n ...product,\r\n quantity: product.quantity ? product.quantity : 1,\r\n cartItemId: uuid()\r\n }\r\n ];\r\n } else {\r\n return cartItems.map(item =>\r\n item.cartItemId === cartItem.cartItemId\r\n ? {\r\n ...item,\r\n quantity: product.quantity\r\n ? item.quantity + product.quantity\r\n : item.quantity + 1\r\n }\r\n : item\r\n );\r\n }\r\n // for variant products\r\n } else {\r\n const cartItem = cartItems.filter(\r\n item =>\r\n item.id === product.id &&\r\n product.selectedProductColor &&\r\n product.selectedProductColor === item.selectedProductColor &&\r\n product.selectedProductSize &&\r\n product.selectedProductSize === item.selectedProductSize &&\r\n (product.cartItemId ? product.cartItemId === item.cartItemId : true)\r\n )[0];\r\n\r\n if (cartItem === undefined) {\r\n return [\r\n ...cartItems,\r\n {\r\n ...product,\r\n quantity: product.quantity ? product.quantity : 1,\r\n cartItemId: uuid()\r\n }\r\n ];\r\n } else if (\r\n cartItem !== undefined &&\r\n (cartItem.selectedProductColor !== product.selectedProductColor ||\r\n cartItem.selectedProductSize !== product.selectedProductSize)\r\n ) {\r\n return [\r\n ...cartItems,\r\n {\r\n ...product,\r\n quantity: product.quantity ? product.quantity : 1,\r\n cartItemId: uuid()\r\n }\r\n ];\r\n } else {\r\n return cartItems.map(item =>\r\n item.cartItemId === cartItem.cartItemId\r\n ? {\r\n ...item,\r\n quantity: product.quantity\r\n ? item.quantity + product.quantity\r\n : item.quantity + 1,\r\n selectedProductColor: product.selectedProductColor,\r\n selectedProductSize: product.selectedProductSize\r\n }\r\n : item\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (action.type === DECREASE_QUANTITY) {\r\n if (product.quantity === 1) {\r\n const remainingItems = (cartItems, product) =>\r\n cartItems.filter(\r\n cartItem => cartItem.cartItemId !== product.cartItemId\r\n );\r\n return remainingItems(cartItems, product);\r\n } else {\r\n return cartItems.map(item =>\r\n item.cartItemId === product.cartItemId\r\n ? { ...item, quantity: item.quantity - 1 }\r\n : item\r\n );\r\n }\r\n }\r\n\r\n if (action.type === DELETE_FROM_CART) {\r\n const remainingItems = (cartItems, product) =>\r\n cartItems.filter(cartItem => cartItem.cartItemId !== product.cartItemId);\r\n return remainingItems(cartItems, product);\r\n }\r\n\r\n if (action.type === DELETE_ALL_FROM_CART) {\r\n return cartItems.filter(item => {\r\n return false;\r\n });\r\n }\r\n\r\n return state;\r\n};\r\n\r\nexport default cartReducer;\r\n","import {\r\n ADD_TO_WISHLIST,\r\n DELETE_FROM_WISHLIST,\r\n DELETE_ALL_FROM_WISHLIST\r\n} from \"../actions/wishlistActions\";\r\n\r\nconst initState = [];\r\n\r\nconst wishlistReducer = (state = initState, action) => {\r\n const wishlistItems = state,\r\n product = action.payload;\r\n\r\n if (action.type === ADD_TO_WISHLIST) {\r\n const wishlistItem = wishlistItems.filter(\r\n item => item.id === product.id\r\n )[0];\r\n if (wishlistItem === undefined) {\r\n return [...wishlistItems, product];\r\n } else {\r\n return wishlistItems;\r\n }\r\n }\r\n\r\n if (action.type === DELETE_FROM_WISHLIST) {\r\n const remainingItems = (wishlistItems, product) =>\r\n wishlistItems.filter(wishlistItem => wishlistItem.id !== product.id);\r\n return remainingItems(wishlistItems, product);\r\n }\r\n\r\n if (action.type === DELETE_ALL_FROM_WISHLIST) {\r\n return wishlistItems.filter(item => {\r\n return false;\r\n });\r\n }\r\n\r\n return wishlistItems;\r\n};\r\n\r\nexport default wishlistReducer;\r\n","import { ADD_TO_COMPARE, DELETE_FROM_COMPARE } from \"../actions/compareActions\";\r\n\r\nconst initState = [];\r\n\r\nconst compareReducer = (state = initState, action) => {\r\n const compareItems = state,\r\n product = action.payload;\r\n\r\n if (action.type === ADD_TO_COMPARE) {\r\n const compareItem = compareItems.filter(item => item.id === product.id)[0];\r\n if (compareItem === undefined) {\r\n return [...compareItems, product];\r\n } else {\r\n return compareItems;\r\n }\r\n }\r\n\r\n if (action.type === DELETE_FROM_COMPARE) {\r\n const remainingItems = (compareItems, product) =>\r\n compareItems.filter(compareItem => compareItem.id !== product.id);\r\n return remainingItems(compareItems, product);\r\n }\r\n\r\n return compareItems;\r\n};\r\n\r\nexport default compareReducer;\r\n","import currencyReducer from \"./currencyReducer\";\r\nimport productReducer from \"./productReducer\";\r\nimport cartReducer from \"./cartReducer\";\r\nimport wishlistReducer from \"./wishlistReducer\";\r\nimport compareReducer from \"./compareReducer\";\r\nimport { combineReducers } from \"redux\";\r\nimport { createMultilanguageReducer } from \"redux-multilanguage\";\r\n\r\nconst rootReducer = combineReducers({\r\n multilanguage: createMultilanguageReducer({ currentLanguageCode: \"tr\" }),\r\n currencyData: currencyReducer,\r\n productData: productReducer,\r\n cartData: cartReducer,\r\n wishlistData: wishlistReducer,\r\n compareData: compareReducer\r\n});\r\n\r\nexport default rootReducer;\r\n","import { useEffect } from \"react\";\r\nimport { withRouter } from \"react-router-dom\";\r\n\r\nconst ScrollToTop = props => {\r\n useEffect(() => {\r\n window.scrollTo(0, 0);\r\n });\r\n return props.children;\r\n};\r\n\r\nexport default withRouter(ScrollToTop);\r\n","import PropTypes from \"prop-types\";\r\nimport React, { useEffect, Suspense, lazy } from \"react\";\r\nimport ScrollToTop from \"./helpers/scroll-top\";\r\nimport { BrowserRouter as Router, Switch, Route } from \"react-router-dom\";\r\nimport { ToastProvider } from \"react-toast-notifications\";\r\nimport { multilanguage, loadLanguages } from \"redux-multilanguage\";\r\nimport { connect } from \"react-redux\";\r\nimport { BreadcrumbsProvider } from \"react-breadcrumbs-dynamic\";\r\n\r\n\r\n// home pages\r\nconst home = lazy(() => import(\"./pages/home/home\"));\r\n//products\r\nconst ShopGridNoSidebar = lazy(() => import(\"./pages/products/ShopGridNoSidebar\"));\r\nconst Product = lazy(() => import(\"./pages/products/Product\"));\r\nconst ShopGridStandard = lazy(() => import(\"./pages/products/ShopGridStandard\"));\r\nconst Wishlist = lazy(() => import(\"./pages/other/Wishlist\"));\r\nconst Compare = lazy(() => import(\"./pages/other/Compare\"));\r\n\r\nconst ShopGridNoSideBarWithProductLabel = lazy(() => import(\"./pages/products/ShopGridNoSideBarWithProductLabel\"));\r\n\r\n\r\n// const DiningRooms = lazy(() => import(\"./pages/products/DiningRooms\"));\r\n// const Bedrooms = lazy(() => import(\"./pages/products/Bedrooms\"));\r\n// const TvWallUnits = lazy(() => import(\"./pages/products/TvWallUnits\"));\r\n// const TeenagerRooms = lazy(() => import(\"./pages/products/TeenagerRooms\"));\r\n// const KitchenTables = lazy(() => import(\"./pages/products/KitchenTables\"));\r\n// const Accessories = lazy(() => import(\"./pages/products/Accessories\"));\r\n// const BedAndBase = lazy(() => import(\"./pages/products/BedAndBase\"));\r\n// const HomeFurniture = lazy(() => import(\"./pages/home/HomeFurniture\"));\r\n// const HomeFurnitureTwo = lazy(() => import(\"./pages/home/HomeFurnitureTwo\"));\r\n// const HomeFurnitureThree = lazy(() =>\r\n// import(\"./pages/home/HomeFurnitureThree\")\r\n// );\r\n// const HomeFurnitureFour = lazy(() => import(\"./pages/home/HomeFurnitureFour\"));\r\n// const HomeFurnitureFive = lazy(() => import(\"./pages/home/HomeFurnitureFive\"));\r\n// const HomeFurnitureSix = lazy(() => import(\"./pages/home/HomeFurnitureSix\"));\r\n// const HomeFurnitureSeven = lazy(() =>\r\n// import(\"./pages/home/HomeFurnitureSeven\")\r\n// );\r\n\r\n// shop pages\r\n//const ShopGridStandard = lazy(() => import(\"./pages/shop/ShopGridStandard\"));\r\nconst ShopGridFilter = lazy(() => import(\"./pages/shop/ShopGridFilter\"));\r\nconst ShopGridTwoColumn = lazy(() => import(\"./pages/shop/ShopGridTwoColumn\"));\r\n// const ShopGridNoSidebar = lazy(() => import(\"./pages/shop/ShopGridNoSidebar\"));\r\nconst ShopGridFullWidth = lazy(() => import(\"./pages/shop/ShopGridFullWidth\"));\r\nconst ShopGridRightSidebar = lazy(() =>\r\n import(\"./pages/shop/ShopGridRightSidebar\")\r\n);\r\nconst ShopListStandard = lazy(() => import(\"./pages/shop/ShopListStandard\"));\r\nconst ShopListFullWidth = lazy(() => import(\"./pages/shop/ShopListFullWidth\"));\r\nconst ShopListTwoColumn = lazy(() => import(\"./pages/shop/ShopListTwoColumn\"));\r\n\r\n// product pages\r\n// const Product = lazy(() => import(\"./pages/shop-product/Product\"));\r\nconst ProductTabLeft = lazy(() =>\r\n import(\"./pages/shop-product/ProductTabLeft\")\r\n);\r\nconst ProductTabRight = lazy(() =>\r\n import(\"./pages/shop-product/ProductTabRight\")\r\n);\r\nconst ProductSticky = lazy(() => import(\"./pages/shop-product/ProductSticky\"));\r\nconst ProductSlider = lazy(() => import(\"./pages/shop-product/ProductSlider\"));\r\nconst ProductFixedImage = lazy(() =>\r\n import(\"./pages/shop-product/ProductFixedImage\")\r\n);\r\n\r\n// blog pages\r\nconst BlogStandard = lazy(() => import(\"./pages/blog/BlogStandard\"));\r\nconst BlogNoSidebar = lazy(() => import(\"./pages/blog/BlogNoSidebar\"));\r\nconst BlogRightSidebar = lazy(() => import(\"./pages/blog/BlogRightSidebar\"));\r\nconst BlogDetailsStandard = lazy(() =>\r\n import(\"./pages/blog/BlogDetailsStandard\")\r\n);\r\n\r\n// other pages\r\nconst About = lazy(() => import(\"./pages/other/About\"));\r\nconst Contact = lazy(() => import(\"./pages/other/Contact\"));\r\nconst ShopPhotos = lazy(() => import(\"./pages/other/ShopPhotos\"));\r\nconst WarrantyConditions = lazy(() => import(\"./pages/other/WarrantyConditions\"));\r\nconst ProductMaintenance = lazy(() => import(\"./pages/other/ProductMaintenance\"));\r\nconst ProductShippingAbroad = lazy(() => import(\"./pages/other/ProductShippingAbroad\"));\r\nconst WhyUs = lazy(() => import(\"./pages/other/WhyUs\"));\r\nconst MyAccount = lazy(() => import(\"./pages/other/MyAccount\"));\r\nconst LoginRegister = lazy(() => import(\"./pages/other/LoginRegister\"));\r\n\r\nconst Cart = lazy(() => import(\"./pages/other/Cart\"));\r\n\r\n\r\nconst Checkout = lazy(() => import(\"./pages/other/Checkout\"));\r\n\r\nconst NotFound = lazy(() => import(\"./pages/other/NotFound\"));\r\n\r\nconst App = (props) => {\r\n useEffect(() => {\r\n props.dispatch(\r\n loadLanguages({\r\n languages: {\r\n tr: require(\"./translations/turkish.json\"),\r\n en: require(\"./translations/english.json\"),\r\n fn: require(\"./translations/french.json\"),\r\n de: require(\"./translations/germany.json\")\r\n }\r\n })\r\n );\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n }\r\n >\r\n \r\n \r\n\r\n {/* Homepages */}\r\n\r\n \r\n\r\n {/*Products*/}\r\n\r\n \r\n\r\n {/* */}\r\n\r\n (\r\n \r\n )}\r\n />\r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n {/* \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n */}\r\n\r\n {/* */}\r\n\r\n\r\n\r\n\r\n {/* */}\r\n {/* \r\n \r\n \r\n \r\n \r\n */}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n {/* Shop pages */}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* Shop product pages */}\r\n {/* (\r\n \r\n )}\r\n /> */}\r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* Blog pages */}\r\n \r\n \r\n \r\n \r\n\r\n {/* Other pages */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nApp.propTypes = {\r\n dispatch: PropTypes.func\r\n};\r\n\r\nexport default connect()(multilanguage(App));\r\n\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === \"localhost\" ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === \"[::1]\" ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n );\r\n \r\n export function register(config) {\r\n if (process.env.NODE_ENV === \"production\" && \"serviceWorker\" in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n \r\n window.addEventListener(\"load\", () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n \r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n \r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n \"This web app is being served cache-first by a service \" +\r\n \"worker. To learn more, visit https://bit.ly/CRA-PWA\"\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n }\r\n \r\n function registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === \"installed\") {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n \"New content is available and will be used when all \" +\r\n \"tabs for this page are closed. See https://bit.ly/CRA-PWA.\"\r\n );\r\n \r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log(\"Content is cached for offline use.\");\r\n \r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error(\"Error during service worker registration:\", error);\r\n });\r\n }\r\n \r\n function checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get(\"content-type\");\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf(\"javascript\") === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n \"No internet connection found. App is running in offline mode.\"\r\n );\r\n });\r\n }\r\n \r\n export function unregister() {\r\n if (\"serviceWorker\" in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n }\r\n ","import \"react-app-polyfill/ie11\";\r\nimport \"react-app-polyfill/stable\";\r\nimport React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { createStore, applyMiddleware } from \"redux\";\r\nimport thunk from \"redux-thunk\";\r\nimport { save, load } from \"redux-localstorage-simple\";\r\nimport { Provider } from \"react-redux\";\r\nimport { fetchProducts } from \"./redux/actions/productActions\";\r\nimport rootReducer from \"./redux/reducers/rootReducer\";\r\nimport products from \"./data/products.json\";\r\n\r\nimport App from './App';\r\nimport \"./assets/scss/style.scss\";\r\nimport * as serviceWorker from \"./serviceWorker\";\r\n\r\nimport { composeWithDevTools } from \"redux-devtools-extension\";\r\n\r\nconst store = createStore(\r\n rootReducer,\r\n load(),\r\n composeWithDevTools(applyMiddleware(thunk, save()))\r\n);\r\n\r\n// fetch products from json file\r\nstore.dispatch(fetchProducts(products));\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n","export const ADD_TO_CART = \"ADD_TO_CART\";\r\nexport const DECREASE_QUANTITY = \"DECREASE_QUANTITY\";\r\nexport const DELETE_FROM_CART = \"DELETE_FROM_CART\";\r\nexport const DELETE_ALL_FROM_CART = \"DELETE_ALL_FROM_CART\";\r\n\r\n//add to cart\r\nexport const addToCart = (\r\n item,\r\n addToast,\r\n quantityCount,\r\n selectedProductColor,\r\n selectedProductSize\r\n) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Added To Cart\", { appearance: \"success\", autoDismiss: true });\r\n }\r\n dispatch({\r\n type: ADD_TO_CART,\r\n payload: {\r\n ...item,\r\n quantity: quantityCount,\r\n selectedProductColor: selectedProductColor\r\n ? selectedProductColor\r\n : item.selectedProductColor\r\n ? item.selectedProductColor\r\n : null,\r\n selectedProductSize: selectedProductSize\r\n ? selectedProductSize\r\n : item.selectedProductSize\r\n ? item.selectedProductSize\r\n : null\r\n }\r\n });\r\n };\r\n};\r\n//decrease from cart\r\nexport const decreaseQuantity = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Item Decremented From Cart\", {\r\n appearance: \"warning\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DECREASE_QUANTITY, payload: item });\r\n };\r\n};\r\n//delete from cart\r\nexport const deleteFromCart = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Removed From Cart\", { appearance: \"error\", autoDismiss: true });\r\n }\r\n dispatch({ type: DELETE_FROM_CART, payload: item });\r\n };\r\n};\r\n//delete all from cart\r\nexport const deleteAllFromCart = addToast => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Removed All From Cart\", {\r\n appearance: \"error\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DELETE_ALL_FROM_CART });\r\n };\r\n};\r\n\r\n// get stock of cart item\r\nexport const cartItemStock = (item, color, size) => {\r\n if (item.stock) {\r\n return item.stock;\r\n } else {\r\n return item.variation\r\n .filter(single => single.color === color)[0]\r\n .size.filter(single => single.name === size)[0].stock;\r\n }\r\n};\r\n","export const ADD_TO_WISHLIST = \"ADD_TO_WISHLIST\";\r\nexport const DELETE_FROM_WISHLIST = \"DELETE_FROM_WISHLIST\";\r\nexport const DELETE_ALL_FROM_WISHLIST = \"DELETE_ALL_FROM_WISHLIST\";\r\n\r\n// add to wishlist\r\nexport const addToWishlist = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Ürün beğendiklerinize eklendi.\", {\r\n appearance: \"success\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: ADD_TO_WISHLIST, payload: item });\r\n };\r\n};\r\n\r\n// delete from wishlist\r\nexport const deleteFromWishlist = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Ürün beğendiklerinizden çıkarıldı.\", {\r\n appearance: \"error\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DELETE_FROM_WISHLIST, payload: item });\r\n };\r\n};\r\n\r\n//delete all from wishlist\r\nexport const deleteAllFromWishlist = addToast => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Tüm ürünler beğendiklerinizden çıkarıldı.\", {\r\n appearance: \"error\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DELETE_ALL_FROM_WISHLIST });\r\n };\r\n};\r\n"],"sourceRoot":""}