(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[671],{5482:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/new-releases",function(){return n(1225)}])},9874:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var l=n(5893),r=n(3960);function o(e){return(0,l.jsx)(l.Fragment,{children:e.html?(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,r.Cd)(e.html)}}):e.children?e.children:""})}n(7294)},178:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var l=n(5893),r=n(9008),o=n.n(r);n(7294);var a=n(1163),i=n(3960);function s(e){let{seo:t}=e,n=(0,a.useRouter)();if(!t)return null;let r=()=>{var e,n;return(null==t?void 0:null===(n=t.keywords)||void 0===n?void 0:null===(e=n.related_keywords)||void 0===e?void 0:e.length)?t.keywords.related_keywords.join(","):""},s=i.wB+n.asPath,c="/favicon.ico";return(0,l.jsxs)(o(),{children:[r()&&(0,l.jsx)("meta",{name:"keywords",content:r()}),(0,l.jsx)("link",{rel:"canonical",href:s}),(0,l.jsx)("meta",{property:"og:url",content:s}),(0,l.jsx)("meta",{property:"og:type",content:"website"}),t.title&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{property:"og:title",content:t.title}),(0,l.jsx)("title",{children:"".concat(t.title)})]}),t.description&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"description",content:t.description}),(0,l.jsx)("meta",{property:"og:description",content:t.description}),(0,l.jsx)("meta",{name:"twitter:description",content:t.description})]}),(0,l.jsx)("meta",{property:"og:image",content:c}),(0,l.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,l.jsx)("meta",{name:"twitter:url",content:s}),(0,l.jsx)("meta",{name:"twitter:image",content:c}),(0,l.jsx)("meta",{name:"robots",content:"index, follow"})]})}},3745:function(e,t,n){"use strict";var l=n(5893);n(7294),t.Z=e=>{let{children:t,bgHeight:n=536,bgImg:r="/image/home/BG6.png"}=e;return(0,l.jsxs)("div",{className:"flex flex-col justify-center items-center bg-no-repeat bg-cover bg-center relative",children:[(0,l.jsx)("img",{src:r,alt:"",className:"!h-[".concat(n,"px] w-full")}),(0,l.jsx)("div",{className:"absolute inset-0 bg-[rgba(0,0,0,.1)]",children:(0,l.jsx)("div",{className:"w-full h-full c-flex flex-col",children:t})})]})}},1225:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return j}});var l=n(5893),r=n(178),o=n(9874),a=n(3478),i=n(1664),s=n.n(i),c=n(992),u=n(7294),d=n(9469),p=n(1402),h=n(7256),m=n(3745);let f=e=>{let{title:t,className:n=""}=e;return(0,l.jsx)("h2",{className:"py-8 font-bold text-3xl max-md:text-xl ".concat(n),children:t})},y=e=>{let{children:t,className:n=""}=e;return(0,l.jsx)("div",{className:"container py-[100px] max-md:py-[60px] ".concat(n),children:t})},v=()=>(0,l.jsxs)(m.Z,{children:[(0,l.jsx)("h2",{className:"lg:text-5xl sm:text-xl text-white text-center font-black mb-10",children:"New Releases"}),(0,l.jsx)("div",{className:"text-white",children:(0,l.jsxs)("p",{className:"text-center mt-10",children:[(0,l.jsx)(s(),{href:"/",className:"text-gray-400 hover:text-main",children:"Home"})," > New Releases"]})})]}),x=[{id:1,name:"NEW",title:"New Products",key:"newProducts"},{id:2,name:"FEATURED",title:"Featured Products",key:"featuredProducts"},{id:3,name:"TOP SELLERS",title:"Top Sellers Products",key:"bestSellingProducts"}],b=e=>{let{productNFB:t}=e,[n,r]=(0,u.useState)(x[0]);return(0,l.jsxs)(y,{children:[(0,l.jsx)("div",{children:(0,l.jsx)("h2",{className:"text-xl md:text-2xl font-black",children:"Explore our latest power bank products! Carefully designed by experts, they seamlessly combine fashion and practicality and are perfect for your charging needs"})}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between max-md:flex-col max-md:items-start",children:[(0,l.jsx)(f,{title:n.title}),(0,l.jsx)("div",{className:"c-flex gap-x-3 max-md:mb-4",children:x.map(e=>(0,l.jsx)("span",{onClick:r.bind(null,e),className:"pb-1 border-b-[2px] ".concat(n.id===e.id?"text-main":"!border-transparent text-gray-500"," text-sm cursor-pointer"),children:e.name},e.id))})]}),(0,l.jsx)("div",{children:t&&Object.keys(t).map(e=>e===n.key?(0,l.jsx)("div",{className:"grid md:grid-cols-5 grid-cols-2 w-full",children:t[e].edges.map(e=>(0,l.jsx)(g,{product:e.node,className:"border-[1px] border-gray-200"},e.node.databaseId))},e):null)})]})},g=e=>{var t,n;let{product:r,className:o}=e;return(0,l.jsxs)(s(),{href:"/product/".concat(r.slug),onClick:e=>{r.slug||e.preventDefault()},className:"c-flex flex-col px-5 max-md:px-2 ".concat(o||""," group"),children:[(0,l.jsx)("div",{className:"py-5 max-md:py-2",children:(0,l.jsx)(a.V,{src:(null==r?void 0:null===(t=r.image)||void 0===t?void 0:t.sourceUrl)||"",alt:r.name,className:"bg-[#f8f8f8] group-hover:scale-110 duration-300",imageWidth:320,imageHeight:320,fit:"contain",quality:80})}),(0,l.jsxs)("div",{className:"mt-2 mb-4 w-full",children:[(0,l.jsx)(c.A,{className:"line-clamp-1",children:null==r?void 0:r.name}),(0,l.jsx)("div",{className:"s-flex",children:(0,l.jsx)(d.Z,{readonly:!0,initialRating:null==r?void 0:r.averageRating,emptySymbol:(0,l.jsx)("i",{className:"ri-star-fill text-themeSecondary300 h-4 w-4"}),fullSymbol:(0,l.jsx)("i",{className:"ri-star-fill text-themeWarning500 h-4 w-4"})})}),(0,l.jsxs)("div",{className:"s-flex",children:[(0,l.jsx)("i",{className:"".concat((null==r?void 0:r.stockStatus)==="IN_STOCK"?"ri-check-line text-main":"ri-close-line text-red-700"," ri-lg mr-1")}),null==r?void 0:null===(n=r.stockStatus)||void 0===n?void 0:n.replace(/_/g," ")]}),(0,l.jsxs)("div",{className:"s-flex font-bold flex-wrap",children:[(null==r?void 0:r.regularPrice)&&r.regularPrice!==r.price&&(0,l.jsx)(p.Z,{price:null==r?void 0:r.regularPrice,className:"py-0.5 !text-gray-500 text-sm mr-1 line-through"}),(0,l.jsx)(p.Z,{price:null==r?void 0:r.price,className:"py-0.5"}),(0,l.jsx)("span",{className:"whitespace-nowrap pl-2 font-normal text-gray-500 text-sm max-md:hidden",children:"/ each"})]}),(0,l.jsx)(h.z,{size:"xs",className:"w-full !rounded-[0px]",children:"View"}),(null==r?void 0:r.sku)&&(0,l.jsxs)(c.A,{className:"mt-1",children:["SKU: ",(0,l.jsx)("span",{className:"text-gray-500",children:(null==r?void 0:r.sku)||""})]})]})]})};var j=!0;t.default=u.memo(function(e){var t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.Z,{seo:null==e?void 0:null===(t=e.seo)||void 0===t?void 0:t.data}),(0,l.jsx)(v,{}),(0,l.jsx)(o.Z,{html:e.page_code,children:(0,l.jsx)(b,{productNFB:e.productNFB})})]})})},9008:function(e,t,n){e.exports=n(9201)},9469:function(e,t,n){"use strict";var l=n(7294);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function i(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(this,arguments)}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},l=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),l.forEach(function(t){s(e,t,n[t])})}return e}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return t&&("object"==typeof t||"function"==typeof t)?t:m(e)}var y={display:"inline-block",borderRadius:"50%",border:"5px double white",width:30,height:30},v={empty:u({},y,{backgroundColor:"#ccc"}),full:u({},y,{backgroundColor:"black"}),placeholder:u({},y,{backgroundColor:"red"})},x=function(e){return l.isValidElement(e)?e:"object"===r(e)&&null!==e?l.createElement("span",{style:e}):"[object String]"===Object.prototype.toString.call(e)?l.createElement("span",{className:e}):void 0},b=function(e){function t(){return o(this,t),f(this,p(t).apply(this,arguments))}return d(t,e),i(t,[{key:"render",value:function(){var e,t=this.props,n=t.index,r=t.inactiveIcon,o=t.activeIcon,a=t.percent,i=t.direction,c=t.readonly,u=t.onClick,d=t.onMouseMove,p=x(r),h=a<100,m=x(o),f=(s(e={display:"inline-block",position:"absolute",overflow:"hidden",top:0},"rtl"===i?"right":"left",0),s(e,"width","".concat(a,"%")),e);function y(e){d&&d(n,e)}function v(e){u&&(e.preventDefault(),u(n,e))}return l.createElement("span",{style:{cursor:c?"inherit":"pointer",display:"inline-block",position:"relative"},onClick:v,onMouseMove:y,onTouchMove:y,onTouchEnd:v},l.createElement("span",{style:h?{}:{visibility:"hidden"}},p),l.createElement("span",{style:f},m))}}]),t}(l.PureComponent),g=function(e){function t(e){var n;return o(this,t),(n=f(this,p(t).call(this,e))).state={displayValue:n.props.value,interacting:!1},n.onMouseLeave=n.onMouseLeave.bind(m(m(n))),n.symbolMouseMove=n.symbolMouseMove.bind(m(m(n))),n.symbolClick=n.symbolClick.bind(m(m(n))),n}return d(t,e),i(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props.value!==e.value;this.setState(function(n){return{displayValue:t?e.value:n.displayValue}})}},{key:"componentDidUpdate",value:function(e,t){if(e.value===this.props.value){if(t.interacting&&!this.state.interacting)return this.props.onHover();this.state.interacting&&this.props.onHover(this.state.displayValue)}}},{key:"symbolClick",value:function(e,t){var n=this.calculateDisplayValue(e,t);this.props.onClick(n,t)}},{key:"symbolMouseMove",value:function(e,t){var n=this.calculateDisplayValue(e,t);this.setState({interacting:!this.props.readonly,displayValue:n})}},{key:"onMouseLeave",value:function(){this.setState({displayValue:this.props.value,interacting:!1})}},{key:"calculateDisplayValue",value:function(e,t){var n=this.calculateHoverPercentage(t),l=Math.ceil(n%1*this.props.fractions)/this.props.fractions,r=e+(Math.floor(n)+Math.floor(1e3*l)/1e3);return r>0?r>this.props.totalSymbols?this.props.totalSymbols:r:1/this.props.fractions}},{key:"calculateHoverPercentage",value:function(e){var t=e.nativeEvent.type.indexOf("touch")>-1?e.nativeEvent.type.indexOf("touchend")>-1?e.changedTouches[0].clientX:e.touches[0].clientX:e.clientX,n=e.target.getBoundingClientRect(),l="rtl"===this.props.direction?n.right-t:t-n.left;return l<0?0:l/n.width}},{key:"render",value:function(){for(var e,t=this.props,n=t.readonly,r=t.quiet,o=t.totalSymbols,a=t.value,i=t.placeholderValue,s=t.direction,d=t.emptySymbol,p=t.fullSymbol,h=t.placeholderSymbol,m=t.className,f=t.id,y=t.style,v=t.tabIndex,x=this.state,g=x.displayValue,j=x.interacting,k=[],w=[].concat(d),N=[].concat(p),S=[].concat(h),_=0!==i&&0===a&&!j,C=Math.floor(e=_?i:r?a:g),P=0;P<o;P++){var E=void 0;E=P-C<0?100:P-C==0?(e-P)*100:0,k.push(l.createElement(b,c({key:P,index:P,readonly:n,inactiveIcon:w[P%w.length],activeIcon:_?S[P%N.length]:N[P%N.length],percent:E,direction:s},!n&&{onClick:this.symbolClick,onMouseMove:this.symbolMouseMove,onTouchMove:this.symbolMouseMove,onTouchEnd:this.symbolClick})))}return l.createElement("span",c({id:f,style:u({},y,{display:"inline-block",direction:s}),className:m,tabIndex:v,"aria-label":this.props["aria-label"]},!n&&{onMouseLeave:this.onMouseLeave}),k)}}]),t}(l.PureComponent);function j(){}j._name="react_rating_noop";var k=function(e){function t(e){var n;return o(this,t),(n=f(this,p(t).call(this,e))).state={value:e.initialRating},n.handleClick=n.handleClick.bind(m(m(n))),n.handleHover=n.handleHover.bind(m(m(n))),n}return d(t,e),i(t,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState({value:e.initialRating})}},{key:"handleClick",value:function(e,t){var n=this,l=this.translateDisplayValueToValue(e);this.props.onClick(l),this.state.value!==l&&this.setState({value:l},function(){return n.props.onChange(n.state.value)})}},{key:"handleHover",value:function(e){var t=void 0===e?e:this.translateDisplayValueToValue(e);this.props.onHover(t)}},{key:"translateDisplayValueToValue",value:function(e){var t=e*this.props.step+this.props.start;return t===this.props.start?t+1/this.props.fractions:t}},{key:"tranlateValueToDisplayValue",value:function(e){return void 0===e?0:(e-this.props.start)/this.props.step}},{key:"render",value:function(){var e=this.props,t=e.step,n=e.emptySymbol,r=e.fullSymbol,o=e.placeholderSymbol,a=e.readonly,i=e.quiet,s=e.fractions,c=e.direction,u=e.start,d=e.stop,p=e.id,h=e.className,m=e.style,f=e.tabIndex;return l.createElement(g,{id:p,style:m,className:h,tabIndex:f,"aria-label":this.props["aria-label"],totalSymbols:Math.floor((d-u)/t),value:this.tranlateValueToDisplayValue(this.state.value),placeholderValue:this.tranlateValueToDisplayValue(this.props.placeholderRating),readonly:a,quiet:i,fractions:s,direction:c,emptySymbol:n,fullSymbol:r,placeholderSymbol:o,onClick:this.handleClick,onHover:this.handleHover})}}]),t}(l.PureComponent);k.defaultProps={start:0,stop:5,step:1,readonly:!1,quiet:!1,fractions:1,direction:"ltr",onHover:j,onClick:j,onChange:j,emptySymbol:v.empty,fullSymbol:v.full,placeholderSymbol:v.placeholder},t.Z=k}},function(e){e.O(0,[774,888,179],function(){return e(e.s=5482)}),_N_E=e.O()}]);