PageSourceSearch

https://schnucks.com/_next/static/chunks/pages/payments/add-payment-method/v1-34286097971bcd9f.js

js schnucks.com collected 2026-09-24 09:25:20 UTC 6,482 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7140],{16414:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/payments/add-payment-method/v1",function(){return a(54783)}])},85491:function(e,t,a){"use strict";a.d(t,{O:function(){return h}});var s=a(85893),r=a(68092),n=a(24189),i=a(80407),l=a(58013),o=a(67294);let c=(0,o.forwardRef)(function(e,t){let{className:a="",id:r,label:n,error:i,value:l,onChange:c,...d}=e,[u,m]=(0,o.useState)(""),p=(0,o.useId)(),h=null!=r?r:p,f=l||u,x=(0,o.useCallback)(e=>{m(e.currentTarget.value),null==c||c(e)},[c]);return(0,s.jsxs)("div",{className:"flex flex-col-reverse text-left ".concat(a),children:[(0,s.jsx)("p",{className:"mt-0.5 min-h-3 text-[0.6875rem] leading-3 text-red",children:i}),(0,s.jsx)("input",{ref:t,className:"peer h-10 w-full border px-1.5 text-sm outline-0 placeholder:text-sm placeholder:uppercase placeholder:text-black focus:border-[#0058C1] focus:shadow-[0rem_0rem_0.5rem_#0009] focus:placeholder:opacity-0 ".concat(i?"border-red":""),id:h,placeholder:n,value:l,onChange:x,...d}),(0,s.jsx)("label",{className:"px-2.5 text-xs uppercase leading-[0.875rem] ".concat(f?"":"opacity-0 peer-focus:opacity-100"),htmlFor:h,children:n})]})});var d=a(84585),u=a(87536),m=a(43704),p=a(39902);function h(e){let{className:t,hideTitle:a=!1,showFsa:h=!1,submitButtonLabel:f="Save Payment Method",disableSubmit:x=!1,onSubmit:v}=e,w=(0,o.useRef)(null),[S,y]=(0,o.useState)(!1),[N,g]=(0,o.useState)("0px"),[C,_]=(0,o.useState)(!1),[b,j]=(0,o.useState)(!1),{session:E,fetchSession:k}=function(){let[e,t]=(0,o.useState)(),[a,s]=(0,o.useState)(),r=(0,o.useCallback)(async()=>{t(void 0);let[e,a]=await (0,m.Y)((0,p.sg)({url:"payment-api/v1/payment-method-sessions",body:{},authenticated:!1}));a?(t(null),s(a)):t(e.SessionResponse)},[]);return(0,o.useEffect)(()=>{r()},[r]),{session:e,sessionError:a,fetchSession:r}}(),{register:P,trigger:O,watch:I,resetField:T,formState:{errors:A,isValid:M}}=(0,u.cI)(),R=I("zipCode"),z="fsa/hsa"===I("type"),F=x||S||!E||!C||!M,U=(0,o.useCallback)(async e=>{let t=E&&new URL(E.IFrameUrl);if(e.origin!==(null==t?void 0:t.origin)||"string"!=typeof e.data)return;let[a,s]=e.data.split("=");switch(a){case"enablePlaceOrder":_("true"===s);break;case"response":y(!0);try{await (null==v?void 0:v(JSON.parse(s),z,R))}catch(e){k(),j(!1),T("zipCode")}y(!1);break;case"iframeHeight":g(s)}},[k,z,v,E,R,T]);return(0,o.useEffect)(()=>(window.addEventListener("message",U),()=>window.removeEventListener("message",U)),[U]),(0,s.jsxs)("section",{className:t,children:[!a&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.J,{className:"mx-auto w-fit",name:"Lock",size:"2.5rem"}),(0,s.jsx)("p",{className:"text-center",children:"Transaction secured by"}),(0,s.jsx)("h1",{className:"text-center text-h3",children:"Aurus"})]}),h&&(0,s.jsxs)("div",{className:"my-2 space-y-2",children:[(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsx)(l.X,{type:"radio",defaultChecked:!0,value:"credit/debit",...P("type"),children:"Credit/Debit Card"}),(0,s.jsx)(l.X,{type:"radio",value:"fsa/hsa",...P("type"),children:"*FSA/HSA Card"})]}),(0,s.jsx)("p",{className:"text-center text-[0.875rem]",children:"*Select FSA/HSA to register your medical expense account card for qualified in-store purchases."})]}),E&&(0,s.jsx)("iframe",{ref:w,className:"-mx-1 w-full",title:"Payment Method Window",id:"GCframe_carddetails",name:"GCframe_carddetails",onLoad:()=>j(!0),height:N,src:E.IFrameUrl}),b?(0,s.jsx)(c,{className:"-mt-3 mb-8 ml-0.5 mr-2",...d._.address.zipCode({register:P,errors:A,onBlur:()=>O("zipCode")}),label:"Billing Zip Code"}):(0,s.jsx)("div",{className:"flex min-h-96 items-center justify-center",children:(0,s.jsx)(i.P,{})}),(0,s.jsx)(r.z,{disabled:F,width:"full",onClick:()=>{var e;let t=null===(e=w.current)||void 0===e?void 0:e.contentWindow;if(!t)throw Error("Missing iframe content window");if(!E)throw Error("Missing Aurus Session data");let a=new URL(E.IFrameUrl);t.postMessage("aurus-token",a.origin)},children:f})]})}},74032:function(e,t,a){"use strict";a.d(t,{I:function(){return n}});var s=a(39902),r=a(97927);async function n(e,t){let a=await (0,s._0)({...t?{url:"payment-api/v1/users/authenticated/payment-methods",authenticated:!1,includeAuthorization:!1,extraHeaders:{"X-SCHNUCKS-SKIP-INTERCEPT":"true","X-SSO-SCHNUCKS-TOKEN":t}}:{url:"payment-api/v1/payment-methods",authenticated:!0,includeAuthorization:!0},method:"POST",body:e});return(0,r.j)(e=>"payment-api/v1/payment-methods"===e.url),a}},54783:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return h}});var s=a(85893),r=a(39332);function n(e,t){var a;let s=(0,r.useParams)(),n=(0,r.useSearchParams)();if(!s)return;let i=null!==(a=null==n?void 0:n.get(e))&&void 0!==a?a:null;return t?t(i):i}
1var i=a(43704),l=a(85491),o=a(74032),c=a(39902);async function d(e){return(await (0,c._0)({url:"sso-api/v1/users/one-time-auth-tokens/".concat(e),method:"GET",authenticated:!1})).rawResponse.headers.get("X-SSO-SCHNUCKS-TOKEN")}var u=a(9008),m=a.n(u),p=a(67294);function h(){let[e,t]=(0,p.useState)(""),[a,r]=(0,p.useState)(!1),[c,u]=(0,p.useState)(""),h=n("showfsaoptions",e=>"true"===e),f=n("tk"),x=(0,p.useCallback)(async(t,a,s)=>{let[n,l]=await (0,i.Y)((0,o.I)({maskedCardNumber:t.masked_card_num,expiration:t.card_expiry_date,paymentMethodType:t.card_type,lowValueToken:t.one_time_token,application:"MOBILE_APP",fsa:a,transactionDescription:"Register payment method",billingZipCode:s},e));if(l)throw u(l.message),l;if(n){var c,d;r(!0),window.postMessage(JSON.stringify({message:"ADD_PAYMENT_SUCCESS",id:null===(d=n.parsedResponse)||void 0===d?void 0:null===(c=d.data)||void 0===c?void 0:c.id}))}},[e]);return(0,p.useEffect)(()=>{f&&(0,i.Y)(d(f)).then(e=>{let[a]=e;if(a){t(a),u("");return}u("Oops! Something went wrong.")})},[f]),(0,p.useEffect)(()=>{let e=setInterval(()=>{var t;null===(t=window.SecuritiSDK)||void 0===t||t.onReady(t=>{t.closeBanner(),clearInterval(e)})},100);return()=>clearInterval(e)},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m(),{children:(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"})}),(0,s.jsxs)("div",{className:"size-full p-4 pb-14",children:[(0,s.jsx)("p",{className:"text-center text-h6 text-red",children:c}),(0,s.jsx)(l.O,{className:"mx-auto max-w-96",showFsa:h,submitButtonLabel:"Save Payment Method",disableSubmit:a,onSubmit:x})]})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=16414)}),_N_E=e.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.