1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,419719,e=>{"use strict";var t=e.i(972673),a=e.i(980406);let s={"payment-provider":"payments"},r=(0,a.create)(e=>({isOpen:!1,activeView:"list",open:()=>e({isOpen:!0,activeView:"list"}),close:()=>e({isOpen:!1,activeView:"list"}),toggle:()=>e(e=>({isOpen:!e.isOpen,activeView:e.isOpen?"list":e.activeView})),navigateTo:t=>e({activeView:t}),navigateBack:()=>e(e=>({activeView:s[e.activeView]??"list"}))}));var n=e.i(673447);let i=[{id:"dev",name:"Dev",description:"CFA Development",url:"https://cfa-dev-api.test.subway.com"},{id:"qe",name:"QE",description:"CFA QE",url:"https://cfa-qe-api.test.subway.com"},{id:"sandbox-east",name:"Sandbox East",description:"CFA East sandbox",url:"https://cfa-east-api.test.subway.com"},{id:"sandbox-west",name:"Sandbox West",description:"CFA West sandbox",url:"https://cfa-west-api.test.subway.com"},{id:"prod",name:"Production",description:"Production environment",url:"https://api.subway.com"},{id:"mock",name:"Mock",description:"Custom SUBWAY_XAPI_BASE_URL"}],l=[{id:"cfa-dev",name:"CFA Dev",description:"CFA Development tier"},{id:"cfa-dev1",name:"CFA Dev 1",description:"CFA Development tier 1"},{id:"cfa-dev2",name:"CFA Dev 2",description:"CFA Development tier 2"},{id:"cfa-qe",name:"CFA QE",description:"CFA QE tier"},{id:"cfa-qe1",name:"CFA QE 1",description:"CFA QE tier 1"},{id:"cfa-qe2",name:"CFA QE 2",description:"CFA QE tier 2"},{id:"cfa-uat",name:"CFA UAT",description:"CFA UAT tier"},{id:"cfa-uat1",name:"CFA UAT 1",description:"CFA UAT tier 1"},{id:"cfa-uat2",name:"CFA UAT 2",description:"CFA UAT tier 2"},{id:"api-gateway",name:"API Gateway",description:"Legacy API gateway"},{id:"prod",name:"Production",description:"Production environment"}],o=[{id:"DEV",name:"DEV",description:"NPS Development"},{id:"DEV1",name:"DEV 1",description:"NPS Development tier 1"},{id:"DEV3",name:"DEV 3",description:"NPS Development tier 3"},{id:"QE",name:"QE",description:"NPS QE"},{id:"QE1",name:"QE 1",description:"NPS QE tier 1"},{id:"QE2",name:"QE 2",description:"NPS QE tier 2"},{id:"UAT",name:"UAT",description:"NPS UAT"},{id:"UAT1",name:"UAT 1",description:"NPS UAT tier 1"},{id:"UAT2",name:"UAT 2",description:"NPS UAT tier 2"},{id:"PE",name:"PE",description:"NPS Performance"},{id:"PE1",name:"PE 1",description:"NPS Performance tier 1"},{id:"PE2",name:"PE 2",description:"NPS Performance tier 2"},{id:"Prod",name:"Production",description:"NPS Production"}];var d=e.i(1477);function c(){try{let e=document.cookie.split("; ").find(e=>e.startsWith(`${d.DEV_ENV_COOKIE_NAME}=`));if(!e)return{};let t=e.split("=")[1],a=JSON.parse(decodeURIComponent(t));if(!a||"object"!=typeof a||Array.isArray(a))return{};return a}catch{return{}}}function m(e){let t=encodeURIComponent(JSON.stringify(e));document.cookie=`${d.DEV_ENV_COOKIE_NAME}=${t}; path=/; SameSite=Lax`}function u({label:e,value:a,description:s,onPress:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex w-full items-center justify-between rounded-lg border border-gray-200 bg-white p-4 text-left transition-colors hover:bg-gray-50",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"font-medium text-gray-900",children:e}),s&&(0,t.jsx)("div",{"data-testid":"dev-menu-item-description",className:"text-sm text-gray-500",children:s})]}),(0,t.jsxs)("div",{className:"ml-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-green-600",children:a}),(0,t.jsx)("span",{"data-testid":"dev-menu-item-chevron",className:"text-gray-400",children:(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,t.jsx)("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})}function x({name:e,description:a,isDefault:s=!1}){return(0,t.jsxs)("div",{"data-testid":"current-env-banner",className:"rounded-lg bg-green-50 border border-green-200 p-3",children:[(0,t.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-green-700",children:"CURRENT ENVIRONMENT"}),(0,t.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-gray-900",children:e}),s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Default (.env)"})]}),(0,t.jsx)("div",{className:"text-sm text-gray-500",children:a})]})}function g({id:e,name:a,description:s,url:r,isActive:n,onSelect:i}){return(0,t.jsx)("button",{"data-testid":`env-card-${e}`,type:"button",onClick:()=>!n&&i(e),className:`w-full rounded-lg border p-3 text-left transition-colors ${n?"border-green-600 bg-green-50":"border-gray-200 bg-white hover:border-gray-400"}`,children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{"data-testid":`env-card-indicator-${e}`,className:`mt-0.5 text-lg leading-none ${n?"text-green-600":"text-gray-400"}`,children:n?"â":"â"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"font-medium text-gray-900",children:a}),(0,t.jsx)("div",{className:"text-sm text-gray-500",children:s}),r&&(0,t.jsx)("div",{"data-testid":`env-card-url-${e}`,className:"mt-1 truncate text-xs text-gray-400",children:r})]})]})})}function p({environments:e,currentId:a,isDefault:s,onSelect:r,onReset:n}){let i=e.find(e=>e.id===a);return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(x,{name:i?.name??"Unknown",de
1scription:i?.description??"Environment not found",isDefault:s}),(0,t.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"SELECT ENVIRONMENT"}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,t.jsx)(g,{id:e.id,name:e.name,description:e.description,url:e.url,isActive:e.id===a,onSelect:r},e.id))}),(0,t.jsx)("button",{type:"button",disabled:s,onClick:n,className:"mt-2 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Reset to default",children:"Reset to Default"})]})}function h({isOpen:e,environmentName:a,onConfirm:s,onCancel:r}){return e?(0,t.jsxs)("dialog",{"data-testid":"confirm-switch-dialog",open:!0,"aria-labelledby":"confirm-switch-title",className:"fixed inset-0 z-[60] flex items-center justify-center bg-transparent",children:[(0,t.jsx)("div",{"data-testid":"confirm-switch-backdrop",role:"button",tabIndex:-1,className:"absolute inset-0 bg-black/50",onClick:r,onKeyDown:e=>{"Escape"===e.key&&r()},"aria-label":"Close dialog"}),(0,t.jsxs)("div",{className:"relative z-10 mx-4 w-full max-w-sm rounded-xl bg-white p-6 shadow-xl",children:[(0,t.jsx)("h3",{id:"confirm-switch-title",className:"text-lg font-semibold text-gray-900",children:"Switch environment?"}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["Switch to ",(0,t.jsx)("strong",{children:a}),"? The page will reload to apply the new environment."]}),(0,t.jsxs)("div",{className:"mt-4 flex gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"flex-1 rounded-lg border border-gray-300 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50","aria-label":"Cancel",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:s,className:"flex-1 rounded-lg bg-green-600 px-4 py-2 text-sm font-medium text-white hover:bg-green-700","aria-label":"Confirm",children:"Confirm"})]})]})]}):null}var b=e.i(261948),f=e.i(55667);let v=(0,f.createServerReference)("40ca2d7af7de3fce6d049c0e60c8747ff525767c3a",f.callServer,void 0,f.findSourceMapURL,"debugCreateCartAction"),y=(0,f.createServerReference)("603061afdd11dda6115632da7ae34a8b2defb59228",f.callServer,void 0,f.findSourceMapURL,"debugUpdateCartAction");function j(){let e=(0,b.useOrderingSessionStore)(e=>e.storeId),a=(0,b.useOrderingSessionStore)(e=>
1e.cartId),[s,r]=(0,n.useState)(e??""),[i,l]=(0,n.useState)(!1),[o,d]=(0,n.useState)(null);async function c(){l(!0),d(null);try{let e=await v(s);d(e)}finally{l(!1)}}async function m(){if(a){l(!0),d(null);try{let e=await y(a,s);d(e)}finally{l(!1)}}}return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"cart-debug-store-id",className:"mb-1 block text-sm font-medium text-gray-700",children:"Store ID"}),(0,t.jsx)("input",{id:"cart-debug-store-id",type:"text",value:s,onChange:e=>r(e.target.value),className:"w-full rounded-lg border border-gray-300 px-3 py-2 text-sm",placeholder:"e.g. 54321"})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:c,disabled:i||!s,className:"flex-1 rounded-lg bg-green-600 px-4 py-2 text-sm font-medium text-white hover:bg-green-700 disabled:opacity-50",children:"Create Cart"}),(0,t.jsx)("button",{type:"button",onClick:m,disabled:i||!a,className:"flex-1 rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 disabled:opacity-50",children:"Update Cart"})]}),i&&(0,t.jsx)("div",{"data-testid":"cart-debug-loading",className:"text-sm text-gray-500",children:"Running..."}),o&&(0,t.jsx)("pre",{"data-testid":"cart-debug-result",className:`max-h-64 overflow-auto rounded-lg p-3 text-xs ${o.success?"bg-green-50 text-green-900":"bg-red-50 text-red-900"}`,children:JSON.stringify(o,null,2)})]})}var N=e.i(563945);let w=[{key:"order-bag",label:"Bag items",storage:"localStorage"},{key:"ordering-session",label:"Ordering session (cart totals)",storage:"sessionStorage"},{key:"order-location",label:"Order location",storage:"localStorage"}],S=[24,48,72];function C(){let[e,a]=(0,n.useState)(null);return(0,t.jsxs)("div",{"data-testid":"bag-debug-section",className:"flex flex-col gap-4",children:[(0,t.jsx)("button",{type:"button",onClick:function(){let e=0;for(let{key:t,storage:a}of w){let s="sessionStorage"===a?sessionStorage:localStorage;null!==s.getItem(t)&&(s.removeItem(t),e++)}a(`Cleared ${e} storage key(s). Reload the page to reset UI state.`)},"data-testid":"bag-debug-clear-all",className:"rounded-lg bg-red-600 px-4 py-3 text-sm font-medium text-white hover:bg-red-700 active:bg-red-800",children:"Clear All Bag Data"}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Clear individual stores"}),w.map(({key:e,label:s,storage:r})=>(0,t.jsxs)("button",{type:"button",onClick:()=>{("sessionStorage"===r?sessionStorage:localStorage).removeItem(e),a(`Cleared "${e}" from ${r}.`)},"data-testid":`bag-debug-clear-${e}`,className:"flex items-center justify-between rounded-lg border border-gray-200 px-4 py-2.5 text-left hover:bg-gray-50 active:bg-gray-100",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:s}),(0,t.jsxs)("span",{className:"ml-2 text-xs text-gray-400",children:["(",r,")"]})]}),(0,t.jsx)("span",{className:"text-xs font-medium text-red-500",children:"Clear"})]},e))]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Expire bag (back-date last-modified)"}),(0,t.jsx)("div",{className:"flex gap-2",children:S.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{N.useBagStore.setState({bagLastModifiedTimestamp:Date.now()-60*e*6e4}),a(`Set bag last-modified to ${e}h ago. Reload or refocus the tab to trigger the auto-expiry clear.`)},"data-testid":`bag-debug-expire-${e}h`,className:"flex-1 rounded-lg border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm font-medium text-amber-800 hover:bg-amber-100 active:bg-amber-200",children:[e,"h ago"]},e))})]}),e&&(0,t.jsx)("div",{"data-testid":"bag-debug-feedback",className:"rounded-lg bg-green-50 px-4 py-3 text-xs text-green-800",children:e})]})}let k=[{id:"auto",label:"Auto (from store country)",country:null},{id:"adyen",label:"Adyen (US/CA)",country:"US"},{id:"freedompay",label:"FreedomPay (NPS)",country:"PR"}];
1function O(){let[e,a]=(0,n.useState)(()=>localStorage.getItem(d.DEV_PAYMENT_PROVIDER_KEY)??"auto");return(0,t.jsxs)("div",{"data-testid":"payment-provider-section",className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Payment Provider Override"}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"Overrides the store country to force Adyen or FreedomPay. Reload the checkout page after changing."}),k.map(s=>(0,t.jsxs)("button",{type:"button",onClick:()=>{var e;a(e=s.id),"auto"===e?localStorage.removeItem(d.DEV_PAYMENT_PROVIDER_KEY):localStorage.setItem(d.DEV_PAYMENT_PROVIDER_KEY,e)},"data-testid":`payment-provider-${s.id}`,className:["flex items-center justify-between rounded-lg border px-4 py-3 text-left",e===s.id?"border-green-500 bg-green-50":"border-gray-200 hover:bg-gray-50"].join(" "),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900",children:s.label}),s.country&&(0,t.jsxs)("span",{className:"ml-2 text-xs text-gray-400",children:["country=",s.country]})]}),e===s.id&&(0,t.jsx)("span",{className:"text-xs font-medium text-green-600",children:"Active"})]},s.id))]})}var E=e.i(235933),P=e.i(635428),A=e.i(106712),I=e.i(472997);function D({onNavigateTo:e}){let{isAuthenticated:a}=(0,E.useAuthLite)();return(0,t.jsxs)("div",{"data-testid":"payments-section",className:"flex flex-col gap-3",children:[(0,t.jsx)(u,{label:"Payment Provider",value:"Override",description:"Force Adyen or FreedomPay regardless of store country",onPress:()=>e("payment-provider")}),a?(0,t.jsx)(T,{}):(0,t.jsx)("p",{"data-testid":"delete-all-cards-signed-out",className:"px-1 text-xs text-gray-400",children:"Sign in to clear saved cards â the wallet is per-account."})]})}function T(){let{status:e,result:a,error:s,run:r}=function(){let[e,t]=(0,n.useState)("idle"),[a,s]=(0,n.useState)(null),[r,i]=(0,n.useState)(null),l=(0,n.useRef)(!1),o=(0,n.useCallback)(()=>{l.current||(l.current=!0,t("running"),s(null),i(null),(async()=>{let e=[],a=0,r=0,n=0,o=!1;try{let i;for(let t of(i=function(){try{return localStorage.getItem(d.DEV_PAYMENT_PROVIDER_KEY)}catch{return null}}(),e="freedompay"===i||"adyen"===i?[i]:["freedompay","adyen"])){let e=await (0,P.getWalletAction)(t);if(!e.success||!e.data){I.logger.info("[useDeleteAllSavedCards] wallet read skipped",{provider:t,error:e.error});continue}o=!0;let s=e.data.storedPayments??[];a+=s.length,(await Promise.allSettled(s.map(e=>(0,A.deleteWalletCardAction)(e.paymentId,e.paymentType,t)))).forEach((e,a)=>{if("fulfilled"===e.status&&e.value.success){r+=1;return}n+=1,"rejected"===e.status?I.logger.warn("[useDeleteAllSavedCards] delete threw",{provider:t,paymentId:s[a].paymentId,reason:e.reason instanceof Error?e.reason.message:e.reason}):I.logger.warn("[useDeleteAllSavedCards] delete failed",{provider:t,paymentId:s[a].paymentId,error:e.value.error})})}if(!o)throw Error(`Could not read wallet from any provider (${e.join(", ")})`);s({found:a,deleted:r,failed:n,providers:e}),t(n>0?"partial":"done"),I.logger.info("[useDeleteAllSavedCards] DONE",{found:a,deleted:r,failed:n,providers:e})}catch(l){I.logger.error("[useDeleteAllSavedCards] FAILED",l instanceof Error?l:void 0,{found:a,deleted:r,failed:n}),s({found:a,deleted:r,failed:n,providers:e}),i(l instanceof Error?l.message:String(l)),t("error")}finally{l.current=!1}})())},[]);return{status:e,result:a,error:r,run:o,reset:(0,n.useCallback)(()=>{t("idle"),s(null),i(null)},[])}}(),i="running"===e;return(0,t.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"delete-all-cards","data-status":e,"data-found":a?.found??"","data-deleted":a?.deleted??"","data-failed":a?.failed??"",children:[(0,t.jsxs)("button",{type:"button",onClick:r,disabled:i,"data-testid":"delete-all-cards-button",className:["flex w-full items-center justify-between rounded-lg border px-4 py-3 text-left transition-colors","border-red-200 bg-white hover:bg-red-50",i?"opacity-60":""].filter(Boolean).join(" "),children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"font-medium text-red-700",children:"Delete all saved cards"}),(0,t.jsx)("div",{className:"text-sm text-gray-500",children:"Clears the wallet so add-card flows start fresh. Cannot be undone. Gift cards are left alone."})]}),i&&(0,t.jsx)("span",{"data-testid":"delete-all-cards-running",className:"ml-3 text-xs text-gray-500",children:"Deletingâ¦"})]}),(0,t.jsxs)("div",{role:"status","aria-live":"polite",className:"px-1 text-xs",children:["done"===e&&a&&(0,t.jsx)("span",{"data-testid":"delete-all-cards-result",className:"text-green-600",children:0===a.found?"No saved cards foun
1d â wallet already empty.":`Deleted ${a.deleted} of ${a.found} card${1===a.found?"":"s"}.`}),"partial"===e&&a&&(0,t.jsxs)("span",{"data-testid":"delete-all-cards-result",className:"text-amber-600",children:["Deleted ",a.deleted," of ",a.found,"; ",a.failed," failed. Check the console."]}),"error"===e&&(0,t.jsxs)("span",{"data-testid":"delete-all-cards-error",className:"text-red-600",children:["Failed",a&&a.deleted>0?` after deleting ${a.deleted}`:"",s?`: ${s}`:"."]})]})]})}var R=e.i(292045),M=e.i(829448),V=e.i(641111),F=e.i(9339),_=e.i(128554);function $({checked:e,onChange:a,testId:s,label:r}){return(0,t.jsxs)("button",{type:"button",role:"switch","aria-checked":e,"data-testid":s,onClick:()=>a(!e),className:"flex items-center justify-between rounded-lg border px-4 py-2.5 text-left border-gray-200 hover:bg-gray-50",children:[(0,t.jsx)("span",{className:"text-sm text-gray-900",children:r}),(0,t.jsx)("span",{className:["relative inline-flex h-5 w-9 shrink-0 rounded-full transition-colors",e?"bg-green-500":"bg-gray-300"].join(" "),children:(0,t.jsx)("span",{className:["inline-block h-4 w-4 rounded-full bg-white shadow transform transition-transform mt-0.5",e?"translate-x-4 ml-0.5":"translate-x-0 ml-0.5"].join(" ")})})]})}let U=Object.keys(_.OOS_STORE_CONFIGS),B={off:"Off","optional-modifier":"Optional ingredient â strip it","required-default":"Required default â remove the product",mixed:"Mixed (one of each, different products)","all-lines":"Every line (drives the empty-bag state)",explicit:"Explicit option ids"},W=[...new Set(Object.values(_.OOS_STORE_CONFIGS).flatMap(e=>e.oosCategories??[]))];function L(){let[e,a]=(0,R.useOosDevToggle)(),[s,r]=(0,M.useOosAddBypassToggle)(),[i,l]=(0,V.useIngredientOosBypassToggle)(),[o,c]=(0,F.useOosRejectionSimulator)(),m=(0,n.useRef)([]),u=(0,n.useCallback)((e,t)=>{let a=d.OOS_REJECTION_SCENARIOS.length,s=t=>{e.preventDefault(),c({scenario:d.OOS_REJECTION_SCENARIOS[t]}),m.current[t]?.focus()};"ArrowRight"===e.key||"ArrowDown"===e.key?s((t+1)%a):"ArrowLeft"===e.key||"ArrowUp"===e.key?s((t-1+a)%a):(" "===e.key||"Enter"===e.key)&&(e.preventDefault(),c({scenario:d.OOS_REJECTION_SCENARIOS[t]}))},[c]);return(0,t.jsxs)("div",{"data-testid":"oos-testing-section",className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"OOS Dev Overrides"}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"Forces configured products into out-of-stock states. Applied client-side â no page reload needed."}),(0,t.jsx)($,{checked:e.enabled,onChange:function(t){if(t&&0===Object.keys(e.categories).length){let e={};for(let t of W)e[t]=!0;a({enabled:t,categories:e})}else a({enabled:t})},testId:"oos-testing-master",label:"Enable OOS Overrides"}),W.length>0&&(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500 mb-1.5",children:"Categories"}),(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:W.map(s=>(0,t.jsx)($,{checked:e.enabled&&!1!==e.categories[s],onChange:t=>a({enabled:!0,categories:{...e.categories,[s]:t}}),testId:`oos-category-${s}`,label:s.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")},s))})]}),(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500 mb-1.5",children:"Product OOS Types"}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)($,{checked:e.enabled&&e.unavailable,onChange:e=>a({enabled:!0,unavailable:e}),testId:"oos-type-unavailable",label:"Product Unavailable"}),(0,t.jsx)($,{checked:e.enabled&&e.coreIngredientOos,onChange:e=>a({enabled:!0,coreIngredientOos:e}),testId:"oos-type-core-ingredient",label:"Core Ingredient OOS"})]})]}),(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500 mb-1.5",children:"Reorder Scenarios"}),(0,t.jsx)("div",{className:"flex flex-col gap-1.5",children:(0,t.jsx)($,{checked:e.enabled&&e.forceMotdMismatch,onChange:e=>a({enabled:!0,forceMotdMismatch:e}),testId:"oos-type-motd-mismatch",label:"Force MOTD/SOTD Date Mismatch"})})]}),(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500 mb-1.5",children:"Bag OOS Testing"}),(0,t.jsx)($,{checked:s,onChange:r,testId:"oos-add-bypass",label:"Allow adding OOS items to bag"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:"Treats every product as available so a genuinely out-of-stock item can be added to the bag. Server availability is unchanged, so opening the bag surfaces the entire-item OOS modal."}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)($,{checked:i,onChange:l,testId:"oos-ingredient-bypass",label:"Show OOS ingredients as available"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:"PDP customization list treats every ingredient as available (display only) â required defaults like bread and protein included. Lets you build an item whose ingredients are out of stock; the cart payload to the server is unchanged."})]})]}),(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500 mb-1.5",children:"Modifier OOS Rejection (simulated)"}),(0,t.jsxs)("p",{className:"mb-2 text-xs text-gray-400",children:["Fabricates the server's ",(0,t.jsx)("code",{children:"ORDR-3047"}),'cart rejection using option ids taken from the bag you are actually carrying, then runs the real recovery flow on them. No cart write is sent â the bag changes only when you choose "Remove Items and Continue", and that sync is a genuine round trip. The entire-item availability pre-check still runs first, so expect one ',(0,t.jsx)("code",{children:"/api/reorder-availability"})," call in the network tab. Bag page only."]}),(0,t.jsx)("div",{className:"flex flex-col gap-1.5",role:"radiogroup","aria-label":"Rejection scenario",children:d.OOS_REJECTION_SCENARIOS.map((e,a)=>{let s=o.scenario===e;return(0,t.jsxs)("button",{ref:e=>{m.current[a]=e},type:"button",role:"radio","aria-checked":s,tabIndex:s?0:-1,"data-testid":`oos-rejection-scenario-${e}`,onKeyDown:e=>u(e,a),onClick:()=>c({scenario:e}),className:["flex items-center gap-2 rounded-lg border px-4 py-2.5 text-left text-sm",s?"border-green-500 bg-green-50 text-gray-900":"border-gray-200 text-gray-900 hover:bg-gray-50"].join(" "),children:[(0,t.jsx)("span",{className:["inline-block h-3 w-3 shrink-0 rounded-full border",s?"border-green-500 bg-green-500":"border-gray-300"].join(" ")}),B[e]]},e)})}),"mixed"===o.scenario&&(0,t.jsx)("p",{"data-testid":"oos-rejection-mixed-hint",className:"mt-2 text-xs text-gray-400",children:'Needs 2+ affected products in the bag â one carrying a required default (bread, protein) and another carrying a strippable modifier. With a single product, or when every other product is all-required-defaults, this arm quietly behaves like "Required default" and the independent-evaluation path never runs.'}),"explicit"===o.scenario&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("label",{htmlFor:"oos-rejection-explicit-ids",className:"text-xs font-medium text-gray-500",children:"Option ids (comma separated)"}),(0,t.jsx)("input",{id:"oos-rejection-explicit-ids","data-testid":"oos-rejection-explicit-ids",type:"text",value:o.explicitIds,onChange:e=>c({explicitIds:e.target.value}),placeholder:"D78, D23",className:"mt-1 w-full rounded-lg border border-gray-200 px-3 py-2 font-mono text-xs text-gray-900"}),(0,t.jsx)("p",{"data-testid":"oos-rejection-explicit-hint",className:"mt-1 text-xs text-gray-400",children:'Ids are not validated against the bag. An id that matches nothing produces no alert at all â the bag just syncs normally â because the alert only lists bag lines carrying one of the ids. Check the console for a "matched nothing in the bag" warning naming the ids; the arm stays armed so you can correct them without re-selecting it.'})]}),(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)($,{checked:o.sticky,onChange:e=>c({sticky:e}),testId:"oos-rejection-sticky",label:"Keep firing (do not disarm after one rejection)"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:'Off: the arm fires once, so "Remove Items and Continue" settles on the next sync. On: it fires every sync, which is how the consecutive-rejection cascade fuse gets exercised.'})]})]}),U.length>0&&(0,t.jsxs)("div",{className:"mt-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Configured Stores"}),(0,t.jsx)("div",{className:"mt-1 flex flex-wrap gap-2",children:U.map(e=>(0,t.jsx)("span",{className:"rounded bg-gray-100 px-2 py-1 font-mono text-xs text-gray-600",children:e},e))})]})]})}var Q=e.i(566818);function H(){let[e,a]=(0,Q.useRevealHiddenCategoriesDevToggle)();return(0,t.jsxs)("div",{"data-testid":"hide-category-testing-section",className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Hide-Category Override"}),(0,t.jsxs)("p",{className:"text-xs text-gray-400",children:["Reveals categories XAPI marks ",(0,t.jsx)("code",{children:"hide-category"}),"(e.g. the Moana cup's âNon-Food Itemsâ) so you can verify otherwise-suppressed categories. Server-side override â the page reloads when toggled. Non-prod only."]}),(0,t.jsx)($,{checked:e,onChange:a,testId:"hide-category-reveal-toggle",label:"Reveal hidden categories"})]})}var Y=e.i(405925),q=e.i(6969);function K(){let[e,a]=(0,Y.useDisclaimerDevToggle)();return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)($,{checked:e.enabled,onChange:t=>a({enabled:t,sodiumWarning:!t||e.sodiumWarning,sugarWarning:!t||e.sugarWarning,prop65Warning:!t||e.prop65Warning}),testId:"dev-disclaimer-master-toggle",label:"Enable Disclaimer Overrides"}),e.enabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-xs text-gray-500",children:'Force disclaimers to appear on any store menu, regardless of store attributes. Clear session storage to reset "Don\'t show me again" state.'}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Disclaimers"}
1),(0,t.jsx)($,{checked:e.sodiumWarning,onChange:e=>a({sodiumWarning:e}),testId:"dev-disclaimer-sodium-toggle",label:"Sodium Warning (NYC / Philadelphia)"}),(0,t.jsx)($,{checked:e.sugarWarning,onChange:e=>a({sugarWarning:e}),testId:"dev-disclaimer-sugar-toggle",label:"Added Sugar Warning (NYC)"}),(0,t.jsx)($,{checked:e.prop65Warning,onChange:e=>a({prop65Warning:e}),testId:"dev-disclaimer-prop65-toggle",label:"Prop 65 Warning (California)"})]}),(0,t.jsx)("button",{type:"button","data-testid":"dev-disclaimer-reset-session",onClick:()=>{try{sessionStorage.removeItem(q.SODIUM_DISMISSED_KEY)}catch{}},className:"rounded-lg border border-gray-200 px-4 py-2.5 text-left text-sm text-gray-900 hover:bg-gray-50",children:'Reset "Don\'t show me again" '})]})]})}var z=e.i(986251);function J({label:e,value:a,onChange:s,testId:r,prefix:n,min:i,max:l,step:o}){return(0,t.jsxs)("label",{className:"flex items-center justify-between rounded-lg border border-gray-200 px-4 py-2.5",children:[(0,t.jsx)("span",{className:"text-sm text-gray-900",children:e}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[n&&(0,t.jsx)("span",{className:"text-sm text-gray-500",children:n}),(0,t.jsx)("input",{type:"number","data-testid":r,value:a,min:i,max:l,step:o,onChange:e=>{let t=parseFloat(e.target.value);!isNaN(t)&&t>=i&&t<=l&&s(t)},className:"w-20 rounded border border-gray-300 px-2 py-1 text-right text-sm"})]})]})}let G=[{label:"$2 (min)",monetaryValue:2,pointsBalance:400},{label:"$10",monetaryValue:10,pointsBalance:2e3},{label:"$50 (max cap)",monetaryValue:50,pointsBalance:1e4},{label:"$100 (exceeds cap)",monetaryValue:100,pointsBalance:2e4}];function X(){let[e,a]=(0,z.useSubwayCashDevToggle)();return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)($,{checked:e.enabled,onChange:e=>a({enabled:e}),testId:"dev-subclub-cash-master-toggle",label:"Simulate Subway Cash"}),e.enabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Override the loyalty wallet on checkout with a simulated Subway Cash balance. Does not affect the actual xAPI response â client-side override only."}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Quick Presets"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:G.map(s=>(0,t.jsx)("button",{type:"button",onClick:()=>a({monetaryValue:s.monetaryValue,pointsBalance:s.pointsBalance}),className:["rounded-full border px-3 py-1 text-xs",e.monetaryValue===s.monetaryValue?"border-green-500 bg-green-50 text-green-700":"border-gray-200 text-gray-700 hover:bg-gray-50"].join(" "),children:s.label},s.label))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Custom Values"}),(0,t.jsx)(J,{label:"Subway Cash ($)",value:e.monetaryValue,onChange:e=>a({monetaryValue:e}),testId:"dev-subclub-cash-monetary-value",prefix:"$",min:0,max:200,step:2}),(0,t.jsx)(J,{label:"Points Balance",value:e.pointsBalance,onChange:e=>a({pointsBalance:e}),testId:"dev-subclub-cash-points-balance",min:0,max:5e4,step:100})]}),(0,t.jsxs)("p",{className:"text-xs text-gray-400",children:["Tip: The hook requires monetaryValue ",">","= $2 (stepAmount) to show the section. Max redemption is the lower of available Subway Cash, $50, and the order subtotal, rounded down to the nearest step."]})]})]})}var Z=e.i(481506);function ee(){let e=(0,Z.useAuthCheckoutOverrideStore)(e=>e.forceMissingPhoneSimulation),a=(0,Z.useAuthCheckoutOverrideStore)(e=>e.setForceMissingPhoneSimulation);return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)($,{checked:e,onChange:a,testId:"dev-profile-force-missing-phone-toggle",label:"Simulate missing phone number"}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"When on, the bag treats your profile as having no phone number â opens the MissingPhoneNumberModal at âContinue to Paymentâ. Toggling on also clears any previously-saved session phone override so the modal actually shows."}),(0,t.jsx)("p",{className:"text-xs text-gray-400",children:"In-memory only â refresh the tab to clear."})]})}var et=e.i(285589);function ea(){let[e,a]=(0,et.useDeviceTimeOverride)(),s=function(e){if(!e)return"";let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let a=e=>String(e).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())}T${a(t.getHours())}:${a(t.getMinutes())}`}(e.overrideIso);return(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)($,{checked:e.enabled,onChange:t=>{t&&!e.overrideIso?a({enabled:!0,overrideIso:new Date().toISOString()}):a({enabled:t})},testId:"dev-device-time-override-toggle",label:"Override device time"}),e.enabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-xs text-gray-500",children:"Pins ânowâ for store-hours cutoff logic (closed / closing-soon banners, bag pickup time) to the value below instead of the real clock. Client-side only â doesn't affect the server or any xAPI response. Turn the toggle off to go back to the real device clock."}),(0,t.jsxs)("label",{className:"flex items-center justify-between rounded-lg border border-gray-200 px-4 py-2.5",children:[(0,t.jsx)("span",{className:"text-sm text-gray-900",children:"Device time"}),(0,t.jsx)("input",{type:"datetime-local","data-testid":"dev-device-time-override-input",value:s,onChange:e=>(e=>{if(!e)return void a({enabled:!1,overrideIso:null});let t=new Date(e);Number.isNaN(t.getTime())||a({overrideIso:t.toISOString()})})(e.target.value),className:"rounded border border-gray-300 px-2 py-1 text-sm"})]})]})]})}function es(){return!("u"<typeof document)&&document.cookie.split("; ").some(e=>e===`${d.DEV_POS_UNHEALTHY_COOKIE}=true`)}
1function er(){let[e,a]=function(){let[e]=(0,n.useState)(es);return[e,(0,n.useCallback)(e=>{e?document.cookie=`${d.DEV_POS_UNHEALTHY_COOKIE}=true; path=/; SameSite=Lax`:document.cookie=`${d.DEV_POS_UNHEALTHY_COOKIE}=; path=/; SameSite=Lax; max-age=0`,window.location.reload()},[])]}();return(0,t.jsxs)("div",{"data-testid":"pos-health-testing-section",className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"POS Health"}),(0,t.jsxs)("p",{className:"text-xs text-gray-400",children:["Makes every cart response report ",(0,t.jsx)("code",{children:"locationInfo.posHealth: false"}),", as if the restaurant's POS were down. Tapping ",(0,t.jsx)("strong",{children:"Place Order"})," is then blocked and the POS-unhealthy sheet opens instead. Server-side override â the page reloads when toggled. Non-prod only."]}),(0,t.jsxs)("p",{className:"text-xs text-gray-400",children:["One-directional: this can only simulate an ",(0,t.jsx)("em",{children:"unhealthy"}),"POS, never mask a real one as healthy. Turn it off and the next cart sync picks up MW's real value with no reload needed."]}),(0,t.jsx)($,{checked:e,onChange:a,testId:"dev-pos-unhealthy-toggle",label:"Simulate unhealthy POS"})]})}function en(){let{isAuthenticated:e}=(0,E.useAuthLite)(),a=async()=>{try{await fetch("/api/auth/logout",{method:"POST"})}catch(e){I.logger.error("[DevMenu] Sign-out failed",e instanceof Error?e:void 0)}window.location.href="/"};return(0,t.jsxs)("div",{"data-testid":"dev-menu-auth-section",className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-gray-200 bg-white p-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium text-gray-900",children:"Auth"}),(0,t.jsx)("div",{className:`text-sm ${e?"text-green-600":"text-gray-400"}`,children:e?"Signed In":"Not signed in"})]}),e&&(0,t.jsx)("button",{"data-testid":"dev-menu-sign-out",type:"button",onClick:a,className:"rounded bg-red-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-red-700","aria-label":"Sign out",children:"Sign Out"})]}),(0,t.jsx)("button",{"data-testid":"dev-menu-nuclear-clear",type:"button",onClick:()=>{try{let e=[];for(let t=0;t<localStorage.length;t++){let a=localStorage.key(t);a&&(a.startsWith("CognitoIdentityServiceProvider.")||a.startsWith("amplify-"))&&e.push(a)}for(let t of e)localStorage.removeItem(t);I.logger.info("[DevMenu] Nuclear auth clear",{keysRemoved:e.length})}catch{I.logger.error("[DevMenu] localStorage unavailable during nuclear clear")}fetch("/api/auth/logout",{method:"POST"}).finally(()=>{window.location.reload()})},className:"w-full rounded-lg bg-red-800 px-4 py-3 text-sm font-medium text-white hover:bg-red-900",children:"Clear All Auth Data (cookies + Amplify)"})]})}let ei={list:"Dev Menu",xapi:"xAPI Environment",middleware:"Middleware Environment","payment-env":"Payment Environment","cart-debug":"Cart Debug","bag-debug":"Bag Page",payments:"Payments","payment-provider":"Payment Provider","oos-testing":"OOS Testing","hide-category-testing":"Hide Category","disclaimer-testing":"Disclaimer Testing","subclub-cash-testing":"SubClub Cash","profile-testing":"User Profile","device-time-testing":"Device Time","pos-health-testing":"POS Health"};function el({isOpen:e,activeView:a,onClose:s,onNavigateTo:r,onNavigateBack:d,defaultXApiEnv:x,defaultMiddlewareEnv:g,defaultPaymentEnv:b}){let f,v,y,N,w,S,[k,E]=(0,n.useState)(null),{currentOverride:P,setXApiEnvironment:A,setMiddlewareEnvironment:I,setPaymentEnvironment:T,clearXApiOverride:R,clearMiddlewareOverride:M,clearPaymentOverride:V}=(f=(0,n.useMemo)(()=>c(),[]),v=(0,n.useCallback)(e=>{m({...c(),xApiEnvironment:e}),window.location.reload()},[]),y=(0,n.useCallback)(e=>{m({...c(),middlewareEnvironment:e}),window.location.reload()},[]),N=(0,n.useCallback)(e=>{m({...c(),paymentEnvironment:e}),window.location.reload()},[]),w=(0,n.useCallback)(()=>{let{xApiEnvironment:e,...t}=c();m(t),window.location.reload()},[]),S=(0,n.useCallback)(()=>{let{middlewareEnvironment:e,...t}=c();m(t),window.location.reload()},[]),{currentOverride:f,setXApiEnvironment:v,setMiddlewareEnvironment:y,setPaymentEnvironment:N,clearXApiOverride:w,clearMiddlewareOverride:S,clearPaymentOverride:(0,n.useCallback)(()=>{let{paymentEnvironment:e,...t}=c();m(t),window.location.reload()},[]),clearOverrides:(0,n.useCallback)(()=>{m({}),window.location.reload()},[])});if(!e)return null;let F=P.xApiEnvironment??x,_=P.middlewareEnvironment??g,$=P.paymentEnvironment??b,U=!P.xApiEnvironment,B=!P.middlewareEnvironment,W=!P.paymentEnvironment,Q=i.find(e=>e.id===F)?.name??F,Y=l.find(e=>e.id===_)?.name??_,q=o.find(e=>e.id===$)?.name??$;function z(e,t){let a=("xapi"===e?i:"middleware"===e?l:o).find(e=>e.id===t);E({tab:e,envId:t,envName:a?.name??t})}return(0,t.jsxs)("div",{"data-testid":"dev-menu-panel",className:"fixed inset-x-0 bottom-0 z-50 flex max-h-[70vh] flex-col rounded-t-2xl bg-white shadow-2xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-200 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:["list"!==a&&(0,t.jsx)("button",{"data-testid":"dev-menu-back",type:"button",onClick:d,className:"rounded-lg p-1 text-gray-500 hover:bg-gray-100","aria-label":"Back to menu",children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,t.jsx)("path",{d:"M12 4L6 10l6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:ei[a]})]}),(0,t.jsx)("button",{"data-testid":"dev-menu-close",type:"button",onClick:s,className:"rounded-lg p-1 text-gray-500 hover:bg-gray-100","aria-label":"Close dev menu",children:(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,t.jsx)("path",{d:"M15 5L5 15M5 5l10 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:["list"===a&&(0,t.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"dev-menu-list",children:[(0,t.jsx)(u,{label:"xAPI Environment",value:Q,onPress:()=>r("xapi")}),(0,t.jsx)(u,{label:"Middleware Environment",value:Y,onPress:()=>r("middleware")}),(0,t.jsx)(u,{label:"Payment Environment",value:q,onPress:()=>r("payment-env")}),(0,t.jsx)(u,{label:"Cart Debug",value:"Debug",onPress:()=>r("cart-debug")}),(0,t.jsx)(u,{label:"Bag Page",value:"Storage",onPress:()=>r("bag-debug")}),(0,t.jsx)(u,{label:"Payments",value:"Provider, wallet",onPress:()=>r("payments")}),(0,t.jsx)(u,{label:"OOS Testing",value:"Toggle",onPress:()=>r("oos-testing")}),(0,t.jsx)(u,{label:"Hide Category",value:"Reveal",onPress:()=>r("hide-category-testing")}),(0,t.jsx)(u,{label:"Disclaimer Testing",value:"Toggle",onPress:()=>r("disclaimer-testing")}),(0,t.jsx)(u,{label:"SubClub Cash",value:"Simulate",onPress:()=>r("subclub-cash-testing")}),(0,t.jsx)(u,{label:"User Profile",value:"Simulate",onPress:()=>r("profile-testing")}),(0,t.jsx)(u,{label:"Device Time",value:"Override",onPress:()=>r("device-time-testing")}),(0,t.jsx)(u,{label:"POS Health",value:"Simulate",onPress:()=>r("pos-health-testing")}),(0,t.jsx)(en,{})]}),"xapi"===a&&(0,t.jsx)(p,{environments:i,currentId:F,isDefault:U,onSelect:e=>z("xapi",e),onReset:R}),"middleware"===a&&(0,t.jsx)(p,{environments:l,currentId:_,isDefault:B,onSelect:e=>z("middleware",e),onReset:M}),"payment-env"===a&&(0,t.jsx)(p,{environments:o,currentId:$,isDefault:W,onSelect:e=>z("payment-env",e),onReset:V}),"cart-debug"===a&&(0,t.jsx)(j,{}),"bag-debug"===a&&(0,t.jsx)(C,{}),"payments"===a&&(0,t.jsx)(D,{onNavigateTo:r}),"payment-provider"===a&&(0,t.jsx)(O,{}),"oos-testing"===a&&(0,t.jsx)(L,{}),"hide-category-testing"===a&&(0,t.jsx)(H,{}),"disclaimer-testing"===a&&(0,t.jsx)(K,{}),"subclub-cash-testing"===a&&(0,t.jsx)(X,{}),"profile-testing"===a&&(0,t.jsx)(ee,{}),"device-time-testing"===a&&(0,t.jsx)(ea,{}),"pos-health-testing"===a&&(0,t.jsx)(er,{})]}),(0,t.jsx)(h,{isOpen:!!k,environmentName:k?.envName??"",onConfirm:function(){k&&("xapi"===k.tab?A(k.envId):"middleware"===k.tab?I(k.envId):"payment-env"===k.tab&&T(k.envId),E(null))},onCancel:()=>E(null)})]})}e.s(["DevMenuButton",0,function({defaultXApiEnv:e="qe",defaultMiddlewareEnv:a="cfa-qe2",defaultPaymentEnv:s="QE2"}){let{isOpen:n,activeView:i,open:l,close:o,navigateTo:d,navigateBack:c}=r();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{"data-testid":"dev-menu-trigger",type:"button",onClick:l,className:"fixed top-4 left-4 z-50 flex h-[38px] w-[38px] items-center justify-center rounded-full bg-green-600 text-white shadow-lg hover:bg-green-700 active:scale-95","aria-label":"Dev menu",children:(0,t.jsxs)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("path",{d:"M12 15a3 3 0 100-6 3 3 0 000 6z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009
119.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),(0,t.jsx)(el,{isOpen:n,activeView:i,onClose:o,onNavigateTo:d,onNavigateBack:c,defaultXApiEnv:e,defaultMiddlewareEnv:a,defaultPaymentEnv:s})]})}],419719)},55802,e=>{"use strict";var t=e.i(972673);e.s(["DevLogoutButton",0,function(){let e=async()=>{await fetch("/api/auth/logout",{method:"POST"}),window.location.reload()};return(0,t.jsx)("button",{type:"button",onClick:e,className:"fixed top-4 left-14 z-50 flex h-[38px] w-[38px] items-center justify-center rounded-full bg-red-600 text-white shadow-lg hover:bg-red-700 active:scale-95","aria-label":"Dev logout",children:(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),(0,t.jsx)("polyline",{points:"16 17 21 12 16 7"}),(0,t.jsx)("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})})}])}]);
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.