PageSourceSearch

https://klinic.com/_next/static/chunks/pages/pharmacy-support-8e2a3cf165a910a1.js

js klinic.com collected 2026-09-29 13:17:24 UTC 7,864 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9137],{71519:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pharmacy-support",function(){return r(65495)}])},63113:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var n=r(20218),i=r(52983),a=r(47647),l=r(11856),o=r(60187),u=r(25351),s=r(34094),d=r(12338),c=r(48281);let h=i.forwardRef(function(e,t){return(0,n.tZ)(c.Z,{direction:"up",ref:t,...e})});function p(e){let{open:t,onClose:r,title:i,message:c,okLabel:p,cancelLabel:Z,onOk:m,onCancel:f}=e;return(0,n.BX)(l.Z,{open:t,TransitionComponent:h,keepMounted:!0,onClose:r,"aria-describedby":"alert-dialog-slide-description",children:[(0,n.tZ)(d.Z,{children:i}),(0,n.tZ)(u.Z,{children:(0,n.tZ)(s.Z,{id:"alert-dialog-slide-description",children:c})}),(0,n.BX)(o.Z,{children:[Z&&(0,n.tZ)(a.Z,{onClick:()=>{f?.()},children:Z}),(0,n.tZ)(a.Z,{onClick:()=>{m?.(),r?.()},children:p||"OK"})]})]})}},65495:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return C},default:function(){return X}});var n=r(20218),i=r(52983),a=r(47744),l=r(49362),o=r(8661),u=r(35904),s=r(35998),d=r(98919),c=r.n(d),h=r(52444),p=r(86999),Z=r(85865),m=r(8586),f=r(61861),g=r(6778),y=r(82523),v=r(8273),P=r(34834),x=r(4293),_=r(32809);let b=(0,_.Ry)().shape({firstName:(0,_.Z_)().required("First name is required"),lastName:(0,_.Z_)().required("Last name is required"),phone:(0,_.Z_)().required("Phone is required").matches(/((1\s|\B)?\(?[0-9]{3}[-\s)]\s?[0-9]{3}[-\s][0-9]{4}|[0-9]{10})/,"Phone number is invalid"),treatment:(0,_.Z_)().required("Treatment is required")}),N=e=>{let[t,r]=(0,i.useState)(!1),[n,a]=(0,i.useState)(!1),[l]=(0,P.Qk)(),[o,u]=(0,i.useState)(""),s=(0,m.useRouter)(),d=(0,y.A4)(),c=(0,i.useCallback)(()=>{if(l&&""!==l){let t,r=0;e.forEach(e=>{let n=(0,g.ZP)(l,e.displayName);n>r&&(r=n,t=e)}),u(t.displayName)}},[e,l]);(0,i.useEffect)(()=>{c()},[c]);let{control:h,trigger:p,getValues:_}=(0,f.cI)({resolver:(0,Z.X)(b),resetOptions:{keepDirtyValues:!0,keepErrors:!0},values:{firstName:"",lastName:"",phone:"",treatment:o}}),N=async e=>{try{r(!0),await (0,x.Lm)(e),d.track("Pharmacy Support Form Submitted",{preferred_treatment:e?.treatment}),await s.push({pathname:"/thank-you"})}catch(e){(0,v.T)(e),a(!0)}finally{r(!1)}};return{states:{control:h,loading:t,displayError:n},actions:{handleSubmit:async()=>{await p()&&N(_())},setDisplayError:a}}};var w=r(63113),k=r(71418);let q=e=>{let{allTreatmentsOptions:t,phone:r}=e,{actions:{handleSubmit:i,setDisplayError:d},states:{control:Z,loading:m,displayError:f}}=N(t),g=(0,l.Z)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)(c(),{children:(0,n.tZ)("title",{children:"Get the care you deserve | Klinic"})}),(0,n.BX)(o.ZP,{paddingX:2,display:"flex",flexDirection:"column",height:"75vh",justifyContent:"center",mx:{md:15},overflow:"hidden",className:"no-footer-padding",children:[(0,n.BX)(s.Z,{display:"flex",flexDirection:"column",gap:g.spacing(2),children:[(0,n.tZ)(s.Z,{children:(0,n.tZ)(u.Z,{id:"cy-title",component:"p",variant:"h2",textAlign:"left",color:"secondary.main",sx:{fontWeight:"600 !important"},children:"Klinic Pharmacy"})}),(0,n.tZ)(s.Z,{children:(0,n.tZ)(u.Z,{id:"cy-title",component:"p",variant:"h4",textAlign:"left",color:"secondary.main",sx:{fontWeight:"600 !important"},children:"Fill your script for as low as $0"})})]}),(0,n.BX)(s.Z,{mt:3,gap:2,display:"flex",flexDirection:"column",children:[(0,n.tZ)(o.ZP,{item:!0,xs:6,children:(0,n.tZ)(h.Z,{id:"firstName-input",name:"firstName",required:!0,displayErrorMessage:!0,fullWidth:!0,placeholder:"First Name",variant:"outlined",control:Z})}),(0,n.tZ)(o.ZP,{item:!0,xs:6,children:(0,n.tZ)(h.Z,{id:"lastName-input",name:"lastName",required:!0,displayErrorMessage:!0,fullWidth:!0,placeholder:"Last Name",variant:"outlined",control:Z})}),(0,n.tZ)(o.ZP,{item:!0,xs:6,children:(0,n.tZ)(p.Z,{inputProps:{id:"phone-input"},name:"phone",mask:"+1 (000) 000-0000",required:!0,displayErrorMessage:!0,type:"tel",placeholder:"Phone",variant:"outlined",control:Z})}),(0,n.tZ)(o.ZP,{item:!0,xs:6,children:(0,n.tZ)(h.Z,{id:"treatment-input",name:"treatment",required:!0,displayErrorMessage:!0,fullWidth:!0,placeholder:"Treatment",variant:"outlined",control:Z})})]}),(0,n.tZ)(s.Z,{width:"100%",children:(0,n.tZ)(a.Z,{id:"cy-submit-button",variant:"contained",sx:{marginTop:2},onClick:i,loading:m,children:"Submit"})})]}),(0,n.tZ)(w.Z,{open:f,onClose:()=>d(!1),title:"Oops, something went wrong",message:(0,n.tZ)(n.HY,{children:(0,n.BX)(u.Z,{children:["Call our team now ",(0,n.tZ)("strong",{style:{color:g.palette.primary.contrastText},children:r})," to get care."]})})})]})};q.getLayout=function(e,t){return(0,n.tZ)(k.Z,{hideHeader:!0,pageProps:e,footer:"secondary",headerIncludeGetCare:!1,children:t})};var C=!0,X=q},75665:function(e,t,r){"use strict";var n=r(20218),i=r(66139),a=r(92738),l=r(35904);t.Z=e=>{let{label:t,required:r=!1,typographyVariant:o="bodyLarge",fontWeight:u="bold",mb:s=1.5,mt:d=0,...c}=e;return(0,n.tZ)(i.Z,{mb:s,mt:d,children:(0,n.tZ)(a.Z,{required:r,...c,children:(0,n.tZ)(l.Z,{variant:o,fontWeight:u,children:t})})})}},86999:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(20218),i=r(1761),a=r(61861),l=r(75665),o=r(52983),u=r(94744),s=r(41314),d=r(22830),c=function(e){let{mask:t,onChange:r,placeholder:i,name:a,type:l,label:c,value:h,variant:p,InputProps:Z,inputProps:m,required:f,error:g,helperText:y,sx:v={},InputLabelProps:P}=e,{ref:x,setValue:_}=(0,s.Cj)({mask:t},{onAccept:(e,t)=>
1{t.updateValue(),r&&r({target:{value:e}}),_(e)}});(0,o.useEffect)(()=>{null!==h&&_(h)},[_,h]);let b=f&&!c?(0,d.g)(Z,!!g):Z;return(0,n.tZ)(u.Z,{sx:{width:"100%",...v},inputRef:x,placeholder:i,name:a,type:l,label:c,variant:p,InputProps:b,helperText:y,value:h,inputProps:m,InputLabelProps:P,error:g})},h=function(e){let{control:t,rules:r,name:o,defaultValue:u,mask:s,variant:d,staticLabel:h=!1,displayErrorMessage:p=!1,label:Z,placeholder:m,required:f,type:g,inputProps:y}=e,v=h&&(Z||m);return(0,n.BX)(n.HY,{children:[v&&(0,n.tZ)(l.Z,{htmlFor:o,label:v,required:f}),(0,n.tZ)(a.Qr,{name:o,control:t,rules:r,defaultValue:u,render:e=>{let{field:{onChange:t,name:r,value:a},fieldState:{error:l}}=e;return(0,n.BX)(n.HY,{children:[(0,n.tZ)(c,{label:h?void 0:Z,placeholder:m,onChange:t,name:r,type:g,mask:s,variant:d,inputProps:y,value:a,error:!!l}),(0,n.tZ)(i.Z,{variant:"outlined",error:!!(p&&l&&l.message),children:l?.message})]})}})]})}},52444:function(e,t,r){"use strict";var n=r(20218),i=r(52983),a=r(1761),l=r(94744),o=r(61861),u=r(22830),s=r(75665);t.Z=function(e){let{control:t,rules:r,name:d,defaultValue:c,variant:h,label:p,required:Z,InputProps:m,placeholder:f,staticLabel:g=!1,displayErrorMessage:y=!1,showCharactersLeft:v=!1,...P}=e,x=g&&(p||f),[_,b]=(0,i.useState)(!1),N=(0,i.useMemo)(()=>P?.inputProps?P.inputProps.maxLength:void 0,[P?.inputProps]),w=(0,i.useMemo)(()=>v&&_&&!!N,[v,_,N]);return(0,n.BX)(n.HY,{children:[x&&(0,n.tZ)(s.Z,{htmlFor:d,label:x,required:Z}),(0,n.tZ)(o.Qr,{name:d,control:t,rules:r,defaultValue:c,render:e=>{let{field:{onChange:t,onBlur:r,value:i,name:o,ref:s},fieldState:{invalid:d,isTouched:c,isDirty:_,error:k}}=e,q=Z&&!(p||x)?(0,u.g)(m,!!k):m;return(0,n.BX)(n.HY,{children:[(0,n.tZ)(l.Z,{name:o,value:i,onChange:t,onFocus:()=>{b(!0)},onBlur:()=>{r&&r(),b(!1)},inputRef:s,label:g?void 0:p,placeholder:f,required:Z,error:!!k,variant:h,InputProps:q,className:v?"TextArea_Counter":void 0,helperText:w&&i?.length>0?`${N-i.length} characters left`:void 0,...P}),y?(0,n.tZ)(a.Z,{variant:"outlined",error:!!(y&&k&&k.message),children:k?.message}):null]})}})]})}},22830:function(e,t,r){"use strict";function n(e,t){return e}function i(e,t){let{startAdornment:r}={...e};return{...e,startAdornment:r}}r.d(t,{T:function(){return n},g:function(){return i}})}},function(e){e.O(0,[8910,4863,2220,2375,4744,9054,8858,4980,2888,9774,179],function(){return e(e.s=71519)}),_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.