1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[455],{131:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(2074),s=n(6565),c=n.n(s),i=n(1374),o=n(7610),a=n(5893);function u(e){var t,n,s,u=(0,r.$G)(),l=u.t,h=u.i18n;return(0,a.jsx)("div",{className:"col-4 col-xxl-3 d-none d-lg-block",children:(0,a.jsx)("div",{className:"card ".concat(c().CheckOutCartSumm," border-0'"),children:(0,a.jsxs)("div",{className:"card-body shadow d-flex flex-column justify-content-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"mb-3",children:[(0,a.jsx)("i",{className:"fas fa-shopping-cart"}),"\xa0",l("checkout:summary.header")]}),(0,a.jsx)("hr",{className:c().cartSummDivider}),(0,a.jsx)("h4",{className:"text-text-muted mb-2",children:(0,a.jsx)("strong",{children:l("checkout:summary.products")})}),(0,a.jsx)("h6",{className:"text-text-muted mb-2",children:l("checkout:summary.orderTotal")}),(0,a.jsx)("div",{className:"shadow-sm px-1 ".concat(c().orderSummaryCont),children:e.Order.items.map((function(e){return(0,a.jsxs)("p",{className:"mb-0",children:[(0,a.jsxs)("strong",{children:[(0,o.SD)(e),"x "]}),(0,i.H6)(e.product,h.language)]},e.product._id)}))})]}),(0,a.jsxs)("div",{className:"d-flex flex-column",children:[(0,a.jsx)("hr",{className:c().cartSummDivider}),(0,a.jsx)("h4",{className:"text-text-muted mb-2",children:(0,a.jsx)("strong",{children:l("checkout:summary.orderTotal")})}),(0,a.jsx)("h5",{className:"text-text-muted mb-1",children:l("checkout:summary.payment.header")}),(0,a.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,a.jsx)("p",{className:"mb-1",children:(0,a.jsx)("strong",{children:l("checkout:summary.payment.subTotal")})}),(0,a.jsxs)("p",{className:"m-0",children:[null===(t=e.Order)||void 0===t?void 0:t.subTotal," EGP"]})]}),(0,a.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,a.jsx)("p",{className:"mb-1",children:(0,a.jsxs)("strong",{children:[l("checkout:summary.payment.tax"),":"]})}),(0,a.jsxs)("p",{className:"m-0",children:[null===(n=e.Order)||void 0===n?void 0:n.taxes," EGP"]})]}),(0,a.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,a.jsx)("p",{className:"mb-1",children:(0,a.jsxs)("strong",{children:[l("checkout:summary.payment.shipping"),":"]})}),(0,a.jsx)("p",{className:"m-0",children:"FREE"})]}),(0,a.jsxs)("h4",{className:"text-text-muted mb-0",children:[l("checkout:summary.payment.total"),":"]}),(0,a.jsx)("p",{className:"m-0 text-end fs-5",children:(0,a.jsxs)("strong",{children:[null===(s=e.Order)||void 0===s?void 0:s.totalPrice," EGP"]})}),(0,a.jsxs)("button",{className:"btn btn-light link-info w-50",type:"button",children:[(0,a.jsx)("i",{className:"far fa-caret-square-left m-1"}),l("checkout:summary.back")]})]})]})})})}},230:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(2074),s=n(6565),c=n.n(s),i=n(7610),o=n(5222),a=n(5893);function u(e){var t=(0,r.$G)(),n=t.t;t.i18n;return(0,a.jsxs)("div",{className:"col-2 p-0",children:[(0,a.jsxs)("div",{className:"shadow",style:{height:"10%",border:"solid",borderWidth:"0px 2px 2px 0px",borderColor:"rgb(224,224,224)",backgroundColor:"#ffffff",textAlign:"center",padding:"0.4rem"},children:[(0,a.jsx)("p",{className:"mb-0",children:n("checkout:progress.timer")}),(0,a.jsx)("h5",{children:(0,a.jsx)("strong",{children:(0,i.sg)(e.timer)})})]}),(0,a.jsxs)("div",{className:"shadow d-flex flex-column justify-content-between align-items-center align-content-center ".concat(c().CheckOutProg),children:[(0,a.jsxs)("div",{className:c().CheckOutProgContainer,children:[(0,a.jsx)("div",{className:"".concat(c().CheckoutProgCircle," ").concat(e.progressData.shipping===o.U.INPROGRESS?c().InProgress:e.progressData.shipping===o.U.DONE?c().Done:""),children:(0,a.jsx)("h5",{className:"m-0",children:(0,a.jsx)("i",{className:"fas fa-shipping-fast"})})}),(0,a.jsx)("h6",{className:"m-0",children:n("checkout:progress.shipping")})]}),(0,a.jsx)("div",{className:c().ProgressLineBase}),(0,a.jsxs)("div",{className:c().CheckOutProgContainer,children:[(0,a.jsx)("div",{className:"".concat(c().CheckoutProgCircle," ").concat(e.progressData.billing===o.U.INPROGRESS?c().InProgress:e.progressData.billing===o.U.DONE?c().Done:""),children:(0,a.jsx)("h5",{className:"m-0",children:(0,a.jsx)("i",{className:"fas fa-money-bill-wave-alt"})})}),(0,a.jsx)("h6",{className:"m-0",children:n("checkout:progress.billing")})]}),(0,a.jsx)("div",{className:c().ProgressLineBase}),(0,a.jsxs)("div",{className:c().CheckOutProgContainer,children:[(0,a.jsx)("div",{className:"".concat(c().CheckoutProgCircle," ").concat(e.progressData.confirm===o.U.INPROGRESS?c().InProgress:e.progressData.confirm===o.U.DONE?c().Done:""),children:(0,a.jsx)("h5",{className:"m-0",children:(0,a.jsx)("i",{className:"fas fa-check"})})}),(0,a.jsx)("h6",{className:"m-0",children:n("checkout:progress.confirm")})]})]})]})}},8461:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return y},default:function(){return C}});var r=n(266),s=n(809),c=n.n(s),i=n(2074),o=n(4651),a=n(9008),u=n(7294),l=n(6565),h=n.n(l),d=n(5893);function m(){var e=(0,o.useRouter)();return(0,d.jsx)("div",{className:"col-10",children:(0,d.jsxs)("div",{className:"d-flex flex-column justify-content-between ".concat(h().CheckoutContent," h-100"),children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("h2",{children:[(0,d.jsx)("i",{className:"fas fa-money-bill-wave-alt"}),"\xa0Billing"]}),(0,d.jsxs)("h3",{children:[(0,d.jsx)("i",{className:"far fa-credit-card"}),"\xa0Card Payment"]}),(0,d.jsx)("p",{children:"Your order will begin processing as soon as payment is confirmed!"})]}),(0,d.jsxs)("div",{className:"text-danger text-center",children:[(0,d.jsx)("i",{className:"far fa-times-circle",style:{fontSize:"7rem"}}),(0,d.jsx)("h1",{children:"Payment Failed!"}),(0,d.jsx)("h3",{children:"Checkout unsuccessful! Try Again Later\xa0"})]}),(0,d.jsx)("div",{className:"d-flex justify-content-end pt-3",children:(0,d.jsx)("button",{className:"btn btn-dark rounded-0 me-2",type:"button",onClick:function(){e.push({pathname:"/cart"})},children:"Exit Checkout"})})]})})}var f=n(131),x=n(230),p=n(9427),N=n(7970),j=n(5249),g=n(7610),v=n(5222),y=!0;function C(){var e=(0,o.useRouter)(),t=(0,u.useState)(),n=(t[0],t[1]);(0,u.useEffect)((function(){function t(){return(t=(0,r.Z)(c().mark((function t(){var r;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"!==typeof e.query.orderId){t.next=11;break}return t.prev=1,t.next=4,p.Z.getOneOrder(e.query.orderId);case 4:r=t.sent,C(r),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),t.t0 instanceof N.Z&&new j.Z(e,n,t.t0,"Checkout").Execute();case 11:case"end":return t.stop()}}),t,null,[[1,8]])})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[e.query]);var s=(0,u.useState)(v.O.FAILCARD),l=s[0],h=(s[1],(0,u.useState)(void 0)),y=h[0],C=h[1],b=(0,i.$G)(),k=b.t;b.i18n;return(0,d.jsxs)("div",{className:"container",id:"pageContent",children:[(0,d.jsx)(a.default,{children:(0,d.jsx)("title",{children:"Ultrateb | Checkout "})}),(0,d.jsx)("div",{className:"row",children:(0,d.jsx)("div",{className:"col",children:(0,d.jsx)("h1",{className:"mb-3",children:k("checkout:heading")})})}),(0,d.jsxs)("div",{className:"row",children:[(0,d.jsx)("div",{className:"col",children:(0,d.jsx)("div",{className:"card shadow border-0",children:(0,d.jsxs)("div",{className:"row",children:[(0,d.jsx)(x.Z,{timer:0,progressData:(0,g.Wt)(l)}),(0,d.jsx)(m,{})]})})}),y?(0,d.jsx)(f.Z,{Order:y}):"Loading"]})]})}},5249:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(8216),s=n(5997),c=n(3444),i=n(982),o=n(2953),a=n(2809);function u(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,o.Z)(e);if(t){var s=(0,o.Z)(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return(0,i.Z)(this,n)}}var l=function(e){(0,c.Z)(n,e);var t=u(n);function n(e,s,c){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Order";return(0,r.Z)(this,n),t.call(this,e,s,c,i)}
1return(0,s.Z)(n,[{key:"Execute",value:function(){switch(this.err.getStatusCode()){case 404:return this.handle404();case 401:return this.handle401();case 503:return this.handle503()}}}]),n}(function(){function e(t,n,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"Order";(0,r.Z)(this,e),(0,a.Z)(this,"router",void 0),(0,a.Z)(this,"setError",void 0),(0,a.Z)(this,"err",void 0),(0,a.Z)(this,"page",void 0),this.router=t,this.setError=n,this.err=s,this.page=c}return(0,s.Z)(e,[{key:"handle401",value:function(){return this.router.push({pathname:"/login",query:{timeout:!0}})}},{key:"handle404",value:function(){return this.setError(this.err.getMessage())}},{key:"handle503",value:function(){return this.setError(this.err.getMessage())}},{key:"handle403",value:function(){return this.router.push({pathname:"/"})}}]),e}())},7610:function(e,t,n){"use strict";n.d(t,{sg:function(){return o},Wt:function(){return a},SD:function(){return u},nA:function(){return l}});var r=n(266),s=n(809),c=n.n(s),i=n(5222);function o(e){var t=Math.floor(e/60),n=e-60*t;return"".concat(t>=10?t:"0".concat(t),":").concat(n<10?"0".concat(n):n)}function a(e){switch(e){case i.O.SHIPPING:return{shipping:i.U.INPROGRESS,billing:i.U.NOTSTARTED,confirm:i.U.NOTSTARTED};case i.O.CHOOSEPAYMENT:case i.O.BANKPAYMENT:case i.O.CASHPAYMENT:case i.O.FAILCARD:return{shipping:i.U.DONE,billing:i.U.INPROGRESS,confirm:i.U.NOTSTARTED};case i.O.SUCCESSCARD:return{shipping:i.U.DONE,billing:i.U.DONE,confirm:i.U.NOTSTARTED};case i.O.CONFIRM:return{shipping:i.U.DONE,billing:i.U.DONE,confirm:i.U.DONE}}}function u(e){var t=0;return e.items.forEach((function(e){t+=e.quantity})),t}function l(e){return h.apply(this,arguments)}function h(){return(h=(0,r.Z)(c().mark((function e(t){var r,s,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(484).then(n.t.bind(n,7484,23));case 2:return r=e.sent.default,s=r(t).add(10,"minute"),i=s.diff(r(),"second"),e.abrupt("return",i);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},5222:function(e,t,n){"use strict";var r,s;n.d(t,{O:function(){return r},U:function(){return s}}),function(e){e.SHIPPING="SHIPPING",e.CHOOSEPAYMENT="CHOOSEPAYMENT",e.BANKPAYMENT="BANK",e.CASHPAYMENT="CASH",e.SUCCESSCARD="SCCUESSCARD",e.FAILCARD="FAILCARD",e.CONFIRM="CONFIRM"}(r||(r={})),function(e){e.INPROGRESS="INPROGRESS",e.DONE="DONE",e.NOTSTARTED="NOTSTARTED"}(s||(s={}))},8557:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout/[orderId]/fail",function(){return n(8461)}])},6565:function(e){e.exports={CheckOutProg:"checkout_CheckOutProg__3UIB1",CheckOutProgContainer:"checkout_CheckOutProgContainer__2qRT-",CheckoutProgCircle:"checkout_CheckoutProgCircle__1U1QZ",InProgress:"checkout_InProgress__28cVu",Done:"checkout_Done__WvF8q",CheckoutProgLine:"checkout_CheckoutProgLine__1ujNi",ProgressLineBase:"checkout_ProgressLineBase__2f9c7",CheckoutContent:"checkout_CheckoutContent__15EKD",CheckOutCartSumm:"checkout_CheckOutCartSumm__ENTpc",cartSummDivider:"checkout_cartSummDivider__2j9BY",orderSummaryCont:"checkout_orderSummaryCont__1qFuC",PaymentOption:"checkout_PaymentOption__2Mlds",Disabled:"checkout_Disabled__Jch5K",PaymentMethContainer:"checkout_PaymentMethContainer__p1Bv4",PaymentIcon:"checkout_PaymentIcon__2fBFE"}},2953:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,{Z:function(){return r}})},3444:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){if("function"!==typeof t&&null!==t)throw new 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&&r(e,t)}n.d(t,{Z:function(){return s}})},982:function(e,t,n){"use strict";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 s(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}n.d(t,{Z:function(){return s}})}},function(e){e.O(0,[774,888,179],(function(){return t=8557,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.