PageSourceSearch

https://www.mypatriotsupply.com/a/account/_next/static/chunks/5414.adac90b81ce3fcb8.js

js mypatriotsupply.com collected 2026-09-24 09:07:19 UTC 9,570 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5414],{68603:(e,t,i)=>{i.d(t,{C:()=>d});var n=i(71830),r=i.n(n),o=i(22824),a=i(98927),s=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)0>t.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]]);return i};function d({options:e}={}){let[t,i]=(0,o.RP)(Object.assign({context:{isAction:!0}},e)),{loading:n}=i;return Object.assign({updateSubscriptionShippingAddress:e=>{var i,n,o,s;return i=this,n=void 0,o=void 0,s=function*(){let{data:i}=yield t({variables:{input:e},refetchQueries:[{query:a.hB,variables:{subscriptionId:e.subscriptionId}}]});if(r().isNil(i)||r().isNil(i.updateSubscriptionShippingAddressV2))throw Error("No data returned from updateSubscriptionShippingAddressMutation");return i.updateSubscriptionShippingAddressV2},new(o||(o=Promise))(function(e,t){function r(e){try{d(s.next(e))}catch(e){t(e)}}function a(e){try{d(s.throw(e))}catch(e){t(e)}}function d(t){var i;t.done?e(t.value):((i=t.value)instanceof o?i:new o(function(e){e(i)})).then(r,a)}d((s=s.apply(i,n||[])).next())})},isUpdatingShippingAddress:n},s(i,["loading"]))}},85414:(e,t,i)=>{i.r(t),i.d(t,{PrepaidGiftConfirmAddressView:()=>P,PrepaidGiftRenewFinalReviewView:()=>O,PrepaidGiftRenewModal:()=>C});var n=i(77571),r=i(56149),o=i(24163),a=i(88695),s=i(88768),d=i(46567),p=i(66073),c=i(47719),l=i(37272),m=i(73822),u=i(94270),f=i(28402),h=i(68603),b=i(96493),y=i(10190),g=i(78109),w=i(48725),S=i(14323),v=i(94350),_=i(30589),x=i(98805),N=i(68099),j=i(63338),k=i(55575),A=i(47200),M=i(14758);function P({subscription:e,onSubmit:t,onCancel:i}){let{t:r}=(0,f.B)(),{updateSubscriptionShippingAddress:d,isUpdatingShippingAddress:p}=(0,h.C)({options:{onCompleted:()=>{t?.(e.ShippingAddress?.id??"")}}}),c=e.ShippingAddress?.firstName??e.PrepaidGiftRecipient?.firstName??"",l=e.ShippingAddress?.lastName??e.PrepaidGiftRecipient?.lastName??"",m=(0,o.useMemo)(()=>({firstName:c,lastName:l,address1:e.ShippingAddress?.address1??"",address2:e.ShippingAddress?.address2??"",city:e.ShippingAddress?.city??"",province:e.ShippingAddress?.province??"",zip:e.ShippingAddress?.zip??"",country:e.ShippingAddress?.country??"",phoneNumber:e.ShippingAddress?.phoneNumber??"",company:e.ShippingAddress?.company??""}),[e.ShippingAddress]),b=(0,s.mN)({defaultValues:m,resolver:(0,N.u)(j.a),mode:"onChange"}),{handleSubmit:y,watch:g,formState:{isValid:w}}=b,S=g(),v=(0,o.useMemo)(()=>S.country&&(0,u.BG)()[S.country]||[],[S.country]),_=(0,o.useMemo)(()=>0===v.length||S.province&&""!==S.province.trim(),[v.length,S.province]),x=(0,o.useMemo)(()=>Object.keys(m).some(e=>(S[e]||"")!==(m[e]||"")),[S,m]);return(0,n.jsx)(s.Op,{...b,children:(0,n.jsx)(a.l,{"data-skio-name":"prepaid-gift-renew-confirm-address-form",className:"flex flex-col gap-5",onSubmit:y(i=>{if(!x)return void t?.(e.ShippingAddress?.id??"");
1d({subscriptionId:e.id,updatedShippingAddress:{firstName:i.firstName,lastName:i.lastName,address1:i.address1,address2:i.address2||"",city:i.city,province:i.province||"",zip:i.zip,country:i.country,phone:i.phoneNumber||"",company:i.company||""}})}),children:(0,n.jsx)(k.V,{title:r("prepaid_gift.renew_modal.confirm_address.title"),subtitle:r("prepaid_gift.renew_modal.confirm_address.subtitle"),buttons:[{text:r("prepaid_gift.renew_modal.cancel_button"),type:"button",color:"support",onClick:i,isDisabled:p,dataSkioName:"prepaid-gift-renew-confirm-address-back-button"},{text:r("prepaid_gift.renew_modal.confirm_button"),type:"submit",color:"primary",isDisabled:!w||!_,isLoading:p,dataSkioName:"prepaid-gift-renew-confirm-address-confirm-button"}],classNames:{footer:"gap-3",content:"pb-3 border-b-0"},children:(0,n.jsx)(j.G,{})})})})}function O(e){let t,i,o,a,s,p,c,l,m,u,h,S,v,_,x=(0,r.c)(43),{subscription:N,selectedPaymentMethod:j,onSubmit:A,onBack:P}=e,{showToast:O}=(0,d.d)(),{t:C}=(0,f.B)(),{refetch:I}=(0,b.y)();x[0]!==A||x[1]!==I||x[2]!==O||x[3]!==C?(t=()=>{I(),O({title:C("common.success"),description:C("prepaid_gift.renew_modal.success_toast"),type:"success"}),A?.()},x[0]=A,x[1]=I,x[2]=O,x[3]=C,x[4]=t):t=x[4],x[5]!==O||x[6]!==C?(i=()=>{O({title:C("common.error"),description:C("prepaid_gift.renew_modal.error_toast"),type:"error"})},x[5]=O,x[6]=C,x[7]=i):i=x[7],x[8]!==t||x[9]!==i?(o={onSuccess:t,onError:i},x[8]=t,x[9]=i,x[10]=o):o=x[10];let{mutate:R,isPending:G}=function(e){return(0,w.useMutation)(Object.assign(Object.assign({},e),{mutationFn:e=>{var t,i,n,r;return t=this,i=[e],n=void 0,r=function*({subscriptionId:e,paymentMethodId:t}){return yield(0,g.U)({path:y.xwe,method:"POST",body:{subscriptionId:e,paymentMethodId:t}})},new(n||(n=Promise))(function(e,o){function a(e){try{d(r.next(e))}catch(e){o(e)}}function s(e){try{d(r.throw(e))}catch(e){o(e)}}function d(t){var i;t.done?e(t.value):((i=t.value)instanceof n?i:new n(function(e){e(i)})).then(a,s)}d((r=r.apply(t,i||[])).next())})}}))}(o);x[11]!==R||x[12]!==j?.id||x[13]!==N?(a=()=>{R({subscriptionId:N.id,paymentMethodId:j?.id??""})},x[11]=R,x[12]=j?.id,x[13]=N,x[14]=a):a=x[14];let V=a;return x[15]!==C?(s=C("prepaid_gift.renew_modal.final_review.title"),x[15]=C,x[16]=s):s=x[16],x[17]!==C?(p=C("prepaid_gift.renew_modal.final_review.subtitle"),x[17]=C,x[18]=p):p=x[18],x[19]!==C?(c=C("common.back"),x[19]=C,x[20]=c):c=x[20],x[21]!==G||x[22]!==P||x[23]!==c?(l={text:c,type:"button",color:"support",onClick:P,isDisabled:G,dataSkioName:"prepaid-gift-renew-final-review-back-button"},x[21]=G,x[22]=P,x[23]=c,x[24]=l):l=x[24],x[25]!==C?(m=C("prepaid_gift.renew_modal.renew_button"),x[25]=C,x[26]=m):m=x[26],x[27]!==V||x[28]!==G||x[29]!==m?(u={text:m,type:"submit",color:"primary",isDisabled:G,isLoading:G,onClick:V,dataSkioName:"prepaid-gift-renew-final-review-renew-button"},x[27]=V,x[28]=G,x[29]=m,x[30]=u):u=x[30],x[31]!==u||x[32]!==l?(h=[l,u],x[31]=u,x[32]=l,x[33]=h):h=x[33],x[34]===Symbol.for("react.memo_cache_sentinel")?(S={footer:"gap-3",content:"pb-3 border-b-0 max-h-[500px] overflow-y-auto"},x[34]=S):S=x[34],x[35]!==j||x[36]!==N?(v=(0,n.jsx)(M.w,{subscription:N,renewalPaymentMethod:j,isRenewalDisplay:!0}),x[35]=j,x[36]=N,x[37]=v):v=x[37],x[38]!==h||x[39]!==v||x[40]!==s||x[41]!==p?(_=(0,n.jsx)(k.V,{title:s,subtitle:p,buttons:h,classNames:S,children:v}),x[38]=h,x[39]=v,x[40]=s,x[41]=p,x[42]=_):_=x[42],_}function C(e){let t,i,a,s,d,u,f,h,b,y,g,w,N,j,k,M,C,I,R=(0,r.c)(52),{open:G,onClose:V,giftSubscription:B}=e,{siteSettings:E,isLoading:D}=(0,S.A)(),z=!!E?.enableStorefrontCC,L=!G;R[0]!==L?(t={skip:L},R[0]=L,R[1]=t):t=R[1];let{isLoadingSpreedly:F}=(0,v.g)(t),{storefrontUserId:U,isLoading:q}=(0,_._)(),[Q,T]=(0,o.useState)("confirm-address"),[H,J]=(0,o.useState)(void 0),K=U??"",W=!U;R[2]!==W?(i={skip:W},R[2]=W,R[3]=i):i=R[3],R[4]!==K||R[5]!==i?(a={storefrontUserId:K,options:i},R[4]=K,R[5]=i,R[6]=a):a=R[6];let{paymentMethods:X,isLoading:Y,refetch:Z}=(0,x.O)(a);R[7]!==X||R[8]!==H?(d=X?.find(e=>e.id===H),R[7]=X,R[8]=H,R[9]=d):d=R[9],s=d,R[10]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{T("confirm-payment-method")},R[10]=u):u=R[10];let $=u;R[11]!==Z||R[12]!==U?(f=(e,t)=>
1{t?T("final-review"):T("confirm-payment-method"),J(e),U&&Z({storefrontUserId:U})},R[11]=Z,R[12]=U,R[13]=f):f=R[13];let ee=f;R[14]!==V?(h=()=>{J(void 0),T("confirm-address"),V()},R[14]=V,R[15]=h):h=R[15];let et=h,ei=D||F||q||Y;return R[16]===Symbol.for("react.memo_cache_sentinel")?(b=(0,m.cx)("relative max-w-[600px] min-h-[350px] flex flex-col gap-5 p-6"),y=(0,m.cx)("top-4 right-4"),R[16]=b,R[17]=y):(b=R[16],y=R[17]),R[18]===Symbol.for("react.memo_cache_sentinel")?(g=(0,n.jsx)("link",{rel:"preload",href:(0,l.O)("/card-bg.jpg"),as:"image"}),R[18]=g):g=R[18],R[19]!==ei?(w=ei&&(0,n.jsx)("div",{"data-skio-name":"payment-method-modal-loading-indicator",className:"absolute inset-0 z-100 flex items-center justify-center bg-white/50 rounded-border-radius",children:(0,n.jsx)(p.I,{})}),R[19]=ei,R[20]=w):w=R[20],R[21]!==B||R[22]!==et||R[23]!==Q?(N="confirm-address"===Q&&(0,n.jsx)(P,{subscription:B,onSubmit:$,onCancel:et}),R[21]=B,R[22]=et,R[23]=Q,R[24]=N):N=R[24],R[25]!==B||R[26]!==et||R[27]!==s||R[28]!==Q?(j="final-review"===Q&&(0,n.jsx)(O,{subscription:B,selectedPaymentMethod:s,onSubmit:et,onBack:()=>{T("confirm-payment-method")}}),R[25]=B,R[26]=et,R[27]=s,R[28]=Q,R[29]=j):j=R[29],R[30]!==z||R[31]!==ee||R[32]!==H||R[33]!==Q?(k="confirm-payment-method"===Q&&(0,n.jsx)(A.MainPaymentMethodModalView,{selectedPaymentMethodId:H,onAddPayment:()=>{T("add-payment")},onEditPayment:e=>{J(e),T("edit-payment")},onSave:e=>ee(e,!0),isStorefrontCCEnabled:z,filterInvalidMethods:!0,isRenewalModal:!0}),R[30]=z,R[31]=ee,R[32]=H,R[33]=Q,R[34]=k):k=R[34],R[35]!==B||R[36]!==ee||R[37]!==Q?(M="add-payment"===Q&&(0,n.jsx)(A.AddPaymentMethodModalView,{onGoBack:()=>{T("confirm-payment-method")},onSubmit:e=>ee(e),subscription:B,isRenewalModal:!0}),R[35]=B,R[36]=ee,R[37]=Q,R[38]=M):M=R[38],R[39]!==ee||R[40]!==s||R[41]!==Q?(C="edit-payment"===Q&&(0,n.jsx)(A.EditPaymentMethodModalView,{paymentMethod:s,onGoBack:()=>{T("confirm-payment-method")},onSubmit:e=>ee(e),isRenewalModal:!0}),R[39]=ee,R[40]=s,R[41]=Q,R[42]=C):C=R[42],R[43]!==et||R[44]!==G||R[45]!==w||R[46]!==N||R[47]!==j||R[48]!==k||R[49]!==M||R[50]!==C?(I=(0,n.jsxs)(c.aF,{"data-skio-name":"prepaid-gift-renew-modal",className:b,closeButtonClassName:y,isDismissable:!0,open:G,onOpenChange:et,children:[g,w,N,j,k,M,C]}),R[43]=et,R[44]=G,R[45]=w,R[46]=N,R[47]=j,R[48]=k,R[49]=M,R[50]=C,R[51]=I):I=R[51],I}}}]);

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.