PageSourceSearch

https://yklaboratories.com/_next/static/chunks/app/mailEnquiry/page-fec342b542eba7fd.js

js yklaboratories.com collected 2026-10-02 01:51:58 UTC 12,399 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[181],{772:(e,r,a)=>{"use strict";a.d(r,{A:()=>o});var t=a(2115),s=a(907);let l=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,a)=>a?a.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)};var i=a(1265);let o=(e,r)=>{let a=(0,t.forwardRef)(({className:a,...o},n)=>(0,t.createElement)(i.default,{ref:n,iconNode:r,className:(0,s.z)(`lucide-${l(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...o}));return a.displayName=l(e),a}},907:(e,r,a)=>{"use strict";a.d(r,{z:()=>t});let t=(...e)=>e.filter((e,r,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===r).join(" ").trim()},1265:(e,r,a)=>{"use strict";a.d(r,{default:()=>o});var t=a(2115),s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},l=a(907);let i=(0,t.createContext)({}),o=(0,t.forwardRef)(({color:e,size:r,strokeWidth:a,absoluteStrokeWidth:o,className:n="",children:d,iconNode:c,...u},m)=>{let{size:p=24,strokeWidth:x=2,absoluteStrokeWidth:h=!1,color:f="currentColor",className:y=""}=(0,t.useContext)(i)??{},b=o??h?24*Number(a??x)/Number(r??p):a??x;return(0,t.createElement)("svg",{ref:m,...s,width:r??p??s.width,height:r??p??s.height,stroke:e??f,strokeWidth:b,className:(0,l.z)("lucide",y,n),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(d)?d:[d]])})},3321:(e,r,a)=>{"use strict";var t=a(4645);a.o(t,"usePathname")&&a.d(r,{usePathname:function(){return t.usePathname}}),a.o(t,"useSearchParams")&&a.d(r,{useSearchParams:function(){return t.useSearchParams}})},5322:(e,r,a)=>{"use strict";a.d(r,{J:()=>t});let t="https://yklaboratories.com/webservices/"},5796:(e,r,a)=>{"use strict";a.d(r,{A:()=>t});let t=(0,a(772).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},5979:(e,r,a)=>{"use strict";a.d(r,{default:()=>x});var t=a(5155),s=a(3321),l=a(2115),i=a(772);let o=(0,i.A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);var n=a(5796),d=a(6483),c=a(6369);let u=(0,i.A)("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]),m=(0,i.A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);var p=a(5322);function x(){let e=(0,s.useSearchParams)(),r=e.get("ProdName")||"",a=e.get("Package")||"",[i,x]=(0,l.useState)(!1),[h,f]=(0,l.useState)(!1),[y,b]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{try{let e=new FormData;e.append("Param1","3");let r=await fetch(`${p.J}api/Farmer/GetAdminDetailsForfarmer`,{method:"POST",body:e}),a=await r.json();b(a||[])}catch(e){console.error("Failed to fetch admin details",e)}})()},[]);let g=a?`I want enquiry about this product ${r} with package ${a}`:`I want enquiry about this product ${r}`,N=async e=>{e.preventDefault(),x(!0);let t=Object.fromEntries(new FormData(e.currentTarget).entries()),s=[{FarmerName:t.name,Mobile:t.number,EmailID:t.email,Subject:t.subject,City:t.city,Address:t.Address,Area:t.Area,Pincode:t.Pincode,Message:t.message,Product:`${r} ${a}`.trim()}];try{let e=new FormData;e.append("Email",JSON.stringify(s)),await fetch(`${p.J}api/YKLabs/ProductEnquiryMailTo_ykAdmin`,{method:"POST",body:e});let l=t.name,i=`${r} ${a}`.trim(),o=`${l} has initiated a new enquiry for ${i}`;for(let e of y){if(e.Token){let r=new FormData;r.append("deviceToken",e.Token),r.append("message",o),r.append("senderName","YK Labs"),r.append("path","/tabs/tab1"),r.append("Img",""),fetch(`${p.J}api/Farmer/sendNotification`,{method:"POST",body:r}).catch(console.error)}let r=[{Useid:e.Id,Notification:o,Image:"",CreatedBy:null}],a=new FormData;a.append("Notification",JSON.stringify([r])),a.append("Flag","1"),fetch(`${p.J}api/Farmer/Crud_Notifications`,{method:"POST",body:a}).catch(console.error)}f(!0)}catch(e){console.error(e),alert("Something went wrong while submitting the enquiry.")}finally{x(!1)}};return h?(0,t.jsxs)("div",{className:"w-full max-w-3xl mx-auto p-12 bg-card border-2 border-primary/20 rounded-2xl shadow-xl text-center mt-12",children:[(0,t.jsx)("div",{className:"w-20 h-20 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-6 text-4xl",children:"✅"}),(0,t.jsx)("h2",{className:"text-3xl font-display font-bold text-primary mb-4",children:"Enquiry Sent Successfully!"}),(0,t.jsxs)("p",{className:"text-muted-foreground text-lg mb-8",children:["Thank you for your interest in ",r?(0,t.jsx)("strong",{className:"text-foreground",children:r}
1):"our products",". Our team will contact you shortly."]}),(0,t.jsx)("button",{onClick:()=>window.history.back(),className:"px-8 py-3 bg-primary text-primary-foreground font-bold rounded-xl hover:bg-primary/90 transition-colors",children:"Go Back to Products"})]}):(0,t.jsxs)("div",{className:"w-full py-8",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-8",children:[(0,t.jsx)("div",{className:"w-1.5 h-8 bg-primary rounded-full"}),(0,t.jsxs)("h1",{className:"text-2xl md:text-3xl font-display font-bold text-primary",children:["Enquiry Mail For ",r||"Product"," ",a&&(0,t.jsxs)("span",{className:"text-muted-foreground text-xl",children:["(",a,")"]})]})]}),(0,t.jsx)("div",{className:"bg-card border border-border/50 rounded-2xl shadow-sm p-6 md:p-10",children:(0,t.jsxs)("form",{onSubmit:N,className:"grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(o,{className:"w-4 h-4 text-primary"})," Name ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"name",required:!0,minLength:3,maxLength:50,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Enter your full name"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(n.A,{className:"w-4 h-4 text-primary"})," Email ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"email",name:"email",required:!0,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Enter your email address"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(d.A,{className:"w-4 h-4 text-primary"})," Subject ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"subject",required:!0,defaultValue:r?`Enquiry for ${r}`:"",className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Enquiry Subject"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(c.A,{className:"w-4 h-4 text-primary"})," Phone Number ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"tel",name:"number",required:!0,maxLength:10,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Your contact number"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(u,{className:"w-4 h-4 text-primary"})," City ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"city",required:!0,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Enter your city"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(m,{className:"w-4 h-4 text-primary"})," Address ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"Address",required:!0,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Enter your full address"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground
1/80 flex items-center gap-2",children:[(0,t.jsx)(m,{className:"w-4 h-4 text-primary"})," Area ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"Area",required:!0,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Enter your area"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(m,{className:"w-4 h-4 text-primary"})," Pincode ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("input",{type:"text",name:"Pincode",required:!0,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all",placeholder:"Enter your pincode"})]}),(0,t.jsxs)("div",{className:"md:col-span-2 space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-foreground/80 flex items-center gap-2",children:[(0,t.jsx)(d.A,{className:"w-4 h-4 text-primary"})," Message ",(0,t.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,t.jsx)("textarea",{name:"message",required:!0,rows:6,defaultValue:g,className:"w-full px-4 py-3 bg-background border border-border rounded-xl focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary transition-all resize-y",placeholder:"Your enquiry message..."})]}),(0,t.jsx)("div",{className:"md:col-span-2 pt-4",children:(0,t.jsx)("button",{type:"submit",disabled:i,className:"w-full md:w-auto md:px-12 py-4 bg-primary text-primary-foreground font-bold rounded-xl hover:bg-primary/90 transition-all hover:-translate-y-1 hover:shadow-lg disabled:opacity-70 disabled:hover:translate-y-0 text-center flex items-center justify-center",children:i?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}),"Sending..."]}):"Submit Enquiry"})})]})})]})}},6369:(e,r,a)=>{"use strict";a.d(r,{A:()=>t});let t=(0,a(772).A)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]])},6483:(e,r,a)=>{"use strict";a.d(r,{A:()=>t});let t=(0,a(772).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},8770:(e,r,a)=>{Promise.resolve().then(a.bind(a,5979))}},e=>{e.O(0,[441,928,358],()=>e(e.s=8770)),_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.