1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5556],{83547:function(e,a,l){l.d(a,{GL:function(){return n},IP:function(){return d},yO:function(){return o},eQ:function(){return c}});var t=l(78551),r=l(98029),i=l(63781);const s="https://api.optikmelawai.com",n=()=>(0,t.a)({queryKey:["getreviewList"],queryFn:()=>(async()=>(await(0,i.RE)({method:i.Is.GET,overrideBaseUrl:s,subUrl:"/api/v1/customer/reviews?review=0",useStrapi:!1})).data)(),refetchOnMount:!0}),d=()=>(0,r.D)({mutationFn:e=>(async e=>(await(0,i.RE)({method:i.Is.POST,overrideBaseUrl:s,subUrl:"/api/v1/products/review",headerPost:{"Content-Type":"multipart/form-data"},data:e,useStrapi:!1})).data)(e)}),o=e=>(0,t.a)({queryKey:["getEditReview",e],queryFn:()=>(async e=>(await(0,i.RE)({method:i.Is.GET,overrideBaseUrl:s,subUrl:"/api/v2/reviews/".concat(null==e?void 0:e.Id),useStrapi:!1})).data)(e)}),c=e=>(0,t.a)({queryKey:["GetHistoryreviewList"],queryFn:()=>(async e=>(await(0,i.RE)({method:i.Is.GET,overrideBaseUrl:s,subUrl:"/api/v2/reviews?page=".concat(e.page,"&limit=").concat(e.limit),useStrapi:!1})).data)(e),refetchOnMount:!0})},1644:function(e,a,l){l.d(a,{Z:function(){return s}});var t=l(85893),r=l(60651),i=l(11163);function s(e){let{loading:a,onClickLoadMore:l,show:s=!0}=e;const{locale:n}=(0,i.useRouter)(),d=r.z[n];return(0,t.jsx)(t.Fragment,{children:s&&(0,t.jsxs)("div",{className:"mt-5 py-10 text-center",children:[a&&(0,t.jsx)("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status",children:(0,t.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})}),!a&&(0,t.jsx)("button",{onClick:l,className:"text-black text-xl font-epilogue font-bold text-center uppercase hover:text-primary",children:null==d?void 0:d.btnLoadMore})]})})}},5556:function(e,a,l){l.r(a),l.d(a,{default:function(){return b}});var t=l(85893),r=l(67294),i=l(92666),s=l(83547),n=l(41664),d=l.n(n),o=l(30381),c=l.n(o),u=l(11163),m=l(18584),p=l(15267),v=l(1644);var x=()=>{const{locale:e}=(0,u.useRouter)(),a=m.c[e],l=(0,s.GL)(),[n,o]=(0,r.useState)();(0,r.useEffect)(()=>{var e,a,t;(null==l?void 0:l.isSuccess)&&((null==l||null===(e=l.data)||void 0===e?void 0:e.status)&&o((null==l||null===(t=l.data)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.data)||[]))},[null==l?void 0:l.isSuccess,null==l?void 0:l.isError,null==l?void 0:l.isFetching]);const[x,b]=(0,r.useState)(1),[h,f]=(0,r.useState)(),[w,g]=(0,r.useState)(0),[N,j]=(0,r.useState)(!1),y=(0,s.eQ)({page:x,limit:15});(0,r.useEffect)(()=>{var e,a,l;(null==y?void 0:y.isSuccess)&&((null==y||null===(e=y.data)||void 0===e?void 0:e.status)&&(f(e=>{var a,l;return[...e||[],...(null==y||null===(l=y.data)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.data)||[]]}),g((null==y||null===(l=y.data)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.total)||0),j(!1)))},[null==y?void 0:y.isSuccess,null==y?void 0:y.isError,null==y?void 0:y.isFetching,x]);return(0,r.useEffect)(()=>{if("#tab-history-review"===window.location.hash){const e=document.querySelector('[data-te-target="#tab-history-review"]');e&&e.click()}},[]),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"w-full h-full flex md:flex-row sm:flex-col",children:[(0,t.jsx)(i.Z,{activedMenu:"Review"}),(0,t.jsxs)("div",{className:"md:w-[74%] sm:w-full border-[1px] border-zinc-200",children:[(0,t.jsx)("div",{className:"md:pb-5 sm:py-2 md:mt-6 sm:mt-0 border-b-[1px] border-zinc-200",children:(0,t.jsx)("div",{className:"p-25",children:(0,t.jsx)("p",{className:"text-black text-2xl font-bold font-epilogue",children:null==a?void 0:a.review})})}),(0,t.jsxs)("div",{className:"md:px-25 sm:px-15",children:[(0,t.jsx)("div",{className:"flex md:flex-row items-center md:justify-between w-full border-b-2 border-zinc-200 py-5",children:(0,t.jsxs)("ul",{className:"flex flex-row overflow-x-scroll no-scrollbar whitespace-nowrap",role:"tablist","data-te-nav-ref":!0,children:[(0,t.jsx)("li",{role:"presentation",children:(0,t.jsx)("a",{href:"#tab-create-review",className:"my-7 mx-3 block border-x-0 border-b-2 border-t-0 border-transparent py-1 text-[18px] font-bold uppercase font-epilogue leading-tight text-gray hover:isolate hover:border-b-2 hover:border-white focus:isolate focus:border-transparent data-[te-nav-active]:border-primary data-[te-nav-active]:text-black","data-te-toggle":"pill","data-te-target":"#tab-create-review","data-te-nav-active":!0,role:"tab","aria-controls":"tab-create-review","aria-selected":"true",children:null==a?void 0:a.needreview})}),(0,t.jsx)("li",{role:"presentation",children:(0,t.jsx)("a",{href:"#tab-history-review",className:"my-7 mx-3 block border-x-0 border-b-2 border-t-0 border-transparent py-1 text-[18px] font-bold uppercase font-epilogue leading-tight text-gray hover:isolate hover:border-b-2 hover:border-white focus:isolate focus:border-transparent data-[te-nav-active]:border-primary data-[te-nav-active]:text-black","data-te-toggle":"pill","data-te-target":"#tab-history-review",role:"tab","aria-controls":"tab-history-review","aria-selected":"false",children:null==a?void 0:a.reviewHistory})})]})}),(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("div",{className:"hidden w-full h-full opacity-100 transition-opacity duration-150 ease-linear data-[te-tab-active]:block",i
1d:"tab-create-review",role:"tabpanel","aria-labelledby":"tab-create-review-tab","data-te-tab-active":!0,children:[(null==l?void 0:l.isFetching)&&(0,t.jsx)("div",{className:"w-full text-center py-64",children:(0,t.jsx)("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status",children:(0,t.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}),!(null==l?void 0:l.isFetching)&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"space-y-10",children:n&&0!==n.length?(0,t.jsx)("div",{children:null==n?void 0:n.map((e,l)=>{var r,i,s,n,o,u,m,v,x,b,h,f,w,g,N;return(0,t.jsx)("div",{className:"py-10 pr-5 border-b-2 border-zinc-200",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"grid md:grid-cols-6 sm:grid-cols-2 items-start",children:[(0,t.jsx)("div",{className:"md:h-[100px] sm:h-full md:w-[100px] sm:w-full flex items-center px-3 border border-zinc-200 rounded-lg",children:(0,t.jsx)(p.Z,{fallbackSrc:"/assets/icons/broken-img.svg",src:null==e||null===(i=e.product)||void 0===i||null===(r=i.image)||void 0===r?void 0:r.filename,blurDataURL:null==e||null===(n=e.product)||void 0===n||null===(s=n.image)||void 0===s?void 0:s.filename,height:700,width:700,alt:"",className:"max-w-full max-h-auto object-fill",loading:"lazy"})}),(0,t.jsx)("div",{className:"md:px-0 sm:px-5",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue",children:null==e||null===(u=e.product)||void 0===u||null===(o=u.brand)||void 0===o?void 0:o.name}),(0,t.jsx)("p",{className:"text-black text-sm uppercase font-normal font-epilogue -mt-1",children:null==e||null===(m=e.product)||void 0===m?void 0:m.name})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue md:px-10 sm:px-1 md:mt-0 sm:mt-5",children:null==a?void 0:a.labelOrder}),(0,t.jsxs)("p",{className:"text-black text-sm uppercase font-normal font-epilogue md:px-10 sm:px-1 md:mt-0 sm:mt-5",children:["#",null==e||null===(v=e.invoice)||void 0===v?void 0:v.invoice_number]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue md:mt-0 sm:mt-5 sm:px-5",children:null==a?void 0:a.labelOrderDate}),(0,t.jsx)("p",{className:"text-black text-sm uppercase font-normal font-epilogue md:mt-0 sm:mt-5 sm:px-5",children:c()((null==e||null===(x=e.order)||void 0===x?void 0:x.created_at)||"1999-10-06 06:06:06").utcOffset("+07:00").format("DD MMM YYYY")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue md:mt-0 sm:mt-5",children:"Total"}),(0,t.jsxs)("p",{className:"text-black text-sm uppercase font-normal font-epilogue md:mt-0 sm:mt-5",children:["Rp. ",null==e||null===(h=e.product)||void 0===h||null===(b=h.price)||void 0===b?void 0:b.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")]})]}),(0,t.jsx)("div",{className:"md:block sm:hidden",children:(0,t.jsx)(d(),{href:"/member/review/create?id=".concat(null==e||null===(f=e.product)||void 0===f?void 0:f.id,"&orderId=").concat(null==e||null===(w=e.order)||void 0===w?void 0:w.invoice_id),className:"h-[40px] md:w-[150px] sm:w-full px-5 border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue inline-flex items-center justify-center",children:null==a?void 0:a.btnReview})})]}),(0,t.jsx)("div",{className:"md:hidden sm:grid grid-cols-2 mt-10 w-full",children:(0,t.jsx)(d(),{href:"/member/review/create?id=".concat(null==e||null===(g=e.product)||void 0===g?void 0:g.id,"&orderId=").concat(null==e||null===(N=e.order)||void 0===N?void 0:N.invoice_id),className:"h-[40px] md:w-[150px] sm:w-[90%] border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue flex items-center justify-center",children:null==a?void 0:a.btnReview})})]})},l)})}):(0,t.jsxs)("div",{className:"lg:w-1/2 md:w-1/2 sm:w-full m-auto pb-10",children:[(0,t.jsx)("div",{className:"px-25",children:(0,t.jsx)("div",{className:"flex mt-10",children:(0,t.jsxs)("div",{className:"pb-5 flex flex-col items-center w-full",children:[(0,t.jsx)(p.Z,{fallbackSrc:"/assets/icons/broken-img.svg",src:"/assets/icons/no-product.
1svg",blurDataURL:"/assets/icons/no-product.svg",height:700,width:700,alt:"",className:"w-[200px] h-auto mt-5",loading:"lazy"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("p",{className:"text-black text-base uppercase font-bold font-epilogue text-center",children:null==a?void 0:a.noProductNeedReview}),(0,t.jsx)("p",{className:"text-black text-sm uppercase font-normal font-epilogue text-center",children:null==a?void 0:a.startShoppingMelawai})]})]})})}),(0,t.jsx)("div",{className:"py-5 px-25",children:(0,t.jsx)(d(),{href:"/shop",className:"btn btn-primary md:w-[400px] sm:w-full m-auto max-w-full",children:null==a?void 0:a.exploreProduct})})]})})})]}),(0,t.jsxs)("div",{className:"hidden w-full h-full opacity-0 transition-opacity duration-150 ease-linear data-[te-tab-active]:block",id:"tab-history-review",role:"tabpanel","aria-labelledby":"tab-history-review-tab",children:[(null==y?void 0:y.isFetching)&&(0,t.jsx)("div",{className:"w-full text-center py-64",children:(0,t.jsx)("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status",children:(0,t.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}),(0,t.jsxs)("div",{className:"space-y-10",children:[!(null==y?void 0:y.isFetching)&&(!h||0===h.length)&&(0,t.jsxs)("div",{className:"lg:w-1/2 md:w-1/2 sm:w-full m-auto pb-10",children:[(0,t.jsx)("div",{className:"px-25",children:(0,t.jsx)("div",{className:"flex mt-10",children:(0,t.jsxs)("div",{className:"pb-5 flex flex-col items-center w-full",children:[(0,t.jsx)(p.Z,{fallbackSrc:"/assets/icons/broken-img.svg",src:"/assets/icons/empty-product.svg",blurDataURL:"/assets/icons/empty-product.svg",height:700,width:700,alt:"",className:"w-[200px] h-auto mt-5",loading:"lazy"}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("p",{className:"text-black text-base uppercase font-bold font-epilogue text-center",children:null==a?void 0:a.youHaventProvided}),(0,t.jsx)("p",{className:"text-black text-sm uppercase font-normal font-epilogue text-center",children:null==a?void 0:a.pleaseReview})]})]})})}),(0,t.jsx)("div",{className:"py-5 px-25",children:(0,t.jsx)(d(),{href:"/shop",className:"btn btn-primary md:w-[400px] sm:w-full m-auto max-w-full",children:null==a?void 0:a.exploreProduct})})]}),(0,t.jsx)("div",{children:null==h?void 0:h.map((e,l)=>{var r,i,s,n,o,u,m,v,x,b,h,f,w,g,N,j,y,k,A;return(0,t.jsx)("div",{className:"py-10 pr-5 border-b-2 border-zinc-200",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"grid md:grid-cols-6 sm:grid-cols-2 items-start",children:[(0,t.jsx)("div",{className:"md:h-[100px] sm:h-full md:w-[100px] sm:w-full flex items-center px-3 border border-zinc-200 rounded-lg",children:(0,t.jsx)(p.Z,{fallbackSrc:"/assets/icons/broken-img.svg",src:(null==e||null===(u=e.order)||void 0===u||null===(o=u.invoice)||void 0===o||null===(n=o.invoice_products)||void 0===n||null===(s=n[0])||void 0===s||null===(i=s.product)||void 0===i||null===(r=i.image_thumbnail)||void 0===r?void 0:r.filename)||"/assets/icons/broken-img.svg",blurDataURL:(null==e||null===(f=e.order)||void 0===f||null===(h=f.invoice)||void 0===h||null===(b=h.invoice_products)||void 0===b||null===(x=b[0])||void 0===x||null===(v=x.product)||void 0===v||null===(m=v.image_thumbnail)||void 0===m?void 0:m.filename)||"/assets/icons/broken-img.svg",height:700,width:700,alt:"Product Thumbnail",className:"max-w-full max-h-auto object-fill",loading:"lazy"})}),(0,t.jsx)("div",{className:"md:px-0 sm:px-5",children:null==e||null===(N=e.order)||void 0===N||null===(g=N.invoice)||void 0===g||null===(w=g.invoice_products)||void 0===w?void 0:w.map((e,a)=>{var l,r,i;return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue",children:null==e||null===(r=e.product)||void 0===r||null===(l=r.brand)||void 0===l?void 0:l.name}),(0,t.jsx)("p",{className:"text-black text-sm uppercase font-normal font-epilogue -mt-1",children:null==e||null===(i=e.product)||void 0===i?void 0:i.name})]},a)})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue md:px-10 sm:px-1 md:mt-0 sm:mt-5",children:null==a?void 0:a.labelOrder}),(0,t.jsxs)("p",{className:"text-black text-sm uppercase font-normal font-epilogue md:px-10 sm:px-1 md:mt-0 sm:mt-5",children:["#",null==e||null===(y=e.order)||void 0===y||null===(j=y.invoice)||void 0===j?void 0:j.invoice_number]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue md:mt-0 sm:mt-5 sm:px-5",children:null==a?void 0:a.labelOrderDate}),(0,t.jsx)("p",{className:"text-black text-sm uppercase font-normal font-epilogue md:mt-0 sm:mt-5 sm:px-5",children:c()((null==e||null===(k=e.order)||void 0===k?void 0:k.created_at)||"1999-10-06 06:06:06").utcOffset("+0
17:00").format("DD MMM YYYY")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-black text-sm uppercase font-bold font-epilogue md:mt-0 sm:mt-5",children:"Total"}),(0,t.jsxs)("p",{className:"text-black text-sm uppercase font-normal font-epilogue md:mt-0 sm:mt-5",children:["Rp. ",null==e||null===(A=e.order)||void 0===A?void 0:A.grand_total.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")]})]}),(0,t.jsx)("div",{className:"md:block sm:hidden",children:(0,t.jsx)(d(),{href:"/member/review/edit/".concat(e.id),className:"h-[40px] md:w-[150px] sm:w-full px-5 border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue inline-flex items-center justify-center",children:null==a?void 0:a.btnView})})]}),(0,t.jsx)("div",{className:"md:hidden sm:grid grid-cols-2 mt-10 w-full",children:(0,t.jsx)(d(),{href:"/member/review/edit/".concat(e.id),className:"h-[40px] md:w-[150px] sm:w-[90%] border-2 border-primary text-primary text-sm uppercase font-bold font-epilogue flex items-center justify-center",children:null==a?void 0:a.btnView})})]})},l)})})]}),h&&h.length<w&&(0,t.jsx)(v.Z,{loading:N,onClickLoadMore:()=>{j(!0),b(x+1)}})]})]})]})]})]})})};function b(){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"content overflow-hidden",children:(0,t.jsx)(x,{})})})}},18584:function(e,a,l){l.d(a,{c:function(){return t}});const t={id:{labelPlc:"Masukkan Ulasan",btnView:"Lihat Ulasan",btnReview:"Tulis Ulasan",labelOrder:"Pesanan",labelOrderDate:"Tanggal Pemesanan",labelUpload:"Unggah Foto",sendBtn:"Kirim",labelHow:"BAGAIMANA PENDAPATMU TERKAIT PRODUK INI ?",backBtn:"Kembali",starBtn:"Yuk berikan bintang !",review:"Ulasan",needreview:"Perlu Diulas",reviewHistory:"Riwayat Ulasan",alertStart:"Silakan berikan ulasan terkait produk ini.",alertStart1:"Ulasan harus minimal 15 karakter.",noOrder:"Belum ada pesanan yang dilakukan",youNotPlacedOrder:"Anda belum melakukan pemesanan. Silakan tambahkan item ke keranjang Anda dan checkout ketika Anda sudah siap.",exploreProduct:"Jelajahi Produk",noProductNeedReview:"TIDAK ADA PRODUK YANG PERLU DITINJAU",youHaventProvided:"ANDA BELUM MEMBERIKAN ULASAN PRODUK APAPUN",pleaseReview:"Harap tinjau produk yang telah Anda beli setelah pesanan Anda selesai",startShoppingSharing:"MULAI BELANJA DAN BERBAGI ULASAN ANDA DENGAN ORANG LAIN!",startShoppingMelawai:"PRODUK AKAN MUNCUL SETELAH PESANAN SELESAI.",drawScss:"TAMBAHKAN ULASAN BERHASIL",plcReview:"Masukkan Ulasan",lblJenisLensa:"Jenis Lensa",lblInvoiceLensa:" Invoice Pesanan",lblTanggalPesanan:"Tanggal Pesanan",lblTotPesanan:"Total Pesanan"},en:{labelPlc:"Enter a review",btnView:"View Review",btnReview:"Write Review",labelOrder:"Order",labelOrderDate:"Order Date",labelUpload:"Upload photo",sendBtn:"Send",labelHow:"WHAT DO YOU THINK ABOUT THIS PRODUCT?",starBtn:"Let`s give it stars!",backBtn:"Back",review:"Review",needreview:"Need to Be Reviewed",reviewHistory:"Review History",alertStart:"Please leave a review regarding this product.",alertStart1:"Reviews must be at least 15 characters.",noOrder:"No orders placed yet",youNotPlacedOrder:"You have not placed an order yet. Please add items to your cart and checkout when you are ready.",exploreProduct:"Explore Products",noProductNeedReview:"No products require reviewing",noProductReview:"No products require reviewing",youHaventProvided:"YOU HAVE NOT PROVIDED ANY PRODUCT REVIEWS YET",pleaseReview:"Please review the products you have purchased after your order is complete",startShoppingSharing:"START SHOPPING AND SHARING YOUR REVIEWS WITH OTHERS!",startShoppingMelawai:"The product will appear after the order is completed.",drawScss:"ADD REVIEW SUCCESS",plcReview:"Enter Review",lblJenisLensa:"Lens Type",lblInvoiceLensa:"Order Invoice",lblTanggalPesanan:"Order Date",lblTotPesanan:"Total Order"}}},60651:function(e,a,l){l.d(a,{z:function(){return t}});const t={id:{noResultFound:"Tidak ada hasil yang ditemukan",tryDifKey:"Coba kata kunci yang berbeda atau lebih umum",learn:"Artikel",service:"Layanan",viewAll:"Lihat Semua",discoverMore:"Temukan Lebih Banyak",btnLoadMore:"Muat Lebih Banyak",product:"Produk",page:"Halaman",brand:"Brand",searchResult:"Hasil Pencarian"},en:{noResultFound:"No results found",tryDifKey:"Try different or more general keywords",learn:"Article",service:"Service",viewAll:"View All",discoverMore:"Discover More",btnLoadMore:"Load More",product:"Product",page:"Pages",brand:"Brand",searchResult:"Search Result"}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.