PageSourceSearch

https://jandjfoods.com/build/_shared/SwiftlyAccountMobMenu-GU7A43YZ.js

js jandjfoods.com collected 2026-09-25 03:48:20 UTC 5,866 bytes, 1 lines download raw bytes

1import{a as oe,b as ne}from"/build/_shared/chunk-AKQP7ZTF.js";import{b as N}from"/build/_shared/chunk-72LTRJKW.js";import{a as D}from"/build/_shared/chunk-UVEUNW5V.js";import{a as E}from"/build/_shared/chunk-G23TZE6T.js";import{a as V}from"/build/_shared/chunk-HW3ZBI4X.js";import{e as Q}from"/build/_shared/chunk-QO6ZZEOS.js";import{b as X}from"/build/_shared/chunk-XVAPMXJX.js";import{a as Z,b as ee}from"/build/_shared/chunk-FP5P2PZ5.js";import"/build/_shared/chunk-DFBTCTRV.js";import"/build/_shared/chunk-3QBGRSAQ.js";import"/build/_shared/chunk-LAOPLM43.js";import{a as j}from"/build/_shared/chunk-DOYHSD6F.js";import{i as q}from"/build/_shared/chunk-77NQXAK6.js";import"/build/_shared/chunk-DEEIYPRZ.js";import"/build/_shared/chunk-55L7LVSM.js";import"/build/_shared/chunk-ANJCCTCL.js";import"/build/_shared/chunk-H7HYKT7E.js";import{h as K,j as b}from"/build/_shared/chunk-D7PKK72C.js";import"/build/_shared/chunk-CCXUG7EA.js";import"/build/_shared/chunk-GLNX7PBK.js";import{a as Y}from"/build/_shared/chunk-7KPUGNT7.js";import{f as G}from"/build/_shared/chunk-LFHN7H6R.js";import{b as J}from"/build/_shared/chunk-5YNYLFAA.js";import"/build/_shared/chunk-4KCZBG7X.js";import"/build/_shared/chunk-Z5UH4LOQ.js";import{I as B,ba as T,c as x,ca as H,da as _,w as S,z}from"/build/_shared/chunk-JDCYZ4LL.js";import{A as me,j as R,v as W}from"/build/_shared/chunk-ZSEETMYI.js";import"/build/_shared/chunk-JHYR5QDS.js";import"/build/_shared/chunk-IWXKJYOV.js";import"/build/_shared/chunk-XHXRPQY5.js";import"/build/_shared/chunk-XQ4KNWUT.js";import{K as I,O as p,Z as c,ea as A,fa as i,t as $}from"/build/_shared/chunk-FES3B5QL.js";import{A as y}from"/build/_shared/chunk-XC7SPKRF.js";import{a as U}from"/build/_shared/chunk-G3QUQOKW.js";import{a as ue}from"/build/_shared/chunk-F3RAJA4O.js";import"/build/_shared/chunk-O5OXJSFQ.js";import{e as k}from"/build/_shared/chunk-O3BUCIVF.js";var u=k(ue());me();var e=k(U()),Fe=({drawerToggle:s,user:a})=>{let[te,{close:se,open:m}]=y(!1),[re,{close:f,open:g}]=y(!1),{setIsInitialSync:ie}=q(),{setActiveMenu:w}=X(),o=Y(),{challengesFeatureFlag:d,ecomFeatureFlag:v,rewardsFeatureFlag:M,shoppingListFeatureFlag:L}=J(),{setIsPointsOnly:ce,user:n}=b(),{publicEnvs:t}=G(),[ae,P]=(0,u.useState)(!1),C=n==null?void 0:n.isPointsOnly,le=(0,u.useMemo)(()=>[{text:"Dashboard",link:"/account",icon:(0,e.jsx)(B,{}),asMenu:!0,onClick:s},{text:"Profile",link:"/account/profile",icon:(0,e.jsx)(_,{}),asMenu:!0,onClick:s},v&&(n!=null&&n.token)&&(t!=null&&t.ecomLEUrl)?{text:(o==null?void 0:o.account_settings_your_orders)||"Your Orders",icon:(0,e.jsx)(D,{className:"your-orders-icon"}),onClick:g,asMenu:!0,hasToggleIcon:!0}:null,M||d||C?{text:"My Rewards",link:"/account/rewards",icon:(0,e.jsx)(oe,{}),asMenu:!0,onClick:s}:null,{text:"My Coupons",link:"/account/coupons",icon:(0,e.jsx)(T,{}),asMenu:!0,onClick:s},d?{text:"My Challenges",link:"/account/challenges",icon:(0,e.jsx)(H,{}),asMenu:!0,onClick:s}:null,L?{text:"Shopping List",link:"/shopping-list",icon:(0,e.jsx)(ne,{}),asMenu:!0,onClick:s}:null],[v,M,d,C,L,s,g,t==null?void 0:t.ecomLEUrl,o==null?void 0:o.account_settings_your_orders,n==null?void 0:n.token]),F=(0,u.useMemo)(()=>{let r=a.givenName||K.givenName,l=a.surName?` ${a.surName}`:"";return!l&&!r?"Your Account":`${r}${l?` ${l}`:""}`},[a.givenName,a.surName]),O=()=>{if(w("account"),m(),C===void 0&&!M&&!d){let r=R();r&&(P(!0),Q(void 0,r).then(l=>{ce(V(l))}).finally(()=>{P(!1)}))}},h=()=>{w("none"),se()};return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{opened:re,menuItemTabIndex:0,closeOnEscape:!0,onClose:()=>{f(),m()},transitionProps:{transition:"slide-left",duration:250},withinPortal:!1,children:(0,e.jsxs)(i.Dropdown,{className:"account-menu-dropdown",children:[(0,e.jsxs)(i.Item,{className:"account-menu-header",onClick:()=>{f(),m()},children:[(0,e.jsx)(x,{"data-testid":"left-arrow",size:24,onClick:()=>{f(),m()}}),(0,e.jsx)(c,{mx:12,orientation:"vertical"}),(0,e.jsx)(p,{fw:600,fz:"sm",children:(o==null?void 0:o.account_settings_your_orders)||"Your Orders"})]}),(0,e.jsx)(N,{className:"your-orders-menu-section",asMenu:!0,items:[{text:(o==null?void 0:o.account_settings_orders)||"Order History",externalUrl:`${t==null?void 0:t.ecomLEUrl}/profile/orders/?ex_access_token=${n==null?void 0:n.token}`,icon:(0,e.jsx)(ee,{}),onClick:s,asMenu:!0},{text:(o==null?void 0:o.account_settings_saved_addresses)||"Saved Addresses",externalUrl:`${t==null?void 0:t.ecomLEUrl}/profile/addresses/?ex_access_token=${n==null?void 0:n.token}`,icon:(0,e.jsx)(j,{width:24,height:24}),onClick:s,asMenu:!0},{text:(o==null?void 0:o.account_settings_payment_methods)||"Payment Methods",externalUrl:`${t==null?void 0:t.ecomLEUrl}/profile/cards-list/?ex_access_token=${n==null?void 0:n.token}`,icon:(0,e.jsx)(E,{}),onClick:s,asMenu:!0}]})]})}),(0,e.jsxs)(i,{opened:te,menuItemTabIndex:0,closeOnEscape:!0,onClose:h,transitionProps:{transition:"slide-left",duration:250},withinPortal:!1,children:[(0,e.jsx)(i.Target,{children:(0,e.jsxs)(I,{className:"user-account-link",tabIndex:0,onKeyDown:r=>W({callback:O,event:r}),onClick:O,children:[(0,e.jsxs)(I,{align:"center",gap:"sm",children:[(0,e.jsx)(_,{className:"user-icon",size:24}),(0,e.jsx)(p,{children:F})]}),(0,e.jsx)(S,{className:"chevron-right",size:20})]})}),(0,e.jsxs)(i.Dropdown,{className:"account-menu-dropdown",children:[(0,e.jsxs)(i.Item,{className:"account-menu-header",onClick:h,children:[(0,e.jsx)(x,{"data-testid":"left-arrow",size:24,onClick:h}),(0,e.jsx)(c,{mx:12,orientation:"vertical"}),(0,e.jsx)(p,{fw:600,fz:"sm",children:F})]}),(0,e.jsx)(c,{variant:"dashed"}),(0,e.jsxs)($,{children:[(0,e.jsx)(A,{visible:ae}),(0,e.jsx)(N,{asMenu:!0,items:le.filter(r=>r!==null)})]}),(0,e.jsx)(c,{variant:"dashed"}),(0,e.jsx)(Z,{className:"sign-out",iconElement:(0,e.jsx)(z,{}),onClick:()=>{ie(!1),s()}}),(0,e.jsx)(c,{variant:"dashed"})]})]})]})};export{Fe as SwiftlyAccountMobMenu};

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.