1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6858],{1648:(t,e,n)=>{"use strict";n.d(e,{A:()=>p});var r=n(44501),s=n(40670),i=n(14232),a=n(69241),o=n(4697),u=n(43714),c=n(75855),d=n(47951),h=n(45879);function l(t){return(0,h.Ay)("MuiTableContainer",t)}(0,d.A)("MuiTableContainer",["root"]);var f=n(37876);let m=["className","component"],$=(0,c.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),p=i.forwardRef(function(t,e){let n=(0,u.b)({props:t,name:"MuiTableContainer"}),{className:i,component:c="div"}=n,d=(0,s.A)(n,m),h=(0,r.A)({},n,{component:c}),p=(t=>{let{classes:e}=t;return(0,o.A)({root:["root"]},l,e)})(h);return(0,f.jsx)($,(0,r.A)({ref:e,as:c,className:(0,a.A)(p.root,i),ownerState:h},d))})},39287:(t,e,n)=>{"use strict";n.r(e),n.d(e,{__N_SSP:()=>O,default:()=>k});var r=n(37876),s=n(14232),i=n(85263),a=n(12e3),o=n(70496),u=n(5067),c=n(93372),d=n(98952),h=n(11765),l=n(1965),f=n(77873),m=n(47704),$=n(61154),p=n(86491),y=n(73162),M=n(75855),v=n(31548),g=n(94491),x=n(84733),D=n(47414),S=n(41792);let w=(0,M.Ay)(y.A)(t=>{let{theme:e}=t;return{"& .MuiDialog-paper":{width:"95%",margin:0,padding:"0px 30px"},[e.breakpoints.up("sm")]:{"& .MuiDialog-paper":{maxWidth:"600px",padding:0}}}}),A={xs:"15px",sm:"40px"},b=t=>{let{isOpen:e,onClose:n,order:s,onConfirmCancelOrder:i,isCancelingOrder:a=!0}=t;return(0,r.jsxs)(w,{open:e,onClose:n,children:[(0,r.jsxs)(S.A,{sx:{paddingX:A,paddingBottom:"0px"},children:[(0,r.jsx)(D.A,{onClick:n,"data-testid":"close-confirm-cancel-order"}),(0,r.jsxs)(x.A,{display:"flex",justifyContent:"space-between",children:[(0,r.jsxs)(x.A,{children:[(0,r.jsx)(u.A,{fontSize:16,fontWeight:800,children:"Cancel order ?"}),(0,r.jsxs)(u.A,{fontSize:16,fontWeight:800,children:["Order: #",s.number]})]}),(0,r.jsx)(o.A,{variant:"contained",color:"primary",sx:{height:"36px",cursor:a?"wait":"pointer"},onClick:i,"data-testid":"confirm-cancel-order-button",children:"Confirm"})]})]}),(0,r.jsx)(v.A,{sx:{paddingX:A,marginTop:"10px"},children:(0,r.jsx)(g.A,{order:s,minimal:!0})})]})},Y=t=>{let{pageData:{orders:e=[]}}=t,[n,y]=(0,s.useState)(e),[M,v]=(0,s.useState)(null),{mutate:g,isLoading:x}=(0,m.A)($.N4,{onSuccess:()=>(()=>{let t=n.findIndex(t=>t.id===M.id);if(-1===t)return;let e=[...n];e[t]={...e[t],status:p.A.Canceled},y(e)})()}),D=async()=>{x||(await g(M.id),v(null))},S=t=>{let e=n.findIndex(e=>e.id===t);-1!==e&&v(n[e])};return(0,r.jsxs)(a.A,{direction:"column",spacing:2,children:[(0,r.jsxs)(i.A,{elevation:0,sx:{p:"27px"},children:[(0,r.jsx)(c.sT,{children:"Order history"}),(0,r.jsx)(c.TQ,{}),0===n.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{fontSize:"14px",fontWeight:400,fontFamily:h.v.AVENIR,children:"You haven't placed any orders, yet."}),(0,r.jsx)(o.A,{variant:"contained",color:"secondary",component:f.w,to:l.q.INDEX,sx:{mt:4,width:"300px",height:"42px",fontSize:"18px",fontWeight:800,fontFamily:h.v.AVENIR},children:"Start Shopping!"})]}):(0,r.jsx)(r.Fragment,{children:n.map(t=>(0,r.jsx)(d.A,{order:t,onCancelOrder:S},t.id))})]}),(null==M?void 0:M.number)&&(0,r.jsx)(b,{order:M,isOpen:!!(null==M?void 0:M.number),onClose:()=>{v(null)},onConfirmCancelOrder:D,isCancelingOrder:x})]})};Y.getLayout=c.bP;var O=!0;let k=Y},41792:(t,e,n)=>{"use strict";n.d(e,{A:()=>p});var r=n(44501),s=n(40670),i=n(14232),a=n(69241),o=n(4697),u=n(5067),c=n(75855),d=n(43714),h=n(40336),l=n(80501),f=n(37876);let m=["className","id"],$=(0,c.Ay)(u.A,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),p=i.forwardRef(function(t,e){let n=(0,d.b)({props:t,name:"MuiDialogTitle"}),{className:u,id:c}=n,p=(0,s.A)(n,m),y=(t=>{let{classes:e}=t;return(0,o.A)({root:["root"]},h.t,e)})(n),{titleId:M=c}
1=i.useContext(l.A);return(0,f.jsx)($,(0,r.A)({component:"h2",className:(0,a.A)(y.root,u),ownerState:n,ref:e,variant:"h6",id:null!=c?c:M},p))})},42812:(t,e,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profiles/orders",function(){return n(39287)}])},47414:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(37876),s=n(55134),i=n(20818);let a={position:"absolute",right:8,top:8,background:"black",borderRadius:"0px",color:"silver",width:"20px",height:"20px","&:hover":{background:"black",color:"white"},"&:focus":{border:"1px solid lightblue",outline:"none"}},o=t=>(0,r.jsx)(s.A,{sx:a,...t,children:(0,r.jsx)(i.A,{})})},56557:function(t){t.exports=function(){"use strict";var t="millisecond",e="second",n="minute",r="hour",s="week",i="month",a="quarter",o="year",u="date",c="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,l=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},f="en",m={};m[f]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}};var $="$isDayjsObject",p=function(t){return t instanceof g||!(!t||!t[$])},y=function t(e,n,r){var s;if(!e)return f;if("string"==typeof e){var i=e.toLowerCase();m[i]&&(s=i),n&&(m[i]=n,s=i);var a=e.split("-");if(!s&&a.length>1)return t(a[0])}else{var o=e.name;m[o]=e,s=o}return!r&&s&&(f=s),s||!r&&f},M=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new g(n)},v={s:l,z:function(t){var e=-t.utcOffset(),n=Math.abs(e);return(e<=0?"+":"-")+l(Math.floor(n/60),2,"0")+":"+l(n%60,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),s=e.clone().add(r,i),a=n-s<0,o=e.clone().add(r+(a?-1:1),i);return+(-(r+(n-s)/(a?s-o:o-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(c){return({M:i,y:o,w:s,d:"day",D:u,h:r,m:n,s:e,ms:t,Q:a})[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}};v.l=y,v.i=p,v.w=function(t,e){return M(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var g=function(){function l(t){this.$L=y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[$]=!0}var f=l.prototype;return f.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(d);if(r){var s=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],s,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.init()},f.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},f.$utils=function(){return v},f.isValid=function(){return this.$d.toString()!==c},f.isSame=function(t,e){var n=M(t);return this.startOf(e)<=n&&n<=this.endOf(e)},f.isAfter=function(t,e){return M(t)<this.startOf(e)},f.isBefore=function(t,e){return this.endOf(e)<M(t)},f.$g=function(t,e,n){return v.u(t)?this[e]:this.set(n,t)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(t,a){var c=this,d=!!v.u(a)||a,h=v.p(t),l=function(t,e){var n=v.w(c.$u?Date.UTC(c.$y,e,t):new Date(c.$y,e,t),c);return d?n:n.endOf("day")},f=function(t,e){return v.w(c.toDate()[t].apply(c.toDate("s"),(d?[0,0,0,0]:[23,59,59,999]).slice(e)),c)},m=this.$W,$=this.$M,p=this.$D,y="set"+(this.$u?"UTC":"");switch(h){case o:return d?l(1,0):l(31,11);case i:return d?l(1,$):l(0,$+1);case s:var M=this.$locale().weekStart||0,g=(m<M?m+7:m)-M;return l(d?p-g:p+(6-g),$);case"day":case u:return f(y+"Hours",0);case r:return f(y+"Minutes",1);case n:return f(y+"Seconds",2);case e:return f(y+"Milliseconds",3);default:return this.clone()}},f.endOf=function(t){return this.startOf(t,!1)},f.$set=function(s,a){var c,d=v.p(s),h="set"+(this.$u?"UTC":""),l=((c={}
1).day=h+"Date",c[u]=h+"Date",c[i]=h+"Month",c[o]=h+"FullYear",c[r]=h+"Hours",c[n]=h+"Minutes",c[e]=h+"Seconds",c[t]=h+"Milliseconds",c)[d],f="day"===d?this.$D+(a-this.$W):a;if(d===i||d===o){var m=this.clone().set(u,1);m.$d[l](f),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else l&&this.$d[l](f);return this.init(),this},f.set=function(t,e){return this.clone().$set(t,e)},f.get=function(t){return this[v.p(t)]()},f.add=function(t,a){var u,c=this;t=Number(t);var d=v.p(a),h=function(e){var n=M(c);return v.w(n.date(n.date()+Math.round(e*t)),c)};if(d===i)return this.set(i,this.$M+t);if(d===o)return this.set(o,this.$y+t);if("day"===d)return h(1);if(d===s)return h(7);var l=((u={})[n]=6e4,u[r]=36e5,u[e]=1e3,u)[d]||1,f=this.$d.getTime()+t*l;return v.w(f,this)},f.subtract=function(t,e){return this.add(-1*t,e)},f.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||c;var r=t||"YYYY-MM-DDTHH:mm:ssZ",s=v.z(this),i=this.$H,a=this.$m,o=this.$M,u=n.weekdays,d=n.months,l=n.meridiem,f=function(t,n,s,i){return t&&(t[n]||t(e,r))||s[n].slice(0,i)},m=function(t){return v.s(i%12||12,t,"0")},$=l||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(h,function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return o+1;case"MM":return v.s(o+1,2,"0");case"MMM":return f(n.monthsShort,o,d,3);case"MMMM":return f(d,o);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(n.weekdaysMin,e.$W,u,2);case"ddd":return f(n.weekdaysShort,e.$W,u,3);case"dddd":return u[e.$W];case"H":return String(i);case"HH":return v.s(i,2,"0");case"h":return m(1);case"hh":return m(2);case"a":return $(i,a,!0);case"A":return $(i,a,!1);case"m":return String(a);case"mm":return v.s(a,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")})},f.utcOffset=function(){return-(15*Math.round(this.$d.getTimezoneOffset()/15))},f.diff=function(t,u,c){var d,h=this,l=v.p(u),f=M(t),m=(f.utcOffset()-this.utcOffset())*6e4,$=this-f,p=function(){return v.m(h,f)};switch(l){case o:d=p()/12;break;case i:d=p();break;case a:d=p()/3;break;case s:d=($-m)/6048e5;break;case"day":d=($-m)/864e5;break;case r:d=$/36e5;break;case n:d=$/6e4;break;case e:d=$/1e3;break;default:d=$}return c?d:v.a(d)},f.daysInMonth=function(){return this.endOf(i).$D},f.$locale=function(){return m[this.$L]},f.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=y(t,e,!0);return r&&(n.$L=r),n},f.clone=function(){return v.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},l}(),x=g.prototype;return M.prototype=x,[["$ms",t],["$s",e],["$m",n],["$H",r],["$W","day"],["$M",i],["$y",o],["$D",u]].forEach(function(t){x[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),M.extend=function(t,e){return t.$i||(t(e,g,M),t.$i=!0),M},M.locale=y,M.isDayjs=p,M.unix=function(t){return M(1e3*t)},M.en=m[f],M.Ls=m,M.p={},M}()},61154:(t,e,n)=>{"use strict";n.d(e,{N4:()=>s,fS:()=>i});var r=n(81553);let s=async t=>{await r.Ay.patch("/me/orders/cancel/".concat(t,"/"))},i=async t=>(await r.Ay.post("/me/orders/",t)).data},82908:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(e,n,r){var s=n.prototype,i=s.format;r.en.formats=t,s.format=function(e){void 0===e&&(e="YYYY-MM-DDTHH:mm:ssZ");var n,r,s=this.$locale().formats,a=(n=e,r=void 0===s?{}:s,n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,n,s){var i=s&&s.toUpperCase();return n||r[s]||t[s]||r[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})}));return i.call(this,a)}}}()},86090:function(t){t.exports=function(){"use strict";var t,e,n=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}
1|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,r=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,s={years:31536e6,months:2628e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},i=function(t){return t instanceof h},a=function(t,e,n){return new h(t,n,e.$l)},o=function(t){return e.p(t)+"s"},u=function(t){return t<0},c=function(t){return u(t)?Math.ceil(t):Math.floor(t)},d=function(t,e){return t?u(t)?{negative:!0,format:""+Math.abs(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},h=function(){function u(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return a(t*s[o(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){i.$d[o(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var u=t.match(r);if(u){var c=u.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var h=u.prototype;return h.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,n){return e+(t.$d[n]||0)*s[n]},0)},h.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=c(t/31536e6),t%=31536e6,this.$d.months=c(t/2628e6),t%=2628e6,this.$d.days=c(t/864e5),t%=864e5,this.$d.hours=c(t/36e5),t%=36e5,this.$d.minutes=c(t/6e4),t%=6e4,this.$d.seconds=c(t/1e3),t%=1e3,this.$d.milliseconds=t},h.toISOString=function(){var t=d(this.$d.years,"Y"),e=d(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=d(n,"D"),s=d(this.$d.hours,"H"),i=d(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var o=d(a,"S"),u=t.negative||e.negative||r.negative||s.negative||i.negative||o.negative,c=s.format||i.format||o.format?"T":"",h=(u?"-":"")+"P"+t.format+e.format+r.format+c+s.format+i.format+o.format;return"P"===h||"-P"===h?"P0D":h},h.toJSON=function(){return this.toISOString()},h.format=function(t){var r={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return(t||"YYYY-MM-DDTHH:mm:ss").replace(n,function(t,e){return e||String(r[t])})},h.as=function(t){return this.$ms/s[o(t)]},h.get=function(t){var e=this.$ms,n=o(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?c(e/s[n]):this.$d[n],e||0},h.add=function(t,e,n){var r;return r=e?t*s[o(e)]:i(t)?t.$ms:a(t,this).$ms,a(this.$ms+r*(n?-1:1),this)},h.subtract=function(t,e){return this.add(t,e,!0)},h.locale=function(t){var e=this.clone();return e.$l=t,e},h.clone=function(){return a(this.$ms,this)},h.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},h.valueOf=function(){return this.asMilliseconds()},h.milliseconds=function(){return this.get("milliseconds")},h.asMilliseconds=function(){return this.as("milliseconds")},h.seconds=function(){return this.get("seconds")},h.asSeconds=function(){return this.as("seconds")},h.minutes=function(){return this.get("minutes")},h.asMinutes=function(){return this.as("minutes")},h.hours=function(){return this.get("hours")},h.asHours=function(){return this.as("hours")},h.days=function(){return this.get("days")},h.asDays=function(){return this.as("days")},h.weeks=function(){return this.get("weeks")},h.asWeeks=function(){return this.as("weeks")},h.months=function(){return this.get("months")},h.asMonths=function(){return this.as("months")},h.years=function(){return this.get("years")},h.asYears=function(){return this.as("years")},u}(),l=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,r,s){t=s,e=s().$utils(),s.duration=function(t,e){return a(t,{$l:s.locale()},e)},s.isDuration=i;var o=r.prototype.add,u=r.prototype.subtract;r.prototype.add=function(t,e){return i(t)?l(this,t,1):o.bind(this)(t,e)},r.prototype.subtract=function(t,e){return i(t)?l(this,t,-1):u.bind(this)(t,e)}}}()}},t=>{t.O(0,[6044,366,3781,6997,3372,4899,8952,636,6593,8792],()=>t(t.s=42812)),_N_E=t.O()}]);
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.