PageSourceSearch

https://www.flogas.ie/_next/static/chunks/9583-aca20d73c1dcddf6.js

js flogas.ie collected 2026-09-28 09:25:56 UTC 9,073 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9583],{99583:(e,a,r)=>{r.r(a),r.d(a,{default:()=>b});var s=r(95155),l=r(12115),t=r(20063),n=r(68321),i=r(2821),o=r(41521),c=r(43678),d=r(35068),u=r(91848);let m=d.Ik().shape({accountNumber:d.Yj().required("Account Number is required").min(7,"Account Number must be at least 7 characters").max(12,"Account Number must be at most 12 characters"),firstName:d.Yj().required("First name is required").max(100,"First name must be at most 100 characters"),lastName:d.Yj().required("Last name is required").max(100,"Last name must be at most 100 characters"),streetAddress:d.Yj().required("Street address is required").max(255,"At most 255 characters allowed"),streetAddress2:d.Yj().optional(),city:d.Yj().required("City is required").max(50,"City must be at most 50 characters"),county:d.Yj().required("State / Province is required"),eircode:d.Yj().required("".concat(u.WS?"Postcode":"Eircode"," is required")).max(10,"".concat(u.WS?"Postcode":"Eircode"," must be at most 10 characters")),country:d.Yj().required("Country is required"),email:d.Yj().email("Please enter a valid email").required("Email is required"),phoneNumber:d.Yj().required("Phone number is required").max(50,"Phone number must be at most 50 characters"),phoneNumberCode:d.Yj().required("Phone number code is required"),totalAmount:d.ai().required("Total amount is required").min(10,"Amount must be greater than 10"),paymentReference:d.Yj().optional()});var p=r(60862),h=r(49790),g=r(27707),x=r(80939);function b(e){let{title:a,type:r,variant:d,isEditable:b=!0,isLoading:y=!1,error:N=null,onSubmitForm:j}=e,f=(0,t.useSearchParams)(),v=(0,u.GU)()===u.kC?{accentColor:"text-orange"}:{accentColor:"text-purple"},[C,q]=(0,l.useState)(null),[A,w]=(0,l.useState)(!1),[P,E]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(f.get("retry"))try{let e=localStorage.getItem("paymentFormData");if(e){let a=JSON.parse(e);q(a)}}catch(e){console.error("Error parsing stored form data:",e)}},[f]);let S="lpg"===d?"ROI LPG Account Number":"residential"===r?"Account Number":"User Reference",Y="lpg"===d?"NI LPG Account Number":"residential"===r?"Account Number":"User Reference";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.default,{src:"/js/rxp-hpp.js"}),(0,s.jsxs)("div",{className:"flex flex-col gap-[50px] py-10 lg:gap-12",children:[(0,s.jsx)("div",{className:"flex flex-col gap-6",children:a?(0,s.jsx)(p.Xy,{content:a}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("h1",{className:"font-bold",children:["Pay Your ",(0,s.jsx)("span",{className:v.accentColor,children:"Bill"})]}),(0,s.jsx)("p",{children:"Please fill the following details to allow us to process your payment below."})]})}),N&&(0,s.jsx)("div",{className:"col-span-2 text-error",children:(0,s.jsx)("p",{children:N})}),(0,s.jsx)(o.l1,{initialValues:null!=C?C:{accountNumber:"",firstName:"",lastName:"",streetAddress:"",streetAddress2:"",city:"",county:"",eircode:"",country:"372",email:"",phoneNumber:"",phoneNumberCode:"353",totalAmount:0,paymentReference:""},validationSchema:m,onSubmit:async e=>{E(!0),A&&await j(e)},enableReinitialize:!0,validateOnChange:!0,validateOnBlur:!0,children:e=>{let{values:a,touched:l,setFieldValue:t,setFieldTouched:n,submitForm:m,isValid:j,errors:f}=e,v=(e,a)=>{E(!0),t(e,a),n(e,!0,!1)},C=e=>!!f[e]&&!!l[e];return(0,s.jsxs)(o.lV,{id:"paymentForm",className:"flex flex-col gap-y-10 lg:grid lg:grid-cols-2 lg:gap-x-4",children:[(0,s.jsx)(g.yo,{type:"string",name:"accountNumber",label:u.WS?Y:S,placeholder:"1234567",description:"lpg"===d?"Enter your LPG account number":"residential"===r?"Please enter your Flogas account number":"Please enter your Flogas user reference",required:!0,hasError:C("accountNumber"),value:a.accountNumber,onChange:e=>v("accountNumber",e.target.value),disabled:!b}),(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),(0,s.jsxs)("div",{className:"grid gap-x-6 gap-y-6 lg:col-span-2 lg:grid-cols-2 lg:gap-y-8",children:[(0,s.jsx)(g.yo,{type:"text",name:"firstName",label:"First Name",placeholder:"eg. John",description:"First Name",required:!0,hasError:C("firstName"),value:a.firstName,onChange:e=>v("firstName",e.target.value),disabled:!b}),(0,s.jsx)(g.yo,{type:"text",name:"lastName",label:"Last Name",placeholder:"eg. Doe",description:"Last Name",required:!0,labelClassName:"hidden lg:invisible lg:flex",hasError:C("lastName"),value:a.lastName,onChange:e=>v("lastName",e.target.value),disabled:!b})]}),(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),(0,s.jsxs)("div",{className:"grid gap-x-6 gap-y-6 lg:col-span-2 lg:grid-cols-2 lg:gap-y-8",children:[(0,s.jsx)(g.yo,{type:"text",name:"streetAddress",label:"Address",placeholder:"eg. 123 Main St",description:"Street Address",required:!0,hasError:C("streetAddress"),value:a.streetAddress,onChange:e=>v("streetAddress",e.target.value),className:"lg:col-span-2",disabled:!b}),(0,s.jsx)(g.yo,{type:"text",name:"streetAddress2",description:"Street Address Line 2",label:"Address",labelClassName:"hidden",value:a.streetAddress2,onChange:e=>v("streetAddress2",e.target.value),className:"lg:col-span-2",disabled:!b}),(0,s.jsx)(g.yo,{type:"text",name:"city",label:"City",description:"City",required:!0,labelClassName:"hidden",hasError:C("city"),value:a.city,onChange:e=>v("city",e.target.value),disabled:!b}),(0,s.jsx)(g.yo,{type:"text",name:"county",label:"County",description:"County",required:!0,labelClassName:"hidden",hasError:C("county"),value:a.county,onChange:e=>v("county",e.target.value),disabled:!b}),(0,s.jsx)(g.yo,{type:"text",name:"eircode",label:u.WS?"Postcode":"Eir
1code",description:u.WS?"Postcode":"Eircode",required:!0,labelClassName:"hidden",hasError:C("eircode"),value:a.eircode,onChange:e=>v("eircode",e.target.value),disabled:!b})]}),!u.yu&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),(0,s.jsx)("div",{className:"grid gap-x-6 gap-y-6 lg:col-span-2 lg:grid-cols-2 lg:gap-y-8",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,s.jsx)(p.l6,{placeholder:"Select Country",options:c._,disabled:!b,value:a.country,onChange:e=>v("country",e),required:!0}),(0,s.jsx)("p",{className:"heading-5 font-medium text-off-black/70",children:"Country"})]})})]}),(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),(0,s.jsx)(g.yo,{type:"email",name:"email",label:"Email",description:"[email protected]",required:!0,hasError:C("email"),value:a.email,onChange:e=>v("email",e.target.value),disabled:!b}),(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),(0,s.jsx)("div",{className:"grid gap-x-6 gap-y-6 lg:col-span-2 lg:grid-cols-2 lg:gap-y-8",children:(0,s.jsx)(g.nk,{name:"phoneNumber",label:"Phone Number",placeholder:"00 000-0000",description:"Please enter a valid phone number",required:!0,hasError:C("phoneNumber"),disabled:!b,onInputChange:(e,a)=>{E(!0),t("phoneNumberCode",e),t("phoneNumber",a),n("phoneNumberCode",!0,!1),n("phoneNumber",!0,!1)}})}),"lpg"===d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),(0,s.jsx)(g.yo,{type:"string",name:"paymentReference",label:"Payment Reference",value:a.paymentReference,onChange:e=>v("paymentReference",e.target.value),disabled:!b})]}),(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),(0,s.jsx)(g.yo,{type:"string",name:"totalAmount",label:u.yu?"Total Amount (Sterling only)":"Total Amount",placeholder:"00 000-0000",description:"Please enter how much you are paying",required:!0,hasError:C("totalAmount"),value:a.totalAmount,onChange:e=>v("totalAmount",Number(e.target.value)),disabled:!b}),(0,s.jsx)("span",{className:"col-span-2 h-[1px] w-full bg-white"}),y&&(0,s.jsxs)("div",{className:"col-span-2 flex items-center justify-center py-4",children:[(0,s.jsx)("div",{className:"border-primary h-8 w-8 animate-spin rounded-full border-4 border-t-transparent"}),(0,s.jsx)("span",{className:"ml-3 text-gray-700",children:"Processing payment..."})]}),(0,s.jsx)("div",{className:"col-span-2",children:(0,s.jsx)(x.default,{onChangeCaptchaVerified:w})}),N&&(0,s.jsx)("div",{className:"col-span-2 text-error",children:(0,s.jsx)("p",{children:N})}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(p.J0,{variant:"primary",size:"large",disabled:y,endIcon:!y&&(0,s.jsx)(h.vK,{}),className:(0,i.A)("!min-w-[296px]",!b&&"hidden"),type:"submit",onClick:()=>{E(!0),m()},children:y?"Processing...":"Submit Details"}),P&&(!j||!A)&&(0,s.jsx)("p",{className:"heading-5 font-medium text-red",children:"There are errors in the form. Please review the fields above."}),(0,s.jsxs)("div",{className:(0,i.A)("flex flex-col gap-4",b&&"hidden"),children:[(0,s.jsx)("p",{className:"text-dark-green",children:"Thank you for your details. Please click below to proceed to payment."}),(0,s.jsx)(p.J0,{type:"button",id:"pay-now-button",variant:"primary",size:"large",endIcon:!y&&(0,s.jsx)(h.vK,{}),className:(0,i.A)("min-w-[296px] bg-green text-white"),disabled:y,children:y?"Processing...":"Pay Now"})]})]})]})}})]})]})}}}]);

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.