@bookmypuja-tech/bmp-pdf 0.4.86 → 0.4.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ interface KitchenReportProps {
35
35
  }
36
36
 
37
37
  interface ITransactionItem {
38
+ dateObj?: Date;
38
39
  date: string;
39
40
  time: string;
40
41
  invoiceNumber: string;
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import p from'react';import {maxBy}from'lodash';import Ht from'qrcode';var $i=Object.defineProperty;var Oi=(n,d,y)=>d in n?$i(n,d,{enumerable:true,configurable:true,writable:true,value:y}):n[d]=y;var Dt=(n,d,y)=>Oi(n,typeof d!="symbol"?d+"":d,y);var _e=n=>{typeof n=="string"&&(n=new Date(n));let d={day:"2-digit",month:"short",year:"numeric"};return n.toLocaleDateString("en-GB",d).replace(",","")};var W=(n,d=false,y=false)=>{if(!d){if(n>=1e7)return `\u20B9${(n/1e7).toFixed(2)}Cr`;if(n>=1e5)return `\u20B9${(n/1e5).toFixed(2)}L`}return n.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:y?2:n%1===0?0:2})};var We="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",dt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Nt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Bt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var pt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",gt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Vt={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var Ft=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Ji=({data:n,dates:d})=>{let y=_e(d[0])===_e(d[1]);return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:Ft.page},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),p.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",y?_e(d[0]):`${_e(d[0])} - ${_e(d[1])}`),p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},n?n.map((l,a)=>p.createElement(View,{wrap:false,key:a,style:Ft.pujaTile},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(a+1).toString().padStart(2,"0"))),p.createElement(View,{style:{flexGrow:1}},p.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantName),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantNakshatra)),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Puja name : "),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.pujaName)),y?null:p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Date: "),p.createElement(Text,{style:{fontWeight:"bold"}},_e(l.date)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},p.createElement(Text,null,"Priest Note: ",l.priestNote)):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},p.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",l.amount),l.paymentStatus=="pending"?p.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},p.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},Yi=Ji;Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var ge=1,ot=25*ge,Wt=StyleSheet.create({page:{padding:10*ge,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ge,paddingHorizontal:10*ge,fontSize:ot,border:`${5*ge}px solid black`,borderRadius:5*ge,width:"100%",display:"flex",flexDirection:"column"}}),eo=({data:n,dates:d})=>{let y=_e(d[0])===_e(d[1]);return p.createElement(Document,null,p.createElement(Page,{dpi:200,size:[457*ge],style:Wt.page},p.createElement(Image,{fixed:true,style:{height:55*ge,width:274*ge,marginBottom:10*ge,marginHorizontal:"auto"},src:We}),p.createElement(Text,{style:{fontSize:25*ge,marginBottom:5*ge,marginHorizontal:"auto"}},"Puja List"),p.createElement(Text,{style:{fontSize:20*ge,marginBottom:5*ge,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",y?_e(d[0]):`${_e(d[0])} - ${_e(d[1])}`),p.createElement(Text,{style:{fontSize:17*ge,marginBottom:20*ge,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ge}},n?n.map((l,a)=>p.createElement(View,{wrap:false,key:a,style:Wt.pujaTile},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ge}},p.createElement(Text,{style:{opacity:.6,marginRight:10*ge}},"#",(a+1).toString().padStart(2,"0")),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ge}},l.paymentStatus=="pending"?p.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ge,paddingHorizontal:5*ge,borderRadius:5*ge,marginTop:3*ge}},p.createElement(Text,{style:{color:"#ffffff",fontSize:ot}},"Pending")):null,p.createElement(Text,{style:{fontWeight:"bold",fontSize:ot}},"Rs ",l.amount))),p.createElement(View,{style:{flexGrow:1}},p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ge,gap:3*ge}},p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantName),p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},"-"),p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantNakshatra)),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ge}},p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},p.createElement(Text,null,"Puja name : "),p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.pujaName)),y?null:p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Date: "),p.createElement(Text,{style:{fontWeight:"bold"}},_e(l.date)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ge}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ge}},p.createElement(Text,null,"Priest Note: ",l.priestNote)):null))):null)))},to=eo;var oo={Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,SC:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,Bengali:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,JP:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,KR:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,Tamil:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,Kannada:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,Myanmar:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,Ethiopic:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,Thai:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,Greek:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,Khmer:/[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,Armenian:/[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,Hebrew:/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,Georgian:/[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,Lao:/[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,"Canadian Aboriginal":/[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,Sinhala:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,"Ol Chiki":/[\u1C50-\u1C7F]/g,Tibetan:/[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,Tifinagh:/[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,Yi:/[\uA000-\uA48C\uA490-\uA4C6]/g,Syriac:/[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,Thaana:/[\u0780-\u07B1]/g,Vai:/[\uA500-\uA62B]/g,Cherokee:/[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,"Tai Tham":/[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,"Tai Viet":/[\uAA80-\uAAC2\uAADB-\uAADF]/g,Javanese:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,Telugu:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,Gujarati:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,Malayalam:/[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,Gurmukhi:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g},ro=({style:n={},children:d})=>{let y=r=>{let t=maxBy(Object.entries(oo),([o,m])=>{let D=r.match(m);return D?D.length:0});return t?t[0]:"Latin"},l=r=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(o=>o.test(r));function a(r){return r.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let h=r=>{let t=[],o=null,m="";for(let D of r){D=a(D);let T=y(D);T!==o?(m&&t.push({text:m,script:o}),o=T,m=D):m+=D;}return m&&t.push({text:m,script:o}),t},u=[];d&&typeof d=="string"&&!Array.isArray(d)&&!l(d)&&h(d).forEach((t,o)=>{let m=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;u.push(p.createElement(Text,{key:o,style:{fontFamily:m}},t.text));});let s=[],i={fontFamily:"Noto Sans"};return Array.isArray(n)?s=[...n,i]:n&&Object.keys(n).length>0?s=[n,i]:s=[i],p.createElement(Text,{style:s},u?.length?u:d)},e=ro;var lo=({startDate:n,endDate:d,reportTiming:y,templeName:l,reportName:a,showGeneratedAt:h=true})=>p.createElement(p.Fragment,null,p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:We}),h&&p.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),d?p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",n.toDateString()," - ",d.toDateString()):p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",n.toDateString()),y&&Object.keys(Vt).includes(y)?p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Vt[y]," Report"):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},a),p.createElement(e,{style:{fontSize:12}},`${l}`)),k=lo;var po=({startDate:n,endDate:d,templeName:y,data:l,reportTiming:a})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,templeName:y,reportTiming:a,reportName:"Temple Prasad (Kitchen) Report"}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,"Quantity"))),l.map((h,u)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,u+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,h.name)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,h.quantity))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),_t=po;var uo=({startDate:n,endDate:d,templeName:y,data:l,isDayWiseGrouped:a,dayWiseTotals:h,summary:u})=>{let s=u?.totalBookingsAmount??l.reduce((t,o)=>o.status==="cancelled"?t:t+o.bookingAmount,0),i=u?.totalPostalCharges??l.reduce((t,o)=>o.status==="cancelled"?t:t+(o.postalCharges||0),0),r=u?.totalCreditedAmount??l.reduce((t,o)=>o.status==="cancelled"?t:t+o.creditedAmount,0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Payment Report",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:10}},"Total Bookings Amount: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",i.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",r.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),a&&h&&h.length>0&&p.createElement(View,{style:{marginBottom:20}},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"Day Wise Totals")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Puja Amount")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Postal Charges")),p.createElement(View,{style:{padding:6,width:"25%"}},p.createElement(e,null,"Credited Amount"))),h.map((t,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.dateDisplay)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,width:"25%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),p.createElement(View,null,a&&p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"All Bookings")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Puja Amt")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,"Delivery")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,"Credited Amt")),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"Transaction ID"))),l.map((t,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,o+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,t.date," ",t.time)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?p.createElement(View,{style:{padding:6,width:"58%"}},p.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):p.createElement(p.Fragment,null,p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,t.transactionId))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Lt=uo;var fo=({children:n,splitat:d})=>{if(!n||typeof n!="string")return null;let y="";return d=="words"&&(y=" "),p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},n.split(y).map((l,a)=>p.createElement(p.Fragment,null,p.createElement(e,{key:a},l,d=="words"?" ":"")))))},Q=fo;var wo=({startDate:n,endDate:d,templeName:y,data:l,isDayWiseGrouped:a,dayGroups:h})=>{let u=t=>{let o="";try{let m=JSON.parse(t.address);o=`${m.address}, ${m.locality}, ${m.state} - ${m.pincode}`;}catch(m){console.error("Error parsing address:",m),o=t.address;}return {...t,address:o}},s=l.map(u),i=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Post Type")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,width:"15%"}},p.createElement(e,null,"Postal Amnt"))),r=(t,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(Q,null,t.invoiceNumber)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,t.devoteeName),p.createElement(e,{style:{fontSize:8,marginTop:4}},t.address)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,t.postType)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.pujaName)),p.createElement(View,{style:{padding:6,width:"15%"}},p.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Prasad Delivery Address",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a&&h&&h.length>0?p.createElement(p.Fragment,null,h.map((t,o)=>{let m=t.items.map(u);return p.createElement(View,{key:t.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.dateDisplay),p.createElement(e,{style:{fontSize:10}},t.count," delivery",t.count!==1?" items":" item")),i(),m.map((D,T)=>r(D,T)))})):p.createElement(p.Fragment,null,i(),s.map((t,o)=>r(t,o)))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=wo;var Do=({startDate:n,endDate:d,templeName:y,data:l,reportTiming:a,isDayWiseGrouped:h,dayGroups:u,isEmbed:s=false})=>{l.sort((m,D)=>m.invoiceNumber.localeCompare(D.invoiceNumber));let r=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,width:"7%"}},p.createElement(e,null,"Mode"))),t=(m,D)=>p.createElement(View,{key:D,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,D+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,m.invoiceNumber)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},p.createElement(e,null,m.devoteeName)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},p.createElement(e,null,m.pujaName," - ",m.prasadName)),p.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,m.quantity)),p.createElement(View,{style:{padding:6,width:"7%"}},p.createElement(e,null,m.collectionMode))),o=p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Prasad Report",templeName:y,reportTiming:a}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},h&&u&&u.length>0?p.createElement(p.Fragment,null,u.map((m,D)=>p.createElement(View,{key:m.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},m.dateDisplay),p.createElement(e,{style:{fontSize:10}},m.count," item",m.count!==1?"s":"")),r(),m.items.map((T,F)=>t(T,F))))):p.createElement(p.Fragment,null,r(),l.map((m,D)=>t(m,D)))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return s?o:p.createElement(Document,null,o)},mt=Do;var So=({startDate:n,endDate:d,templeName:y,pujas:l,reportTiming:a,isDayWiseGrouped:h,isEmbed:u=false})=>{let s=0,i=0,r=l.some(o=>o.bookings.some(m=>m.requires_coupon));if(!l||l.length===0){let o=p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Puja List",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return u?o:p.createElement(Document,null,o)}let t=p.createElement(p.Fragment,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:8}},"C = Collec | D = Distribute | P = Postal")),l.some(o=>o.bookings.some(m=>m.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),l.some(o=>o.bookings.some(m=>m.is_early_reminder&&!m.requires_coupon))?l.flatMap((o,m)=>o.bookings.filter(D=>D.is_early_reminder&&!D.requires_coupon).map((D,T)=>(i++,p.createElement(View,{key:`${m}-${T}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,o.name)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,D.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,D.collectionMode||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,D.date?new Date(D.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),p.createElement(e,{style:{fontSize:12}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((o,m)=>{if(o.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;s=0;let D=o.bookings.some(z=>z.topping_name),T=h&&o.dayGroups&&o.dayGroups.length>0,F=(z=false)=>D?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"29%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode"))),v=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:D?p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,U)),p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},p.createElement(e,null,z.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"29%"}},p.createElement(e,null,z.topping_name||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},p.createElement(e,null,z.quantity))):p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,U)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,z.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,z.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,z.collectionMode||""))),z.priestNote&&p.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,z.priestNote))));return p.createElement(View,{key:m,style:{marginBottom:25}},p.createElement(View,{wrap:false,minPresenceAhead:20},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.totalBookings||o.bookings.length}`),!T&&F(true)),T?p.createElement(p.Fragment,null,o.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Be=>!Be.is_early_reminder&&!Be.requires_coupon);return we.length===0?null:p.createElement(View,{key:z.dateKey,style:{marginTop:X>0?15:0}},p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:6}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},z.dateDisplay),p.createElement(e,{style:{fontSize:9}},`${we.length} booking${we.length!==1?"s":""}`)),F(false),we.map((Be,Tt)=>(U++,v(Be,Tt,U))))})):p.createElement(p.Fragment,null,(()=>{if(D){let z=o.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Be=X.get(we);Be.quantity=(parseInt(Be.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>(s++,v(U,we,s)))}else return o.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(s++,v(z,X,s)))})()))}))),r?p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let o=l.flatMap(D=>D.bookings.filter(T=>T.requires_coupon).map(T=>({...T,pujaName:D.name}))),m={};for(let D of o)m[D.invoiceNumber]||(m[D.invoiceNumber]=[]),m[D.invoiceNumber].push(D);return Object.entries(m).map(([D,T],F)=>{let v=T,z=v[0],X=v.length<=5;return p.createElement(View,{key:D,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!X},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},p.createElement(e,{style:{fontWeight:"semibold"}},D),p.createElement(e,null,z.date?new Date(z.date).toDateString():n.toDateString())),p.createElement(e,null,z.phone_number)),p.createElement(View,{style:{height:15,width:"100%"}}),v.map((U,we)=>p.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:25}},p.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return u?t:p.createElement(Document,null,t)},ut=So;var zo=({templeName:n,startDate:d,endDate:y,pujas:l,reportTiming:a})=>{let h=l.sort((u,s)=>{let i=u.nakshatras.length;return s.nakshatras.length-i});return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:d,endDate:y,reportTiming:a,reportName:"Puja Summary",templeName:n}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},h.map((u,s)=>p.createElement(p.Fragment,null,p.createElement(View,{style:{marginBottom:25}},p.createElement(View,null,p.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${u.name} - ${u.totalCount}`)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},p.createElement(e,null,"Quantity"))),u.nakshatras.map((i,r)=>p.createElement(p.Fragment,null,p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,r+1)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},p.createElement(e,null,i.count))))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},$t=zo;var ko=({startDate:n,endDate:d,templeName:y,data:l,isEmbed:a=false})=>{let h=p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Prasad Delivery Postal Report",templeName:y}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:15,marginTop:10,fontSize:9}},p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),l&&l.length>0?p.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let u=l.filter(t=>!t.deliveryMode||t.deliveryMode==="normal-post"),s=l.filter(t=>t.deliveryMode==="international-post"),i=l.filter(t=>t.deliveryMode==="speedpost"),r=t=>p.createElement(p.Fragment,null,t.map((o,m)=>{let D=o.qrContent,T=Ht.toDataURL(D);if(m%2===0){let F=t[m+1];return p.createElement(View,{key:`row-${m}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:20,marginBottom:20}},p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},p.createElement(View,{style:{width:240}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},o.name),p.createElement(View,{style:{fontSize:10}},p.createElement(e,{style:{fontSize:10}},o.address)),p.createElement(e,{style:{fontSize:10}},o.phone)),p.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},o.deliveryMode==="speedpost"?"SP":o.deliveryMode==="international-post"?"IP":"NP"),o.qrContent&&T?p.createElement(Image,{src:T,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,p.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",o.pujaDetails)),F&&(()=>{let v=Ht.toDataURL(F.qrContent);return p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},p.createElement(View,{style:{width:240}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},F.name),p.createElement(View,{style:{fontSize:10}},p.createElement(e,{style:{fontSize:10}},F.address)),p.createElement(e,{style:{fontSize:10}},F.phone)),p.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},F.deliveryMode==="speedpost"?"SP":F.deliveryMode==="international-post"?"IP":"NP"),F.qrContent&&v?p.createElement(Image,{src:v,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,p.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",F.pujaDetails))})())}return null}));return p.createElement(p.Fragment,null,u.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",u.length),r(u)),s.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"International Post (IP) - ",s.length),r(s)),i.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",i.length),r(i)))})()):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return a?h:p.createElement(Document,null,h)},yt=ko;var Bo=({startDate:n,endDate:d,templeName:y,pujaData:l,prasadData:a,deliveryData:h,reportTiming:u})=>{h=h.map(t=>{let o="";try{let m=JSON.parse(t.address);o=`${m.address}, ${m.locality}, ${m.state} - ${m.pincode}`;}catch(m){console.error("Error parsing address:",m),o=t.address;}return {...t,address:o}});l.some(t=>t.bookings.some(o=>o.requires_coupon));return l.length==0&&a.length==0&&h.length==0?p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportTiming:u,reportName:"Combined Report",templeName:y}),p.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):p.createElement(p.Fragment,null,p.createElement(Document,null,l.length>0&&ut({startDate:n,endDate:d,templeName:y,pujas:l,isEmbed:true}),a.length>0&&mt({startDate:n,endDate:d,templeName:y,data:a,isEmbed:true}),h.length>0&&yt({startDate:n,endDate:d,templeName:y,data:h,isEmbed:true})))},Ut=Bo;var Wo=({startDate:n,endDate:d,data:y})=>p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Temple Payment Report",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"S.No.")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,"Temple Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Bookings")),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"Revenue"))),y?.map((l,a)=>p.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,a+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,l.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,l.bookings)),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"\u20B9",l.revenue))))))),Qt=Wo;var co=({startDate:n,endDate:d,templeName:y,data:l})=>{let a=p.useMemo(()=>{let s=[],i=new Map;return l.settlements.forEach(r=>{let t=r.date;i.has(t)||i.set(t,{dateKey:t,dateDisplay:t,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let o=i.get(t);o.items.push(r),o.count++;let m=o.items.reduce((D,T)=>D+T.settlement_amount,0);o.dayTotal=String(m),o.dayTotalVerbose=o.items.map(D=>D.settlement_amount).join(" + ")+" = "+W(m);}),i.forEach(r=>s.push(r)),s},[l.settlements]),h=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"Gateway Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"UTR")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},p.createElement(e,null,"Invoices")),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"Settlement Amt"))),u=(s,i)=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,i+1,". ",s.paymentGateway),p.createElement(e,{style:{fontSize:8,color:"#666",marginTop:2}},s.settlement_id)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},p.createElement(e,null,s.utr.split("").map((r,t)=>p.createElement(e,{key:t},r)))),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%",fontSize:9}},p.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((r,t)=>p.createElement(e,{key:t},r.number," (",W(r.amount),")")))),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,W(s.settlement_amount))));return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Settlements Report",templeName:y}),p.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a.map(s=>p.createElement(View,{key:s.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},s.dateDisplay),p.createElement(e,{style:{fontSize:10}},s.count," settlement",s.count!==1?"s":""," | ",s.dayTotalVerbose)),h(),s.items.map((i,r)=>u(i,r))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Jt=co;var qo=({data:n})=>p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},p.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),p.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},n.templeName),p.createElement(e,{style:{fontSize:10}},n.templeAddress),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},p.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),p.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:pt}))),n.qrContent?p.createElement(View,{style:{width:85}},p.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},n.status==="confirmed"?p.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:gt}):null,p.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),p.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),p.createElement(View,{style:{marginTop:10}},p.createElement(e,{style:{fontSize:11}},"Bill to:"),p.createElement(e,{style:{fontSize:11}},n.devoteeDetails.name),n.devoteeDetails.phone?p.createElement(e,{style:{fontSize:11}},n.devoteeDetails.phone):null,p.createElement(e,{style:{fontSize:11}},n.bookingDate)),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},p.createElement(e,null,"Item Description")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Price")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Quantity")),p.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},p.createElement(e,null,"Total"))),n.items.map((d,y)=>p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},d.pujaName?p.createElement(e,{style:{fontSize:11}},d.pujaName):null,d.devoteesName?p.createElement(e,{style:{fontSize:9,color:"#333333"}},d.devoteesName):null,d.pujaDate?p.createElement(e,{style:{fontSize:9,color:"#333333"}},d.pujaDate," ",d.timing?`- ${d.timing}`:null):null,d.repeatEndDate&&d.repeatStartDate?p.createElement(e,{style:{fontSize:9,color:"#333333"}},d.repeatStartDate," to ",d.repeatEndDate," ",d.timing?`- ${d.timing}`:null):null,d.refNo?p.createElement(e,{style:{fontSize:9,color:"#333333"}},"Reference No: ",d.refNo):null),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.basePujPrice)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},`${d.quantity?d.quantity:""}${d.repeatCount?` x ${d.repeatCount}`:""}`)),p.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.totalPrice))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},p.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),p.createElement(e,null,n.paymentMethod)),p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"50%",textAlign:"right"}},p.createElement(e,null,"Subtotal: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.subTotal))),n.postalCharges?p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Postal Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.postalCharges))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Payment Gateway Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.paymentGatewayCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Platform Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.platformCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"GST (18%): ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.gst))),p.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Total: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?p.createElement(View,{style:{marginBottom:5}},p.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},p.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.afternoon.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.evening.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",d.name," (",d.timings,")"))):null):null,n.instructions.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},p.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},p.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),p.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},n.instructions.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,") ",d.instruction)))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),p.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),Yt=qo;var Oo=({startDate:n,endDate:d,templeName:y,data:l})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Payment Settlement Report",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Amount")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Payment Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},p.createElement(e,null,"Bank UTR No"))),l.map((a,h)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,h+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.invoiceNo)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.amount)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.paymentDate)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},p.createElement(Q,null,a.bankUtrNo))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Gt=Oo;var Uo=({startDate:n,endDate:d,templeName:y,data:l})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Invoice Level Breakup",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Base Amount")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees GST")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway Charges")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway GST")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Payment Mode")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Booking Date")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},p.createElement(e,null,"UTR Number"))),l.map((a,h)=>p.createElement(View,{key:h,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,h+1)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.invoiceNumber)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.baseAmount)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFees)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFeesGST)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayCharges)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayChargesGST)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.paymentMode)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},p.createElement(Q,null,a.bookingDate)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:3,width:"12%"}},p.createElement(Q,null,a.utrNumber))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Zt=Uo;var Yo=({startDate:n,endDate:d,templeName:y,data:l,dayGroups:a,summary:h})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Puja Count Summary Report",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a&&a.length>1?p.createElement(View,{style:{marginBottom:25}},p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,null,"Total Amount"))),(()=>{let u=new Map;return a.forEach(s=>{s.items.forEach(i=>{let r=u.get(i.name)||{quantity:0,amount:0};u.set(i.name,{quantity:r.quantity+i.quantity,amount:r.amount+(i.amount||0)});});}),Array.from(u.entries()).map(([s,i],r)=>p.createElement(View,{key:s,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,r+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,s)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,null,W(i.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},(()=>{let u=new Map;return a.forEach(s=>{s.items.forEach(i=>{let r=u.get(i.name)||{quantity:0,amount:0};u.set(i.name,{quantity:r.quantity+i.quantity,amount:r.amount+(i.amount||0)});});}),Array.from(u.values()).reduce((s,i)=>s+i.quantity,0)})())),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let u=new Map;return a.forEach(s=>{s.items.forEach(i=>{let r=u.get(i.name)||{quantity:0,amount:0};u.set(i.name,{quantity:r.quantity+i.quantity,amount:r.amount+(i.amount||0)});});}),Array.from(u.values()).reduce((s,i)=>s+i.amount,0)})())))),a.some(u=>u.dayPostalTempleFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,(()=>{let u=a.filter(i=>i.postalChargesBreakup).map(i=>i.postalChargesBreakup);if(u.length===0)return "";let s=[0,0,0];return u.forEach(i=>{i&&(s[0]+=i[0],s[1]+=i[1],s[2]+=i[2]);}),`${s.join("+")}`})())),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((u,s)=>u+(s.dayPostalTempleFees||0),0))))),a.some(u=>u.dayPostalCarrierFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((u,s)=>u+(s.dayPostalCarrierFees||0),0))))),(()=>{let u=new Map;return a.forEach(s=>{s.otherChargesBreakup?.forEach(i=>{let r=u.get(i.name)||{count:0,amount:0};u.set(i.name,{count:r.count+(i.count||0),amount:r.amount+i.amount});});}),u.size===0?null:Array.from(u.entries()).map(([s,i])=>p.createElement(View,{key:s,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},s)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.count>0?i.count:"")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(i.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}})),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let u=new Map;a.forEach(t=>{t.items.forEach(o=>{let m=u.get(o.name)||{quantity:0,amount:0};u.set(o.name,{quantity:m.quantity+o.quantity,amount:m.amount+(o.amount||0)});});});let s=Array.from(u.values()).reduce((t,o)=>t+o.amount,0),i=a.reduce((t,o)=>t+((o.dayPostalCarrierFees||0)+(o.dayPostalTempleFees||0)),0),r=a.reduce((t,o)=>{let m=o.otherChargesBreakup?.reduce((D,T)=>D+T.amount,0)||0;return t+m},0);return s+i+r})()))))):null,a&&a.length>1&&p.createElement(View,{break:true,style:{marginBottom:25}},p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,"Puja Amount"))),a.map((u,s)=>p.createElement(View,{key:u.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,s+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,u.dateDisplay)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,u.items.reduce((i,r)=>i+r.quantity,0))),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,null,W(u.dayPujaTotal))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},a.reduce((u,s)=>u+s.items.reduce((i,r)=>i+r.quantity,0),0))),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((u,s)=>u+s.dayPujaTotal,0)))))),a&&a.length>0&&p.createElement(View,{break:true},p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),a.map((u,s)=>p.createElement(View,{key:u.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},u.dateDisplay)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Count")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,"Amount"))),u.items.map((i,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,r+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(i.amount||0))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,u.items.reduce((i,r)=>i+r.quantity,0))),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(u.dayPujaTotal)))),u.dayPostalTempleFees||u.dayPostalCarrierFees?p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Charge")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,u.postalChargesBreakup?`${u.postalChargesBreakup.map(i=>i||0).join("+")}`:"")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(u.dayPostalTempleFees)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Service")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(u.dayPostalCarrierFees))))):null,u.otherChargesBreakup?.length?p.createElement(p.Fragment,null,u.otherChargesBreakup.map((i,r)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.count?i.count:"")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(i.amount)))))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Grand Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(u.dayGrandTotal)))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Xt=Yo;var Go=({startDate:n,templeName:d,pujas:y,reportTiming:l})=>{return !y||y.length===0?p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),y.map((h,u)=>{let s=h.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return s.length===0?null:p.createElement(View,{key:u,style:{marginBottom:20},wrap:false},p.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},h.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.length," booking",s.length>1?"s":"")),s.map((i,r)=>(p.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:i.topping_name?6:0}},p.createElement(e,{style:{fontSize:12}},i.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",i.quantity)),i.topping_name&&p.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},p.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",i.topping_name)),i.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.priestNote))))))})))},ti=Go;var Zo=({startDate:n,templeName:d,data:y,reportTiming:l,isDayWiseGrouped:a,dayGroups:h})=>{if(!y||y.length===0)return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let u=y.sort((i,r)=>i.invoiceNumber.localeCompare(r.invoiceNumber)),s=(i,r)=>p.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},p.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},p.createElement(e,{style:{fontSize:12}},i.prasadName),p.createElement(e,{style:{fontSize:12}}," (qty: ",i.quantity,")")),p.createElement(e,{style:{fontSize:12,color:"#666"}},i.collectionMode)));return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},u.length," item",u.length>1?"s":"")),a&&h&&h.length>0?p.createElement(p.Fragment,null,h.map((i,r)=>p.createElement(View,{key:i.dateKey,style:{marginBottom:12}},p.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},i.dateDisplay),p.createElement(e,{style:{fontSize:11}},i.count," item",i.count!==1?"s":""))),i.items.map((t,o)=>s(t,o))))):p.createElement(p.Fragment,null,u.map((i,r)=>s(i,r)))))},ri=Zo;var Xo=({startDate:n,templeName:d,data:y,isDayWiseGrouped:l,dayGroups:a})=>{let h=i=>{let r="";try{let t=JSON.parse(i.address);r=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{r=i.address;}return {...i,address:r}},u=y.map(h);if(!u||u.length===0)return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let s=(i,r)=>p.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11}},i.address)),i.phoneNumber&&p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:12}},"Ph: ",i.phoneNumber)),p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",i.note||i.pujaName)));return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},u.length," delivery",u.length>1?" items":" item")),l&&a&&a.length>0?p.createElement(p.Fragment,null,a.map((i,r)=>{let t=i.items.map(h);return p.createElement(View,{key:i.dateKey,style:{marginBottom:12}},p.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},i.dateDisplay),p.createElement(e,{style:{fontSize:11}},i.count," item",i.count!==1?"s":""))),t.map((o,m)=>s(o,m)))})):p.createElement(p.Fragment,null,u.map((i,r)=>s(i,r)))))},si=Xo;var Ro=({startDate:n,templeName:d,pujaData:y,prasadData:l,deliveryData:a,reportTiming:h})=>{if(y.length===0&&l.length===0&&a.length===0)return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let s=l.sort((i,r)=>i.invoiceNumber.localeCompare(r.invoiceNumber));return p.createElement(Document,null,y.length>0&&p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),h&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},h.charAt(0).toUpperCase()+h.slice(1)," Report")),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),y.map((i,r)=>{let t=i.bookings.filter(o=>!o.is_early_reminder&&!o.requires_coupon);return t.length===0?null:p.createElement(View,{key:r,style:{marginBottom:20},wrap:false},p.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},i.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((o,m)=>(p.createElement(View,{key:m,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12}},o.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",o.quantity)),o.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},o.priestNote))))))})),l.length>0&&p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),h&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},h.charAt(0).toUpperCase()+h.slice(1)," Report")),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.length," item",s.length>1?"s":"")),s.map((i,r)=>p.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},p.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},p.createElement(e,{style:{fontSize:12}},i.prasadName),p.createElement(e,{style:{fontSize:12}}," (qty: ",i.quantity,")")),p.createElement(e,{style:{fontSize:12,color:"#666"}},i.collectionMode))))),a.length>0&&p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," delivery",a.length>1?" items":" item")),a.map((i,r)=>p.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.name),p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11}},i.address)),i.phone&&p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:12}},"Ph: ",i.phone)),p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",i.pujaDetails))))))},ai=Ro;var er=({startDate:n,templeName:d,data:y})=>!y||y.length===0?p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},y.length," label",y.length>1?"s":"")),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"center",gap:10,marginBottom:12,fontSize:9}},p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"NP"),"-Normal"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"SP"),"-Speed"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"IP"),"-International")),y.map(l=>p.createElement(View,{key:l.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:5}},p.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},l.name),p.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},l.deliveryMode==="speedpost"?"SP":l.deliveryMode==="international-post"?"IP":"NP")),p.createElement(View,{style:{marginBottom:5}},p.createElement(e,{style:{fontSize:11}},l.address)),p.createElement(e,{style:{fontSize:11,marginBottom:5}},l.phone),p.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),p.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",l.pujaDetails))))),mi=er;var ir=({startDate:n,endDate:d,templeName:y,pujas:l,reportTiming:a,selectedPujaNames:h=[]})=>{let u=0,s=0,i=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Custom Puja Report",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(o=>o.is_early_reminder&&!o.requires_coupon).map((o,m)=>(s++,p.createElement(View,{key:`${t}-${m}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,s)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,o.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,o.collectionMode||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,o.date?new Date(o.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),p.createElement(e,{style:{fontSize:12}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((r,t)=>{if(r.bookings.every(T=>T.is_early_reminder||T.requires_coupon))return null;u=0;let o=r.bookings.some(T=>T.topping_name),m=(T=false)=>o?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:T?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"29%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:T?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode"))),D=(T,F,v)=>T.is_early_reminder||T.requires_coupon?null:o?p.createElement(View,{key:F,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,v)),p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},p.createElement(e,null,T.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},p.createElement(e,null,T.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},p.createElement(e,null,T.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"29%"}},p.createElement(e,null,T.topping_name||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},p.createElement(e,null,T.quantity))):p.createElement(View,{key:F,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,v)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,T.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,T.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,T.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,T.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,T.collectionMode||""))),T.priestNote&&p.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,T.priestNote))));return p.createElement(View,{key:t,style:{marginBottom:25}},p.createElement(View,{wrap:false,minPresenceAhead:20},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.bookings.length}`),m(true)),p.createElement(p.Fragment,null,(()=>{if(o){let T=r.bookings.filter(v=>!v.is_early_reminder&&!v.requires_coupon),F=new Map;return T.forEach(v=>{let z=`${v.invoiceNumber}|${v.devoteeName}|${v.nakshatra}|${v.topping_name||""}`;if(F.has(z)){let X=F.get(z);X.quantity=(parseInt(X.quantity)+parseInt(v.quantity)).toString();}else F.set(z,{...v});}),Array.from(F.values()).map((v,z)=>(u++,D(v,z,u)))}else return r.bookings.map((T,F)=>T.is_early_reminder||T.requires_coupon?null:(u++,D(T,F,u)))})()))}))),i?p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let r=l.flatMap(o=>o.bookings.filter(m=>m.requires_coupon).map(m=>({...m,pujaName:o.name}))),t={};for(let o of r)t[o.invoiceNumber]||(t[o.invoiceNumber]=[]),t[o.invoiceNumber].push(o);return Object.entries(t).map(([o,m],D)=>{let T=m,F=T[0];return p.createElement(View,{key:o,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},p.createElement(e,{style:{fontWeight:"semibold"}},o),p.createElement(e,null,F.date?new Date(F.date).toDateString():n.toDateString())),p.createElement(e,null,F.phone_number)),p.createElement(View,{style:{height:15,width:"100%"}}),T.map((v,z)=>p.createElement(View,{key:z,style:{display:"flex",flexDirection:"row",marginTop:25}},p.createElement(e,null,`${v.devoteeName} ----- ${v.nakshatra} ----- ${v.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},yi=ir;var or=({startDate:n,templeName:d,pujas:y,reportTiming:l,selectedPujaNames:a=[]})=>{return !y||y.length===0?p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," ","Report")),a.length>0&&p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),p.createElement(e,{style:{fontSize:9,marginTop:2}},a.join(", "))),y.map((u,s)=>{let i=u.bookings.filter(r=>!r.is_early_reminder&&!r.requires_coupon);return i.length===0?null:p.createElement(View,{key:s,style:{marginBottom:20},wrap:false},p.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},u.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},i.length," booking",i.length>1?"s":"")),i.map((r,t)=>(p.createElement(View,{key:t,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},r.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},r.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12}},r.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",r.quantity)),r.collectionMode&&p.createElement(View,{style:{marginTop:4}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",r.collectionMode)),r.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},r.priestNote))))))}),p.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},p.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},hi=or;var sr=n=>{let d=0,y=0,l=0,a=0;for(let h of n.items)h.exclude||(d+=h.platformFees,y+=h.platformFeesGST,a+=h.invoiceTotal);return l=y+d,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(View,{style:{flexDirection:"row",width:"100%"}},p.createElement(View,{style:{width:"50%"}},p.createElement(Text,null,"INVOICE RECON"),p.createElement(Text,{style:{fontSize:12,marginTop:6}},n.templeName," "),p.createElement(Text,{style:{fontSize:12}},"Bookings from ",n.startDate.toDateString()," to"," ",n.endDate.toDateString()," ")),p.createElement(View,{style:{width:"50%",alignItems:"flex-end"}},p.createElement(Text,{style:{fontSize:12,fontWeight:"semibold"}},"Infinix AI Pvt Ltd"," "),p.createElement(Text,{style:{fontSize:12}},"GSTIN: 32AAICI0436P1ZG"," "))),p.createElement(Text,{style:{fontSize:10,backgroundColor:"#fffca6",marginTop:10}},"Bookings marked with yellow are not to be counted"),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},p.createElement(Text,null,"Sr no")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},p.createElement(Text,null,"Invoice Number")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%",fontSize:7}},p.createElement(Text,null,"Booking Date")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,"Inv Total")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,"PF Total")),p.createElement(View,{style:{padding:3,width:"12%",borderRight:"1px solid #000"}},p.createElement(Text,null,"Pay Method")),p.createElement(View,{style:{padding:3,width:"17%",borderRight:"1px solid #000"}},p.createElement(Text,null,"Transaction ID")),p.createElement(View,{style:{padding:3,width:"16%"}},p.createElement(Text,null,"Settlement ID")))),n.items.map((h,u)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:h.exclude?"#fffca6":"transparent"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},p.createElement(Text,null,u+1)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},p.createElement(Text,null,h.invoiceNumber)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}},p.createElement(Text,null,h.bookingDate)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(h.invoiceTotal))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(h.platformFees)," +"," ",W(h.platformFeesGST))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,h.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),p.createElement(View,{style:{padding:3,width:"17%",fontSize:6,borderRight:"1px solid #000"}},p.createElement(Text,null,h.transactionID)),p.createElement(View,{style:{padding:3,width:"16%",fontSize:6}},p.createElement(Text,null,h.settlementID)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},p.createElement(Text,null,"Total")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}}),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(a))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(l))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"17%"}}),p.createElement(View,{style:{padding:3,width:"16%"}})),p.createElement(View,{style:{marginTop:10,fontSize:12}},p.createElement(Text,null,"Total Payable: ",W(l)))))},wi=sr;var pr=({startDate:n,endDate:d,templeName:y,data:l,reportTiming:a})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,templeName:y,reportTiming:a,reportName:"Temple Prasad (Kitchen) Report"}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,"Quantity"))),l.map((h,u)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,u+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,h.name)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,h.quantity))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),bi=pr;var ur=({startDate:n,endDate:d,templeName:y,data:l,isDayWiseGrouped:a,dayWiseTotals:h,summary:u})=>{let s=u?.totalBookingsAmount??l.reduce((t,o)=>o.status==="cancelled"?t:t+o.bookingAmount,0),i=u?.totalPostalCharges??l.reduce((t,o)=>o.status==="cancelled"?t:t+(o.postalCharges||0),0),r=u?.totalCreditedAmount??l.reduce((t,o)=>o.status==="cancelled"?t:t+o.creditedAmount,0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Payment Report",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:9}},"Total Bookings Amount: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",i.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",r.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),a&&h&&h.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Day Wise Totals")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Puja Amount")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Postal Charges")),p.createElement(View,{style:{padding:4,width:"25%"}},p.createElement(e,null,"Credited Amount"))),h.map((t,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.dateDisplay)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,width:"25%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),p.createElement(View,null,a&&p.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"All Bookings")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Puja Amt")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,"Delivery")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,"Credited Amt")),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"Transaction ID"))),l.map((t,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,o+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,t.date," ",t.time)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?p.createElement(View,{style:{padding:4,width:"58%"}},p.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):p.createElement(p.Fragment,null,p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,t.transactionId))))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Ti=ur;var xr=({startDate:n,endDate:d,templeName:y,data:l,isDayWiseGrouped:a,dayGroups:h})=>{let u=t=>{let o="";try{let m=JSON.parse(t.address);o=`${m.address}, ${m.locality}, ${m.state} - ${m.pincode}`;}catch(m){console.error("Error parsing address:",m),o=t.address;}return {...t,address:o}},s=l.map(u),i=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Post Type")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,width:"15%"}},p.createElement(e,null,"Postal Amnt"))),r=(t,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%",fontSize:6}},p.createElement(Q,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(Q,null,t.invoiceNumber)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,t.devoteeName),p.createElement(e,{style:{fontSize:7,marginTop:3}},t.address)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,t.postType)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.pujaName)),p.createElement(View,{style:{padding:4,width:"15%"}},p.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Prasad Delivery Address",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a&&h&&h.length>0?p.createElement(p.Fragment,null,h.map((t,o)=>{let m=t.items.map(u);return p.createElement(View,{key:t.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),p.createElement(e,{style:{fontSize:9}},t.count," delivery",t.count!==1?" items":" item")),i(),m.map((D,T)=>r(D,T)))})):p.createElement(p.Fragment,null,i(),s.map((t,o)=>r(t,o)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Di=xr;var br=({startDate:n,endDate:d,templeName:y,data:l,reportTiming:a,isDayWiseGrouped:h,dayGroups:u,isEmbed:s=false})=>{l.sort((m,D)=>m.invoiceNumber.localeCompare(D.invoiceNumber));let r=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:4,width:"7%"}},p.createElement(e,null,"Mode"))),t=(m,D)=>p.createElement(View,{key:D,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,D+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,m.invoiceNumber)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},p.createElement(e,null,m.devoteeName)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},p.createElement(e,null,m.pujaName," - ",m.prasadName)),p.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,m.quantity)),p.createElement(View,{style:{padding:4,width:"7%"}},p.createElement(e,null,m.collectionMode))),o=p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Prasad Report",templeName:y,reportTiming:a}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},h&&u&&u.length>0?p.createElement(p.Fragment,null,u.map((m,D)=>p.createElement(View,{key:m.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},m.dateDisplay),p.createElement(e,{style:{fontSize:9}},m.count," item",m.count!==1?"s":"")),r(),m.items.map((T,F)=>t(T,F))))):p.createElement(p.Fragment,null,r(),l.map((m,D)=>t(m,D)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return s?o:p.createElement(Document,null,o)},xt=br;var Dr=({startDate:n,endDate:d,templeName:y,pujas:l,reportTiming:a,isDayWiseGrouped:h,isEmbed:u=false})=>{let s=0,i=0,r=l.some(o=>o.bookings.some(m=>m.requires_coupon));if(!l||l.length===0){let o=p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Puja List",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"));return u?o:p.createElement(Document,null,o)}let t=p.createElement(p.Fragment,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.some(o=>o.bookings.some(m=>m.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:4}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),l.some(o=>o.bookings.some(m=>m.is_early_reminder&&!m.requires_coupon))?l.flatMap((o,m)=>o.bookings.filter(D=>D.is_early_reminder&&!D.requires_coupon).map((D,T)=>(i++,p.createElement(View,{key:`${m}-${T}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,o.name)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,D.quantity)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,D.collectionMode||"")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},p.createElement(e,null,D.date?new Date(D.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Puja List"),p.createElement(e,{style:{fontSize:10}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},l.map((o,m)=>{if(o.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;s=0;let D=o.bookings.some(z=>z.topping_name),T=h&&o.dayGroups&&o.dayGroups.length>0,F=(z=false)=>D?p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"34%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice"))):p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"36%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"17%"}},p.createElement(e,null,"Invoice No"))),v=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:D?p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,U)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"24%"}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"34%"}},p.createElement(e,null,z.topping_name||"")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,z.quantity)),p.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},p.createElement(e,null,z.invoiceNumber))):p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,U)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${36*1.11111}%`}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,z.quantity)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},p.createElement(e,null,z.collectionMode||"")),p.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:`${17*1.11111}%`}},p.createElement(e,null,z.invoiceNumber))),z.priestNote&&p.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,z.priestNote))));return p.createElement(View,{key:m,style:{marginBottom:10}},p.createElement(View,{wrap:false,minPresenceAhead:15},p.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.totalBookings||o.bookings.length}`),!T&&F(true)),T?p.createElement(p.Fragment,null,o.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Be=>!Be.is_early_reminder&&!Be.requires_coupon);return we.length===0?null:p.createElement(View,{key:z.dateKey,style:{marginTop:X>0?12:0}},p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:2}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},z.dateDisplay),p.createElement(e,{style:{fontSize:8}},`${we.length} booking${we.length!==1?"s":""}`)),F(false),we.map((Be,Tt)=>(U++,v(Be,Tt,U))))})):p.createElement(p.Fragment,null,(()=>{if(D){let z=o.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Be=X.get(we);Be.quantity=(parseInt(Be.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>{s=s||1;let Be=s;return s+=Number(U.quantity)||1,v(U,we,Be)})}else return o.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(s++,v(z,X,s)))})()))}))),r?p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let o=l.flatMap(D=>D.bookings.filter(T=>T.requires_coupon).map(T=>({...T,pujaName:D.name}))),m={};for(let D of o)m[D.invoiceNumber]||(m[D.invoiceNumber]=[]),m[D.invoiceNumber].push(D);return Object.entries(m).map(([D,T],F)=>{let v=T,z=v[0],X=v.length<=5;return p.createElement(View,{key:D,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:!X},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},p.createElement(e,{style:{fontWeight:"semibold"}},D),p.createElement(e,null,z.date?new Date(z.date).toDateString():n.toDateString())),p.createElement(e,null,z.phone_number)),p.createElement(View,{style:{height:10,width:"100%"}}),v.map((U,we)=>p.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:18}},p.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return u?t:p.createElement(Document,null,t)},ht=Dr;var Pr=({templeName:n,startDate:d,endDate:y,pujas:l,reportTiming:a})=>{let h=l.sort((u,s)=>{let i=u.nakshatras.length;return s.nakshatras.length-i});return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:d,endDate:y,reportTiming:a,reportName:"Puja Summary",templeName:n}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},h.map((u,s)=>p.createElement(p.Fragment,null,p.createElement(View,{style:{marginBottom:20}},p.createElement(View,null,p.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${u.name} - ${u.totalCount}`)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:4,fontSize:9,width:"20%",fontWeight:"semibold"}},p.createElement(e,null,"Quantity"))),u.nakshatras.map((i,r)=>p.createElement(p.Fragment,null,p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,r+1)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},p.createElement(e,null,i.count))))))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Si=Pr;var Ar=({startDate:n,endDate:d,templeName:y,data:l,isEmbed:a=false})=>{let h=p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Prasad Delivery Postal Report",templeName:y}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,marginTop:8,fontSize:7}},p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),l&&l.length>0?p.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let u=l.filter(t=>!t.deliveryMode||t.deliveryMode==="normal-post"),s=l.filter(t=>t.deliveryMode==="international-post"),i=l.filter(t=>t.deliveryMode==="speedpost"),r=t=>p.createElement(p.Fragment,null,t.map((o,m)=>{let D=o.qrContent,T=Ht.toDataURL(D);if(m%2===0){let F=t[m+1];return p.createElement(View,{key:`row-${m}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:15,marginBottom:15}},p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},o.name),p.createElement(View,{style:{fontSize:8}},p.createElement(Q,{splitat:"words"},o.address)),p.createElement(e,{style:{fontSize:8}},o.phone)),o.qrContent&&T?p.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},o.deliveryMode==="speedpost"?"SP":o.deliveryMode==="international-post"?"IP":"NP"),p.createElement(Image,{src:T,style:{width:40,height:40,minWidth:40,maxWidth:40}}),p.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",o.pujaDetails)),F&&(()=>{let v=Ht.toDataURL(F.qrContent);return p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},F.name),p.createElement(View,{style:{fontSize:8}},p.createElement(Q,{splitat:"words"},F.address)),p.createElement(e,{style:{fontSize:8}},F.phone)),F.qrContent&&v?p.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},F.deliveryMode==="speedpost"?"SP":F.deliveryMode==="international-post"?"IP":"NP"),p.createElement(Image,{src:v,style:{width:40,height:40,minWidth:40,maxWidth:40}}),p.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",F.pujaDetails))})())}return null}));return p.createElement(p.Fragment,null,u.length>0&&p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",u.length),r(u)),s.length>0&&p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"International Post (IP) - ",s.length),r(s)),i.length>0&&p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",i.length),r(i)))})()):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return a?h:p.createElement(Document,null,h)},wt=Ar;var kr=({startDate:n,endDate:d,templeName:y,pujaData:l,prasadData:a,deliveryData:h,reportTiming:u})=>(h=h.map(s=>{let i="";try{let r=JSON.parse(s.address);i=`${r.address}, ${r.locality}, ${r.state} - ${r.pincode}`;}catch(r){console.error("Error parsing address:",r),i=s.address;}return {...s,address:i}}),l.length==0&&a.length==0&&h.length==0?p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportTiming:u,reportName:"Combined Report",templeName:y}),p.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):p.createElement(Document,null,l.length>0&&ht({startDate:n,endDate:d,templeName:y,pujas:l,reportTiming:u,isEmbed:true}),a.length>0&&xt({startDate:n,endDate:d,templeName:y,data:a,reportTiming:u,isEmbed:true}),h.length>0&&wt({startDate:n,endDate:d,templeName:y,data:h,isEmbed:true}))),Ai=kr;var Fr=({startDate:n,endDate:d,data:y})=>p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Temple Payment Report",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"S.No.")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,"Temple Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Bookings")),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"Revenue"))),y?.map((l,a)=>p.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,a+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,l.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,l.bookings)),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"\u20B9",l.revenue))))))),Ci=Fr;var jr=({startDate:n,endDate:d,templeName:y,data:l})=>{let a=p.useMemo(()=>{let s=[],i=new Map;return l.settlements.forEach(r=>{let t=r.date;i.has(t)||i.set(t,{dateKey:t,dateDisplay:t,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let o=i.get(t);o.items.push(r),o.count++;let m=o.items.reduce((D,T)=>D+T.settlement_amount,0);o.dayTotal=String(m),o.dayTotalVerbose=o.items.map(D=>D.settlement_amount).join(" + ")+" = "+W(m);}),i.forEach(r=>s.push(r)),s},[l.settlements]),h=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"Gateway Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"UTR")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%"}},p.createElement(e,null,"Invoices")),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"Settlement Amt"))),u=(s,i)=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,i+1,". ",s.paymentGateway),p.createElement(e,{style:{fontSize:6,color:"#666",marginTop:2}},s.settlement_id)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},p.createElement(e,null,s.utr.split("").map((r,t)=>p.createElement(e,{key:t},r)))),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%",fontSize:7}},p.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((r,t)=>p.createElement(e,{key:t},r.number," (",W(r.amount),")")))),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,W(s.settlement_amount))));return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Settlements Report",templeName:y}),p.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a.map(s=>p.createElement(View,{key:s.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},s.dateDisplay),p.createElement(e,{style:{fontSize:8}},s.count," settlement",s.count!==1?"s":""," | ",s.dayTotalVerbose)),h(),s.items.map((i,r)=>u(i,r))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},ki=jr;var _r=({data:n})=>p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},p.createElement(View,{style:{backgroundColor:"#FFA823",width:15,height:"100%"}}),p.createElement(View,{style:{marginLeft:10,marginTop:8,marginBottom:0,flex:1}},p.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},n.templeName),p.createElement(e,{style:{fontSize:8}},n.templeAddress),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:4,marginTop:8,alignItems:"center"}},p.createElement(e,{style:{fontSize:8,marginTop:-4}},"Powered by"),p.createElement(Image,{style:{height:20,width:75,objectFit:"contain"},src:pt}))),n.qrContent?p.createElement(View,{style:{width:65}},p.createElement(Image,{style:{height:55,width:55,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},n.status==="confirmed"?p.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:gt}):null,p.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),p.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),p.createElement(View,{style:{marginTop:8}},p.createElement(e,{style:{fontSize:9}},"Bill to:"),p.createElement(e,{style:{fontSize:9}},n.devoteeDetails.name),n.devoteeDetails.phone?p.createElement(e,{style:{fontSize:9}},n.devoteeDetails.phone):null,p.createElement(e,{style:{fontSize:9}},n.bookingDate)),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},p.createElement(e,null,"Item Description")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Price")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Quantity")),p.createElement(View,{style:{padding:4,width:"20%",textAlign:"center"}},p.createElement(e,null,"Total"))),n.items.map((d,y)=>p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},d.pujaName?p.createElement(e,{style:{fontSize:9}},d.pujaName):null,d.devoteesName?p.createElement(e,{style:{fontSize:7,color:"#333333"}},d.devoteesName):null,d.pujaDate?p.createElement(e,{style:{fontSize:7,color:"#333333"}},d.pujaDate," ",d.timing?`- ${d.timing}`:null):null,d.repeatEndDate&&d.repeatStartDate?p.createElement(e,{style:{fontSize:7,color:"#333333"}},d.repeatStartDate," to ",d.repeatEndDate," ",d.timing?`- ${d.timing}`:null):null),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.basePujPrice)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},`${d.quantity?d.quantity:""}${d.repeatCount?` x ${d.repeatCount}`:""}`)),p.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.totalPrice))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:15,marginHorizontal:15}},p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:9}},p.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),p.createElement(e,null,n.paymentMethod)),p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"50%",textAlign:"right"}},p.createElement(e,null,"Subtotal: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.subTotal))),n.postalCharges?p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Postal Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.postalCharges))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Payment Gateway Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.paymentGatewayCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Platform Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.platformCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"GST (18%): ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.gst))),p.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:4}}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Total: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?p.createElement(View,{style:{marginBottom:4}},p.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:20}},p.createElement(View,{style:{backgroundColor:"#FF266F",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.afternoon.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.evening.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",d.name," (",d.timings,")"))):null):null,n.instructions.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:15,fontSize:7,border:"1px solid #757575"}},p.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:8,paddingVertical:4}},p.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),p.createElement(View,{style:{display:"flex",flexDirection:"column",gap:4,marginVertical:8,paddingHorizontal:8}},n.instructions.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:7}},y+1,") ",d.instruction)))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Terms and Conditions:"),p.createElement(e,{style:{fontSize:7,marginLeft:4}},"https://www.bookmypuja.app/terms-and-condition")))),Ni=_r;var Mr=({startDate:n,endDate:d,templeName:y,data:l})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Payment Settlement Report",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Amount")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Payment Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},p.createElement(e,null,"Bank UTR No"))),l.map((a,h)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,h+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.invoiceNo)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.amount)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.paymentDate)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},p.createElement(Q,null,a.bankUtrNo))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Bi=Mr;var Hr=({startDate:n,endDate:d,templeName:y,data:l})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Invoice Level Breakup",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:6,fontWeight:"semibold"}},p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Base Amount")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees GST")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway Charges")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway GST")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Payment Mode")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Booking Date")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:2,borderRight:"none",width:"12%"}},p.createElement(e,null,"UTR Number"))),l.map((a,h)=>p.createElement(View,{key:h,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:6}},p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,h+1)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.invoiceNumber)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.baseAmount)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFees)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFeesGST)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayCharges)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayChargesGST)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.paymentMode)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},p.createElement(Q,null,a.bookingDate)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:2,width:"12%"}},p.createElement(Q,null,a.utrNumber))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Fi=Hr;var Qr=({startDate:n,endDate:d,templeName:y,data:l,dayGroups:a,summary:h})=>{l.reduce((s,i)=>s+i.quantity,0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Puja Count Summary Report",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a&&a.length>1?p.createElement(View,{style:{marginBottom:20}},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,"Total Amount"))),(()=>{let s=new Map;return a.forEach(i=>{i.items.forEach(r=>{let t=s.get(r.name)||{quantity:0,amount:0};s.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(s.entries()).map(([i,r],t)=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,t+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,i)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,r.quantity)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,W(r.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},(()=>{let s=new Map;return a.forEach(i=>{i.items.forEach(r=>{let t=s.get(r.name)||{quantity:0,amount:0};s.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(s.values()).reduce((i,r)=>i+r.quantity,0)})())),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let s=new Map;return a.forEach(i=>{i.items.forEach(r=>{let t=s.get(r.name)||{quantity:0,amount:0};s.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(s.values()).reduce((i,r)=>i+r.amount,0)})())))),a.some(s=>s.dayPostalTempleFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,(()=>{let s=a.filter(r=>r.postalChargesBreakup).map(r=>r.postalChargesBreakup);if(s.length===0)return "";let i=[0,0,0];return s.forEach(r=>{r&&(i[0]+=r[0],i[1]+=r[1],i[2]+=r[2]);}),`${i.join("+")}`})())),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((s,i)=>s+(i.dayPostalTempleFees||0),0))))),a.some(s=>s.dayPostalCarrierFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((s,i)=>s+(i.dayPostalCarrierFees||0),0))))),(()=>{let s=new Map;return a.forEach(i=>{i.otherChargesBreakup?.forEach(r=>{let t=s.get(r.name)||{count:0,amount:0};s.set(r.name,{count:t.count+(r.count||0),amount:t.amount+r.amount});});}),s.size===0?null:Array.from(s.entries()).map(([i,r])=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},i)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,r.count>0?r.count:"")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(r.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}})),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let s=new Map;a.forEach(o=>{o.items.forEach(m=>{let D=s.get(m.name)||{quantity:0,amount:0};s.set(m.name,{quantity:D.quantity+m.quantity,amount:D.amount+(m.amount||0)});});});let i=Array.from(s.values()).reduce((o,m)=>o+m.amount,0),r=a.reduce((o,m)=>o+((m.dayPostalCarrierFees||0)+(m.dayPostalTempleFees||0)),0),t=a.reduce((o,m)=>{let D=m.otherChargesBreakup?.reduce((T,F)=>T+F.amount,0)||0;return o+D},0);return i+r+t})()))))):null,a&&a.length>1&&p.createElement(View,{break:true,style:{marginBottom:20}},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,"Puja Amount"))),a.map((s,i)=>p.createElement(View,{key:s.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,i+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,s.dateDisplay)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,s.items.reduce((r,t)=>r+t.quantity,0))),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,W(s.dayPujaTotal))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},a.reduce((s,i)=>s+i.items.reduce((r,t)=>r+t.quantity,0),0))),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((s,i)=>s+i.dayPujaTotal,0)))))),a&&a.length>0&&p.createElement(View,{break:true},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),a.map((s,i)=>p.createElement(View,{key:s.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid #000",borderBottom:"none"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},s.dateDisplay)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,"Amount"))),s.items.map((r,t)=>p.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,t+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,r.quantity)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(r.amount||0))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,s.items.reduce((r,t)=>r+t.quantity,0))),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(s.dayPujaTotal)))),s.dayPostalTempleFees&&s.dayPostalCarrierFees?p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Charge")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,s.postalChargesBreakup?`${s.postalChargesBreakup.map(r=>r||0).join("+")}`:"")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(s.dayPostalTempleFees)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Service")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(s.dayPostalCarrierFees))))):null,s.otherChargesBreakup?.length?p.createElement(p.Fragment,null,s.otherChargesBreakup.map((r,t)=>p.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,r.count?r.count:"")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(r.amount)))))):null,s.dayPostalTempleFees||s.dayPostalCarrierFees||s.otherChargesBreakup?.length?p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Day Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(s.dayGrandTotal)))):null)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},vi=Qr;var Yr=({startDate:n,endDate:d,templeName:y,pujas:l,reportTiming:a,selectedPujaNames:h=[]})=>{let u=0,s=0,i=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportName:"Custom Puja Report",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range and pujas"))):p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:4}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(o=>o.is_early_reminder&&!o.requires_coupon).map((o,m)=>(s++,p.createElement(View,{key:`${t}-${m}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,s)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,o.quantity)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,o.collectionMode||"")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,o.date?new Date(o.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Custom Puja Report"),p.createElement(e,{style:{fontSize:10}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},l.map((r,t)=>{if(r.bookings.every(T=>T.is_early_reminder||T.requires_coupon))return null;u=0;let o=r.bookings.some(T=>T.topping_name),m=(T=false)=>o?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:T?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"34%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:T?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"36%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"17%"}},p.createElement(e,null,"Invoice No"))),D=(T,F,v)=>T.is_early_reminder||T.requires_coupon?null:o?p.createElement(View,{key:F,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,v)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"24%"}},p.createElement(e,null,T.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,T.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"34%"}},p.createElement(e,null,T.topping_name||"")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,T.quantity)),p.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},p.createElement(e,null,T.invoiceNumber))):p.createElement(View,{key:F,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,v)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${36*1.11111}%`}},p.createElement(e,null,T.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,T.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,T.quantity)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},p.createElement(e,null,T.collectionMode||"")),p.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:`${17*1.11111}%`}},p.createElement(e,null,T.invoiceNumber))),T.priestNote&&p.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,T.priestNote))));return p.createElement(View,{key:t,style:{marginBottom:10}},p.createElement(View,{wrap:false,minPresenceAhead:20},p.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.bookings.length}`),m(true)),p.createElement(p.Fragment,null,(()=>{if(o){let T=r.bookings.filter(v=>!v.is_early_reminder&&!v.requires_coupon),F=new Map;return T.forEach(v=>{let z=`${v.invoiceNumber}|${v.devoteeName}|${v.nakshatra}|${v.topping_name||""}`;if(F.has(z)){let X=F.get(z);X.quantity=(parseInt(X.quantity)+parseInt(v.quantity)).toString();}else F.set(z,{...v});}),Array.from(F.values()).map((v,z)=>{u=u||1;let X=u;return u+=Number(v.quantity)||1,D(v,z,X)})}else return r.bookings.map((T,F)=>T.is_early_reminder||T.requires_coupon?null:(u++,D(T,F,u)))})()))}))),i?p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let r=l.flatMap(o=>o.bookings.filter(m=>m.requires_coupon).map(m=>({...m,pujaName:o.name}))),t={};for(let o of r)t[o.invoiceNumber]||(t[o.invoiceNumber]=[]),t[o.invoiceNumber].push(o);return Object.entries(t).map(([o,m],D)=>{let T=m,F=T[0];return p.createElement(View,{key:o,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:false},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},p.createElement(e,{style:{fontWeight:"semibold"}},o),p.createElement(e,null,F.date?new Date(F.date).toDateString():n.toDateString())),p.createElement(e,null,F.phone_number)),p.createElement(View,{style:{height:10,width:"100%"}}),T.map((v,z)=>p.createElement(View,{key:z,style:{display:"flex",flexDirection:"row",marginTop:18}},p.createElement(e,null,`${v.devoteeName} ----- ${v.nakshatra} ----- ${v.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},ji=Yr;var Xr=({startDate:n,endDate:d,templeName:y,data:l,reportTiming:a})=>{let h=l.items[0].shares.length,u=50/(h||1),s=0,i=0,r=new Array(h).fill(0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n,endDate:d,reportTiming:a,reportName:"Share Report",templeName:y}),l.items.length<=0?p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,l.items.length>0?p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black"}},p.createElement(View,{style:{width:"5%",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Sr")),p.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Puja Name")),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Price")),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Count")),l.items[0].shares.map((t,o)=>p.createElement(View,{style:{width:`${u}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.key))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),l.items.map((t,o)=>(s+=t.count,i+=t.total,t.shares.forEach((m,D)=>{r[D]+=m.value;}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{width:"5%",padding:4}},p.createElement(e,{style:{fontSize:8}},o+1)),p.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},t.pujaName)),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(t.price))),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},t.count)),t.shares.map((m,D)=>p.createElement(View,{style:{width:`${u}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(m.value)))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(t.total)))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",fontWeight:"bold",borderTop:"none"}},p.createElement(View,{style:{width:"33%",padding:4}},p.createElement(e,{style:{fontSize:8}},"Total")),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},s)),r.map((t,o)=>p.createElement(View,{style:{width:`${u}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(t)))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(i))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},p.createElement(View,{style:{width:"30%"}},r.map((t,o)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",paddingBottom:"2px"}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},l.items[0].shares[o].key)),p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},W(t,true,true))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",fontWeight:"bold",borderBottom:"1px solid black",borderTop:"1px solid black",marginTop:"2px"}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},"Total")),p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},W(i,true,true))))),p.createElement(View,{style:{width:"35%"}},l.options?.right_side_table?.map((t,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2,...l.options?.right_side_table&&o==l.options?.right_side_table?.length-1?{borderBottom:"1px solid black",borderTop:"1px solid black"}:{}}},t.map((m,D)=>p.createElement(View,{style:{width:`${100/t.length}%`}},p.createElement(e,{style:{fontSize:9,...D==1?{textAlign:"right"}:{}}},m)))))),p.createElement(View,{style:{width:"1%"}})),l.options?.footer_paragraph&&p.createElement(View,{style:{marginTop:50}},p.createElement(e,{style:{fontSize:10}},l.options.footer_paragraph))):null)))},Ei=Xr;var tn=n=>{let d=0,y=0;return n.data.items.forEach(l=>{d+=l.quantity,y+=l.total;}),p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(k,{startDate:n.startDate,endDate:n.endDate,reportName:"Advance Goods Report",templeName:n.templeName,showGeneratedAt:true}),p.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},n.data.multiplier.name," ="," ",W(n.data.multiplier.rate)),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(Text,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Text,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(Text,null,"Quantity")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,"Amount"))),n.data.items.map((l,a)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(Text,null,a+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Text,null,l.date)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(Text,null,l.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,W(l.total))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},p.createElement(Text,null,"Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(Text,null,d)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,W(y)))))))},ci=tn;var qi={kitchen:{A4:_t,A5:bi},transaction:{A4:Lt,A5:Ti},"prasad-delivery":{A4:qt,A5:Di,"110mm":si},prasad:{A4:mt,A5:xt,"110mm":ri},"puja-detailed":{A4:ut,A5:ht,"110mm":ti},"puja-summary":{A4:$t,A5:Si},"combined-report":{A4:Ut,A5:Ai,"110mm":ai},"multi-temple-payment":{A4:Qt,A5:Ci},"settlements-report":{A4:Jt,A5:ki},invoice:{A4:Yt,A5:Ni},"postal-report":{A4:yt,A5:wt,"110mm":mi},"payment-settlement-report":{A4:Gt,A5:Bi},"invoice-breakup":{A4:Zt,A5:Fi},"puja-count":{A4:Xt,A5:vi},"custom-report":{A4:yi,A5:ji,"110mm":hi},"invoice-recon":{A4:wi},"share-report":{A4:Ei},"advance-goods":{A4:ci}},Mi=class{constructor(d,y){Dt(this,"option");Dt(this,"size");this.option=d,this.size=y,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:a,src:h})=>Font.register({family:a,src:h})),Font.register({family:"Noto Sans",fontWeight:"normal",src:kt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Nt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Bt});}async print(d){let l=qi[this.option][this.size],a=p.createElement(l,{...d}),h=pdf(a).toBlob();return h.then(u=>{var s=URL.createObjectURL(u);if(window!=null){let i=window.open(s,"_blank");setTimeout(()=>{i?.print();},1e3);}}),h}async getBlob(d){let l=qi[this.option][this.size],a=p.createElement(l,{...d});return pdf(a).toBlob()}};
2
- export{Yi as A4Print,to as T2Inch,Mi as reportPrinter};
1
+ import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import p from'react';import {maxBy}from'lodash';import Ht from'qrcode';var $i=Object.defineProperty;var Oi=(n,d,y)=>d in n?$i(n,d,{enumerable:true,configurable:true,writable:true,value:y}):n[d]=y;var Dt=(n,d,y)=>Oi(n,typeof d!="symbol"?d+"":d,y);var _e=n=>{typeof n=="string"&&(n=new Date(n));let d={day:"2-digit",month:"short",year:"numeric"};return n.toLocaleDateString("en-GB",d).replace(",","")};var W=(n,d=false,y=false)=>{if(!d){if(n>=1e7)return `\u20B9${(n/1e7).toFixed(2)}Cr`;if(n>=1e5)return `\u20B9${(n/1e5).toFixed(2)}L`}return n.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:y?2:n%1===0?0:2})};var We="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",dt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Nt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Ft="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var pt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",gt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Vt={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var Bt=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Ji=({data:n,dates:d})=>{let y=_e(d[0])===_e(d[1]);return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:Bt.page},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),p.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",y?_e(d[0]):`${_e(d[0])} - ${_e(d[1])}`),p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},n?n.map((s,a)=>p.createElement(View,{wrap:false,key:a,style:Bt.pujaTile},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(a+1).toString().padStart(2,"0"))),p.createElement(View,{style:{flexGrow:1}},p.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.participantName),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.participantNakshatra)),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Puja name : "),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.pujaName)),y?null:p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Date: "),p.createElement(Text,{style:{fontWeight:"bold"}},_e(s.date)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),s.priestNote!==""&&s.priestNote!==null&&s.priestNote!==void 0?p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},p.createElement(Text,null,"Priest Note: ",s.priestNote)):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},p.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",s.amount),s.paymentStatus=="pending"?p.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},p.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},Gi=Ji;Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var me=1,ot=25*me,Wt=StyleSheet.create({page:{padding:10*me,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*me,paddingHorizontal:10*me,fontSize:ot,border:`${5*me}px solid black`,borderRadius:5*me,width:"100%",display:"flex",flexDirection:"column"}}),eo=({data:n,dates:d})=>{let y=_e(d[0])===_e(d[1]);return p.createElement(Document,null,p.createElement(Page,{dpi:200,size:[457*me],style:Wt.page},p.createElement(Image,{fixed:true,style:{height:55*me,width:274*me,marginBottom:10*me,marginHorizontal:"auto"},src:We}),p.createElement(Text,{style:{fontSize:25*me,marginBottom:5*me,marginHorizontal:"auto"}},"Puja List"),p.createElement(Text,{style:{fontSize:20*me,marginBottom:5*me,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",y?_e(d[0]):`${_e(d[0])} - ${_e(d[1])}`),p.createElement(Text,{style:{fontSize:17*me,marginBottom:20*me,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*me}},n?n.map((s,a)=>p.createElement(View,{wrap:false,key:a,style:Wt.pujaTile},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*me}},p.createElement(Text,{style:{opacity:.6,marginRight:10*me}},"#",(a+1).toString().padStart(2,"0")),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*me}},s.paymentStatus=="pending"?p.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*me,paddingHorizontal:5*me,borderRadius:5*me,marginTop:3*me}},p.createElement(Text,{style:{color:"#ffffff",fontSize:ot}},"Pending")):null,p.createElement(Text,{style:{fontWeight:"bold",fontSize:ot}},"Rs ",s.amount))),p.createElement(View,{style:{flexGrow:1}},p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*me,gap:3*me}},p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},s.participantName),p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},"-"),p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},s.participantNakshatra)),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*me}},p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},p.createElement(Text,null,"Puja name : "),p.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},s.pujaName)),y?null:p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Date: "),p.createElement(Text,{style:{fontWeight:"bold"}},_e(s.date)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*me}}),s.priestNote!==""&&s.priestNote!==null&&s.priestNote!==void 0?p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*me}},p.createElement(Text,null,"Priest Note: ",s.priestNote)):null))):null)))},to=eo;var oo={Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,SC:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,Bengali:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,JP:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,KR:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,Tamil:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,Kannada:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,Myanmar:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,Ethiopic:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,Thai:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,Greek:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,Khmer:/[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,Armenian:/[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,Hebrew:/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,Georgian:/[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,Lao:/[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,"Canadian Aboriginal":/[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,Sinhala:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,"Ol Chiki":/[\u1C50-\u1C7F]/g,Tibetan:/[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,Tifinagh:/[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,Yi:/[\uA000-\uA48C\uA490-\uA4C6]/g,Syriac:/[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,Thaana:/[\u0780-\u07B1]/g,Vai:/[\uA500-\uA62B]/g,Cherokee:/[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,"Tai Tham":/[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,"Tai Viet":/[\uAA80-\uAAC2\uAADB-\uAADF]/g,Javanese:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,Telugu:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,Gujarati:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,Malayalam:/[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,Gurmukhi:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g},ro=({style:n={},children:d})=>{let y=o=>{let t=maxBy(Object.entries(oo),([r,u])=>{let T=o.match(u);return T?T.length:0});return t?t[0]:"Latin"},s=o=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(r=>r.test(o));function a(o){return o.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let V=o=>{let t=[],r=null,u="";for(let T of o){T=a(T);let b=y(T);b!==r?(u&&t.push({text:u,script:r}),r=b,u=T):u+=T;}return u&&t.push({text:u,script:r}),t},m=[];d&&typeof d=="string"&&!Array.isArray(d)&&!s(d)&&V(d).forEach((t,r)=>{let u=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;m.push(p.createElement(Text,{key:r,style:{fontFamily:u}},t.text));});let l=[],i={fontFamily:"Noto Sans"};return Array.isArray(n)?l=[...n,i]:n&&Object.keys(n).length>0?l=[n,i]:l=[i],p.createElement(Text,{style:l},m?.length?m:d)},e=ro;var lo=({startDate:n,endDate:d,reportTiming:y,templeName:s,reportName:a,showGeneratedAt:V=true})=>p.createElement(p.Fragment,null,p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:We}),V&&p.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),d?p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",n.toDateString()," - ",d.toDateString()):p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",n.toDateString()),y&&Object.keys(Vt).includes(y)?p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Vt[y]," Report"):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},a),p.createElement(e,{style:{fontSize:12}},`${s}`)),N=lo;var po=({startDate:n,endDate:d,templeName:y,data:s,reportTiming:a})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,templeName:y,reportTiming:a,reportName:"Temple Prasad (Kitchen) Report"}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,"Quantity"))),s.map((V,m)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,m+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,V.name)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,V.quantity))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),_t=po;var uo=({startDate:n,endDate:d,templeName:y,data:s,isDayWiseGrouped:a,dayWiseTotals:V,summary:m})=>{let l=m?.totalBookingsAmount??s.reduce((t,r)=>r.status==="cancelled"?t:t+r.bookingAmount,0),i=m?.totalPostalCharges??s.reduce((t,r)=>r.status==="cancelled"?t:t+(r.postalCharges||0),0),o=m?.totalCreditedAmount??s.reduce((t,r)=>r.status==="cancelled"?t:t+r.creditedAmount,0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Payment Report",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:10}},"Total Bookings Amount: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",i.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",o.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),a&&V&&V.length>0&&p.createElement(View,{style:{marginBottom:20}},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"Day Wise Totals")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Puja Amount")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Postal Charges")),p.createElement(View,{style:{padding:6,width:"25%"}},p.createElement(e,null,"Credited Amount"))),V.map((t,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.dateDisplay)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,width:"25%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),p.createElement(View,null,a&&p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"All Bookings")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Puja Amt")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,"Delivery")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,"Credited Amt")),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"Transaction ID"))),s.map((t,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,r+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,t.date," ",t.time)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?p.createElement(View,{style:{padding:6,width:"58%"}},p.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):p.createElement(p.Fragment,null,p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,t.transactionId))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Lt=uo;var fo=({children:n,splitat:d})=>{if(!n||typeof n!="string")return null;let y="";return d=="words"&&(y=" "),p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},n.split(y).map((s,a)=>p.createElement(p.Fragment,null,p.createElement(e,{key:a},s,d=="words"?" ":"")))))},Q=fo;var wo=({startDate:n,endDate:d,templeName:y,data:s,isDayWiseGrouped:a,dayGroups:V})=>{let m=t=>{let r="";try{let u=JSON.parse(t.address);r=`${u.address}, ${u.locality}, ${u.state} - ${u.pincode}`;}catch(u){console.error("Error parsing address:",u),r=t.address;}return {...t,address:r}},l=s.map(m),i=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Post Type")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,width:"15%"}},p.createElement(e,null,"Postal Amnt"))),o=(t,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},p.createElement(Q,null,t.invoiceNumber)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,t.devoteeName),p.createElement(e,{style:{fontSize:8,marginTop:4}},t.address)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,t.postType)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.pujaName)),p.createElement(View,{style:{padding:6,width:"15%"}},p.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Prasad Delivery Address",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a&&V&&V.length>0?p.createElement(p.Fragment,null,V.map((t,r)=>{let u=t.items.map(m);return p.createElement(View,{key:t.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.dateDisplay),p.createElement(e,{style:{fontSize:10}},t.count," delivery",t.count!==1?" items":" item")),i(),u.map((T,b)=>o(T,b)))})):p.createElement(p.Fragment,null,i(),l.map((t,r)=>o(t,r)))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=wo;var Do=({startDate:n,endDate:d,templeName:y,data:s,reportTiming:a,isDayWiseGrouped:V,dayGroups:m,isEmbed:l=false})=>{s.sort((u,T)=>u.invoiceNumber.localeCompare(T.invoiceNumber));let o=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,width:"7%"}},p.createElement(e,null,"Mode"))),t=(u,T)=>p.createElement(View,{key:T,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,T+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,u.invoiceNumber)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},p.createElement(e,null,u.devoteeName)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},p.createElement(e,null,u.pujaName," - ",u.prasadName)),p.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,u.quantity)),p.createElement(View,{style:{padding:6,width:"7%"}},p.createElement(e,null,u.collectionMode))),r=p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Prasad Report",templeName:y,reportTiming:a}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},V&&m&&m.length>0?p.createElement(p.Fragment,null,m.map((u,T)=>p.createElement(View,{key:u.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},u.dateDisplay),p.createElement(e,{style:{fontSize:10}},u.count," item",u.count!==1?"s":"")),o(),u.items.map((b,B)=>t(b,B))))):p.createElement(p.Fragment,null,o(),s.map((u,T)=>t(u,T)))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return l?r:p.createElement(Document,null,r)},mt=Do;var So=({startDate:n,endDate:d,templeName:y,pujas:s,reportTiming:a,isDayWiseGrouped:V,isEmbed:m=false})=>{let l=0,i=0,o=s.some(r=>r.bookings.some(u=>u.requires_coupon));if(!s||s.length===0){let r=p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Puja List",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return m?r:p.createElement(Document,null,r)}let t=p.createElement(p.Fragment,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:8}},"C = Collec | D = Distribute | P = Postal")),s.some(r=>r.bookings.some(u=>u.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),s.some(r=>r.bookings.some(u=>u.is_early_reminder&&!u.requires_coupon))?s.flatMap((r,u)=>r.bookings.filter(T=>T.is_early_reminder&&!T.requires_coupon).map((T,b)=>(i++,p.createElement(View,{key:`${u}-${b}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,T.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,T.collectionMode||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,T.date?new Date(T.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),p.createElement(e,{style:{fontSize:12}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},s.map((r,u)=>{if(r.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;l=0;let T=r.bookings.some(z=>z.topping_name),b=V&&r.dayGroups&&r.dayGroups.length>0,B=(z=false)=>T?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"29%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode"))),v=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:T?p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,U)),p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},p.createElement(e,null,z.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"29%"}},p.createElement(e,null,z.topping_name||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},p.createElement(e,null,z.quantity))):p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,U)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,z.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,z.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,z.collectionMode||""))),z.priestNote&&p.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,z.priestNote))));return p.createElement(View,{key:u,style:{marginBottom:25}},p.createElement(View,{wrap:false,minPresenceAhead:20},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.totalBookings||r.bookings.length}`),!b&&B(true)),b?p.createElement(p.Fragment,null,r.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return we.length===0?null:p.createElement(View,{key:z.dateKey,style:{marginTop:X>0?15:0}},p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:6}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},z.dateDisplay),p.createElement(e,{style:{fontSize:9}},`${we.length} booking${we.length!==1?"s":""}`)),B(false),we.map((Fe,Tt)=>(U++,v(Fe,Tt,U))))})):p.createElement(p.Fragment,null,(()=>{if(T){let z=r.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Fe=X.get(we);Fe.quantity=(parseInt(Fe.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>(l++,v(U,we,l)))}else return r.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(l++,v(z,X,l)))})()))}))),o?p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let r=s.flatMap(T=>T.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:T.name}))),u={};for(let T of r)u[T.invoiceNumber]||(u[T.invoiceNumber]=[]),u[T.invoiceNumber].push(T);return Object.entries(u).map(([T,b],B)=>{let v=b,z=v[0],X=v.length<=5;return p.createElement(View,{key:T,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!X},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},p.createElement(e,{style:{fontWeight:"semibold"}},T),p.createElement(e,null,z.date?new Date(z.date).toDateString():n.toDateString())),p.createElement(e,null,z.phone_number)),p.createElement(View,{style:{height:15,width:"100%"}}),v.map((U,we)=>p.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:25}},p.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return m?t:p.createElement(Document,null,t)},ut=So;var zo=({templeName:n,startDate:d,endDate:y,pujas:s,reportTiming:a})=>{let V=s.sort((m,l)=>{let i=m.nakshatras.length;return l.nakshatras.length-i});return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:d,endDate:y,reportTiming:a,reportName:"Puja Summary",templeName:n}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},V.map((m,l)=>p.createElement(p.Fragment,null,p.createElement(View,{style:{marginBottom:25}},p.createElement(View,null,p.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${m.name} - ${m.totalCount}`)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},p.createElement(e,null,"Quantity"))),m.nakshatras.map((i,o)=>p.createElement(p.Fragment,null,p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,o+1)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},p.createElement(e,null,i.count))))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},$t=zo;var ko=({startDate:n,endDate:d,templeName:y,data:s,isEmbed:a=false})=>{let V=p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Prasad Delivery Postal Report",templeName:y}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:15,marginTop:10,fontSize:9}},p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),s&&s.length>0?p.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let m=s.filter(t=>!t.deliveryMode||t.deliveryMode==="normal-post"),l=s.filter(t=>t.deliveryMode==="international-post"),i=s.filter(t=>t.deliveryMode==="speedpost"),o=t=>p.createElement(p.Fragment,null,t.map((r,u)=>{let T=r.qrContent,b=Ht.toDataURL(T);if(u%2===0){let B=t[u+1];return p.createElement(View,{key:`row-${u}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:20,marginBottom:20}},p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},p.createElement(View,{style:{width:240}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},r.name),p.createElement(View,{style:{fontSize:10}},p.createElement(e,{style:{fontSize:10}},r.address)),p.createElement(e,{style:{fontSize:10}},r.phone)),p.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP"),r.qrContent&&b?p.createElement(Image,{src:b,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,p.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",r.pujaDetails)),B&&(()=>{let v=Ht.toDataURL(B.qrContent);return p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},p.createElement(View,{style:{width:240}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},B.name),p.createElement(View,{style:{fontSize:10}},p.createElement(e,{style:{fontSize:10}},B.address)),p.createElement(e,{style:{fontSize:10}},B.phone)),p.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},B.deliveryMode==="speedpost"?"SP":B.deliveryMode==="international-post"?"IP":"NP"),B.qrContent&&v?p.createElement(Image,{src:v,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,p.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",B.pujaDetails))})())}return null}));return p.createElement(p.Fragment,null,m.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",m.length),o(m)),l.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"International Post (IP) - ",l.length),o(l)),i.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",i.length),o(i)))})()):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return a?V:p.createElement(Document,null,V)},yt=ko;var Fo=({startDate:n,endDate:d,templeName:y,pujaData:s,prasadData:a,deliveryData:V,reportTiming:m})=>{V=V.map(t=>{let r="";try{let u=JSON.parse(t.address);r=`${u.address}, ${u.locality}, ${u.state} - ${u.pincode}`;}catch(u){console.error("Error parsing address:",u),r=t.address;}return {...t,address:r}});s.some(t=>t.bookings.some(r=>r.requires_coupon));return s.length==0&&a.length==0&&V.length==0?p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportTiming:m,reportName:"Combined Report",templeName:y}),p.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):p.createElement(p.Fragment,null,p.createElement(Document,null,s.length>0&&ut({startDate:n,endDate:d,templeName:y,pujas:s,isEmbed:true}),a.length>0&&mt({startDate:n,endDate:d,templeName:y,data:a,isEmbed:true}),V.length>0&&yt({startDate:n,endDate:d,templeName:y,data:V,isEmbed:true})))},Ut=Fo;var Wo=({startDate:n,endDate:d,data:y})=>p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Temple Payment Report",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"S.No.")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,"Temple Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Bookings")),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"Revenue"))),y?.map((s,a)=>p.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,a+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,s.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,s.bookings)),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"\u20B9",s.revenue))))))),Qt=Wo;var co=({startDate:n,endDate:d,templeName:y,data:s})=>{let a=p.useMemo(()=>{let l=[],i=new Map;return s.settlements.forEach(o=>{let t=o.date;i.has(t)||i.set(t,{dateKey:t,dateDisplay:t,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let r=i.get(t);r.items.push(o),r.count++;let u=r.items.reduce((T,b)=>T+b.settlement_amount,0);r.dayTotal=String(u),r.dayTotalVerbose=r.items.map(T=>T.settlement_amount).join(" + ")+" = "+W(u);}),i.forEach(o=>l.push(o)),l},[s.settlements]),V=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"Gateway Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"UTR")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},p.createElement(e,null,"Invoices")),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"Settlement Amt"))),m=(l,i)=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,i+1,". ",l.paymentGateway),p.createElement(e,{style:{fontSize:8,color:"#666",marginTop:2}},l.settlement_id)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},p.createElement(e,null,l.utr.split("").map((o,t)=>p.createElement(e,{key:t},o)))),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%",fontSize:9}},p.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((o,t)=>p.createElement(e,{key:t},o.number," (",W(o.amount),")")))),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,W(l.settlement_amount))));return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Settlements Report",templeName:y}),p.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",s.totalCreditedAmount),s.settlements.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a.map(l=>p.createElement(View,{key:l.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.dateDisplay),p.createElement(e,{style:{fontSize:10}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotalVerbose)),V(),l.items.map((i,o)=>m(i,o))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Jt=co;var qo=({data:n})=>p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},p.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),p.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},n.templeName),p.createElement(e,{style:{fontSize:10}},n.templeAddress),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},p.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),p.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:pt}))),n.qrContent?p.createElement(View,{style:{width:85}},p.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},n.status==="confirmed"?p.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:gt}):null,p.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),p.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),p.createElement(View,{style:{marginTop:10}},p.createElement(e,{style:{fontSize:11}},"Bill to:"),p.createElement(e,{style:{fontSize:11}},n.devoteeDetails.name),n.devoteeDetails.phone?p.createElement(e,{style:{fontSize:11}},n.devoteeDetails.phone):null,p.createElement(e,{style:{fontSize:11}},n.bookingDate)),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},p.createElement(e,null,"Item Description")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Price")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Quantity")),p.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},p.createElement(e,null,"Total"))),n.items.map((d,y)=>p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},d.pujaName?p.createElement(e,{style:{fontSize:11}},d.pujaName):null,d.devoteesName?p.createElement(e,{style:{fontSize:9,color:"#333333"}},d.devoteesName):null,d.pujaDate?p.createElement(e,{style:{fontSize:9,color:"#333333"}},d.pujaDate," ",d.timing?`- ${d.timing}`:null):null,d.repeatEndDate&&d.repeatStartDate?p.createElement(e,{style:{fontSize:9,color:"#333333"}},d.repeatStartDate," to ",d.repeatEndDate," ",d.timing?`- ${d.timing}`:null):null,d.refNo?p.createElement(e,{style:{fontSize:9,color:"#333333"}},"Reference No: ",d.refNo):null),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.basePujPrice)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},`${d.quantity?d.quantity:""}${d.repeatCount?` x ${d.repeatCount}`:""}`)),p.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.totalPrice))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},p.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),p.createElement(e,null,n.paymentMethod)),p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"50%",textAlign:"right"}},p.createElement(e,null,"Subtotal: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.subTotal))),n.postalCharges?p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Postal Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.postalCharges))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Payment Gateway Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.paymentGatewayCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Platform Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.platformCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"GST (18%): ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.gst))),p.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Total: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?p.createElement(View,{style:{marginBottom:5}},p.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},p.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.afternoon.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.evening.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",d.name," (",d.timings,")"))):null):null,n.instructions.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},p.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},p.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),p.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},n.instructions.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,") ",d.instruction)))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),p.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),Gt=qo;var Oo=({startDate:n,endDate:d,templeName:y,data:s})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Payment Settlement Report",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Amount")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Payment Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},p.createElement(e,null,"Bank UTR No"))),s.map((a,V)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,V+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.invoiceNo)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.amount)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.paymentDate)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},p.createElement(Q,null,a.bankUtrNo))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Yt=Oo;var Uo=({startDate:n,endDate:d,templeName:y,data:s})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Invoice Level Breakup",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Base Amount")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees GST")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway Charges")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway GST")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Payment Mode")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Booking Date")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},p.createElement(e,null,"UTR Number"))),s.map((a,V)=>p.createElement(View,{key:V,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,V+1)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.invoiceNumber)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.baseAmount)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFees)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFeesGST)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayCharges)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayChargesGST)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.paymentMode)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},p.createElement(Q,null,a.bookingDate)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:3,width:"12%"}},p.createElement(Q,null,a.utrNumber))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Zt=Uo;var Go=({startDate:n,endDate:d,templeName:y,data:s,dayGroups:a,summary:V})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Puja Count Summary Report",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a&&a.length>1?p.createElement(View,{style:{marginBottom:25}},p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,null,"Total Amount"))),(()=>{let m=new Map;return a.forEach(l=>{l.items.forEach(i=>{let o=m.get(i.name)||{quantity:0,amount:0};m.set(i.name,{quantity:o.quantity+i.quantity,amount:o.amount+(i.amount||0)});});}),Array.from(m.entries()).map(([l,i],o)=>p.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,o+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,l)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,null,W(i.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},(()=>{let m=new Map;return a.forEach(l=>{l.items.forEach(i=>{let o=m.get(i.name)||{quantity:0,amount:0};m.set(i.name,{quantity:o.quantity+i.quantity,amount:o.amount+(i.amount||0)});});}),Array.from(m.values()).reduce((l,i)=>l+i.quantity,0)})())),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let m=new Map;return a.forEach(l=>{l.items.forEach(i=>{let o=m.get(i.name)||{quantity:0,amount:0};m.set(i.name,{quantity:o.quantity+i.quantity,amount:o.amount+(i.amount||0)});});}),Array.from(m.values()).reduce((l,i)=>l+i.amount,0)})())))),a.some(m=>m.dayPostalTempleFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,(()=>{let m=a.filter(i=>i.postalChargesBreakup).map(i=>i.postalChargesBreakup);if(m.length===0)return "";let l=[0,0,0];return m.forEach(i=>{i&&(l[0]+=i[0],l[1]+=i[1],l[2]+=i[2]);}),`${l.join("+")}`})())),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((m,l)=>m+(l.dayPostalTempleFees||0),0))))),a.some(m=>m.dayPostalCarrierFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((m,l)=>m+(l.dayPostalCarrierFees||0),0))))),(()=>{let m=new Map;return a.forEach(l=>{l.otherChargesBreakup?.forEach(i=>{let o=m.get(i.name)||{count:0,amount:0};m.set(i.name,{count:o.count+(i.count||0),amount:o.amount+i.amount});});}),m.size===0?null:Array.from(m.entries()).map(([l,i])=>p.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},l)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.count>0?i.count:"")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(i.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}})),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let m=new Map;a.forEach(t=>{t.items.forEach(r=>{let u=m.get(r.name)||{quantity:0,amount:0};m.set(r.name,{quantity:u.quantity+r.quantity,amount:u.amount+(r.amount||0)});});});let l=Array.from(m.values()).reduce((t,r)=>t+r.amount,0),i=a.reduce((t,r)=>t+((r.dayPostalCarrierFees||0)+(r.dayPostalTempleFees||0)),0),o=a.reduce((t,r)=>{let u=r.otherChargesBreakup?.reduce((T,b)=>T+b.amount,0)||0;return t+u},0);return l+i+o})()))))):null,a&&a.length>1&&p.createElement(View,{break:true,style:{marginBottom:25}},p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,"Puja Amount"))),a.map((m,l)=>p.createElement(View,{key:m.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,l+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,m.dateDisplay)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,m.items.reduce((i,o)=>i+o.quantity,0))),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,null,W(m.dayPujaTotal))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},a.reduce((m,l)=>m+l.items.reduce((i,o)=>i+o.quantity,0),0))),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((m,l)=>m+l.dayPujaTotal,0)))))),a&&a.length>0&&p.createElement(View,{break:true},p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),a.map((m,l)=>p.createElement(View,{key:m.dateKey,style:{marginBottom:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},m.dateDisplay)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Count")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,"Amount"))),m.items.map((i,o)=>p.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,o+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(i.amount||0))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,m.items.reduce((i,o)=>i+o.quantity,0))),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(m.dayPujaTotal)))),m.dayPostalTempleFees||m.dayPostalCarrierFees?p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Charge")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,m.postalChargesBreakup?`${m.postalChargesBreakup.map(i=>i||0).join("+")}`:"")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(m.dayPostalTempleFees)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Service")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(m.dayPostalCarrierFees))))):null,m.otherChargesBreakup?.length?p.createElement(p.Fragment,null,m.otherChargesBreakup.map((i,o)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,i.count?i.count:"")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(i.amount)))))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Grand Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,W(m.dayGrandTotal)))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Xt=Go;var Yo=({startDate:n,templeName:d,pujas:y,reportTiming:s})=>{return !y||y.length===0?p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),s&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," Report")),y.map((V,m)=>{let l=V.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return l.length===0?null:p.createElement(View,{key:m,style:{marginBottom:20},wrap:false},p.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},V.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," booking",l.length>1?"s":"")),l.map((i,o)=>(p.createElement(View,{key:o,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:i.topping_name?6:0}},p.createElement(e,{style:{fontSize:12}},i.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",i.quantity)),i.topping_name&&p.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},p.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",i.topping_name)),i.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.priestNote))))))})))},ti=Yo;var Zo=({startDate:n,templeName:d,data:y,reportTiming:s,isDayWiseGrouped:a,dayGroups:V})=>{if(!y||y.length===0)return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let m=y.sort((i,o)=>i.invoiceNumber.localeCompare(o.invoiceNumber)),l=(i,o)=>p.createElement(View,{key:o,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},p.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},p.createElement(e,{style:{fontSize:12}},i.prasadName),p.createElement(e,{style:{fontSize:12}}," (qty: ",i.quantity,")")),p.createElement(e,{style:{fontSize:12,color:"#666"}},i.collectionMode)));return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),s&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," Report")),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},m.length," item",m.length>1?"s":"")),a&&V&&V.length>0?p.createElement(p.Fragment,null,V.map((i,o)=>p.createElement(View,{key:i.dateKey,style:{marginBottom:12}},p.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},i.dateDisplay),p.createElement(e,{style:{fontSize:11}},i.count," item",i.count!==1?"s":""))),i.items.map((t,r)=>l(t,r))))):p.createElement(p.Fragment,null,m.map((i,o)=>l(i,o)))))},ri=Zo;var Xo=({startDate:n,templeName:d,data:y,isDayWiseGrouped:s,dayGroups:a})=>{let V=i=>{let o="";try{let t=JSON.parse(i.address);o=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{o=i.address;}return {...i,address:o}},m=y.map(V);if(!m||m.length===0)return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let l=(i,o)=>p.createElement(View,{key:o,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11}},i.address)),i.phoneNumber&&p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:12}},"Ph: ",i.phoneNumber)),p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",i.note||i.pujaName)));return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},m.length," delivery",m.length>1?" items":" item")),s&&a&&a.length>0?p.createElement(p.Fragment,null,a.map((i,o)=>{let t=i.items.map(V);return p.createElement(View,{key:i.dateKey,style:{marginBottom:12}},p.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},i.dateDisplay),p.createElement(e,{style:{fontSize:11}},i.count," item",i.count!==1?"s":""))),t.map((r,u)=>l(r,u)))})):p.createElement(p.Fragment,null,m.map((i,o)=>l(i,o)))))},si=Xo;var Ro=({startDate:n,templeName:d,pujaData:y,prasadData:s,deliveryData:a,reportTiming:V})=>{if(y.length===0&&s.length===0&&a.length===0)return p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let l=s.sort((i,o)=>i.invoiceNumber.localeCompare(o.invoiceNumber));return p.createElement(Document,null,y.length>0&&p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),V&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.charAt(0).toUpperCase()+V.slice(1)," Report")),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),y.map((i,o)=>{let t=i.bookings.filter(r=>!r.is_early_reminder&&!r.requires_coupon);return t.length===0?null:p.createElement(View,{key:o,style:{marginBottom:20},wrap:false},p.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},i.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((r,u)=>(p.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},r.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},r.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12}},r.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",r.quantity)),r.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},r.priestNote))))))})),s.length>0&&p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),V&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.charAt(0).toUpperCase()+V.slice(1)," Report")),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," item",l.length>1?"s":"")),l.map((i,o)=>p.createElement(View,{key:o,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},p.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},p.createElement(e,{style:{fontSize:12}},i.prasadName),p.createElement(e,{style:{fontSize:12}}," (qty: ",i.quantity,")")),p.createElement(e,{style:{fontSize:12,color:"#666"}},i.collectionMode))))),a.length>0&&p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," delivery",a.length>1?" items":" item")),a.map((i,o)=>p.createElement(View,{key:o,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.name),p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11}},i.address)),i.phone&&p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:12}},"Ph: ",i.phone)),p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",i.pujaDetails))))))},ai=Ro;var er=({startDate:n,templeName:d,data:y})=>!y||y.length===0?p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},y.length," label",y.length>1?"s":"")),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"center",gap:10,marginBottom:12,fontSize:9}},p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"NP"),"-Normal"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"SP"),"-Speed"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"IP"),"-International")),y.map(s=>p.createElement(View,{key:s.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:5}},p.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},s.name),p.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},s.deliveryMode==="speedpost"?"SP":s.deliveryMode==="international-post"?"IP":"NP")),p.createElement(View,{style:{marginBottom:5}},p.createElement(e,{style:{fontSize:11}},s.address)),p.createElement(e,{style:{fontSize:11,marginBottom:5}},s.phone),p.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),p.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",s.pujaDetails))))),mi=er;var ir=({startDate:n,endDate:d,templeName:y,pujas:s,reportTiming:a,selectedPujaNames:V=[]})=>{let m=0,l=0,i=s.some(o=>o.bookings.some(t=>t.requires_coupon));return !s||s.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Custom Puja Report",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),s.some(o=>o.bookings.some(t=>t.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),s.some(o=>o.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?s.flatMap((o,t)=>o.bookings.filter(r=>r.is_early_reminder&&!r.requires_coupon).map((r,u)=>(l++,p.createElement(View,{key:`${t}-${u}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,l)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,o.name)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,r.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,r.collectionMode||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,r.date?new Date(r.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),p.createElement(e,{style:{fontSize:12}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},s.map((o,t)=>{if(o.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;m=0;let r=o.bookings.some(b=>b.topping_name),u=(b=false)=>r?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"29%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode"))),T=(b,B,v)=>b.is_early_reminder||b.requires_coupon?null:r?p.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,v)),p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},p.createElement(e,null,b.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},p.createElement(e,null,b.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},p.createElement(e,null,b.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"29%"}},p.createElement(e,null,b.topping_name||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},p.createElement(e,null,b.quantity))):p.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,v)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,b.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,b.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,b.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,b.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,b.collectionMode||""))),b.priestNote&&p.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,b.priestNote))));return p.createElement(View,{key:t,style:{marginBottom:25}},p.createElement(View,{wrap:false,minPresenceAhead:20},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.bookings.length}`),u(true)),p.createElement(p.Fragment,null,(()=>{if(r){let b=o.bookings.filter(v=>!v.is_early_reminder&&!v.requires_coupon),B=new Map;return b.forEach(v=>{let z=`${v.invoiceNumber}|${v.devoteeName}|${v.nakshatra}|${v.topping_name||""}`;if(B.has(z)){let X=B.get(z);X.quantity=(parseInt(X.quantity)+parseInt(v.quantity)).toString();}else B.set(z,{...v});}),Array.from(B.values()).map((v,z)=>(m++,T(v,z,m)))}else return o.bookings.map((b,B)=>b.is_early_reminder||b.requires_coupon?null:(m++,T(b,B,m)))})()))}))),i?p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let o=s.flatMap(r=>r.bookings.filter(u=>u.requires_coupon).map(u=>({...u,pujaName:r.name}))),t={};for(let r of o)t[r.invoiceNumber]||(t[r.invoiceNumber]=[]),t[r.invoiceNumber].push(r);return Object.entries(t).map(([r,u],T)=>{let b=u,B=b[0];return p.createElement(View,{key:r,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},p.createElement(e,{style:{fontWeight:"semibold"}},r),p.createElement(e,null,B.date?new Date(B.date).toDateString():n.toDateString())),p.createElement(e,null,B.phone_number)),p.createElement(View,{style:{height:15,width:"100%"}}),b.map((v,z)=>p.createElement(View,{key:z,style:{display:"flex",flexDirection:"row",marginTop:25}},p.createElement(e,null,`${v.devoteeName} ----- ${v.nakshatra} ----- ${v.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},yi=ir;var or=({startDate:n,templeName:d,pujas:y,reportTiming:s,selectedPujaNames:a=[]})=>{return !y||y.length===0?p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):p.createElement(Document,null,p.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},p.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},p.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},d),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),s&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," ","Report")),a.length>0&&p.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),p.createElement(e,{style:{fontSize:9,marginTop:2}},a.join(", "))),y.map((m,l)=>{let i=m.bookings.filter(o=>!o.is_early_reminder&&!o.requires_coupon);return i.length===0?null:p.createElement(View,{key:l,style:{marginBottom:20},wrap:false},p.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},m.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},i.length," booking",i.length>1?"s":"")),i.map((o,t)=>(p.createElement(View,{key:t,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12}},o.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",o.quantity)),o.collectionMode&&p.createElement(View,{style:{marginTop:4}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",o.collectionMode)),o.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},o.priestNote))))))}),p.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},p.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},hi=or;var sr=n=>{let d=0,y=0,s=0,a=0,V=0,m=0;for(let i of n.items)d+=i.platformFees,y+=i.platformFeesGST,a+=i.invoiceTotal,i.exclude&&(V+=i.platformFees,m+=i.platformFeesGST);s=y+d;let l=m+V;return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),p.createElement(View,{style:{flexDirection:"row",width:"100%"}},p.createElement(View,{style:{width:"50%"}},p.createElement(Text,null,"INVOICE RECON"),p.createElement(Text,{style:{fontSize:12,marginTop:6}},n.templeName," "),p.createElement(Text,{style:{fontSize:12}},"Bookings from ",n.startDate.toDateString()," to"," ",n.endDate.toDateString()," ")),p.createElement(View,{style:{width:"50%",alignItems:"flex-end"}},p.createElement(Text,{style:{fontSize:12,fontWeight:"semibold"}},"Infinix AI Pvt Ltd"," "),p.createElement(Text,{style:{fontSize:12}},"GSTIN: 32AAICI0436P1ZG"," "))),p.createElement(Text,{style:{fontSize:10,backgroundColor:"#fffca6",textDecoration:"line-through",marginTop:10}},"Bookings crossed out / marked with yellow are not to be counted"),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},p.createElement(Text,null,"Sr no")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},p.createElement(Text,null,"Invoice Number")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%",fontSize:7}},p.createElement(Text,null,"Booking Date")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,"Inv Total")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,"PF Total")),p.createElement(View,{style:{padding:3,width:"12%",borderRight:"1px solid #000"}},p.createElement(Text,null,"Pay Method")),p.createElement(View,{style:{padding:3,width:"17%",borderRight:"1px solid #000"}},p.createElement(Text,null,"Transaction ID")),p.createElement(View,{style:{padding:3,width:"16%"}},p.createElement(Text,null,"Settlement ID")))),n.items.map((i,o)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:i.exclude?"#fffca6":"transparent"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},p.createElement(Text,null,o+1)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},p.createElement(Text,{style:{textDecoration:i.exclude?"line-through":"none"}},i.invoiceNumber)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}},p.createElement(Text,null,i.bookingDate)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(i.invoiceTotal))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(i.platformFees)," +"," ",W(i.platformFeesGST))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,i.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),p.createElement(View,{style:{padding:3,width:"17%",fontSize:6,borderRight:"1px solid #000"}},p.createElement(Text,null,i.transactionID)),p.createElement(View,{style:{padding:3,width:"16%",fontSize:6}},p.createElement(Text,null,i.settlementID)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},p.createElement(Text,null,"Total")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}}),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(a))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,W(s))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"17%"}}),p.createElement(View,{style:{padding:3,width:"16%"}})),p.createElement(View,{style:{marginTop:20,width:"50%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:4}},p.createElement(Text,{style:{fontSize:10,width:"60%"}},"Total Platform Fees (Subtotal)"),p.createElement(Text,{style:{fontSize:10,width:"40%"}},W(s))),p.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:4}},p.createElement(Text,{style:{fontSize:10,width:"60%"}},"Deductions (Excluded)"),p.createElement(Text,{style:{fontSize:10,width:"40%"}},"- ",W(l))),p.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:6,borderTop:"1px solid #000",borderBottom:"1px solid #000"}},p.createElement(Text,{style:{fontSize:10,width:"60%",fontWeight:"semibold"}},"Total Payable"),p.createElement(Text,{style:{fontSize:10,width:"40%",fontWeight:"semibold"}},W(s-l))))))},wi=sr;var pr=({startDate:n,endDate:d,templeName:y,data:s,reportTiming:a})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,templeName:y,reportTiming:a,reportName:"Temple Prasad (Kitchen) Report"}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,"Quantity"))),s.map((V,m)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,m+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,V.name)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,V.quantity))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),bi=pr;var ur=({startDate:n,endDate:d,templeName:y,data:s,isDayWiseGrouped:a,dayWiseTotals:V,summary:m})=>{let l=m?.totalBookingsAmount??s.reduce((t,r)=>r.status==="cancelled"?t:t+r.bookingAmount,0),i=m?.totalPostalCharges??s.reduce((t,r)=>r.status==="cancelled"?t:t+(r.postalCharges||0),0),o=m?.totalCreditedAmount??s.reduce((t,r)=>r.status==="cancelled"?t:t+r.creditedAmount,0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Payment Report",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:9}},"Total Bookings Amount: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",i.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",o.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),a&&V&&V.length>0&&p.createElement(View,{style:{marginBottom:15}},p.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Day Wise Totals")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Puja Amount")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Postal Charges")),p.createElement(View,{style:{padding:4,width:"25%"}},p.createElement(e,null,"Credited Amount"))),V.map((t,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.dateDisplay)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,width:"25%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),p.createElement(View,null,a&&p.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"All Bookings")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Puja Amt")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,"Delivery")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,"Credited Amt")),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"Transaction ID"))),s.map((t,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},p.createElement(e,null,r+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},p.createElement(e,null,t.date," ",t.time)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},p.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?p.createElement(View,{style:{padding:4,width:"58%"}},p.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):p.createElement(p.Fragment,null,p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},p.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},p.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,t.transactionId))))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Ti=ur;var xr=({startDate:n,endDate:d,templeName:y,data:s,isDayWiseGrouped:a,dayGroups:V})=>{let m=t=>{let r="";try{let u=JSON.parse(t.address);r=`${u.address}, ${u.locality}, ${u.state} - ${u.pincode}`;}catch(u){console.error("Error parsing address:",u),r=t.address;}return {...t,address:r}},l=s.map(m),i=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Post Type")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,width:"15%"}},p.createElement(e,null,"Postal Amnt"))),o=(t,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%",fontSize:6}},p.createElement(Q,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},p.createElement(Q,null,t.invoiceNumber)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},p.createElement(e,null,t.devoteeName),p.createElement(e,{style:{fontSize:7,marginTop:3}},t.address)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,t.postType)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.pujaName)),p.createElement(View,{style:{padding:4,width:"15%"}},p.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Prasad Delivery Address",templeName:y}),l.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a&&V&&V.length>0?p.createElement(p.Fragment,null,V.map((t,r)=>{let u=t.items.map(m);return p.createElement(View,{key:t.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),p.createElement(e,{style:{fontSize:9}},t.count," delivery",t.count!==1?" items":" item")),i(),u.map((T,b)=>o(T,b)))})):p.createElement(p.Fragment,null,i(),l.map((t,r)=>o(t,r)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Di=xr;var br=({startDate:n,endDate:d,templeName:y,data:s,reportTiming:a,isDayWiseGrouped:V,dayGroups:m,isEmbed:l=false})=>{s.sort((u,T)=>u.invoiceNumber.localeCompare(T.invoiceNumber));let o=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,"Prasad Name")),p.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:4,width:"7%"}},p.createElement(e,null,"Mode"))),t=(u,T)=>p.createElement(View,{key:T,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,T+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,u.invoiceNumber)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},p.createElement(e,null,u.devoteeName)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},p.createElement(e,null,u.pujaName," - ",u.prasadName)),p.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,u.quantity)),p.createElement(View,{style:{padding:4,width:"7%"}},p.createElement(e,null,u.collectionMode))),r=p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Prasad Report",templeName:y,reportTiming:a}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},V&&m&&m.length>0?p.createElement(p.Fragment,null,m.map((u,T)=>p.createElement(View,{key:u.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},u.dateDisplay),p.createElement(e,{style:{fontSize:9}},u.count," item",u.count!==1?"s":"")),o(),u.items.map((b,B)=>t(b,B))))):p.createElement(p.Fragment,null,o(),s.map((u,T)=>t(u,T)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return l?r:p.createElement(Document,null,r)},xt=br;var Dr=({startDate:n,endDate:d,templeName:y,pujas:s,reportTiming:a,isDayWiseGrouped:V,isEmbed:m=false})=>{let l=0,i=0,o=s.some(r=>r.bookings.some(u=>u.requires_coupon));if(!s||s.length===0){let r=p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Puja List",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"));return m?r:p.createElement(Document,null,r)}let t=p.createElement(p.Fragment,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.some(r=>r.bookings.some(u=>u.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:4}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),s.some(r=>r.bookings.some(u=>u.is_early_reminder&&!u.requires_coupon))?s.flatMap((r,u)=>r.bookings.filter(T=>T.is_early_reminder&&!T.requires_coupon).map((T,b)=>(i++,p.createElement(View,{key:`${u}-${b}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,T.quantity)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,T.collectionMode||"")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},p.createElement(e,null,T.date?new Date(T.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Puja List"),p.createElement(e,{style:{fontSize:10}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},s.map((r,u)=>{if(r.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;l=0;let T=r.bookings.some(z=>z.topping_name),b=V&&r.dayGroups&&r.dayGroups.length>0,B=(z=false)=>T?p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"34%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice"))):p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"36%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"17%"}},p.createElement(e,null,"Invoice No"))),v=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:T?p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,U)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"24%"}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"34%"}},p.createElement(e,null,z.topping_name||"")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,z.quantity)),p.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},p.createElement(e,null,z.invoiceNumber))):p.createElement(View,{key:X,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,U)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${36*1.11111}%`}},p.createElement(e,null,z.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,z.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,z.quantity)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},p.createElement(e,null,z.collectionMode||"")),p.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:`${17*1.11111}%`}},p.createElement(e,null,z.invoiceNumber))),z.priestNote&&p.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,z.priestNote))));return p.createElement(View,{key:u,style:{marginBottom:10}},p.createElement(View,{wrap:false,minPresenceAhead:15},p.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.totalBookings||r.bookings.length}`),!b&&B(true)),b?p.createElement(p.Fragment,null,r.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return we.length===0?null:p.createElement(View,{key:z.dateKey,style:{marginTop:X>0?12:0}},p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:2}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},z.dateDisplay),p.createElement(e,{style:{fontSize:8}},`${we.length} booking${we.length!==1?"s":""}`)),B(false),we.map((Fe,Tt)=>(U++,v(Fe,Tt,U))))})):p.createElement(p.Fragment,null,(()=>{if(T){let z=r.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Fe=X.get(we);Fe.quantity=(parseInt(Fe.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>{l=l||1;let Fe=l;return l+=Number(U.quantity)||1,v(U,we,Fe)})}else return r.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(l++,v(z,X,l)))})()))}))),o?p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let r=s.flatMap(T=>T.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:T.name}))),u={};for(let T of r)u[T.invoiceNumber]||(u[T.invoiceNumber]=[]),u[T.invoiceNumber].push(T);return Object.entries(u).map(([T,b],B)=>{let v=b,z=v[0],X=v.length<=5;return p.createElement(View,{key:T,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:!X},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},p.createElement(e,{style:{fontWeight:"semibold"}},T),p.createElement(e,null,z.date?new Date(z.date).toDateString():n.toDateString())),p.createElement(e,null,z.phone_number)),p.createElement(View,{style:{height:10,width:"100%"}}),v.map((U,we)=>p.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:18}},p.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return m?t:p.createElement(Document,null,t)},ht=Dr;var Pr=({templeName:n,startDate:d,endDate:y,pujas:s,reportTiming:a})=>{let V=s.sort((m,l)=>{let i=m.nakshatras.length;return l.nakshatras.length-i});return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:d,endDate:y,reportTiming:a,reportName:"Puja Summary",templeName:n}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},V.map((m,l)=>p.createElement(p.Fragment,null,p.createElement(View,{style:{marginBottom:20}},p.createElement(View,null,p.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${m.name} - ${m.totalCount}`)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:4,fontSize:9,width:"20%",fontWeight:"semibold"}},p.createElement(e,null,"Quantity"))),m.nakshatras.map((i,o)=>p.createElement(p.Fragment,null,p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,o+1)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},p.createElement(e,null,i.name)),p.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},p.createElement(e,null,i.count))))))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Si=Pr;var Ar=({startDate:n,endDate:d,templeName:y,data:s,isEmbed:a=false})=>{let V=p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Prasad Delivery Postal Report",templeName:y}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,marginTop:8,fontSize:7}},p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),p.createElement(e,null,p.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),s&&s.length>0?p.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let m=s.filter(t=>!t.deliveryMode||t.deliveryMode==="normal-post"),l=s.filter(t=>t.deliveryMode==="international-post"),i=s.filter(t=>t.deliveryMode==="speedpost"),o=t=>p.createElement(p.Fragment,null,t.map((r,u)=>{let T=r.qrContent,b=Ht.toDataURL(T);if(u%2===0){let B=t[u+1];return p.createElement(View,{key:`row-${u}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:15,marginBottom:15}},p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},r.name),p.createElement(View,{style:{fontSize:8}},p.createElement(Q,{splitat:"words"},r.address)),p.createElement(e,{style:{fontSize:8}},r.phone)),r.qrContent&&b?p.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP"),p.createElement(Image,{src:b,style:{width:40,height:40,minWidth:40,maxWidth:40}}),p.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",r.pujaDetails)),B&&(()=>{let v=Ht.toDataURL(B.qrContent);return p.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},p.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},B.name),p.createElement(View,{style:{fontSize:8}},p.createElement(Q,{splitat:"words"},B.address)),p.createElement(e,{style:{fontSize:8}},B.phone)),B.qrContent&&v?p.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},B.deliveryMode==="speedpost"?"SP":B.deliveryMode==="international-post"?"IP":"NP"),p.createElement(Image,{src:v,style:{width:40,height:40,minWidth:40,maxWidth:40}}),p.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",B.pujaDetails))})())}return null}));return p.createElement(p.Fragment,null,m.length>0&&p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",m.length),o(m)),l.length>0&&p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"International Post (IP) - ",l.length),o(l)),i.length>0&&p.createElement(View,{style:{marginBottom:12}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",i.length),o(i)))})()):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return a?V:p.createElement(Document,null,V)},wt=Ar;var kr=({startDate:n,endDate:d,templeName:y,pujaData:s,prasadData:a,deliveryData:V,reportTiming:m})=>(V=V.map(l=>{let i="";try{let o=JSON.parse(l.address);i=`${o.address}, ${o.locality}, ${o.state} - ${o.pincode}`;}catch(o){console.error("Error parsing address:",o),i=l.address;}return {...l,address:i}}),s.length==0&&a.length==0&&V.length==0?p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportTiming:m,reportName:"Combined Report",templeName:y}),p.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):p.createElement(Document,null,s.length>0&&ht({startDate:n,endDate:d,templeName:y,pujas:s,reportTiming:m,isEmbed:true}),a.length>0&&xt({startDate:n,endDate:d,templeName:y,data:a,reportTiming:m,isEmbed:true}),V.length>0&&wt({startDate:n,endDate:d,templeName:y,data:V,isEmbed:true}))),Ai=kr;var Br=({startDate:n,endDate:d,data:y})=>p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Temple Payment Report",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,"S.No.")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,"Temple Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,"Bookings")),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"Revenue"))),y?.map((s,a)=>p.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,a+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},p.createElement(e,null,s.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,s.bookings)),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"\u20B9",s.revenue))))))),Ci=Br;var jr=({startDate:n,endDate:d,templeName:y,data:s})=>{let a=p.useMemo(()=>{let l=[],i=new Map;return s.settlements.forEach(o=>{let t=o.date;i.has(t)||i.set(t,{dateKey:t,dateDisplay:t,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let r=i.get(t);r.items.push(o),r.count++;let u=r.items.reduce((T,b)=>T+b.settlement_amount,0);r.dayTotal=String(u),r.dayTotalVerbose=r.items.map(T=>T.settlement_amount).join(" + ")+" = "+W(u);}),i.forEach(o=>l.push(o)),l},[s.settlements]),V=()=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"Gateway Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"UTR")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%"}},p.createElement(e,null,"Invoices")),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"Settlement Amt"))),m=(l,i)=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,i+1,". ",l.paymentGateway),p.createElement(e,{style:{fontSize:6,color:"#666",marginTop:2}},l.settlement_id)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},p.createElement(e,null,l.utr.split("").map((o,t)=>p.createElement(e,{key:t},o)))),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%",fontSize:7}},p.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((o,t)=>p.createElement(e,{key:t},o.number," (",W(o.amount),")")))),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,W(l.settlement_amount))));return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Settlements Report",templeName:y}),p.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",s.totalCreditedAmount),s.settlements.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a.map(l=>p.createElement(View,{key:l.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},l.dateDisplay),p.createElement(e,{style:{fontSize:8}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotalVerbose)),V(),l.items.map((i,o)=>m(i,o))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},ki=jr;var _r=({data:n})=>p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},p.createElement(View,{style:{backgroundColor:"#FFA823",width:15,height:"100%"}}),p.createElement(View,{style:{marginLeft:10,marginTop:8,marginBottom:0,flex:1}},p.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},n.templeName),p.createElement(e,{style:{fontSize:8}},n.templeAddress),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:4,marginTop:8,alignItems:"center"}},p.createElement(e,{style:{fontSize:8,marginTop:-4}},"Powered by"),p.createElement(Image,{style:{height:20,width:75,objectFit:"contain"},src:pt}))),n.qrContent?p.createElement(View,{style:{width:65}},p.createElement(Image,{style:{height:55,width:55,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},n.status==="confirmed"?p.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:gt}):null,p.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),p.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),p.createElement(View,{style:{marginTop:8}},p.createElement(e,{style:{fontSize:9}},"Bill to:"),p.createElement(e,{style:{fontSize:9}},n.devoteeDetails.name),n.devoteeDetails.phone?p.createElement(e,{style:{fontSize:9}},n.devoteeDetails.phone):null,p.createElement(e,{style:{fontSize:9}},n.bookingDate)),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},p.createElement(e,null,"Item Description")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Price")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},p.createElement(e,null,"Quantity")),p.createElement(View,{style:{padding:4,width:"20%",textAlign:"center"}},p.createElement(e,null,"Total"))),n.items.map((d,y)=>p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},d.pujaName?p.createElement(e,{style:{fontSize:9}},d.pujaName):null,d.devoteesName?p.createElement(e,{style:{fontSize:7,color:"#333333"}},d.devoteesName):null,d.pujaDate?p.createElement(e,{style:{fontSize:7,color:"#333333"}},d.pujaDate," ",d.timing?`- ${d.timing}`:null):null,d.repeatEndDate&&d.repeatStartDate?p.createElement(e,{style:{fontSize:7,color:"#333333"}},d.repeatStartDate," to ",d.repeatEndDate," ",d.timing?`- ${d.timing}`:null):null),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.basePujPrice)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},`${d.quantity?d.quantity:""}${d.repeatCount?` x ${d.repeatCount}`:""}`)),p.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},d.totalPrice))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:15,marginHorizontal:15}},p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:9}},p.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),p.createElement(e,null,n.paymentMethod)),p.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"50%",textAlign:"right"}},p.createElement(e,null,"Subtotal: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.subTotal))),n.postalCharges?p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Postal Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.postalCharges))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Payment Gateway Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.paymentGatewayCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Platform Charges: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.platformCharges))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"GST (18%): ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.gst))),p.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:4}}),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{width:"70%",textAlign:"right"}},p.createElement(e,null,"Total: ")),p.createElement(View,{style:{width:"30%",textAlign:"right"}},p.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?p.createElement(View,{style:{marginBottom:4}},p.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:20}},p.createElement(View,{style:{backgroundColor:"#FF266F",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.afternoon.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",d.name," (",d.timings,")"))):null,n.prasads.evening.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",d.name," (",d.timings,")"))):null):null,n.instructions.length>0?p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:15,fontSize:7,border:"1px solid #757575"}},p.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:8,paddingVertical:4}},p.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),p.createElement(View,{style:{display:"flex",flexDirection:"column",gap:4,marginVertical:8,paddingHorizontal:8}},n.instructions.map((d,y)=>p.createElement(e,{key:y,style:{fontSize:7}},y+1,") ",d.instruction)))):null,p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15}},p.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Terms and Conditions:"),p.createElement(e,{style:{fontSize:7,marginLeft:4}},"https://www.bookmypuja.app/terms-and-condition")))),Ni=_r;var Mr=({startDate:n,endDate:d,templeName:y,data:s})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Payment Settlement Report",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Amount")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Payment Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},p.createElement(e,null,"Bank UTR No"))),s.map((a,V)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,V+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.invoiceNo)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(Q,null,a.amount)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.paymentDate)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},p.createElement(Q,null,a.bankUtrNo))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Fi=Mr;var Hr=({startDate:n,endDate:d,templeName:y,data:s})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Invoice Level Breakup",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:6,fontWeight:"semibold"}},p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Invoice Number")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Base Amount")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Platform Fees GST")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway Charges")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Gateway GST")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Payment Mode")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Booking Date")),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(e,null,"Settlement Date")),p.createElement(View,{style:{padding:2,borderRight:"none",width:"12%"}},p.createElement(e,null,"UTR Number"))),s.map((a,V)=>p.createElement(View,{key:V,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:6}},p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},p.createElement(e,null,V+1)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.invoiceNumber)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.baseAmount)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFees)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.platformFeesGST)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayCharges)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.gatewayChargesGST)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(Q,null,a.paymentMode)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},p.createElement(Q,null,a.bookingDate)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},p.createElement(Q,null,a.settlementDate)),p.createElement(View,{style:{padding:2,width:"12%"}},p.createElement(Q,null,a.utrNumber))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Bi=Hr;var Qr=({startDate:n,endDate:d,templeName:y,data:s,dayGroups:a,summary:V})=>{s.reduce((l,i)=>l+i.quantity,0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Puja Count Summary Report",templeName:y}),s.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a&&a.length>1?p.createElement(View,{style:{marginBottom:20}},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,"Total Amount"))),(()=>{let l=new Map;return a.forEach(i=>{i.items.forEach(o=>{let t=l.get(o.name)||{quantity:0,amount:0};l.set(o.name,{quantity:t.quantity+o.quantity,amount:t.amount+(o.amount||0)});});}),Array.from(l.entries()).map(([i,o],t)=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,t+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,i)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,o.quantity)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,W(o.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},(()=>{let l=new Map;return a.forEach(i=>{i.items.forEach(o=>{let t=l.get(o.name)||{quantity:0,amount:0};l.set(o.name,{quantity:t.quantity+o.quantity,amount:t.amount+(o.amount||0)});});}),Array.from(l.values()).reduce((i,o)=>i+o.quantity,0)})())),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let l=new Map;return a.forEach(i=>{i.items.forEach(o=>{let t=l.get(o.name)||{quantity:0,amount:0};l.set(o.name,{quantity:t.quantity+o.quantity,amount:t.amount+(o.amount||0)});});}),Array.from(l.values()).reduce((i,o)=>i+o.amount,0)})())))),a.some(l=>l.dayPostalTempleFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,(()=>{let l=a.filter(o=>o.postalChargesBreakup).map(o=>o.postalChargesBreakup);if(l.length===0)return "";let i=[0,0,0];return l.forEach(o=>{o&&(i[0]+=o[0],i[1]+=o[1],i[2]+=o[2]);}),`${i.join("+")}`})())),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((l,i)=>l+(i.dayPostalTempleFees||0),0))))),a.some(l=>l.dayPostalCarrierFees>0)&&p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((l,i)=>l+(i.dayPostalCarrierFees||0),0))))),(()=>{let l=new Map;return a.forEach(i=>{i.otherChargesBreakup?.forEach(o=>{let t=l.get(o.name)||{count:0,amount:0};l.set(o.name,{count:t.count+(o.count||0),amount:t.amount+o.amount});});}),l.size===0?null:Array.from(l.entries()).map(([i,o])=>p.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},i)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,o.count>0?o.count:"")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(o.amount)))))})(),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}})),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W((()=>{let l=new Map;a.forEach(r=>{r.items.forEach(u=>{let T=l.get(u.name)||{quantity:0,amount:0};l.set(u.name,{quantity:T.quantity+u.quantity,amount:T.amount+(u.amount||0)});});});let i=Array.from(l.values()).reduce((r,u)=>r+u.amount,0),o=a.reduce((r,u)=>r+((u.dayPostalCarrierFees||0)+(u.dayPostalTempleFees||0)),0),t=a.reduce((r,u)=>{let T=u.otherChargesBreakup?.reduce((b,B)=>b+B.amount,0)||0;return r+T},0);return i+o+t})()))))):null,a&&a.length>1&&p.createElement(View,{break:true,style:{marginBottom:20}},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Summary")),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Total Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,"Puja Amount"))),a.map((l,i)=>p.createElement(View,{key:l.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,i+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,l.dateDisplay)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,l.items.reduce((o,t)=>o+t.quantity,0))),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,null,W(l.dayPujaTotal))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,{style:{fontWeight:"bold"}},"Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,{style:{fontWeight:"bold"}},a.reduce((l,i)=>l+i.items.reduce((o,t)=>o+t.quantity,0),0))),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},p.createElement(e,{style:{fontWeight:"bold"}},W(a.reduce((l,i)=>l+i.dayPujaTotal,0)))))),a&&a.length>0&&p.createElement(View,{break:true},p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),a.map((l,i)=>p.createElement(View,{key:l.dateKey,style:{marginBottom:15}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid #000",borderBottom:"none"}},p.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},l.dateDisplay)),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,"Sr no")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Count")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,"Amount"))),l.items.map((o,t)=>p.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,t+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,o.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,o.quantity)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(o.amount||0))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Puja Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,l.items.reduce((o,t)=>o+t.quantity,0))),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(l.dayPujaTotal)))),l.dayPostalTempleFees&&l.dayPostalCarrierFees?p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Charge")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,l.postalChargesBreakup?`${l.postalChargesBreakup.map(o=>o||0).join("+")}`:"")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(l.dayPostalTempleFees)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Postal Service")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(l.dayPostalCarrierFees))))):null,l.otherChargesBreakup?.length?p.createElement(p.Fragment,null,l.otherChargesBreakup.map((o,t)=>p.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,o.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,o.count?o.count:"")),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(o.amount)))))):null,l.dayPostalTempleFees||l.dayPostalCarrierFees||l.otherChargesBreakup?.length?p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,"Day Total")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,W(l.dayGrandTotal)))):null)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},vi=Qr;var Gr=({startDate:n,endDate:d,templeName:y,pujas:s,reportTiming:a,selectedPujaNames:V=[]})=>{let m=0,l=0,i=s.some(o=>o.bookings.some(t=>t.requires_coupon));return !s||s.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportName:"Custom Puja Report",templeName:y,reportTiming:a}),p.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range and pujas"))):p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportTiming:a,reportName:"",templeName:""}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},p.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.some(o=>o.bookings.some(t=>t.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:4}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),s.some(o=>o.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?s.flatMap((o,t)=>o.bookings.filter(r=>r.is_early_reminder&&!r.requires_coupon).map((r,u)=>(l++,p.createElement(View,{key:`${t}-${u}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,l)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,o.name)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,r.quantity)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,r.collectionMode||"")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,r.date?new Date(r.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Custom Puja Report"),p.createElement(e,{style:{fontSize:10}},`${y}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},s.map((o,t)=>{if(o.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;m=0;let r=o.bookings.some(b=>b.topping_name),u=(b=false)=>r?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"34%"}},p.createElement(e,null,"Offerings")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"36%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"17%"}},p.createElement(e,null,"Invoice No"))),T=(b,B,v)=>b.is_early_reminder||b.requires_coupon?null:r?p.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,v)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"24%"}},p.createElement(e,null,b.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,b.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"34%"}},p.createElement(e,null,b.topping_name||"")),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,b.quantity)),p.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},p.createElement(e,null,b.invoiceNumber))):p.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,v)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${36*1.11111}%`}},p.createElement(e,null,b.devoteeName)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,b.nakshatra)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,b.quantity)),p.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},p.createElement(e,null,b.collectionMode||"")),p.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:`${17*1.11111}%`}},p.createElement(e,null,b.invoiceNumber))),b.priestNote&&p.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,b.priestNote))));return p.createElement(View,{key:t,style:{marginBottom:10}},p.createElement(View,{wrap:false,minPresenceAhead:20},p.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.bookings.length}`),u(true)),p.createElement(p.Fragment,null,(()=>{if(r){let b=o.bookings.filter(v=>!v.is_early_reminder&&!v.requires_coupon),B=new Map;return b.forEach(v=>{let z=`${v.invoiceNumber}|${v.devoteeName}|${v.nakshatra}|${v.topping_name||""}`;if(B.has(z)){let X=B.get(z);X.quantity=(parseInt(X.quantity)+parseInt(v.quantity)).toString();}else B.set(z,{...v});}),Array.from(B.values()).map((v,z)=>{m=m||1;let X=m;return m+=Number(v.quantity)||1,T(v,z,X)})}else return o.bookings.map((b,B)=>b.is_early_reminder||b.requires_coupon?null:(m++,T(b,B,m)))})()))}))),i?p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let o=s.flatMap(r=>r.bookings.filter(u=>u.requires_coupon).map(u=>({...u,pujaName:r.name}))),t={};for(let r of o)t[r.invoiceNumber]||(t[r.invoiceNumber]=[]),t[r.invoiceNumber].push(r);return Object.entries(t).map(([r,u],T)=>{let b=u,B=b[0];return p.createElement(View,{key:r,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:false},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},p.createElement(e,{style:{fontWeight:"semibold"}},r),p.createElement(e,null,B.date?new Date(B.date).toDateString():n.toDateString())),p.createElement(e,null,B.phone_number)),p.createElement(View,{style:{height:10,width:"100%"}}),b.map((v,z)=>p.createElement(View,{key:z,style:{display:"flex",flexDirection:"row",marginTop:18}},p.createElement(e,null,`${v.devoteeName} ----- ${v.nakshatra} ----- ${v.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},ji=Gr;var Xr=({startDate:n,endDate:d,templeName:y,data:s,reportTiming:a})=>{let V=s.items[0].shares.length,m=50/(V||1),l=0,i=0,o=new Array(V).fill(0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n,endDate:d,reportTiming:a,reportName:"Share Report",templeName:y}),s.items.length<=0?p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,s.items.length>0?p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black"}},p.createElement(View,{style:{width:"5%",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Sr")),p.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Puja Name")),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Price")),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Count")),s.items[0].shares.map((t,r)=>p.createElement(View,{style:{width:`${m}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.key))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),s.items.map((t,r)=>(l+=t.count,i+=t.total,t.shares.forEach((u,T)=>{o[T]+=u.value;}),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",borderTop:"none"}},p.createElement(View,{style:{width:"5%",padding:4}},p.createElement(e,{style:{fontSize:8}},r+1)),p.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},t.pujaName)),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(t.price))),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},t.count)),t.shares.map((u,T)=>p.createElement(View,{style:{width:`${m}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(u.value)))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(t.total)))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",fontWeight:"bold",borderTop:"none"}},p.createElement(View,{style:{width:"33%",padding:4}},p.createElement(e,{style:{fontSize:8}},"Total")),p.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},l)),o.map((t,r)=>p.createElement(View,{style:{width:`${m}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(t)))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},W(i))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},p.createElement(View,{style:{width:"30%"}},o.map((t,r)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",paddingBottom:"2px"}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},s.items[0].shares[r].key)),p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},W(t,true,true))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",fontWeight:"bold",borderBottom:"1px solid black",borderTop:"1px solid black",marginTop:"2px"}},p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},"Total")),p.createElement(View,null,p.createElement(e,{style:{fontSize:8}},W(i,true,true))))),p.createElement(View,{style:{width:"35%"}},s.options?.right_side_table?.map((t,r)=>p.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2,...s.options?.right_side_table&&r==s.options?.right_side_table?.length-1?{borderBottom:"1px solid black",borderTop:"1px solid black"}:{}}},t.map((u,T)=>p.createElement(View,{style:{width:`${100/t.length}%`}},p.createElement(e,{style:{fontSize:9,...T==1?{textAlign:"right"}:{}}},u)))))),p.createElement(View,{style:{width:"1%"}})),s.options?.footer_paragraph&&p.createElement(View,{style:{marginTop:50}},p.createElement(e,{style:{fontSize:10}},s.options.footer_paragraph))):null)))},Ei=Xr;var tn=n=>{let d=0,y=0;return n.data.items.forEach(s=>{d+=s.quantity,y+=s.total;}),p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(N,{startDate:n.startDate,endDate:n.endDate,reportName:"Advance Goods Report",templeName:n.templeName,showGeneratedAt:true}),p.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},n.data.multiplier.name," ="," ",W(n.data.multiplier.rate)),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(Text,null,"Sr no")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Text,null,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(Text,null,"Quantity")),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,"Amount"))),n.data.items.map((s,a)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},p.createElement(Text,null,a+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Text,null,s.date)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(Text,null,s.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,W(s.total))))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},p.createElement(Text,null,"Total")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(Text,null,d)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,W(y)))))))},ci=tn;var qi={kitchen:{A4:_t,A5:bi},transaction:{A4:Lt,A5:Ti},"prasad-delivery":{A4:qt,A5:Di,"110mm":si},prasad:{A4:mt,A5:xt,"110mm":ri},"puja-detailed":{A4:ut,A5:ht,"110mm":ti},"puja-summary":{A4:$t,A5:Si},"combined-report":{A4:Ut,A5:Ai,"110mm":ai},"multi-temple-payment":{A4:Qt,A5:Ci},"settlements-report":{A4:Jt,A5:ki},invoice:{A4:Gt,A5:Ni},"postal-report":{A4:yt,A5:wt,"110mm":mi},"payment-settlement-report":{A4:Yt,A5:Fi},"invoice-breakup":{A4:Zt,A5:Bi},"puja-count":{A4:Xt,A5:vi},"custom-report":{A4:yi,A5:ji,"110mm":hi},"invoice-recon":{A4:wi},"share-report":{A4:Ei},"advance-goods":{A4:ci}},Mi=class{constructor(d,y){Dt(this,"option");Dt(this,"size");this.option=d,this.size=y,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:a,src:V})=>Font.register({family:a,src:V})),Font.register({family:"Noto Sans",fontWeight:"normal",src:kt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Nt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Ft});}async print(d){let s=qi[this.option][this.size],a=p.createElement(s,{...d}),V=pdf(a).toBlob();return V.then(m=>{var l=URL.createObjectURL(m);if(window!=null){let i=window.open(l,"_blank");setTimeout(()=>{i?.print();},1e3);}}),V}async getBlob(d){let s=qi[this.option][this.size],a=p.createElement(s,{...d});return pdf(a).toBlob()}};
2
+ export{Gi as A4Print,to as T2Inch,Mi as reportPrinter};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bookmypuja-tech/bmp-pdf",
3
3
  "description": "PDF Report Generation for Temple360 and T-360 by BookMyPuja",
4
- "version": "0.4.86",
4
+ "version": "0.4.88",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",