PageSourceSearch

https://www.timhortons.com/static/js/54.135a2818.chunk.js

js timhortons.com collected 2026-09-24 17:21:04 UTC 10,309 bytes, 2 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[54],{2292:function(e,t,n){"use strict";n.r(t);var o=n(8),r=n.n(o),i=n(2),a=n.n(i),c=n(0),l=n(178),d=n(42),s=n(51),u=n(23),f=n(1070),m=n(330),p=n(719),g=n(542),y=n(300),b=n(724),h=n(13),v=n(2490),w=n(2491),O=n(2396),I=n(132),k=n(732),j=n(211),E=n(25),x=n(524),C=n(2393),_=n(57),M=n(2727),S=n(50);const N=n(1).d.p.withConfig({displayName:"styled__RecentOrdersDescriptionText",componentId:"sc-55qlm-0"})(["margin-bottom:2rem;"]);var L=n(1527),B=n(1041);const q=e=>{var t;return(null===(t=B.a[e])||void 0===t?void 0:t.dateFormat)||L.a},P=e=>{let t=e.dropdownOptions,n=e.items,o=e.onYearAndMonthChange,r=e.selectedYearAndMonth,i=e.onSelectOrder,a=void 0===i?S.a:i,l=e.onClickSignin,s=void 0===l?S.a:l,u=e.isAuthenticated,f=void 0!==u&&u;const m=Object(d.a)(),p=m.formatMessage,g=m.locale;return c.createElement(O.b,null,c.createElement(I.a,{margin:"2rem 0 1rem",width:"100%",center:!0},c.createElement(E.c,{size:E.a.SMALL,to:h.k.support,variant:E.b.OUTLINE},p({id:"backToTopics"}))),c.createElement(O.g,{"data-testid":"section-heading"},p({id:"recentOrders"})),c.createElement(N,null,p({id:"refundEligibilityInfo"})),f?c.createElement("div",null,c.createElement(x.b,{label:p({id:"filterByMonth"}),value:r,onChange:o,options:t,"data-testid":"year-and-month-filter"}),c.createElement(C.a,null,n.map(e=>{var t;return c.createElement(M.a,{onClick:()=>a(e),key:e._id,"data-testid":"order-list-item-link"},c.createElement("span",null,c.createElement("strong",null,Object(j.a)(Object(k.a)(e.createdAt),(e=>e===_.d.fr_ca?"d MMMM":"MMMM d")(g),{locale:q(g)})),c.createElement("br",null),p({id:"xItems"},{xItems:null===(t=e.cart.cartEntries)||void 0===t?void 0:t.length})))}))):c.createElement(E.d,{onClick:s,"data-testid":"sign-in-button"},p({id:"signInToViewOrders"})))};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){r()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=()=>{const e=Object(d.a)(),t=e.formatMessage,n=e.locale,o=Object(m.a)().location,r=new URLSearchParams(o.search),i=Object(s.e)(),I=a()(i,1)[0],E=I.get("subcategoryId"),x=I.get("categoryId"),C=I.get("orderId"),_=Object(b.a)(C||null),M=_.order,S=_.loading,N=_.error,L=Object(y.a)(),B=L.isAuthenticated,A=L.setOriginLocation,T=B(),z=Object(g.b)({skipQuery:Boolean(C)}),W=z.orders,D=z.loading,R=t({id:"recentOrders"}),H=Object(c.useState)(""),U=a()(H,2),Y=U[0],J=U[1],Q=Object(c.useState)(null),V=a()(Q,2),G=V[0],K=V[1],X=Object(p.a)(),Z=X.isSupportDataLoading,$=X.deliveryNeverArriveSubcategory,ee=X.deliveryMissingItemsSubcategory,te=Object(u.r)();Object(c.useEffect)(()=>{M&&K(M)},[M,K]),Object(c.useEffect)(()=>{if(T&&!S){const n=(null===G||void 0===G?void 0:G.rbiOrderId)||C,o=new URLSearchParams(F(F(F({},x&&{categoryId:x}),E&&{subcategoryId:E}),n&&{orderId:n})).toString();if(G){var e,t;const n=null===ee||void 0===ee?void 0:ee._id,r=null===$||void 0===$?void 0:$._id,i=Boolean(C),a=new URLSearchParams(F(F({},x&&{categoryId:x}),E&&{subcategoryId:E})).toString();return null!==M&&void 0!==M&&null!==(e=M.order)&&void 0!==e&&e.refund||E!==n?null!==M&&void 0!==M&&null!==(t=M.order)&&void 0!==t&&t.refund||E!==r?te(h.k.supportForm+"?"+o,{replace:i}):te(h.k.missingOrder+"/"+G.rbiOrderId+"?"+a,{replace:i}):te(h.k.missingItems+"/"+G.rbiOrderId+"?"+a,{replace:i})}}},[G,ee,$,te,E,r,x,T,C,S,M]),Object(c.useEffect)(()=>{if(!D&&0===(null===W||void 0===W?void 0:W.length)){const e=new URLSearchParams(F(F({},x&&{categoryId:x}),E&&{subcategoryId:E})).toString();te(h.k.supportForm+"?"+e,{replace:!0})}},[x,D,te,E,W]);const ne=Object(c.useMemo)(()=>(e=>e.reduce((e,t)=>{const n=Object(j.a)(Object(k.a)(t.createdAt),"yyyy-MM");return e[n]?e[n].push(t):e[n]=[t],e},{}))(W),[W]),oe=Object(c.useMemo)(()=>((e,t)=>Object.keys(e).map(n=>{const o=e[n][0];return{label:Object(j.a)(Object(k.a)(o.createdAt),"MMMM yyyy",{locale:q(t)}),value:n}}))(ne,n),[n,ne]);Object(c.useEffect)(()=>{null!==oe&&void 0!==oe&&oe.length&&J(oe[0].value)},[oe]);const re=Object(c.useCallback)(e=>J(e.target.value),[J]);return D||Z||M||S?c.createElement(w.a,null):T&&0===(null===W||void 0===W?void 0:W.length)||N?c.createElement(v.a,{message:t({id:"looksLikeWereExperiencingIssues"})}):c.createElement(O.f,null,c.createElement(O.c,null,c.createElement(f.a,null),
1c.createElement(l.a,{title:R}),c.createElement(P,{dropdownOptions:oe,items:ne[Y]||[],onYearAndMonthChange:re,selectedYearAndMonth:Y,isAuthenticated:T,onClickSignin:()=>{A(o.pathname+o.search),te(h.k.signIn)},onSelectOrder:K})))};n.d(t,"default",(function(){return T}))},2387:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"d",(function(){return d}));var o=n(1),r=n(2398);const i=o.d.ul.withConfig({displayName:"list__List",componentId:"sc-6qk8me-0"})(["margin:0 0 1rem;padding-left:0;list-style:none;"]),a=o.d.li.withConfig({displayName:"list__ListItem",componentId:"sc-6qk8me-1"})(["border-bottom:1px solid ",";",";&:first-child{border-top:1px solid ",";}"],e.color.grey.four,t=>t.activeHighlight&&"background-color: "+e.color.background,e.color.grey.four),c=o.d.div.withConfig({displayName:"list__ListItemContent",componentId:"sc-6qk8me-2"})(["padding:1rem 2rem;"]),l=o.d.span.withConfig({displayName:"list__ListItemTitle",componentId:"sc-6qk8me-3"})(["width:calc(100% - 24px);display:block;font-family:",";font-weight:",";font-size:1rem;color:",";"],e.fontFamily.base,e.fontWeight.heavy,r.a.listItemTitleColor),d=o.d.span.withConfig({displayName:"list__ListItemSubtext",componentId:"sc-6qk8me-4"})(["display:block;font-size:0.87rem;color:",";"],r.a.listItemSubtextColor)}).call(this,n(21).default)},2393:function(e,t,n){"use strict";var o=n(2387);n.d(t,"a",(function(){return o.a})),n.d(t,"b",(function(){return o.b})),n.d(t,"c",(function(){return o.c})),n.d(t,"d",(function(){return o.d})),n.d(t,"e",(function(){return o.e})),n.d(t,"f",(function(){return o.a}))},2396:function(e,t,n){"use strict";(function(e){n.d(t,"f",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"g",(function(){return f})),n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return p})),n.d(t,"h",(function(){return g}));var o,r,i=n(3),a=n.n(i),c=n(1);const l=c.d.div.withConfig({displayName:"support-form-v2styled__PageWrap",componentId:"sc-vq1yu1-0"})(["background-color:",";flex:1;width:100%;display:flex;justify-content:center;",""],e.color.white,e.desktop(o||(o=a()(["\n    padding-top: 10vh;\n  "])))),d=c.d.div.withConfig({displayName:"support-form-v2styled__InnerBox",componentId:"sc-vq1yu1-1"})(["background-color:",";flex:1;overflow:auto;",""],e.color.white,e.desktop(r||(r=a()(["\n    max-width: ",";\n    background-color: ",";\n    border-radius: ",";\n    box-shadow: ",";\n    min-height: 0;\n"])),e.layout.smallerSectionMaxWidth,e.color.white,e.borderRadius,e.boxShadow)),s=c.d.div.withConfig({displayName:"support-form-v2styled__ContentWrap",componentId:"sc-vq1yu1-2"})(["margin:2rem auto 0 auto;display:flex;flex-direction:column;align-items:center;> *{width:90%;}overflow:auto;"]),u=c.d.h1.withConfig({displayName:"support-form-v2styled__PageHeading",componentId:"sc-vq1yu1-3"})(["font-size:2rem;font-weight:",";font-family:",";line-height:1.25;text-align:center;small{font-size:1.5rem;}"],e.fontWeight.black,e.fontFamily.body),f=c.d.h2.withConfig({displayName:"support-form-v2styled__SectionHeading",componentId:"sc-vq1yu1-4"})(["text-align:center;font-size:1.5rem;font-weight:",";font-family:",";margin-top:0;"],e.fontWeight.black,e.fontFamily.body),m=Object(c.d)(f).withConfig({displayName:"support-form-v2styled__NeedHelpHeading",componentId:"sc-vq1yu1-5"})(["font-size:1.2rem;"]),p=c.d.div.withConfig({displayName:"support-form-v2styled__ContentLoadingContainer",componentId:"sc-vq1yu1-6"})(["width:100%;height:100vh;display:flex;align-items:center;justify-content:center;"]),g=c.d.div.withConfig({displayName:"support-form-v2styled__TextBlock",componentId:"sc-vq1yu1-7"})(["font-family:",";text-decoration:none;padding:4px 0;display:flex;align-items:center;text-align:left;width:90%;margin:0 auto;"],e.fontFamily.body)}).call(this,n(21).default)},2398:function(e,t,n){"use strict";(function(e){t.a={listItemTitleColor:e.color.black,listItemSubtextColor:e.color.black}}).call(this,n(21).default)},2490:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n(0),r=n(2396);const i=e=>{let t=e.message;return o.createElement(r.a,null,o.createElement(r.g,{"data-testid":"error-message"},t))}},2491:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var o=n(0),r=n(134),i=n(2396);const a=()=>o.createElement(i.a,null,o.createElement(r.a,{fillColor:e.color.primary}))}).call(this,n(21).default)},2551:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f}));var o=n(10),r=n.n(o),i=n(0),a=n(125),c=n(1),l=n(934),d=n(2728);const s=["children"],u=Object(c.d)(l.a).withConfig({displayName:"arrow-button__StyledButton",componentId:"sc-19c17t7-0"})(["border-bottom:1px solid ",";background-color:transparent;width:100%;font-family:",";text-decoration:none;color:",";padding:20px 0;display:flex;justify-content:space-between;align-items:center;text-align:left;"],d.a.arrowButtonBorderBottom,e.fontFamily.body,d.a.arrowButtonColor),f=e=>
1{let t=e.children,n=r()(e,s);return i.createElement(u,n,t,i.createElement(a.a,{icon:"next",color:"icon-default",width:"16px","aria-hidden":!0}))}}).call(this,n(21).default)},2727:function(e,t,n){"use strict";var o=n(2551);n.d(t,"a",(function(){return o.a}))},2728:function(e,t,n){"use strict";(function(e){t.a={arrowButtonBorderBottom:e.color.grey.four,arrowButtonColor:"",arrowButtonFill:e.color.black}}).call(this,n(21).default)}}]);
2//# sourceMappingURL=54.135a2818.chunk.js.map

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.