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UAAW,QACXlB,OAAQJ,EAAYK,GAAK,IAAM,IAC/BoC,UAAW,IAEbsB,SAAS,OAIb,gBAAKvE,UAAU,YAAf,UACE,SAAC,IAAD,CACEkH,WAAW,sBACXjF,MAAM,yBACNyE,IAAKiB,EACLtI,QAAS0I","sources":["package/client/api/banner.js","package/client/components/common/carouselLanding/CarouselLanding.jsx","package/client/components/common/productCard/ProductCard.jsx","package/client/components/common/productsFrame/ProductsFrame.jsx","package/client/features/homePage/page/HomePageLayout.jsx"],"sourcesContent":["import axiosClient from \"./axiosClient\";\r\n\r\nexport const banner = {\r\n readAll: async () => {\r\n return await axiosClient.get(\"/Slide/GetAllSlideClient\");\r\n }\r\n};\r\n","import React, { useEffect, useState } from \"react\";\r\n\r\nimport { banner } from \"../../../api/banner\";\r\nimport { openNotificationWithIcon } from \"../../../utils\";\r\nimport { Grid, Space, Spin, Typography } from \"antd\";\r\nimport BannerAnim, { Element } from \"rc-banner-anim\";\r\nimport TweenOne from \"rc-tween-one\";\r\n\r\nimport \"rc-banner-anim/assets/index.css\";\r\nimport \"./CarouselLanding.css\";\r\nexport function _CarouselLanding() {\r\n const [listImage, setListImage] = useState([]);\r\n const [loading, setLoading] = useState(true);\r\n useEffect(() => {\r\n banner\r\n .readAll()\r\n .then((res) => {\r\n setListImage(res);\r\n setLoading(false);\r\n })\r\n .catch((err) => {\r\n openNotificationWithIcon(\r\n \"error\",\r\n \"Lấy danh mục hình ảnh thất bại\",\r\n err?.response?.data?.message || err?.message\r\n );\r\n });\r\n }, []);\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\nconst { useBreakpoint } = Grid;\r\nconst apiUrl = window._env_.REACT_APP_URl_SERVER_APIS;\r\n\r\nfunction CarouselLandingImage({ loading, listImage }) {\r\n const breakPoints = useBreakpoint();\r\n\r\n return (\r\n \r\n \r\n {listImage.map((item, index) => (\r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n \r\n );\r\n function CarouselLangdingContent({ title, content }) {\r\n return (\r\n
\r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n \r\n {content}\r\n \r\n \r\n {/* \r\n \r\n */}\r\n \r\n
\r\n );\r\n }\r\n}\r\n\r\nexport const CarouselLanding = React.memo(_CarouselLanding);\r\n","import { Fragment } from \"react\";\r\nimport { memo } from \"react\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\n\r\nimport { getImageFilterForSizeImage } from \"../../../utils/filterImage\";\r\nimport { Button, Card, Grid, Image, Modal, Select, Skeleton, Space, Spin, Tooltip, Typography } from \"antd\";\r\n\r\nimport \"./ProductCard.css\";\r\nconst { useBreakpoint } = Grid;\r\nconst { Option } = Select;\r\n\r\nfunction _ProductCard(props) {\r\n const breakpoint = useBreakpoint();\r\n const navigate = useNavigate();\r\n\r\n const [isModalVisible, setIsModalVisible] = useState(false);\r\n const [selectTypeReadBook, setSelectTypeReadBook] = useState(1);\r\n const handleOk = () => {\r\n setIsModalVisible(false);\r\n if (selectTypeReadBook === 1) {\r\n navigate(`/view-online/${props?.document?.id}`);\r\n } else {\r\n navigate(`/view-online-flip-books/${props?.document?.id}`);\r\n }\r\n };\r\n const handleChangeSelect = (value) => {\r\n setSelectTypeReadBook(value);\r\n };\r\n const handleCancel = () => {\r\n setIsModalVisible(false);\r\n };\r\n\r\n const defaultImage =\r\n \"https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80\";\r\n const [loading, setLoading] = useState(false);\r\n\r\n useEffect(() => {\r\n props.loading ? setLoading(true) : setLoading(false);\r\n }, [props.loading, props.loadingColor]);\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n ) : (\r\n {\r\n navigate(`/detail-page/${props?.document?.id}`, {\r\n state: { id: props?.document?.id }\r\n });\r\n }}\r\n alt=\"book\"\r\n src={props?.listAvatar?.length > 0 ? getImageFilterForSizeImage(props?.listAvatar, 1) : defaultImage}\r\n />\r\n )\r\n }\r\n actions={[\r\n loading ? (\r\n \r\n ) : (\r\n \r\n \r\n \r\n \r\n {props?.document?.author}\r\n \r\n \r\n {\r\n setIsModalVisible(true);\r\n }}\r\n >\r\n Đọc sách online\r\n \r\n \r\n \r\n )\r\n ]}\r\n >\r\n {loading ? (\r\n \r\n ) : (\r\n \r\n \r\n {props?.document?.docName}\r\n \r\n }\r\n />\r\n \r\n )}\r\n \r\n
\r\n );\r\n}\r\n\r\nexport const ProductCard = memo(_ProductCard);\r\n","import { memo } from \"react\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\n\r\nimport { ContactAndIntroduction } from \"../../../../admin/api/contactAndIntroduction\";\r\nimport { openNotificationWithIcon } from \"../../../utils\";\r\nimport { ProductCard } from \"./../productCard\";\r\nimport { Button, Col, Divider, Pagination, Row } from \"antd\";\r\nimport TweenOne from \"rc-tween-one\";\r\n\r\nimport \"./ProductsFrame.css\";\r\n// const { useBreakpoint } = Grid;\r\nfunction _ProductsFrame(props) {\r\n // const breakpoint = useBreakpoint();\r\n const navigate = useNavigate();\r\n const [loadingColor, setLoadingColor] = useState(true);\r\n const [contactAndIntroduction, setcontactAndIntroduction] = useState({});\r\n useEffect(() => {\r\n ContactAndIntroduction.read(1, 1, 3)\r\n .then((res) => {\r\n setcontactAndIntroduction({ ...res[0] });\r\n })\r\n .catch((err) => {\r\n openNotificationWithIcon(\r\n \"error\",\r\n \"Lấy cấu hình màu sắc thất bại\",\r\n err?.response?.data?.message || err?.message\r\n );\r\n })\r\n .finally(() => {\r\n setLoadingColor(false);\r\n });\r\n }, []);\r\n if (props?.loading) {\r\n return (\r\n
\r\n \r\n {props.title}\r\n \r\n \r\n {[...Array(props?.pageSize || 12)].map((item, index) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n {/* */}\r\n \r\n \r\n {props.title}\r\n \r\n \r\n \r\n {props?.Arr.map((item, index) => (\r\n \r\n \r\n \r\n ))}\r\n \r\n\r\n
\r\n {props.isCategoryPage ? (\r\n \r\n ) : (\r\n {\r\n navigate(`/category-page-especially/${props?.especially}`, {\r\n state: { title: props?.title }\r\n });\r\n }}\r\n >\r\n Xem thêm sách khác\r\n \r\n )}\r\n
\r\n {/*
*/}\r\n
\r\n );\r\n}\r\n\r\nfunction Paginations({ totalNumberProducts, handleOnChange, onShowSizeChange, pageSize, pageIndex }) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport const ProductsFrame = memo(_ProductsFrame);\r\n","import React, { Fragment, useEffect, useState } from \"react\";\r\n\r\nimport WithErrorBoundaryCustom from \"../../../../../units/errorBounDary/WithErrorBoundaryCustom\";\r\nimport { books } from \"../../../api\";\r\nimport { banner } from \"../../../api/banner\";\r\nimport { CarouselLanding } from \"../../../components/common/carouselLanding\";\r\nimport { ProductsFrame } from \"../../../components/common/productsFrame\";\r\nimport { openNotificationWithIcon } from \"../../../utils\";\r\nimport { Grid, Image, Spin } from \"antd\";\r\nconst { useBreakpoint } = Grid;\r\nfunction _HomePageLayout() {\r\n const breakPoints = useBreakpoint();\r\n const [newBooks, setNewBooks] = useState([]);\r\n const [mostPopularBooks, setMostPopularBooks] = useState([]);\r\n const [newBooksLoading, setNewBooksLoading] = useState(true);\r\n const [mostPopularBooksLoading, setMostPopularBooksLoading] = useState(true);\r\n const [Slide, setSlide] = useState([]);\r\n const [loadingSlide, setLoadingSlide] = useState(true);\r\n const [randomNumber, setRandomNumber] = useState(0);\r\n\r\n useEffect(() => {\r\n const fetchData = async () => {\r\n await Promise.all([\r\n books\r\n .getNewBooks(1, 12)\r\n .then((res) => {\r\n setNewBooks(res);\r\n setNewBooksLoading(false);\r\n })\r\n .catch((err) => {\r\n openNotificationWithIcon(\"error\", \"Lấy sách mới thất bại\", err.message);\r\n }),\r\n books\r\n .getMostPopularBooks(1, 12)\r\n .then((res) => {\r\n setMostPopularBooks(res);\r\n setMostPopularBooksLoading(false);\r\n })\r\n .catch((err) => {\r\n openNotificationWithIcon(\"error\", \"Lấy danh sách sách xem nhiều nhất thất bại\", err.message);\r\n }),\r\n banner\r\n .readAll()\r\n .then((res) => {\r\n setSlide(res);\r\n setRandomNumber(Math.floor(Math.random() * res.length));\r\n setLoadingSlide(false);\r\n })\r\n .catch((err) => {\r\n openNotificationWithIcon(\"error\", \"Lấy hình ảnh thất bại\", err?.response?.data?.message || err?.message);\r\n })\r\n ]);\r\n };\r\n fetchData();\r\n }, []);\r\n\r\n useEffect(() => {\r\n document.title = \"Trang chủ\";\r\n }, []);\r\n const apiUrl = window._env_.REACT_APP_URl_SERVER_APIS;\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}\r\n\r\nexport const HomePageLayout = WithErrorBoundaryCustom(_HomePageLayout);\r\n"],"names":["banner","readAll","axiosClient","_CarouselLanding","useState","listImage","setListImage","loading","setLoading","useEffect","then","res","catch","err","openNotificationWithIcon","response","data","message","className","CarouselLandingImage","useBreakpoint","Grid","apiUrl","window","_env_","REACT_APP_URl_SERVER_APIS","breakPoints","spinning","size","style","height","xs","autoPlaySpeed","autoPlay","map","item","index","followParallax","delay","id","key","value","bgPosition","type","backgroundImage","fileName","backgroundSize","backgroundPosition","objectFit","width","CarouselLangdingContent","title","content","description","direction","animation","y","opacity","level","textShadow","textTransform","color","fontWeight","fontSize","lg","md","sm","marginTop","CarouselLanding","React","Option","Select","_ProductCard","props","breakpoint","navigate","useNavigate","isModalVisible","setIsModalVisible","selectTypeReadBook","setSelectTypeReadBook","loadingColor","visible","onOk","document","onCancel","onChange","hoverable","cover","preview","onClick","state","alt","src","listAvatar","length","getImageFilterForSizeImage","actions","active","author","wordBreak","margin","contactAndIntroduction","col1","background","col","docName","overflow","Fragment","ProductCard","memo","_ProductsFrame","setLoadingColor","setcontactAndIntroduction","ContactAndIntroduction","finally","plain","borderTopColor","marginBottom","gutter","Array","pageSize","xl","translateY","Arr","isCategoryPage","Paginations","totalNumberProducts","handleOnChange","onShowSizeChange","pageIndex","e","especially","showQuickJumper","defaultCurrent","total","ProductsFrame","HomePageLayout","WithErrorBoundaryCustom","newBooks","setNewBooks","mostPopularBooks","setMostPopularBooks","newBooksLoading","setNewBooksLoading","mostPopularBooksLoading","setMostPopularBooksLoading","Slide","setSlide","loadingSlide","setLoadingSlide","randomNumber","setRandomNumber","fetchData","Promise","all","books","Math","floor","random"],"sourceRoot":""}