1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7db07227-72cf-44f6-aad9-1305aa36f57b",e._sentryDebugIdIdentifier="sentry-dbid-7db07227-72cf-44f6-aad9-1305aa36f57b")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5254],{19175:function(e,n,l){l.d(n,{RH:function(){return y},SV:function(){return c},_O:function(){return o},qV:function(){return u},s9:function(){return p}});var a,o,t=l(23745),i=l(79269),d=l(46173),r=l(96349);(a=o||(o={})).RAZORPAY="razorpay",a.XPAY="xpay",a.PAYTM="paytm",a.PHONEPE="phonepe";let u=e=>(null==e?void 0:e.toLowerCase().replace(/-/g,""))==="xpay",c=()=>window.location?window.location.origin:t._n||i.nZ,v="xpay-checkout",s=["/ritual-recommendation","/make-your-own-ritual"],p=e=>{if(!e||!s.some(e=>window.location.pathname.includes(e))||(0,d.LG)()!==i.iw.ANDROID)return!1;let n=document.createElement("iframe");return n.name=v,n.title="xpay checkout",n.allow="payment *",n.style.cssText="position:fixed;left:0;top:0;width:100%;height:var(--app-height,".concat((0,r.$D)(),"px);border:0;z-index:2147483647;background:#fff"),n.src=e,document.body.appendChild(n),!0},y=()=>{if(window.name!==v||window.top===window.self)return!1;try{var e;return null===(e=window.top)||void 0===e||e.location.replace(window.location.href),!0}catch(e){return!1}}},12157:function(e,n,l){l.d(n,{C:function(){return o},t:function(){return i}});var a,o,t=l(31993);(a=o||(o={})).EPUJA="epuja",a.CHADHAVA="chadhava",a.KUNDLI="kundli",a.SEVA="seva";let i=(0,t.U)(e=>({serviceType:null==o?void 0:o.CHADHAVA,paymentInitiationError:{isError:!1,errorMessage:""},language:"en",isPaymentSuccess:!1,isPaymentFailed:!1,isPaymentModalOpen:!1,placeOrderData:null,setServiceType:n=>e({serviceType:n}),setPaymentSuccess:n=>e({isPaymentSuccess:n}),setPaymentFailed:n=>e({isPaymentFailed:n}),setPaymentModalOpen:n=>e({isPaymentModalOpen:n}),setPlaceOrderData:n=>e({placeOrderData:n}),setLanguage:n=>e({language:n}),setPaymentinitiationFailed:(n,l)=>e({paymentInitiationError:{isError:n,errorMessage:l}})}))},15254:function(e,n,l){l.d(n,{R:function(){return o},Z:function(){return S}});var a,o,t=l(67294),i=l(49382),d=l(20563),r=l(65885),u=l(18983),c=l(71814),v=l(12157),s=l(31955),p=l(19175),y=l(23745);let m={[v.C.EPUJA]:"order_id",[v.C.CHADHAVA]:"order_id",[v.C.KUNDLI]:"order_id",[v.C.SEVA]:"order_id"};var f=l(86697),_=l(46173),P=l(79269);let h=e=>(0,_.JM)()&&(0,_.LG)()===P.iw.IOS&&e>=32001,g={display:{blocks:{upi:{name:"Pay using UPI",instruments:[{method:"upi",flows:["intent"],apps:["google_pay","phonepe","paytm"]}]}},sequence:["block.upi"],preferences:{show_default_blocks:!0}}};var w=()=>{var e,n;let{a4bAPI:l}=(0,i.b)(),[a,o]=(0,t.useState)(),{setPaymentSuccess:d,setPaymentFailed:c,setPaymentModalOpen:s,language:P,serviceType:w}=(0,v.t)();(0,t.useRef)(0);let C=(0,t.useCallback)(async e=>{var n,a;let o=w===v.C.CHADHAVA||w===v.C.KUNDLI?null==l?void 0:l.chadhavaWeb:null==l?void 0:l.pujaWeb;if(!(null==o?void 0:o.getPaymentRecord))return null;let t=await o.getPaymentRecord(e);return null!==(a=null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.data)&&void 0!==a?a:null},[null==l?void 0:l.chadhavaWeb,null==l?void 0:l.pujaWeb,w]),{startPolling:b,stopPolling:Z,isPolling:A,data:k,error:I}=(0,f.Z)(C,null!==(n=null==a?void 0:null===(e=a.payment_info)||void 0===e?void 0:e.polling_details)&&void 0!==n?n:{polling_interval:5,count:10}),[S,O]=(0,t.useState)(),D=(0,t.useRef)((0,_.Wj)());(0,t.useEffect)(()=>{let e=!1;return(0,_.GE)().then(n=>{!e&&n>0&&(D.current=n)}).catch(()=>{}),()=>{e=!0}},[]);let E=(e,n)=>{var l,a;if(w===v.C.KUNDLI){c(!0);return}if(w===v.C.CHADHAVA){null===u.Z||void 0===u.Z||null===(a=u.Z.chadhavaPaymentFailedHandlerCalled)||void 0===a||a.call(u.Z,e);return}null===r.Z||void 0===r.Z||null===(l=r.Z.pujaPaymentFailedHandlerCalled)||void 0===l||l.call(r.Z,e)};(0,t.useEffect)(()=>{k&&(Z(),d(!0),s(!1)),I&&(Z(),c(!0))},[A,k,I,Z,d,c,s]);let N=e=>(null==e?void 0:e.replace("+91",""))||e,j=(e,n,l,a)=>{var o,t,i,d;return new URLSearchParams({order_id:null==e?void 0:e.order_id,payment_gateway:null==e?void 0:null===(o=e.payment_info)||void 0===o?void 0:o.payment_gateway,payment_id:null==e?void 0:null===(t=e.payment_info)||void 0===t?void 0:t.payment_id,booking_id:null==e?void 0:null===(d=e.booking_id)||void 0===d?void 0:null===(i=d.toString)||void 0===i?void 0:i.call(d),lang:P,service_type:w,currency:null==n?void 0:n.currency,store_id:null==l?void 0:l.storeId,inventory_id:null==l?void 0:l.inventoryId,language_mode:a}).toString()},H=(e,n,l,a,o)=>{let t=j(e,n,l,o);O(t);let i=(0,p.SV)(),d=e.payment_info.rz_order_id,u=m[a];return{retry:{enabled:!0,max_count:4},key:y.JY,amount:n.total,currency:n.currency,name:"Sri Mandir",description:"Transaction",image:"https://srm-cdn.a4b.io/images/orig/UOuUk3pyyxedDzBFo2cXdzlqrOLdpMWN.svg",[u]:d,prefill:{contact:N(l.phoneNo),name:l.name,email:l.email}
1,callback_url:"".concat(i,"/payment_success?").concat(t),redirect:(0,_.JM)(),...h(D.current)?{webview_intent:!0}:{},...h(D.current)?{config:g}:{},modal:{ondismiss:e=>{var l,a;null===r.Z||void 0===r.Z||r.Z.pujaPaymentModalClosed(null===(a=n.items)||void 0===a?void 0:null===(l=a[0])||void 0===l?void 0:l.store_title,n.store_id,"",n.amount.toString(),null,n.email),s(!1)}}}};return{initiateRazorpayPayment:(e,n,l,a,t)=>{if(o(e),d(!1),c(!1),"undefined"==typeof Razorpay){c(!0);return}try{let o=H(e,n,l,a,t),i=new Razorpay(o);i.on("payment.failed",a=>{let o=j(e,n,l,t);E(a,o)}),i.open(),s(!0)}catch(e){c(!0)}}}},C=l(88340),b=l(82165),Z=l(79576),A=()=>{let[e,n]=(0,t.useState)(),{setPaymentSuccess:l,setPaymentFailed:a}=(0,v.t)();return{initiatePaytmPayment:(e,o)=>{n(e),l(!1),a(!1),(e=>{if(document.getElementById("paytm-script"))e();else{let n=document.createElement("script");n.src="".concat(y.s6,"/merchantpgpui/checkoutjs/merchants/").concat(y.jr,".js"),n.id="paytm-script",n.onload=e,document.body.appendChild(n)}})(()=>{if(void 0!==window.Paytm&&void 0!==window.Paytm.CheckoutJS&&"function"==typeof window.Paytm.CheckoutJS.init){var n,l,a,t;let i={root:"",flow:"DEFAULT",data:{orderId:null===(l=e.payment_info)||void 0===l?void 0:null===(n=l.paytm_data)||void 0===n?void 0:n.order_id,token:null===(t=e.payment_info)||void 0===t?void 0:null===(a=t.paytm_data)||void 0===a?void 0:a.txn_token,tokenType:"TXN_TOKEN",amount:o.total.toString()},handler:{notifyMerchant:function(e,n){}}};window.Paytm.CheckoutJS.onLoad(function(){}),window.Paytm.CheckoutJS.init(i).then(function(){window.Paytm.CheckoutJS.invoke()}).catch(function(e){})}})}}},k=l(90327),I=()=>{let[e,n]=(0,t.useState)(),{setPaymentSuccess:l,setPaymentFailed:a,language:o}=(0,v.t)(),{navigate:i}=(0,k.Z)();return{initiatePhonePePayment:(e,t,d,r)=>{var u;n(e),l(!1),a(!1);let c=null==e?void 0:null===(u=e.payment_info)||void 0===u?void 0:u.phone_pe_data;if(!(null==c?void 0:c.callback_url)){a(!0);return}try{i(null==c?void 0:c.callback_url,o,{replace:!0})}catch(e){a(!0)}}}};(a=o||(o={})).INITIATED="initiated",a.FAILED="failed",a.SUCCESS="success";var S=(e,n,l)=>{let{a4bAPI:a,userSummary:o}=(0,i.b)(),{navigate:y}=(0,k.Z)(),{isPaymentSuccess:m,isPaymentFailed:f,isPaymentModalOpen:_,placeOrderData:P,language:h,serviceType:g,setServiceType:S,setPaymentSuccess:O,setPaymentFailed:D,setPaymentModalOpen:E,setPlaceOrderData:N,setLanguage:j,setPaymentinitiationFailed:H,paymentInitiationError:U}=(0,v.t)(),V={[v.C.EPUJA]:null==a?void 0:a.pujaWeb,[v.C.CHADHAVA]:null==a?void 0:a.chadhavaWeb,[v.C.KUNDLI]:null==a?void 0:a.smbffApi,[v.C.SEVA]:null==a?void 0:a.sevaWeb},{initiateRazorpayPayment:L}=w(),{initiatePaytmPayment:T}=A(),{initiatePhonePePayment:R}=I();(0,t.useEffect)(()=>{j(n),S(e)},[]);let x=(n,l,a,o,t,i,d)=>{var r,u,c,v,s,p,y,m;return JSON.stringify({orderId:null==n?void 0:n.order_id,paymentGateway:null==n?void 0:null===(r=n.payment_info)||void 0===r?void 0:r.payment_gateway,paymentId:null==n?void 0:null===(u=n.payment_info)||void 0===u?void 0:u.payment_id,bookingId:null==n?void 0:n.booking_id,date:new Date().toDateString(),amount:null==l?void 0:l.total,userId:null==a?void 0:a.userId,pujaName:null==o?void 0:o.pujaName,pujaDate:null==o?void 0:o.pujaDate,pujaMembers:null==o?void 0:o.pujaMembers,couponName:null==o?void 0:o.couponName,couponValue:null==o?void 0:o.couponValue,currency:null==l?void 0:l.currency,currentCartUrl:null===(v=window)||void 0===v?void 0:null===(c=v.location)||void 0===c?void 0:c.href,lang:h,storeId:null==t?void 0:t.storeId,inventoryId:null==t?void 0:t.inventoryId,serviceType:e,polling_details:i,paytm_order_id:null==n?void 0:null===(p=n.payment_info)||void 0===p?void 0:null===(s=p.paytm_data)||void 0===s?void 0:s.order_id,pg_order_id:null==n?void 0:null===(m=n.payment_info)||void 0===m?void 0:null===(y=m.phone_pe_data)||void 0===y?void 0:y.pg_order_id,segmentId:d,phoneNo:null==t?void 0:t.phoneNo,email:null==t?void 0:t.email,customCountryCode:null==o?void 0:o.customCountryCode,variant:null==o?void 0:o.variant})},J=(e,n,l,a,o,t,i)=>{try{var d,s,p,y,m,f,_,P;if(t)switch(i){case v.C.CHADHAVA:null===u.Z||void 0===u.Z||null===(d=u.Z.chadhavaPlaceOrderPostApiCall)||void 0===d||d.call(u.Z,{...e,...n},l,a,o);break;case v.C.KUNDLI:break;case v.C.SEVA:null===c.ZP||void 0===c.ZP||null===(s=c.ZP.sevaPlaceOrderPostApiCall)||void 0===s||s.call(c.ZP,{...e,...n},l,a,o);break;case v.C.EPUJA:null===r.Z||void 0===r.Z||null===(p=r.Z.pujaPlaceOrderPostApiCall)||void 0===p||p.call(r.Z,{...e,...n},l,a,o);break;default:null===r.Z||void 0===r.Z||null===(y=r.Z.pujaPlaceOrderPostApiCall)||void 0===y||y.call(r.Z,{...e,...n},l,a,o)}else switch(i){case v.C.CHADHAVA:null===u.Z||void 0===u.Z||null===(m=u.Z.chadhavaPlaceOrderPostApiCall)||void 0===m||m.call(u.Z,{...e,...n},l,a);break;case v.C.KUNDLI:break;case v.C.SEVA:null===c.ZP||void 0===c.ZP||null===(f=c.ZP.sevaPlaceOrderPostApiCall)||void 0===f||f.call(c.ZP,{...e,...n},l,a);break;case v.C.EPUJA:null===r.Z||void 0===r.Z||null===(_=r.Z.pujaPlaceOrderPostApiCall)||void 0===_||_.call(r.Z,{...e,...n},l,a);break;default:null===u.Z||void 0===u.Z||null===(P=u.Z.chadhavaPlaceOrderPostApiCall)||void 0===P||P.call(u.Z,{...e,...n},l,a)}}catch(e){}},M=e=>{(0,p.s9)(e)||y(e,h,{replace:!0})},F=(e,n,l,a,o)=>{L(e,n,l,a,o)},z=(e,n,l,a)=>{T(e,n,l,a)},K=(e,n,l,a)=>{R(e,n,l,a)},W=(e,n,l,a,o,t)=>{var i,d,u,c;H(!0,null==e?void 0:null===(u=e.response)||void 0===u?void 0:null===(d=u.data)||void 0===d?void 0:null===(i=d.error)||void 0===i?void 0:i.message);let v=null;window.localStorage||(v={userData:null,accessToken:"",userId:"",isLoggedIn:!1,uuid:null});let s=v||(0,C.fp)("auth_data");null===r.Z||void 0===r.Z||null===(c=r.Z.pujaPlaceOrderFailed)||void 0===c||c.call(r.Z,n,l,a,null==e?void 0:e.toString(),t,s,o);let p=(0,C.fp)("user_data"),y=(0,C.fp)("auth_data"),m=(0,b.ej)("x-afb-r-uid"),f=(0,b.ej)("Authorization"),_=(0,b.ej)("x-afb-device-id");null===r.Z||void 0===r.Z||r.Z.pujaPlaceOrderFailedMetadata(y,p,{userIdFromCookie:m||"no userid",accessTokenFormCookie
1:f||"no token",deviceId:_||"no device id"})};return{startPaymentFlow:async(n,a,t,i,r)=>{let u=(null===s.Z||void 0===s.Z?void 0:s.Z.get("x-afb-device-segment"))||88,c=(0,p.SV)(),y={"x-afb-device-segment":u,...e===v.C.SEVA||e===v.C.KUNDLI?(0,Z.ZH)(i,null==o?void 0:o.userId):{},...(null==r?void 0:r.placeOrderHeaders)||{}};if(null==V?void 0:V[e])try{var m,f,_,P,h,w,C,b,A,k;let v;let Z=await (null==V?void 0:null===(m=V[e])||void 0===m?void 0:m.placeOrderV2({...a,callback_url:"".concat(c,"/payment_success?language_mode=").concat(i,"&custom_country_code=").concat(null==n?void 0:n.customCountryCode).concat((null==n?void 0:n.variant)?"&variant=".concat(n.variant):"")},y)),I=null==Z?void 0:null===(f=Z.data)||void 0===f?void 0:f.data,S=x(I,a,o,n,t,null==Z?void 0:null===(h=Z.data)||void 0===h?void 0:null===(P=h.data)||void 0===P?void 0:null===(_=P.payment_info)||void 0===_?void 0:_.polling_details,u);if(null==r?void 0:r.onOrderPlaced)try{v=await r.onOrderPlaced(I)}catch(e){}switch(s.Z.set("payment_data",v?JSON.stringify({...JSON.parse(S),...v}):S,{secure:!0}),N(I),null==I?void 0:null===(w=I.payment_info)||void 0===w?void 0:w.payment_gateway){case p._O.RAZORPAY:F(I,a,t,g,i);break;case p._O.XPAY:M(null==I?void 0:null===(k=I.payment_info)||void 0===k?void 0:null===(A=k.xpay_data)||void 0===A?void 0:A.fwrd_url);break;case p._O.PAYTM:z(I,a,t,g);break;case p._O.PHONEPE:K(I,a,t,g)}null==r||null===(b=r.onPaymentPartnerPageOpened)||void 0===b||b.call(r,{transactionId:null==I?void 0:I.order_id,partnerName:null==I?void 0:null===(C=I.payment_info)||void 0===C?void 0:C.payment_gateway}),d.B("InitiateCheckout",{currency:null==a?void 0:a.currency,value:null==a?void 0:a.amount}),J(a,I,null==t?void 0:t.phoneNo,null==t?void 0:t.name,null==t?void 0:t.email,l,g)}catch(e){W(e,a,null==t?void 0:t.phoneNo,null==t?void 0:t.name,null==t?void 0:t.email,null==a?void 0:a.store_id)}},isPaymentSuccess:m,isPaymentFailed:f,isPaymentModalOpen:_,paymentInitiationError:U,placeOrderData:P}}},86697:function(e,n,l){var a=l(67294);n.Z=(e,n)=>{let[l,o]=(0,a.useState)(!1),[t,i]=(0,a.useState)(null),[d,r]=(0,a.useState)(null),[u,c]=(0,a.useState)(0),v=(0,a.useRef)(null),s=(0,a.useRef)(null),p=(0,a.useCallback)(()=>{o(!1),s.current&&(clearInterval(s.current),s.current=null)},[]),y=(0,a.useCallback)(async(l,a)=>{c(e=>{let l=e+1;return l>Number(n.count)?(p(),e):l});try{let n=await e(l,a);i(n),r(null)}catch(e){r(e),p()}},[e,n,p]);return(0,a.useEffect)(()=>()=>{p()},[p]),{startPolling:(e,l)=>{o(!0),i(null),r(null),c(0),v.current=Date.now(),s.current=setInterval(()=>{y(e,l)},1e3*Number(null==n?void 0:n.polling_interval))},stopPolling:p,isPolling:l,data:t,error:d,pollingCount:u}}},20563:function(e,n,l){l.d(n,{B:function(){return a}});let a=function(e){var n,l;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null===(l=window)||void 0===l||null===(n=l.fbq)||void 0===n||n.call(l,"track",e,a)}}}]); 2//# sourceMappingURL=5254-e3b571a21535fb51.js.map
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.