1"use strict";(self.webpackChunkmy_webpack_project=self.webpackChunkmy_webpack_project||[]).push([[5485],{75485(e,t,r){r.r(t),r.d(t,{default:()=>E}),r.dn(E);var n=r(39471),a=r(38413),o=r(88477),l=r(86822),i=r(45457),s=r(4172),c=r(5185),d=r(65329),m=r(3784),u=r(62064),p=r(35256),f=r(51794),b=r(29054);function x(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,l,i=[],s=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const g=(0,m.c)(u.h3.stripePubKey),y=e=>{let t=e.open,r=e.onClose,m=(e.showNotification,e.title),u=e.setBanner;const h=(0,a.useElements)(),g=(0,a.useStripe)(),y=x((0,n.useState)(""),2),E=y[0],w=y[1],A=x((0,n.use
1State)(""),2),v=A[0],C=A[1],k=x((0,n.useState)({line1:"",line2:"",city:"",state:"",postal_code:"",country:""}),2),B=k[0],S=k[1],N=x((0,n.useState)(!1),2),F=N[0],j=N[1],I=x((0,n.useState)(""),2),_=I[0],O=I[1];n.useEffect(()=>{t&&(O(""),j(!1),w(""),C(""),S({line1:"",line2:"",city:"",state:"",postal_code:"",country:""}))},[t]);const D={style:{base:{fontSize:"16px",fontFamily:"SpaceGrotesk, sans-serif","::placeholder":{color:"#848484"}}}};return n.createElement(d.A,{open:t,"aria-labelledby":"payment-modal-title","aria-describedby":"payment-modal-description"},n.createElement(l.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",padding:"20px",overflow:"auto"}},n.createElement(l.A,{sx:{padding:"20px",backgroundColor:"rgba(243, 237, 233, 0.85)",margin:"auto",borderRadius:"8px",border:"4px solid #34B5B1",boxShadow:"0px 4px 4px 0px rgba(0, 0, 0, 0.25)",width:{xs:"100%",sm:"714px"},maxHeight:"95vh",overflowY:"auto",overflowX:"hidden","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"rgba(0,0,0,0.1)",borderRadius:"4px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#34B5B1",borderRadius:"4px","&:hover":{backgroundColor:"#2a9490"}}}},n.createElement("div",{style:{textAlign:"right"}},n.createElement(i.A,{onClick:r},n.createElement(b.A,null))),n.createElement(l.A,{sx:{display:"flex",alignItems:"center",my:2}},n.createElement(s.A,{sx:{width:"Edit Card"===m?"41%":"38%",backgroundColor:"#2B2A2A",border:"1px solid #2B2A2A"}}),n.createElement(c.A,{variant:"h6",align:"center",sx:{mx:2,color:"#2B2A2A"}},m),n.createElement(s.A,{sx:{width:"Edit Card"===m?"41%":"38%",backgroundColor:"#2B2A2A",border:"1px solid #2B2A2A"}})),n.createElement("form",{className:"p-4 flex flex-col justify-center items-center",onSubmit:async e=>{if(e.preventDefault(),j(!0),O(""),!g||!h)return O("Stripe.js has not loaded yet."),void j(!1);if(!(B.line1&&B.city&&B.state&&B.postal_code&&B.country))return O("Please complete all address fields"),void j(!1);const t=await g.createPaymentMethod({type:"card",card:h.getElement(a.CardNumberElement),billing_details:{email:E,name:v,address:B}}),n=t.error,o=t.paymentMethod;if(n)return O(n.message),void j(!1);if(o)try{await(0,f.qx)(o.id),r(!0),u({show:!0,text:"You added a new credit card."}),j(!1)}catch(e){var l,i;const t=(null==e||null===(l=e.response)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.error)||(null==e||null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.message)||(null==e?void 0:e.message)||"Your card was declined. Please check your card details or try a different card.";O(t),j(!1)}}},n.createElement(n.Fragment,null,n.createElement(l.A,{className:"w-[80%]",display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center"},n.createElement(c.A,{variant:"subtitle1",sx:{marginBottom:"12px"}},"PERSONAL INFO"),n.createElement(o.wi,{value:E,onChange:e=>w(e.target.value),required:!0,placeholder:"[email protected]",className:"w-full",width:"101%"}),n.createElement(o.wi,{label:"Card Number",ElementComponent:a.CardNumberElement,options:D}),n.createElement(l.A,{display:"flex",justifyContent:"space-between",className:"w-[98%] m-0 mr-[8px]",sx:{gap:"2rem"}},n.createElement(o.wi,{label:"08/24",ElementComponent:a.CardExpiryElement,options:D,placeholder:"08/24"}),n.createElement(o.wi,{label:"111",ElementComponent:a.CardCvcElement,options:D,placeholder:"111"})),n.createElement(o.wi,{label:"John Doe",value:v,onChange:e=>C(e.target.value),required:!0,placeholder:"John Doe",width:"101%"})),n.createElement(l.A,{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",className:"mt-[21px] w-[80%]"},n.createElement(c.A,{variant:"subtitle1",sx:{marginBottom:"12px"}},"LOCATION"),n.createElement(l.A,{className:"w-full",sx:{"& .p-AddressElement":{backgroundColor:"transparent",boxShadow:"none"},"& .Input":{borderRadius:"12px"},"& .FormFieldGroup":{marginBottom:"20px"},"& .FormFieldGroup--state":{marginBottom:"20px"},"& .FormFieldGroup--zip":{marginBottom:"20px"},marginBottom:"20px"}},n.createElement(a.AddressElement,{options:{mode:"billing",defaultValues:B},onChange:e=>{e.complete&&(S(e.value.address),O("")),e.error&&O(e.error.message)}})),_&&n.createElement(l.A,{sx:{color:"#D32F2F",backgroundColor:"#FFEBEE",padding:"12px 16px",borderRadius:"8px",border:"1px solid #EF5350",marginTop:"16px",marginBottom:"16
1px",fontSize:"14px",fontWeight:500,textAlign:"center",width:"100%"}},_),n.createElement(l.A,{className:"flex flex-col gap-8 items-center"},n.createElement(o.$n,{type:"submit",htmlType:"submit",variant:"contained",color:"primary",sx:{width:"200px",color:"white",padding:"30px 10px",backgroundColor:"#34B5B1",fontSize:"18px",fontWeight:700,"&:hover":{backgroundColor:"#3fcac7"}},disabled:!g||F,label:F?n.createElement(p.A,{size:24}):"Save Changes",className:"!w-fit !px-8"}),n.createElement(c.A,{onClick:()=>r(!1),className:"!underline cursor-pointer hover:font-bold"}," ","Cancel"))))))))};function E(e){let t=e.paymentIntent,r=e.open,o=e.onClose,l=e.showNotification,i=e.title,s=e.setBanner;const c={loader:"always",clientSecret:t||"pi_3Q7zwMP4ihZJy68B1I2nnInn_secret_AE2DBHPhAGW0AQkVHGOeTUr04",appearance:{labels:"above"}};if(t)return n.createElement(a.Elements,{stripe:g,options:c},n.createElement(y,{open:r,onClose:o,showNotification:l,title:i,setBanner:s}))}}}]);
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.