@bookmypuja-tech/bmp-pdf 0.4.38 → 0.4.40

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
@@ -111,6 +111,7 @@ interface IPrasadReport$1 {
111
111
  reportTiming?: IReportTimings;
112
112
  isDayWiseGrouped?: boolean;
113
113
  dayGroups?: IDayGroup$5[];
114
+ isEmbed?: boolean;
114
115
  }
115
116
 
116
117
  interface IBooking {
@@ -146,6 +147,7 @@ interface IPujaList$1 {
146
147
  pujas: IPuja$3[];
147
148
  reportTiming?: IReportTimings;
148
149
  isDayWiseGrouped?: boolean;
150
+ isEmbed?: boolean;
149
151
  }
150
152
 
151
153
  interface ISummaryPuja {
@@ -178,6 +180,7 @@ interface IPostalReportProps$1 {
178
180
  endDate: Date;
179
181
  templeName: string;
180
182
  data?: IPostalItem$2[];
183
+ isEmbed?: boolean;
181
184
  }
182
185
 
183
186
  interface CombinedReportData$1 {
@@ -334,7 +337,9 @@ interface IDayGroup$2 {
334
337
  dateKey: string;
335
338
  dateDisplay: string;
336
339
  items: IPujaCountData[];
337
- dayTotal: number;
340
+ dayPujaTotal: number;
341
+ dayPostalTotal: number;
342
+ dayGrandTotal: number;
338
343
  }
339
344
  interface IPujaCountReportProps {
340
345
  startDate: Date;
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 Ao from'qrcode';var Oi=Object.defineProperty;var Gi=(o,n,a)=>n in o?Oi(o,n,{enumerable:true,configurable:true,writable:true,value:a}):o[n]=a;var wt=(o,n,a)=>Gi(o,typeof n!="symbol"?n+"":n,a);var qe=o=>{typeof o=="string"&&(o=new Date(o));let n={day:"2-digit",month:"short",year:"numeric"};return o.toLocaleDateString("en-GB",n).replace(",","")};var De=(o,n=false)=>{if(!n){if(o>=1e7)return `\u20B9${(o/1e7).toFixed(2)}Cr`;if(o>=1e5)return `\u20B9${(o/1e5).toFixed(2)}L`}return o.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:o%1===0?0:2})};var ke="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",gt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",mt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",zt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Pt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var yt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",ft="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",ht={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:gt});Font.register({family:"Roboto",fontWeight:"bold",src:mt});var At=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:o,dates:n})=>{let a=qe(n[0])===qe(n[1]);return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:At.page},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),p.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),p.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",a?qe(n[0]):`${qe(n[0])} - ${qe(n[1])}`),p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},o?o.map((r,d)=>p.createElement(View,{wrap:false,key:d,style:At.pujaTile},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(d+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"}},r.participantName),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),p.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},r.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"}},r.pujaName)),a?null:p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Date: "),p.createElement(Text,{style:{fontWeight:"bold"}},qe(r.date)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},p.createElement(Text,null,"Priest Note: ",r.priestNote)):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},p.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",r.amount),r.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:gt});Font.register({family:"Roboto",fontWeight:"bold",src:mt});var pe=1,lt=25*pe,Ct=StyleSheet.create({page:{padding:10*pe,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*pe,paddingHorizontal:10*pe,fontSize:lt,border:`${5*pe}px solid black`,borderRadius:5*pe,width:"100%",display:"flex",flexDirection:"column"}}),to=({data:o,dates:n})=>{let a=qe(n[0])===qe(n[1]);return p.createElement(Document,null,p.createElement(Page,{dpi:200,size:[457*pe],style:Ct.page},p.createElement(Image,{fixed:true,style:{height:55*pe,width:274*pe,marginBottom:10*pe,marginHorizontal:"auto"},src:ke}),p.createElement(Text,{style:{fontSize:25*pe,marginBottom:5*pe,marginHorizontal:"auto"}},"Puja List"),p.createElement(Text,{style:{fontSize:20*pe,marginBottom:5*pe,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",a?qe(n[0]):`${qe(n[0])} - ${qe(n[1])}`),p.createElement(Text,{style:{fontSize:17*pe,marginBottom:20*pe,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*pe}},o?o.map((r,d)=>p.createElement(View,{wrap:false,key:d,style:Ct.pujaTile},p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*pe}},p.createElement(Text,{style:{opacity:.6,marginRight:10*pe}},"#",(d+1).toString().padStart(2,"0")),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*pe}},r.paymentStatus=="pending"?p.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*pe,paddingHorizontal:5*pe,borderRadius:5*pe,marginTop:3*pe}},p.createElement(Text,{style:{color:"#ffffff",fontSize:lt}},"Pending")):null,p.createElement(Text,{style:{fontWeight:"bold",fontSize:lt}},"Rs ",r.amount))),p.createElement(View,{style:{flexGrow:1}},p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*pe,gap:3*pe}},p.createElement(Text,{style:{fontSize:lt,fontWeight:"bold"}},r.participantName),p.createElement(Text,{style:{fontSize:lt,fontWeight:"bold"}},"-"),p.createElement(Text,{style:{fontSize:lt,fontWeight:"bold"}},r.participantNakshatra)),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*pe}},p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},p.createElement(Text,null,"Puja name : "),p.createElement(Text,{style:{fontSize:lt,fontWeight:"bold"}},r.pujaName)),a?null:p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},p.createElement(Text,null,"Date: "),p.createElement(Text,{style:{fontWeight:"bold"}},qe(r.date)))),p.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*pe}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?p.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*pe}},p.createElement(Text,null,"Priest Note: ",r.priestNote)):null))):null)))},io=to;var ro={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},no=({style:o={},children:n})=>{let a=l=>{let t=maxBy(Object.entries(ro),([i,g])=>{let c=l.match(g);return c?c.length:0});return t?t[0]:"Latin"},r=l=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(l));function d(l){return l.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let m=l=>{let t=[],i=null,g="";for(let c of l){c=d(c);let se=a(c);se!==i?(g&&t.push({text:g,script:i}),i=se,g=c):g+=c;}return g&&t.push({text:g,script:i}),t},x=[];n&&typeof n=="string"&&!Array.isArray(n)&&!r(n)&&m(n).forEach((t,i)=>{let g=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;x.push(p.createElement(Text,{key:i,style:{fontFamily:g}},t.text));});let S=[],s={fontFamily:"Noto Sans"};return Array.isArray(o)?S=[...o,s]:o&&Object.keys(o).length>0?S=[o,s]:S=[s],p.createElement(Text,{style:S},x?.length?x:n)},e=no;var so=({startDate:o,endDate:n,reportTiming:a,templeName:r,reportName:d,showGeneratedAt:m=true})=>p.createElement(p.Fragment,null,p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:ke}),m&&p.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),n?p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",o.toDateString()," - ",n.toDateString()):p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",o.toDateString()),a&&Object.keys(ht).includes(a)?p.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},ht[a]," Report"):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},d),p.createElement(e,{style:{fontSize:12}},`${r}`)),I=so;var go=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,templeName:a,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((m,x)=>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,x+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,m.name)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,m.quantity))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Wt=go;var fo=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayWiseTotals:m,summary:x})=>{let S=x?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),s=x?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),l=x?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.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(I,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.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: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&m&&m.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"))),m.map((t,i)=>p.createElement(View,{key:i,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,d&&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"))),r.map((t,i)=>p.createElement(View,{key:i,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,i+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"))))},jt=fo;var xo=({children:o,splitat:n})=>{if(!o||typeof o!="string")return null;let a="";return n=="words"&&(a=" "),p.createElement(p.Fragment,null,p.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},o.split(a).map((r,d)=>p.createElement(p.Fragment,null,p.createElement(e,{key:d},r,n=="words"?" ":"")))))},q=xo;var bo=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:m})=>{let x=t=>{let i="";try{let g=JSON.parse(t.address);i=`${g.address}, ${g.locality}, ${g.state} - ${g.pincode}`;}catch(g){console.error("Error parsing address:",g),i=t.address;}return {...t,address:i}},S=r.map(x),s=()=>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:"18%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Address")),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,"Amount"))),l=(t,i)=>p.createElement(View,{key:i,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:"18%"}},p.createElement(e,null,t.devoteeName)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.address)),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(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),S.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&m&&m.length>0?p.createElement(p.Fragment,null,m.map((t,i)=>{let g=t.items.map(x);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")),s(),g.map((c,se)=>l(c,se)))})):p.createElement(p.Fragment,null,s(),S.map((t,i)=>l(t,i)))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Et=bo;var Vo=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d,isDayWiseGrouped:m,dayGroups:x})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.invoiceNumber));let s=()=>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"))),l=(t,i)=>p.createElement(View,{key:i,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,i+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.invoiceNumber)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},p.createElement(e,null,t.devoteeName)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},p.createElement(e,null,t.pujaName," - ",t.prasadName)),p.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,t.quantity)),p.createElement(View,{style:{padding:6,width:"7%"}},p.createElement(e,null,t.collectionMode)));return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:d}),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")),r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m&&x&&x.length>0?p.createElement(p.Fragment,null,x.map((t,i)=>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," item",t.count!==1?"s":"")),s(),t.items.map((g,c)=>l(g,c))))):p.createElement(p.Fragment,null,s(),r.map((t,i)=>l(t,i)))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},_t=Vo;var Io=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,isDayWiseGrouped:m})=>{let x=0,S=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:d}),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,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:d,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")),r.some(l=>l.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"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,g)=>(S++,p.createElement(View,{key:`${t}-${g}`,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,l.name)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,i.collectionMode||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),p.createElement(e,{style:{fontSize:12}},`${a}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((l,t)=>{if(l.bookings.every(D=>D.is_early_reminder||D.requires_coupon))return null;x=0;let i=l.bookings.some(D=>D.topping_name),g=m&&l.dayGroups&&l.dayGroups.length>0,c=(D=false)=>i?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?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:"30%"}},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:"none",fontWeight:"semibold",width:"31%"}},p.createElement(e,null,"Offerings"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?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"))),se=(D,P,Y)=>D.is_early_reminder||D.requires_coupon?null:i?p.createElement(View,{key:P,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,Y)),p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},p.createElement(e,null,D.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,D.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},p.createElement(e,null,D.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"31%"}},p.createElement(e,null,D.topping_name||""))):p.createElement(View,{key:P,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,Y)),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,D.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,D.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,D.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,D.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,D.collectionMode||""))),D.priestNote&&p.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,D.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"}},`${l.name} - ${l.totalBookings||l.bookings.length}`),!g&&c(true)),g?p.createElement(p.Fragment,null,l.dayGroups.map((D,P)=>{let Y=0,Ne=D.items.filter(ce=>!ce.is_early_reminder&&!ce.requires_coupon);return Ne.length===0?null:p.createElement(View,{key:D.dateKey,style:{marginTop:P>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"}},D.dateDisplay),p.createElement(e,{style:{fontSize:9}},`${Ne.length} booking${Ne.length!==1?"s":""}`)),c(false),Ne.map((ce,it)=>(Y++,se(ce,it,Y))))})):p.createElement(p.Fragment,null,l.bookings.map((D,P)=>D.is_early_reminder||D.requires_coupon?null:(x++,se(D,P,x)))))}))),s?p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let l=r.flatMap(i=>i.bookings.filter(g=>g.requires_coupon).map(g=>({...g,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,g],c)=>{let se=g,D=se[0];return p.createElement(View,{key:i,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"}},i),p.createElement(e,null,D.date?new Date(D.date).toDateString():o.toDateString())),p.createElement(e,null,D.phone_number)),p.createElement(View,{style:{height:15,width:"100%"}}),se.map((P,Y)=>p.createElement(View,{key:Y,style:{display:"flex",flexDirection:"row",marginTop:25}},p.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},ct=Io;var Po=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:d})=>{let m=r.sort((x,S)=>{let s=x.nakshatras.length;return S.nakshatras.length-s});return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:n,endDate:a,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.map((x,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"}},`${x.name} - ${x.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"))),x.nakshatras.map((s,l)=>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,l+1)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},p.createElement(e,null,s.name)),p.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},p.createElement(e,null,s.count))))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=Po;var No=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:d,deliveryData:m,reportTiming:x})=>{m=m.map(t=>{let i="";try{let g=JSON.parse(t.address);i=`${g.address}, ${g.locality}, ${g.state} - ${g.pincode}`;}catch(g){console.error("Error parsing address:",g),i=t.address;}return {...t,address:i}});let S=0,s=0,l=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&m.length==0?p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,reportName:"Combined Report",templeName:a}),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,r.length>0&&p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,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")),r.some(t=>t.bookings.some(i=>i.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"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(g=>g.is_early_reminder&&!g.requires_coupon).map((g,c)=>(s++,p.createElement(View,{key:`${i}-${c}`,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,t.name)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,g.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,g.collectionMode||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,g.date?new Date(g.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),p.createElement(e,{style:{fontSize:12}},`${a}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((t,i)=>{if(t.bookings.every(P=>P.is_early_reminder||P.requires_coupon))return null;S=0;let g=t.bookings.some(P=>P.topping_name),c=t.dayGroups&&t.dayGroups.length>0,se=(P=false)=>g?p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:P?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:"30%"}},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:"none",fontWeight:"semibold",width:"31%"}},p.createElement(e,null,"Offerings"))):p.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:P?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=(P,Y,Ne)=>P.is_early_reminder||P.requires_coupon?null:g?p.createElement(View,{key:Y,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,Ne)),p.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},p.createElement(e,null,P.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,P.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},p.createElement(e,null,P.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"31%"}},p.createElement(e,null,P.topping_name||""))):p.createElement(View,{key:Y,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,Ne)),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,P.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,P.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,P.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,P.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,P.collectionMode||""))),P.priestNote&&p.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,P.priestNote))));return p.createElement(View,{key:i,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"}},`${t.name} - ${t.totalBookings||t.bookings.length}`),!c&&se(true)),c?p.createElement(p.Fragment,null,t.dayGroups.map((P,Y)=>{let Ne=0,ce=P.items.filter(it=>!it.is_early_reminder&&!it.requires_coupon);return ce.length===0?null:p.createElement(View,{key:P.dateKey,style:{marginTop:Y>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"}},P.dateDisplay),p.createElement(e,{style:{fontSize:9}},`${ce.length} booking${ce.length!==1?"s":""}`)),se(false),ce.map((it,Mi)=>(Ne++,D(it,Mi,Ne))))})):p.createElement(p.Fragment,null,t.bookings.map((P,Y)=>P.is_early_reminder||P.requires_coupon?null:(S++,D(P,Y,S)))))}))),r.length>0&&l&&p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let t=r.flatMap(g=>g.bookings.filter(c=>c.requires_coupon).map(c=>({...c,pujaName:g.name}))),i={};for(let g of t)i[g.invoiceNumber]||(i[g.invoiceNumber]=[]),i[g.invoiceNumber].push(g);return Object.entries(i).map(([g,c],se)=>{let D=c,P=D[0];return p.createElement(View,{key:g,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black"},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"}},g),p.createElement(e,null,P.date?new Date(P.date).toDateString():o.toDateString())),p.createElement(e,null,P.phone_number)),p.createElement(View,{style:{height:15,width:"100%"}}),D.map((Y,Ne)=>p.createElement(View,{key:Ne,style:{display:"flex",flexDirection:"row",marginTop:25}},p.createElement(e,null,`${Y.devoteeName} ----- ${Y.nakshatra} ----- ${Y.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())),d.length>0&&p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,reportName:"Prasad Report",templeName:a}),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,"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:"30%"}},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%"}},p.createElement(e,null,"Qty"))),d.map((t,i)=>p.createElement(View,{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,i+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.invoiceNumber)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,t.devoteeName)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,t.prasadName)),p.createElement(View,{style:{padding:6,width:"10%"}},p.createElement(e,null,t.quantity)))))),m.length>0&&p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,reportName:"Prasad Delivery Postal Report",templeName:a}),p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},m&&m.map(t=>{let i=Ao.toDataURL(t.qrContent);return p.createElement(View,{wrap:false,key:t.id,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,null,p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.name),p.createElement(View,{style:{fontSize:10}},p.createElement(q,{splitat:"words"},t.address)),p.createElement(e,{style:{fontSize:10}},t.phone)),t.qrContent&&i?p.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(Image,{src:i,style:{width:50,height:50,minWidth:50,maxWidth:50}}),p.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),p.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),p.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",t.pujaDetails))})))))},Ot=No;var Bo=({startDate:o,endDate:n,data:a})=>p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,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"))),a?.map((r,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:"55%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,r.bookings)),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"\u20B9",r.revenue))))))),Gt=Bo;var jo=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:m})=>{let x=()=>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,"Date")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Settlement")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"UTR")),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,"Settlement ID"))),S=(s,l)=>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,l+1)),p.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},p.createElement(e,null,s.date)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,s.settlement_amount)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},p.createElement(e,null,s.utr.split("").map((t,i)=>p.createElement(e,{key:i},t)))),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},p.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((t,i)=>p.createElement(e,{key:i},t.number," (",t.amount,")")))),p.createElement(View,{style:{padding:6,width:"20%"}},p.createElement(e,null,s.settlement_id)));return p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),p.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&m&&m.length>0?p.createElement(p.Fragment,null,m.map((s,l)=>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":""," | Total: ",s.dayTotal)),x(),s.items.map((t,i)=>S(t,i))))):p.createElement(p.Fragment,null,x(),r.settlements.map((s,l)=>S(s,l)))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ht=jo;var Lo=({data:o})=>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"}},o.templeName),p.createElement(e,{style:{fontSize:10}},o.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:yt}))),o.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:o.qrContent})):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},o.status==="confirmed"?p.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ft}):null,p.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),p.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),p.createElement(View,{style:{marginTop:10}},p.createElement(e,{style:{fontSize:11}},"Bill to:"),p.createElement(e,{style:{fontSize:11}},o.devoteeDetails.name),o.devoteeDetails.phone?p.createElement(e,{style:{fontSize:11}},o.devoteeDetails.phone):null,p.createElement(e,{style:{fontSize:11}},o.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"))),o.items.map((n,a)=>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%"}},n.pujaName?p.createElement(e,{style:{fontSize:11}},n.pujaName):null,n.devoteesName?p.createElement(e,{style:{fontSize:9,color:"#333333"}},n.devoteesName):null,n.pujaDate?p.createElement(e,{style:{fontSize:9,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?p.createElement(e,{style:{fontSize:9,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.timing}`:null):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:{}},n.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:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),p.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},n.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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?p.createElement(View,{style:{marginBottom:5}},p.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.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")),o.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:"),o.prasads.morning.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.afternoon.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.evening.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.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}},o.instructions.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:8}},a+1,") ",n.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")))),Kt=Lo;var Oo=({startDate:o,endDate:n,templeName:a,data:r})=>p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),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")),r&&r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},r.map(d=>{let m=d.qrContent,x=Ao.toDataURL(m);return p.createElement(View,{wrap:false,key:d.id,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"}},d.name),p.createElement(View,{style:{fontSize:10}},p.createElement(e,{style:{fontSize:10}},d.address)),p.createElement(e,{style:{fontSize:10}},d.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}},d.deliveryMode==="speedpost"?"SP":d.deliveryMode==="international-post"?"IP":"NP"),d.qrContent&&x?p.createElement(Image,{src:x,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: ",d.pujaDetails))})):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),Ut=Oo;var Ko=({startDate:o,endDate:n,templeName:a,data:r})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.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"))),r.map((d,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:"10%"}},p.createElement(e,null,m+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(q,null,d.invoiceNo)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(q,null,d.amount)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(q,null,d.paymentDate)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(q,null,d.settlementDate)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},p.createElement(q,null,d.bankUtrNo))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Qt=Ko;var Jo=({startDate:o,endDate:n,templeName:a,data:r})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.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"))),r.map((d,m)=>p.createElement(View,{key:m,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,m+1)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.invoiceNumber)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.baseAmount)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.platformFees)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.platformFeesGST)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.gatewayCharges)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.gatewayChargesGST)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.paymentMode)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},p.createElement(q,null,d.bookingDate)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},p.createElement(q,null,d.settlementDate)),p.createElement(View,{style:{padding:3,width:"12%"}},p.createElement(q,null,d.utrNumber))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Jt=Jo;var Xo=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:m,summary:x})=>{let S=r.reduce((s,l)=>s+l.quantity,0);return p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.createElement(View,{style:{marginBottom:25}},d&&p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Monthly 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,"Remarks"))),r.map((s,l)=>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,l+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,s.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,s.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),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"}},S)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),d&&m&&m.length>0&&p.createElement(View,null,p.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),m.map((s,l)=>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 #000",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},s.dateDisplay),p.createElement(e,{style:{fontSize:10}},"Day Total: ",s.dayTotal)),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"))),s.items.map((t,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:"10%"}},p.createElement(e,null,i+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,t.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,t.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,De(t.amount||0))))))))):p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Yt=Xo;var Ro=({startDate:o,templeName:n,pujas:a,reportTiming:r})=>{return !a||a.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}},n),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),r&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," Report")),a.map((m,x)=>{let S=m.bookings.filter(s=>!s.is_early_reminder&&!s.requires_coupon);return S.length===0?null:p.createElement(View,{key:x,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}},S.length," booking",S.length>1?"s":"")),S.map((s,l)=>(p.createElement(View,{key:l,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"}},s.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:s.topping_name?6:0}},p.createElement(e,{style:{fontSize:12}},s.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",s.quantity)),s.topping_name&&p.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},p.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",s.topping_name)),s.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},s.priestNote))))))})))},Rt=Ro;var er=({startDate:o,templeName:n,data:a,reportTiming:r,isDayWiseGrouped:d,dayGroups:m})=>{if(!a||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 x=a.sort((s,l)=>s.invoiceNumber.localeCompare(l.invoiceNumber)),S=(s,l)=>p.createElement(View,{key:l,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"}},s.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.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}},s.prasadName),p.createElement(e,{style:{fontSize:12}}," (qty: ",s.quantity,")")),p.createElement(e,{style:{fontSize:12,color:"#666"}},s.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}},n),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),r&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.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}},x.length," item",x.length>1?"s":"")),d&&m&&m.length>0?p.createElement(p.Fragment,null,m.map((s,l)=>p.createElement(View,{key:s.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"}},s.dateDisplay),p.createElement(e,{style:{fontSize:11}},s.count," item",s.count!==1?"s":""))),s.items.map((t,i)=>S(t,i))))):p.createElement(p.Fragment,null,x.map((s,l)=>S(s,l)))))},ii=er;var tr=({startDate:o,templeName:n,data:a,isDayWiseGrouped:r,dayGroups:d})=>{let m=s=>{let l="";try{let t=JSON.parse(s.address);l=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{l=s.address;}return {...s,address:l}},x=a.map(m);if(!x||x.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=(s,l)=>p.createElement(View,{key:l,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.devoteeName),p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11}},s.address)),s.phoneNumber&&p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:12}},"Ph: ",s.phoneNumber)),p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",s.note||s.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}},n),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.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}},x.length," delivery",x.length>1?" items":" item")),r&&d&&d.length>0?p.createElement(p.Fragment,null,d.map((s,l)=>{let t=s.items.map(m);return p.createElement(View,{key:s.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"}},s.dateDisplay),p.createElement(e,{style:{fontSize:11}},s.count," item",s.count!==1?"s":""))),t.map((i,g)=>S(i,g)))})):p.createElement(p.Fragment,null,x.map((s,l)=>S(s,l)))))},ni=tr;var ir=({startDate:o,templeName:n,pujaData:a,prasadData:r,deliveryData:d,reportTiming:m})=>{if(a.length===0&&r.length===0&&d.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=r.sort((s,l)=>s.invoiceNumber.localeCompare(l.invoiceNumber));return p.createElement(Document,null,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}},n),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),m&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},m.charAt(0).toUpperCase()+m.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")),a.map((s,l)=>{let t=s.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return t.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"}},s.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((i,g)=>(p.createElement(View,{key:g,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"}},p.createElement(e,{style:{fontSize:12}},i.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",i.quantity)),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))))))})),r.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}},n),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),m&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},m.charAt(0).toUpperCase()+m.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((s,l)=>p.createElement(View,{key:l,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"}},s.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.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}},s.prasadName),p.createElement(e,{style:{fontSize:12}}," (qty: ",s.quantity,")")),p.createElement(e,{style:{fontSize:12,color:"#666"}},s.collectionMode))))),d.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}},n),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.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}},d.length," delivery",d.length>1?" items":" item")),d.map((s,l)=>p.createElement(View,{key:l,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.name),p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:11}},s.address)),s.phone&&p.createElement(View,{style:{marginBottom:6}},p.createElement(e,{style:{fontSize:12}},"Ph: ",s.phone)),p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",s.pujaDetails))))))},si=ir;var or=({startDate:o,templeName:n,data:a})=>!a||a.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}},n),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.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}},a.length," label",a.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")),a.map(r=>p.createElement(View,{key:r.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"}},r.name),p.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP")),p.createElement(View,{style:{marginBottom:5}},p.createElement(e,{style:{fontSize:11}},r.address)),p.createElement(e,{style:{fontSize:11,marginBottom:5}},r.phone),p.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),p.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",r.pujaDetails))))),ai=or;var nr=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,selectedPujaNames:m=[]})=>{let x=0,S=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:d}),m.length>0&&p.createElement(View,{style:{marginTop:10,marginBottom:10}},p.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",m.join(", "))),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(I,{startDate:o,endDate:n,reportTiming:d,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")),m.length>0&&p.createElement(View,{style:{marginTop:10,marginBottom:5}},p.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",m.join(", "))),r.some(l=>l.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"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,g)=>(S++,p.createElement(View,{key:`${t}-${g}`,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,l.name)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,i.collectionMode||"")),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},p.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),p.createElement(e,{style:{fontSize:12}},`${a}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((l,t)=>l.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(x=0,p.createElement(View,{key:t,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"}},`${l.name} - ${l.bookings.length}`)),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:"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"))),l.bookings.map((i,g)=>i.is_early_reminder||i.requires_coupon?null:(x++,p.createElement(View,{key:g,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,x)),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:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,i.invoiceNumber)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,i.devoteeName)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,i.nakshatra)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,i.collectionMode||""))),i.priestNote&&p.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,i.priestNote))))))))))),s?p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let l=r.flatMap(i=>i.bookings.filter(g=>g.requires_coupon).map(g=>({...g,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,g],c)=>{let se=g,D=se[0];return p.createElement(View,{key:i,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"}},i),p.createElement(e,null,D.date?new Date(D.date).toDateString():o.toDateString())),p.createElement(e,null,D.phone_number)),p.createElement(View,{style:{height:15,width:"100%"}}),se.map((P,Y)=>p.createElement(View,{key:Y,style:{display:"flex",flexDirection:"row",marginTop:25}},p.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},mi=nr;var lr=({startDate:o,templeName:n,pujas:a,reportTiming:r,selectedPujaNames:d=[]})=>{return !a||a.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}},n),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),p.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),r&&p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," ","Report")),d.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}},d.join(", "))),a.map((x,S)=>{let s=x.bookings.filter(l=>!l.is_early_reminder&&!l.requires_coupon);return s.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"}},x.name),p.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.length," booking",s.length>1?"s":"")),s.map((l,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"}},l.invoiceNumber)),p.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),p.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},p.createElement(e,{style:{fontSize:12}},l.nakshatra),p.createElement(e,{style:{fontSize:12}},"Qty: ",l.quantity)),l.collectionMode&&p.createElement(View,{style:{marginTop:4}},p.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",l.collectionMode)),l.priestNote&&p.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},p.createElement(e,{style:{fontSize:11,color:"#666"}},l.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"))))},ui=lr;var ar=o=>{let n=0,a=0,r=0;for(let d of o.items)d.paymentMethod!="INTERNATIONAL_CARD"&&d.platformFees>0&&(n+=d.platformFees,a+=d.platformFeesGST);return r=a+n,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:ke}),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}},o.templeName," "),p.createElement(Text,{style:{fontSize:12}},"Bookings from ",o.startDate.toDateString()," to"," ",o.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:"15%"}},p.createElement(Text,null,"Booking Date")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,"Platform Fees")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},p.createElement(Text,null,"Plt Fees GST")),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,"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:"19%"}},p.createElement(Text,null,"Transaction ID")))),o.items.map((d,m)=>p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${d.platformFees==0||d.paymentMethod=="INTERNATIONAL_CARD"?"#fffca6":""}`}},p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},p.createElement(Text,null,m+1)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},p.createElement(Text,null,d.invoiceNumber)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},p.createElement(Text,null,d.bookingDate)),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,De(d.platformFees))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},p.createElement(Text,null,De(d.platformFeesGST))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,De(d.platformFees+d.platformFeesGST))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,d.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),p.createElement(View,{style:{padding:3,width:"19%"}},p.createElement(Text,null,d.transactionID)))),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:"15%"}}),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,De(n))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},p.createElement(Text,null,De(a))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},p.createElement(Text,null,De(r))),p.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}}),p.createElement(View,{style:{padding:3,width:"19%"}})),p.createElement(View,{style:{marginTop:10,fontSize:12}},p.createElement(Text,null,"Total Payable: ",De(r)))))},xi=ar;var yr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,templeName:a,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((m,x)=>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,x+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},p.createElement(e,null,m.name)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},p.createElement(e,null,m.quantity))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),wi=yr;var xr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayWiseTotals:m,summary:x})=>{let S=x?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),s=x?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),l=x?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.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(I,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.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: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),p.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&m&&m.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"))),m.map((t,i)=>p.createElement(View,{key:i,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,d&&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"))),r.map((t,i)=>p.createElement(View,{key:i,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,i+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"))))},hi=xr;var br=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:m})=>{let x=t=>{let i="";try{let g=JSON.parse(t.address);i=`${g.address}, ${g.locality}, ${g.state} - ${g.pincode}`;}catch(g){console.error("Error parsing address:",g),i=t.address;}return {...t,address:i}},S=r.map(x),s=()=>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:"18%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,"Address")),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,"Amount"))),l=(t,i)=>p.createElement(View,{key:i,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,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:"18%"}},p.createElement(e,null,t.devoteeName)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},p.createElement(e,null,t.address)),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(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),S.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&m&&m.length>0?p.createElement(p.Fragment,null,m.map((t,i)=>{let g=t.items.map(x);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")),s(),g.map((c,se)=>l(c,se)))})):p.createElement(p.Fragment,null,s(),S.map((t,i)=>l(t,i)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},bi=br;var Vr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d,isDayWiseGrouped:m,dayGroups:x})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.invoiceNumber));let s=()=>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"))),l=(t,i)=>p.createElement(View,{key:i,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,i+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.invoiceNumber)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},p.createElement(e,null,t.devoteeName)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},p.createElement(e,null,t.pujaName," - ",t.prasadName)),p.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},p.createElement(e,null,t.quantity)),p.createElement(View,{style:{padding:4,width:"7%"}},p.createElement(e,null,t.collectionMode)));return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:d}),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")),r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m&&x&&x.length>0?p.createElement(p.Fragment,null,x.map((t,i)=>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," item",t.count!==1?"s":"")),s(),t.items.map((g,c)=>l(g,c))))):p.createElement(p.Fragment,null,s(),r.map((t,i)=>l(t,i)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Ti=Vr;var Ir=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,isDayWiseGrouped:m})=>{let x=0,S=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:d}),p.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:d,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")),r.some(l=>l.bookings.some(t=>t.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:8}},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:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,g)=>(S++,p.createElement(View,{key:`${t}-${g}`,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,S)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,l.name)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,i.collectionMode||"")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},p.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),p.createElement(e,{style:{fontSize:10}},`${a}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((l,t)=>{if(l.bookings.every(D=>D.is_early_reminder||D.requires_coupon))return null;x=0;let i=l.bookings.some(D=>D.topping_name),g=m&&l.dayGroups&&l.dayGroups.length>0,c=(D=false)=>i?p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?void 0:"none"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},p.createElement(e,null,"Sr")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},p.createElement(e,null,"Devotee")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"31%"}},p.createElement(e,null,"Offerings"))):p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?void 0:"none"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode"))),se=(D,P,Y)=>D.is_early_reminder||D.requires_coupon?null:i?p.createElement(View,{key:P,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},p.createElement(e,null,Y)),p.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},p.createElement(e,null,D.invoiceNumber)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,D.devoteeName)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},p.createElement(e,null,D.nakshatra)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"31%"}},p.createElement(e,null,D.topping_name||""))):p.createElement(View,{key:P,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,Y)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,D.invoiceNumber)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,D.devoteeName)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,D.nakshatra)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,D.quantity)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,D.collectionMode||""))),D.priestNote&&p.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,D.priestNote))));return p.createElement(View,{key:t,style:{marginBottom:20}},p.createElement(View,{wrap:false,minPresenceAhead:15},p.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${l.name} - ${l.totalBookings||l.bookings.length}`),!g&&c(true)),g?p.createElement(p.Fragment,null,l.dayGroups.map((D,P)=>{let Y=0,Ne=D.items.filter(ce=>!ce.is_early_reminder&&!ce.requires_coupon);return Ne.length===0?null:p.createElement(View,{key:D.dateKey,style:{marginTop:P>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:4}},p.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},D.dateDisplay),p.createElement(e,{style:{fontSize:8}},`${Ne.length} booking${Ne.length!==1?"s":""}`)),c(false),Ne.map((ce,it)=>(Y++,se(ce,it,Y))))})):p.createElement(p.Fragment,null,l.bookings.map((D,P)=>D.is_early_reminder||D.requires_coupon?null:(x++,se(D,P,x)))))}))),s?p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let l=r.flatMap(i=>i.bookings.filter(g=>g.requires_coupon).map(g=>({...g,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,g],c)=>{let se=g,D=se[0];return p.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,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"}},i),p.createElement(e,null,D.date?new Date(D.date).toDateString():o.toDateString())),p.createElement(e,null,D.phone_number)),p.createElement(View,{style:{height:10,width:"100%"}}),se.map((P,Y)=>p.createElement(View,{key:Y,style:{display:"flex",flexDirection:"row",marginTop:18}},p.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.pujaName}`))),p.createElement(View,null,p.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Vi=Ir;var Pr=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:d})=>{let m=r.sort((x,S)=>{let s=x.nakshatras.length;return S.nakshatras.length-s});return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:n,endDate:a,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.map((x,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"}},`${x.name} - ${x.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"))),x.nakshatras.map((s,l)=>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,l+1)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},p.createElement(e,null,s.name)),p.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},p.createElement(e,null,s.count))))))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Si=Pr;var Nr=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:d,deliveryData:m,reportTiming:x})=>{m=m.map(t=>{let i="";try{let g=JSON.parse(t.address);i=`${g.address}, ${g.locality}, ${g.state} - ${g.pincode}`;}catch(g){console.error("Error parsing address:",g),i=t.address;}return {...t,address:i}});let S=0,s=0,l=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&m.length==0?p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,reportName:"Combined Report",templeName:a}),p.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):p.createElement(p.Fragment,null,p.createElement(Document,null,r.length>0&&p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,reportName:"",templeName:""}),r.some(t=>t.bookings.some(i=>i.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:8}},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:"10%"}},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,"Puja Name")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(g=>g.is_early_reminder&&!g.requires_coupon).map((g,c)=>(s++,p.createElement(View,{wrap:false,key:`${i}-${c}`,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,s)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},p.createElement(e,null,t.name)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,g.quantity)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},p.createElement(e,null,g.date?new Date(g.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),p.createElement(e,{style:{fontSize:10}},`${a}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((t,i)=>t.bookings.every(g=>g.is_early_reminder||g.requires_coupon)?null:(S=0,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"}},`${t.name} - ${t.bookings.length}`)),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:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty"))),t.bookings.map((g,c)=>g.is_early_reminder||g.requires_coupon?null:(S++,p.createElement(p.Fragment,null,p.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,S)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,g.invoiceNumber)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${35*1.11111}%`}},p.createElement(e,null,g.devoteeName)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${25*1.11111}%`}},p.createElement(e,null,g.nakshatra)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${10*1.11111}%`}},p.createElement(e,null,g.quantity))),g.priestNote&&p.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,g.priestNote))))))))))))),r.length>0&&l&&p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=r.flatMap(g=>g.bookings.filter(c=>c.requires_coupon).map(c=>({...c,pujaName:g.name}))),i={};for(let g of t)i[g.invoiceNumber]||(i[g.invoiceNumber]=[]),i[g.invoiceNumber].push(g);return Object.entries(i).map(([g,c],se)=>{let D=c,P=D[0];return p.createElement(View,{key:g,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black"},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"}},g),p.createElement(e,null,P.date?new Date(P.date).toDateString():o.toDateString())),p.createElement(e,null,P.phone_number)),p.createElement(View,{style:{height:10,width:"100%"}}),D.map((Y,Ne)=>p.createElement(View,{key:Ne,style:{display:"flex",flexDirection:"row",marginTop:18}},p.createElement(e,null,`${Y.devoteeName} ----- ${Y.nakshatra} ----- ${Y.pujaName}`))))})})())),d.length>0&&p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,reportName:"Prasad Report",templeName:a}),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,"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:"30%"}},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%"}},p.createElement(e,null,"Qty"))),d.map((t,i)=>p.createElement(View,{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,i+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},p.createElement(e,null,t.invoiceNumber)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,t.devoteeName)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},p.createElement(e,null,t.prasadName)),p.createElement(View,{style:{padding:4,width:"10%"}},p.createElement(e,null,t.quantity)))))),m.length>0&&p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportTiming:x,reportName:"Prasad Delivery Postal Report",templeName:a}),p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},m&&m.map(t=>{let i=Ao.toDataURL(t.qrContent);return p.createElement(View,{wrap:false,key:t.id,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"}},t.name),p.createElement(View,{style:{fontSize:8}},p.createElement(q,{splitat:"words"},t.address)),p.createElement(e,{style:{fontSize:8}},t.phone)),t.qrContent&&i?p.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},p.createElement(Image,{src:i,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: ",t.pujaDetails))})))))},ki=Nr;var Br=({startDate:o,endDate:n,data:a})=>p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,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"))),a?.map((r,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:"55%"}},p.createElement(e,null,r.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},p.createElement(e,null,r.bookings)),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"\u20B9",r.revenue))))))),Pi=Br;var jr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:m})=>{let x=()=>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,"Date")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,"Settlement")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(e,null,"UTR")),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},p.createElement(e,null,"Invoice")),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,"Settlement ID"))),S=(s,l)=>p.createElement(View,{key:l,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,l+1)),p.createElement(View,{style:{padding:4,width:"15%",borderRight:"1px solid #000"}},p.createElement(e,null,s.date)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,s.settlement_amount)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%",fontSize:7}},p.createElement(e,null,s.utr.split("").map((t,i)=>p.createElement(e,{key:i},t)))),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},p.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((t,i)=>p.createElement(e,{key:i},t.number," (",t.amount,")")))),p.createElement(View,{style:{padding:4,width:"20%"}},p.createElement(e,null,s.settlement_id)));return p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),p.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&m&&m.length>0?p.createElement(p.Fragment,null,m.map((s,l)=>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.dayTotal)),x(),s.items.map((t,i)=>S(t,i))))):p.createElement(p.Fragment,null,x(),r.settlements.map((s,l)=>S(s,l)))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Ai=jr;var Lr=({data:o})=>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"}},o.templeName),p.createElement(e,{style:{fontSize:8}},o.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:yt}))),o.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:o.qrContent})):null),p.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},o.status==="confirmed"?p.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ft}):null,p.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),p.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),p.createElement(View,{style:{marginTop:8}},p.createElement(e,{style:{fontSize:9}},"Bill to:"),p.createElement(e,{style:{fontSize:9}},o.devoteeDetails.name),o.devoteeDetails.phone?p.createElement(e,{style:{fontSize:9}},o.devoteeDetails.phone):null,p.createElement(e,{style:{fontSize:9}},o.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"))),o.items.map((n,a)=>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%"}},n.pujaName?p.createElement(e,{style:{fontSize:9}},n.pujaName):null,n.devoteesName?p.createElement(e,{style:{fontSize:7,color:"#333333"}},n.devoteesName):null,n.pujaDate?p.createElement(e,{style:{fontSize:7,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?p.createElement(e,{style:{fontSize:7,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.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:{}},n.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:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),p.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},p.createElement(e,{style:{}},n.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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?p.createElement(View,{style:{marginBottom:4}},p.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.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")),o.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:"),o.prasads.morning.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.afternoon.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.evening.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.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}},o.instructions.map((n,a)=>p.createElement(e,{key:a,style:{fontSize:7}},a+1,") ",n.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=Lr;var Or=({startDate:o,endDate:n,templeName:a,data:r})=>p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),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")),r&&r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},r.map(d=>{let m=d.qrContent,x=Ao.toDataURL(m);return p.createElement(View,{wrap:false,key:d.id,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"}},d.name),p.createElement(View,{style:{fontSize:8}},p.createElement(q,{splitat:"words"},d.address)),p.createElement(e,{style:{fontSize:8}},d.phone)),d.qrContent&&x?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}},d.deliveryMode==="speedpost"?"SP":d.deliveryMode==="international-post"?"IP":"NP"),p.createElement(Image,{src:x,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: ",d.pujaDetails))})):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))),Ci=Or;var Kr=({startDate:o,endDate:n,templeName:a,data:r})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.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"))),r.map((d,m)=>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,m+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(q,null,d.invoiceNo)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(q,null,d.amount)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(q,null,d.paymentDate)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},p.createElement(q,null,d.settlementDate)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},p.createElement(q,null,d.bankUtrNo))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Fi=Kr;var Jr=({startDate:o,endDate:n,templeName:a,data:r})=>p.createElement(p.Fragment,null,p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.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"))),r.map((d,m)=>p.createElement(View,{key:m,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,m+1)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.invoiceNumber)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.baseAmount)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.platformFees)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.platformFeesGST)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.gatewayCharges)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.gatewayChargesGST)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},p.createElement(q,null,d.paymentMode)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},p.createElement(q,null,d.bookingDate)),p.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},p.createElement(q,null,d.settlementDate)),p.createElement(View,{style:{padding:2,width:"12%"}},p.createElement(q,null,d.utrNumber))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Bi=Jr;var Xr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:m,summary:x})=>{let S=r.reduce((s,l)=>s+l.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(I,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.createElement(View,{style:{marginBottom:20}},d&&p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Monthly Summary")),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:"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,"Remarks"))),r.map((s,l)=>p.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},p.createElement(e,null,l+1)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},p.createElement(e,null,s.name)),p.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,s.quantity)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),p.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9,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"}},S)),p.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),d&&m&&m.length>0&&p.createElement(View,null,p.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),m.map((s,l)=>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 #000",borderBottom:"none"}},p.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},s.dateDisplay),p.createElement(e,{style:{fontSize:10}},"Day Total: ",s.dayTotal)),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"))),s.items.map((t,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:"10%"}},p.createElement(e,null,i+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},p.createElement(e,null,t.name)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},p.createElement(e,null,t.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},p.createElement(e,null,De(t.amount||0))))))))):p.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},vi=Xr;var en=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,selectedPujaNames:m=[]})=>{let x=0,S=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?p.createElement(Document,null,p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:d}),m.length>0&&p.createElement(View,{style:{marginTop:8,marginBottom:8}},p.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",m.join(", "))),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(I,{startDate:o,endDate:n,reportTiming:d,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")),m.length>0&&p.createElement(View,{style:{marginTop:8,marginBottom:4}},p.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",m.join(", "))),r.some(l=>l.bookings.some(t=>t.is_early_reminder))&&p.createElement(p.Fragment,null,p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),p.createElement(View,{style:{marginTop:8}},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:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},p.createElement(e,null,"Puja Name")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Date"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,g)=>(S++,p.createElement(View,{key:`${t}-${g}`,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,S)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},p.createElement(e,null,l.name)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},p.createElement(e,null,i.collectionMode||"")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},p.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,p.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Custom Puja Report"),p.createElement(e,{style:{fontSize:10}},`${a}`),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((l,t)=>l.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(x=0,p.createElement(View,{key:t,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"}},`${l.name} - ${l.bookings.length}`)),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:"10%"}},p.createElement(e,null,"Sr No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},p.createElement(e,null,"Invoice No")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},p.createElement(e,null,"Devotee Name")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},p.createElement(e,null,"Nakshatra")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},p.createElement(e,null,"Qty")),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},p.createElement(e,null,"Mode"))),l.bookings.map((i,g)=>i.is_early_reminder||i.requires_coupon?null:(x++,p.createElement(View,{key:g,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},p.createElement(e,null,x)),p.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},p.createElement(View,{style:{display:"flex",flexDirection:"row"}},p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},p.createElement(e,null,i.invoiceNumber)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},p.createElement(e,null,i.devoteeName)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},p.createElement(e,null,i.nakshatra)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},p.createElement(e,null,i.quantity)),p.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},p.createElement(e,null,i.collectionMode||""))),i.priestNote&&p.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},p.createElement(e,null,i.priestNote))))))))))),s?p.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},p.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),p.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let l=r.flatMap(i=>i.bookings.filter(g=>g.requires_coupon).map(g=>({...g,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,g],c)=>{let se=g,D=se[0];return p.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,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"}},i),p.createElement(e,null,D.date?new Date(D.date).toDateString():o.toDateString())),p.createElement(e,null,D.phone_number)),p.createElement(View,{style:{height:10,width:"100%"}}),se.map((P,Y)=>p.createElement(View,{key:Y,style:{display:"flex",flexDirection:"row",marginTop:18}},p.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.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=en;var rn=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d})=>{let m=r[0].shares.length,x=50/(m||1),S=0,s=0,l=new Array(m).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(I,{startDate:o,endDate:n,reportTiming:d,reportName:"Share Report",templeName:a}),r.length<=0?p.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,r.length>0?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")),r[0].shares.map((t,i)=>p.createElement(View,{style:{width:`${x}}%`,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"))),r.map((t,i)=>(S+=t.count,s+=t.total,t.shares.forEach((g,c)=>{l[c]+=g.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}},i+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}},De(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((g,c)=>p.createElement(View,{style:{width:`${x}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},De(g.value)))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},De(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)),l.map((t,i)=>p.createElement(View,{style:{width:`${x}}%`,borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},De(t)))),p.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},p.createElement(e,{style:{fontSize:8}},De(s))))):null)))},Ei=rn;var sn=o=>{let n=0,a=0;return o.data.items.forEach(r=>{n+=r.quantity,a+=r.total;}),p.createElement(Document,null,p.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},p.createElement(I,{startDate:o.startDate,endDate:o.endDate,reportName:"Advance Goods Report",templeName:o.templeName,showGeneratedAt:true}),p.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},o.data.multiplier.name," ="," ",De(o.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"))),o.data.items.map((r,d)=>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,d+1)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},p.createElement(Text,null,r.date)),p.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},p.createElement(Text,null,r.quantity)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,De(r.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,n)),p.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},p.createElement(Text,null,De(a)))))))},_i=sn;var qi={kitchen:{A4:Wt,A5:wi},transaction:{A4:jt,A5:hi},"prasad-delivery":{A4:Et,A5:bi,"110mm":ni},prasad:{A4:_t,A5:Ti,"110mm":ii},"puja-detailed":{A4:ct,A5:Vi,"110mm":Rt},"puja-summary":{A4:qt,A5:Si},"combined-report":{A4:Ot,A5:ki,"110mm":si},"multi-temple-payment":{A4:Gt,A5:Pi},"settlements-report":{A4:Ht,A5:Ai},invoice:{A4:Kt,A5:Ni},"postal-report":{A4:Ut,A5:Ci,"110mm":ai},"payment-settlement-report":{A4:Qt,A5:Fi},"invoice-breakup":{A4:Jt,A5:Bi},"puja-count":{A4:Yt,A5:vi},"custom-report":{A4:mi,A5:ji,"110mm":ui},"invoice-recon":{A4:xi},"share-report":{A4:Ei},"advance-goods":{A4:_i}},$i=class{constructor(n,a){wt(this,"option");wt(this,"size");this.option=n,this.size=a,[{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:d,src:m})=>Font.register({family:d,src:m})),Font.register({family:"Noto Sans",fontWeight:"normal",src:zt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:kt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Pt});}async print(n){let r=qi[this.option][this.size],d=p.createElement(r,{...n}),m=pdf(d).toBlob();return m.then(x=>{var S=URL.createObjectURL(x);if(window!=null){let s=window.open(S,"_blank");setTimeout(()=>{s?.print();},1e3);}}),m}async getBlob(n){let r=qi[this.option][this.size],d=p.createElement(r,{...n});return pdf(d).toBlob()}};
2
- export{Yi as A4Print,io as T2Inch,$i as reportPrinter};
1
+ import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import m from'react';import {maxBy}from'lodash';import No from'qrcode';var Mi=Object.defineProperty;var Oi=(o,n,a)=>n in o?Mi(o,n,{enumerable:true,configurable:true,writable:true,value:a}):o[n]=a;var bt=(o,n,a)=>Oi(o,typeof n!="symbol"?n+"":n,a);var ce=o=>{typeof o=="string"&&(o=new Date(o));let n={day:"2-digit",month:"short",year:"numeric"};return o.toLocaleDateString("en-GB",n).replace(",","")};var me=(o,n=false)=>{if(!n){if(o>=1e7)return `\u20B9${(o/1e7).toFixed(2)}Cr`;if(o>=1e5)return `\u20B9${(o/1e5).toFixed(2)}L`}return o.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:o%1===0?0:2})};var Ae="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",pt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",gt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",zt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Nt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var mt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",ut="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Tt={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:pt});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var Ct=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"}}),Qi=({data:o,dates:n})=>{let a=ce(n[0])===ce(n[1]);return m.createElement(Document,null,m.createElement(Page,{size:"A4",style:Ct.page},m.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Ae}),m.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),m.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",a?ce(n[0]):`${ce(n[0])} - ${ce(n[1])}`),m.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},o?o.map((r,s)=>m.createElement(View,{wrap:false,key:s,style:Ct.pujaTile},m.createElement(View,{style:{display:"flex",flexDirection:"row"}},m.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(s+1).toString().padStart(2,"0"))),m.createElement(View,{style:{flexGrow:1}},m.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},m.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},r.participantName),m.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),m.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},r.participantNakshatra)),m.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},m.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},m.createElement(Text,null,"Puja name : "),m.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},r.pujaName)),a?null:m.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},m.createElement(Text,null,"Date: "),m.createElement(Text,{style:{fontWeight:"bold"}},ce(r.date)))),m.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},m.createElement(Text,null,"Priest Note: ",r.priestNote)):null),m.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},m.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",r.amount),r.paymentStatus=="pending"?m.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},m.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},Ji=Qi;Font.register({family:"Roboto",fontWeight:"normal",src:pt});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var le=1,ot=25*le,Bt=StyleSheet.create({page:{padding:10*le,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*le,paddingHorizontal:10*le,fontSize:ot,border:`${5*le}px solid black`,borderRadius:5*le,width:"100%",display:"flex",flexDirection:"column"}}),eo=({data:o,dates:n})=>{let a=ce(n[0])===ce(n[1]);return m.createElement(Document,null,m.createElement(Page,{dpi:200,size:[457*le],style:Bt.page},m.createElement(Image,{fixed:true,style:{height:55*le,width:274*le,marginBottom:10*le,marginHorizontal:"auto"},src:Ae}),m.createElement(Text,{style:{fontSize:25*le,marginBottom:5*le,marginHorizontal:"auto"}},"Puja List"),m.createElement(Text,{style:{fontSize:20*le,marginBottom:5*le,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",a?ce(n[0]):`${ce(n[0])} - ${ce(n[1])}`),m.createElement(Text,{style:{fontSize:17*le,marginBottom:20*le,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),m.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*le}},o?o.map((r,s)=>m.createElement(View,{wrap:false,key:s,style:Bt.pujaTile},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*le}},m.createElement(Text,{style:{opacity:.6,marginRight:10*le}},"#",(s+1).toString().padStart(2,"0")),m.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*le}},r.paymentStatus=="pending"?m.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*le,paddingHorizontal:5*le,borderRadius:5*le,marginTop:3*le}},m.createElement(Text,{style:{color:"#ffffff",fontSize:ot}},"Pending")):null,m.createElement(Text,{style:{fontWeight:"bold",fontSize:ot}},"Rs ",r.amount))),m.createElement(View,{style:{flexGrow:1}},m.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*le,gap:3*le}},m.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},r.participantName),m.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},"-"),m.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},r.participantNakshatra)),m.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*le}},m.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},m.createElement(Text,null,"Puja name : "),m.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},r.pujaName)),a?null:m.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},m.createElement(Text,null,"Date: "),m.createElement(Text,{style:{fontWeight:"bold"}},ce(r.date)))),m.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*le}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*le}},m.createElement(Text,null,"Priest Note: ",r.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:o={},children:n})=>{let a=d=>{let t=maxBy(Object.entries(oo),([i,p])=>{let P=d.match(p);return P?P.length:0});return t?t[0]:"Latin"},r=d=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(d));function s(d){return d.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let g=d=>{let t=[],i=null,p="";for(let P of d){P=s(P);let R=a(P);R!==i?(p&&t.push({text:p,script:i}),i=R,p=P):p+=P;}return p&&t.push({text:p,script:i}),t},f=[];n&&typeof n=="string"&&!Array.isArray(n)&&!r(n)&&g(n).forEach((t,i)=>{let p=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;f.push(m.createElement(Text,{key:i,style:{fontFamily:p}},t.text));});let D=[],l={fontFamily:"Noto Sans"};return Array.isArray(o)?D=[...o,l]:o&&Object.keys(o).length>0?D=[o,l]:D=[l],m.createElement(Text,{style:D},f?.length?f:n)},e=ro;var lo=({startDate:o,endDate:n,reportTiming:a,templeName:r,reportName:s,showGeneratedAt:g=true})=>m.createElement(m.Fragment,null,m.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:Ae}),g&&m.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),n?m.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",o.toDateString()," - ",n.toDateString()):m.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",o.toDateString()),a&&Object.keys(Tt).includes(a)?m.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Tt[a]," Report"):null,m.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},s),m.createElement(e,{style:{fontSize:12}},`${r}`)),I=lo;var po=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:s})=>m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,templeName:a,reportTiming:s,reportName:"Temple Prasad (Kitchen) Report"}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},m.createElement(e,null,"Prasad Name")),m.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},m.createElement(e,null,"Quantity"))),r.map((g,f)=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,f+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},m.createElement(e,null,g.name)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},m.createElement(e,null,g.quantity))))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Et=po;var uo=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayWiseTotals:g,summary:f})=>{let D=f?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),l=f?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),d=f?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.creditedAmount,0);return m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},m.createElement(View,{style:{marginBottom:15}},m.createElement(e,{style:{fontSize:10}},"Total Bookings Amount: ",D.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),m.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),m.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",d.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),s&&g&&g.length>0&&m.createElement(View,{style:{marginBottom:20}},m.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"Day Wise Totals")),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Puja Amount")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Postal Charges")),m.createElement(View,{style:{padding:6,width:"25%"}},m.createElement(e,null,"Credited Amount"))),g.map((t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.dateDisplay)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:6,width:"25%"}},m.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),m.createElement(View,null,s&&m.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"All Bookings")),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},m.createElement(e,null,"Puja Amt")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},m.createElement(e,null,"Delivery")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},m.createElement(e,null,"Credited Amt")),m.createElement(View,{style:{padding:6,width:"20%"}},m.createElement(e,null,"Transaction ID"))),r.map((t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},m.createElement(e,null,i+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},m.createElement(e,null,t.date," ",t.time)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},m.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?m.createElement(View,{style:{padding:6,width:"58%"}},m.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):m.createElement(m.Fragment,null,m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},m.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},m.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},m.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:6,width:"20%"}},m.createElement(e,null,t.transactionId))))))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},ct=uo;var fo=({children:o,splitat:n})=>{if(!o||typeof o!="string")return null;let a="";return n=="words"&&(a=" "),m.createElement(m.Fragment,null,m.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},o.split(a).map((r,s)=>m.createElement(m.Fragment,null,m.createElement(e,{key:s},r,n=="words"?" ":"")))))},q=fo;var ho=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayGroups:g})=>{let f=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},D=r.map(f),l=()=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Address")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:6,width:"15%"}},m.createElement(e,null,"Amount"))),d=(t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},m.createElement(q,null,t.invoiceNumber)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},m.createElement(e,null,t.devoteeName)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.address)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,t.pujaName)),m.createElement(View,{style:{padding:6,width:"15%"}},m.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),D.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},s&&g&&g.length>0?m.createElement(m.Fragment,null,g.map((t,i)=>{let p=t.items.map(f);return m.createElement(View,{key:t.dateKey,style:{marginBottom:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.dateDisplay),m.createElement(e,{style:{fontSize:10}},t.count," delivery",t.count!==1?" items":" item")),l(),p.map((P,R)=>d(P,R)))})):m.createElement(m.Fragment,null,l(),D.map((t,i)=>d(t,i)))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Lt=ho;var To=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:s,isDayWiseGrouped:g,dayGroups:f,isEmbed:D=false})=>{r.sort((p,P)=>p.invoiceNumber.localeCompare(P.invoiceNumber));let d=()=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,"Invoice Number")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,"Prasad Name")),m.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:6,width:"7%"}},m.createElement(e,null,"Mode"))),t=(p,P)=>m.createElement(View,{key:P,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,P+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,p.invoiceNumber)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},m.createElement(e,null,p.devoteeName)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},m.createElement(e,null,p.pujaName," - ",p.prasadName)),m.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},m.createElement(e,null,p.quantity)),m.createElement(View,{style:{padding:6,width:"7%"}},m.createElement(e,null,p.collectionMode))),i=m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:s}),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},m.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g&&f&&f.length>0?m.createElement(m.Fragment,null,f.map((p,P)=>m.createElement(View,{key:p.dateKey,style:{marginBottom:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},p.dateDisplay),m.createElement(e,{style:{fontSize:10}},p.count," item",p.count!==1?"s":"")),d(),p.items.map((R,j)=>t(R,j))))):m.createElement(m.Fragment,null,d(),r.map((p,P)=>t(p,P)))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return D?i:m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},i))},yt=To;var Vo=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:s,isDayWiseGrouped:g,isEmbed:f=false})=>{let D=0,l=0,d=r.some(i=>i.bookings.some(p=>p.requires_coupon));if(!r||r.length===0){let i=m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:s}),m.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return f?i:m.createElement(Document,null,i)}let t=m.createElement(m.Fragment,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:s,reportName:"",templeName:""}),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},m.createElement(e,{style:{fontSize:8}},"C = Collec | D = Distribute | P = Postal")),r.some(i=>i.bookings.some(p=>p.is_early_reminder))&&m.createElement(m.Fragment,null,m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),m.createElement(View,{style:{marginTop:10}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Date"))))),r.some(i=>i.bookings.some(p=>p.is_early_reminder&&!p.requires_coupon))?r.flatMap((i,p)=>i.bookings.filter(P=>P.is_early_reminder&&!P.requires_coupon).map((P,R)=>(l++,m.createElement(View,{key:`${p}-${R}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,l)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},m.createElement(e,null,i.name)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,P.quantity)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},m.createElement(e,null,P.collectionMode||"")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},m.createElement(e,null,P.date?new Date(P.date).toDateString():"")))))):null,m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),m.createElement(e,{style:{fontSize:12}},`${a}`),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((i,p)=>{if(i.bookings.every(c=>c.is_early_reminder||c.requires_coupon))return null;D=0;let P=i.bookings.some(c=>c.topping_name),R=g&&i.dayGroups&&i.dayGroups.length>0,j=(c=false)=>P?m.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:c?void 0:"none"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},m.createElement(e,null,"Sr")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},m.createElement(e,null,"Devotee")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"31%"}},m.createElement(e,null,"Offerings"))):m.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:c?void 0:"none"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Invoice No")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode"))),se=(c,Fe,qe)=>c.is_early_reminder||c.requires_coupon?null:P?m.createElement(View,{key:Fe,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},m.createElement(e,null,qe)),m.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},m.createElement(e,null,c.invoiceNumber)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,c.devoteeName)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},m.createElement(e,null,c.nakshatra)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"31%"}},m.createElement(e,null,c.topping_name||""))):m.createElement(View,{key:Fe,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,qe)),m.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},m.createElement(View,{style:{display:"flex",flexDirection:"row"}},m.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},m.createElement(e,null,c.invoiceNumber)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},m.createElement(e,null,c.devoteeName)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},m.createElement(e,null,c.nakshatra)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},m.createElement(e,null,c.quantity)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},m.createElement(e,null,c.collectionMode||""))),c.priestNote&&m.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},m.createElement(e,null,c.priestNote))));return m.createElement(View,{key:p,style:{marginBottom:25}},m.createElement(View,{wrap:false,minPresenceAhead:20},m.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${i.name} - ${i.totalBookings||i.bookings.length}`),!R&&j(true)),R?m.createElement(m.Fragment,null,i.dayGroups.map((c,Fe)=>{let qe=0,lt=c.items.filter(at=>!at.is_early_reminder&&!at.requires_coupon);return lt.length===0?null:m.createElement(View,{key:c.dateKey,style:{marginTop:Fe>0?15:0}},m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:6}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},c.dateDisplay),m.createElement(e,{style:{fontSize:9}},`${lt.length} booking${lt.length!==1?"s":""}`)),j(false),lt.map((at,$i)=>(qe++,se(at,$i,qe))))})):m.createElement(m.Fragment,null,i.bookings.map((c,Fe)=>c.is_early_reminder||c.requires_coupon?null:(D++,se(c,Fe,D)))))}))),d?m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Ae}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let i=r.flatMap(P=>P.bookings.filter(R=>R.requires_coupon).map(R=>({...R,pujaName:P.name}))),p={};for(let P of i)p[P.invoiceNumber]||(p[P.invoiceNumber]=[]),p[P.invoiceNumber].push(P);return Object.entries(p).map(([P,R],j)=>{let se=R,c=se[0];return m.createElement(View,{key:P,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},m.createElement(e,{style:{fontWeight:"semibold"}},P),m.createElement(e,null,c.date?new Date(c.date).toDateString():o.toDateString())),m.createElement(e,null,c.phone_number)),m.createElement(View,{style:{height:15,width:"100%"}}),se.map((Fe,qe)=>m.createElement(View,{key:qe,style:{display:"flex",flexDirection:"row",marginTop:25}},m.createElement(e,null,`${Fe.devoteeName} ----- ${Fe.nakshatra} ----- ${Fe.pujaName}`))),m.createElement(View,null,m.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return f?t:m.createElement(Document,null,t)},ft=Vo;var Po=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:s})=>{let g=r.sort((f,D)=>{let l=f.nakshatras.length;return D.nakshatras.length-l});return m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:n,endDate:a,reportTiming:s,reportName:"Puja Summary",templeName:o}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.map((f,D)=>m.createElement(m.Fragment,null,m.createElement(View,{style:{marginBottom:25}},m.createElement(View,null,m.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${f.name} - ${f.totalCount}`)),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},m.createElement(e,null,"Quantity"))),f.nakshatras.map((l,d)=>m.createElement(m.Fragment,null,m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,d+1)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},m.createElement(e,null,l.name)),m.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},m.createElement(e,null,l.count))))))))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},$t=Po;var Co=({startDate:o,endDate:n,templeName:a,data:r,isEmbed:s=false})=>{let g=m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:15,marginTop:10,fontSize:9}},m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),r&&r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},r.map(f=>{let D=f.qrContent,l=No.toDataURL(D);return m.createElement(View,{wrap:false,key:f.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},m.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},m.createElement(View,{style:{width:240}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},f.name),m.createElement(View,{style:{fontSize:10}},m.createElement(e,{style:{fontSize:10}},f.address)),m.createElement(e,{style:{fontSize:10}},f.phone)),m.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},f.deliveryMode==="speedpost"?"SP":f.deliveryMode==="international-post"?"IP":"NP"),f.qrContent&&l?m.createElement(Image,{src:l,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,m.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),m.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),m.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",f.pujaDetails))})):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return s?g:m.createElement(Document,null,g)},xt=Co;var Bo=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:s,deliveryData:g,reportTiming:f})=>{g=g.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&s.length==0&&g.length==0?m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:f,reportName:"Combined Report",templeName:a}),m.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):m.createElement(m.Fragment,null,m.createElement(Document,null,r.length>0&&ft({startDate:o,endDate:n,templeName:a,pujas:r,isEmbed:true}),s.length>0&&yt({startDate:o,endDate:n,templeName:a,data:s,isEmbed:true}),g.length>0&&xt({startDate:o,endDate:n,templeName:a,data:g,isEmbed:true})))},Ot=Bo;var Wo=({startDate:o,endDate:n,data:a})=>m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Temple Payment Report",templeName:""}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,"S.No.")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},m.createElement(e,null,"Temple Name")),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},m.createElement(e,null,"Bookings")),m.createElement(View,{style:{padding:6,width:"20%"}},m.createElement(e,null,"Revenue"))),a?.map((r,s)=>m.createElement(View,{key:s,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,s+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},m.createElement(e,null,r.name)),m.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},m.createElement(e,null,r.bookings)),m.createElement(View,{style:{padding:6,width:"20%"}},m.createElement(e,null,"\u20B9",r.revenue))))))),Gt=Wo;var Lo=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayGroups:g})=>{let f=()=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Settlement")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"UTR")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:6,width:"20%"}},m.createElement(e,null,"Settlement ID"))),D=(l,d)=>m.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,d+1)),m.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},m.createElement(e,null,l.date)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,l.settlement_amount)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},m.createElement(e,null,l.utr.split("").map((t,i)=>m.createElement(e,{key:i},t)))),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},m.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((t,i)=>m.createElement(e,{key:i},t.number," (",t.amount,")")))),m.createElement(View,{style:{padding:6,width:"20%"}},m.createElement(e,null,l.settlement_id)));return m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),m.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},s&&g&&g.length>0?m.createElement(m.Fragment,null,g.map((l,d)=>m.createElement(View,{key:l.dateKey,style:{marginBottom:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.dateDisplay),m.createElement(e,{style:{fontSize:10}},l.count," settlement",l.count!==1?"s":""," | Total: ",l.dayTotal)),f(),l.items.map((t,i)=>D(t,i))))):m.createElement(m.Fragment,null,f(),r.settlements.map((l,d)=>D(l,d)))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ht=Lo;var $o=({data:o})=>m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},m.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),m.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},o.templeName),m.createElement(e,{style:{fontSize:10}},o.templeAddress),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},m.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),m.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:mt}))),o.qrContent?m.createElement(View,{style:{width:85}},m.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:o.qrContent})):null),m.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},o.status==="confirmed"?m.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ut}):null,m.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),m.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),m.createElement(View,{style:{marginTop:10}},m.createElement(e,{style:{fontSize:11}},"Bill to:"),m.createElement(e,{style:{fontSize:11}},o.devoteeDetails.name),o.devoteeDetails.phone?m.createElement(e,{style:{fontSize:11}},o.devoteeDetails.phone):null,m.createElement(e,{style:{fontSize:11}},o.bookingDate)),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},m.createElement(e,null,"Item Description")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},m.createElement(e,null,"Price")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},m.createElement(e,null,"Quantity")),m.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},m.createElement(e,null,"Total"))),o.items.map((n,a)=>m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},n.pujaName?m.createElement(e,{style:{fontSize:11}},n.pujaName):null,n.devoteesName?m.createElement(e,{style:{fontSize:9,color:"#333333"}},n.devoteesName):null,n.pujaDate?m.createElement(e,{style:{fontSize:9,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?m.createElement(e,{style:{fontSize:9,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.timing}`:null):null),m.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement(e,{style:{}},n.basePujPrice)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement(e,{style:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),m.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement(e,{style:{}},n.totalPrice))))),m.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},m.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},m.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),m.createElement(e,null,o.paymentMethod)),m.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},m.createElement(View,{style:{width:"50%",textAlign:"right"}},m.createElement(e,null,"Subtotal: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.subTotal))),o.postalCharges?m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Postal Charges: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.postalCharges))):null,m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Payment Gateway Charges: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.paymentGatewayCharges))),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Platform Charges: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.platformCharges))),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"GST (18%): ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.gst))),m.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Total: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.totalAmount))))),o.prasadCollectionMode?m.createElement(View,{style:{marginBottom:5}},m.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?m.createElement(m.Fragment,null,m.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.prasads.evening.length>0)?m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},m.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),o.prasads.morning.length>0?m.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"}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),o.prasads.morning.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.prasads.afternoon.length>0?m.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"}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),o.prasads.afternoon.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.prasads.evening.length>0?m.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"}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),o.prasads.evening.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.instructions.length>0?m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},m.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},m.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),m.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},o.instructions.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:8}},a+1,") ",n.instruction)))):null,m.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),m.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),Kt=$o;var Go=({startDate:o,endDate:n,templeName:a,data:r})=>m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Invoice No")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Amount")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"Payment Date")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"Settlement Date")),m.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},m.createElement(e,null,"Bank UTR No"))),r.map((s,g)=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,g+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(q,null,s.invoiceNo)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(q,null,s.amount)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(q,null,s.paymentDate)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(q,null,s.settlementDate)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},m.createElement(q,null,s.bankUtrNo))))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ut=Go;var Uo=({startDate:o,endDate:n,templeName:a,data:r})=>m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Invoice Number")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Base Amount")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Platform Fees")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Platform Fees GST")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Gateway Charges")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Gateway GST")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Payment Mode")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Booking Date")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Settlement Date")),m.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},m.createElement(e,null,"UTR Number"))),r.map((s,g)=>m.createElement(View,{key:g,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},m.createElement(e,null,g+1)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.invoiceNumber)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.baseAmount)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.platformFees)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.platformFeesGST)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.gatewayCharges)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.gatewayChargesGST)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.paymentMode)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},m.createElement(q,null,s.bookingDate)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},m.createElement(q,null,s.settlementDate)),m.createElement(View,{style:{padding:3,width:"12%"}},m.createElement(q,null,s.utrNumber))))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Qt=Uo;var Yo=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayGroups:g,summary:f})=>{let D=r.reduce((l,d)=>l+d.quantity,0);return m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{marginBottom:25}},s&&m.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Monthly Summary")),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Total Count")),m.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},m.createElement(e,null,"Remarks"))),r.map((l,d)=>m.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,d+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},m.createElement(e,null,l.name)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,l.quantity)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},m.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,{style:{fontWeight:"bold"}},D)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),s&&g&&g.length>0&&m.createElement(View,null,m.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),g.map((l,d)=>m.createElement(View,{key:l.dateKey,style:{marginBottom:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.dateDisplay),l.dayPostalTotal>0?m.createElement(m.Fragment,null,m.createElement(View,{style:{display:"flex",flexDirection:"column",width:"30%"}},m.createElement(View,{style:{display:"flex",flexDirection:"row",padding:2}},m.createElement(View,{style:{width:"65%"}},m.createElement(e,{style:{fontSize:10}},"Puja Total")),m.createElement(View,{style:{width:"35%"}},m.createElement(e,{style:{fontSize:10,textAlign:"right"}},me(l.dayPujaTotal||0)))),m.createElement(View,{style:{display:"flex",flexDirection:"row",padding:2}},m.createElement(View,{style:{width:"65%"}},m.createElement(e,{style:{fontSize:10}},"Postal Charges")),m.createElement(View,{style:{width:"35%"}},m.createElement(e,{style:{fontSize:10,textAlign:"right"}},me(l.dayPostalTotal||0)))),m.createElement(View,{style:{display:"flex",flexDirection:"row",padding:2}},m.createElement(View,{style:{width:"65%"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Grand Total")),m.createElement(View,{style:{width:"35%"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold",textAlign:"right"}},me(l.dayGrandTotal||0)))))):m.createElement(e,{style:{fontSize:10,fontWeight:"bold",textAlign:"right"}},"Grand Total:"," ",me(l.dayGrandTotal||0))),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Count")),m.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},m.createElement(e,null,"Amount"))),l.items.map((t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,i+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},m.createElement(e,null,t.name)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,t.quantity)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},m.createElement(e,null,me(t.amount||0))))))))):m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Jt=Yo;var Zo=({startDate:o,templeName:n,pujas:a,reportTiming:r})=>{return !a||a.length===0?m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),r&&m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," Report")),a.map((g,f)=>{let D=g.bookings.filter(l=>!l.is_early_reminder&&!l.requires_coupon);return D.length===0?null:m.createElement(View,{key:f,style:{marginBottom:20},wrap:false},m.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},g.name),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},D.length," booking",D.length>1?"s":"")),D.map((l,d)=>(m.createElement(View,{key:d,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:11,color:"#666"}},l.invoiceNumber)),m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),m.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:l.topping_name?6:0}},m.createElement(e,{style:{fontSize:12}},l.nakshatra),m.createElement(e,{style:{fontSize:12}},"Qty: ",l.quantity)),l.topping_name&&m.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},m.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",l.topping_name)),l.priestNote&&m.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},m.createElement(e,{style:{fontSize:11,color:"#666"}},l.priestNote))))))})))},Xt=Zo;var Xo=({startDate:o,templeName:n,data:a,reportTiming:r,isDayWiseGrouped:s,dayGroups:g})=>{if(!a||a.length===0)return m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let f=a.sort((l,d)=>l.invoiceNumber.localeCompare(d.invoiceNumber)),D=(l,d)=>m.createElement(View,{key:d,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:11,color:"#666"}},l.invoiceNumber)),m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),m.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},m.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},m.createElement(e,{style:{fontSize:12}},l.prasadName),m.createElement(e,{style:{fontSize:12}}," (qty: ",l.quantity,")")),m.createElement(e,{style:{fontSize:12,color:"#666"}},l.collectionMode)));return m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),r&&m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," Report")),m.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},f.length," item",f.length>1?"s":"")),s&&g&&g.length>0?m.createElement(m.Fragment,null,g.map((l,d)=>m.createElement(View,{key:l.dateKey,style:{marginBottom:12}},m.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},m.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},m.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},l.dateDisplay),m.createElement(e,{style:{fontSize:11}},l.count," item",l.count!==1?"s":""))),l.items.map((t,i)=>D(t,i))))):m.createElement(m.Fragment,null,f.map((l,d)=>D(l,d)))))},ti=Xo;var Ro=({startDate:o,templeName:n,data:a,isDayWiseGrouped:r,dayGroups:s})=>{let g=l=>{let d="";try{let t=JSON.parse(l.address);d=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{d=l.address;}return {...l,address:d}},f=a.map(g);if(!f||f.length===0)return m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let D=(l,d)=>m.createElement(View,{key:d,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:11}},l.address)),l.phoneNumber&&m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:12}},"Ph: ",l.phoneNumber)),m.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},m.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",l.note||l.pujaName)));return m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString())),m.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},f.length," delivery",f.length>1?" items":" item")),r&&s&&s.length>0?m.createElement(m.Fragment,null,s.map((l,d)=>{let t=l.items.map(g);return m.createElement(View,{key:l.dateKey,style:{marginBottom:12}},m.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},m.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},m.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},l.dateDisplay),m.createElement(e,{style:{fontSize:11}},l.count," item",l.count!==1?"s":""))),t.map((i,p)=>D(i,p)))})):m.createElement(m.Fragment,null,f.map((l,d)=>D(l,d)))))},ri=Ro;var er=({startDate:o,templeName:n,pujaData:a,prasadData:r,deliveryData:s,reportTiming:g})=>{if(a.length===0&&r.length===0&&s.length===0)return m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let D=r.sort((l,d)=>l.invoiceNumber.localeCompare(d.invoiceNumber));return m.createElement(Document,null,a.length>0&&m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),g&&m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.charAt(0).toUpperCase()+g.slice(1)," Report")),m.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),a.map((l,d)=>{let t=l.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return t.length===0?null:m.createElement(View,{key:d,style:{marginBottom:20},wrap:false},m.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},l.name),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((i,p)=>(m.createElement(View,{key:p,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),m.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},m.createElement(e,{style:{fontSize:12}},i.nakshatra),m.createElement(e,{style:{fontSize:12}},"Qty: ",i.quantity)),i.priestNote&&m.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},m.createElement(e,{style:{fontSize:11,color:"#666"}},i.priestNote))))))})),r.length>0&&m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),g&&m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.charAt(0).toUpperCase()+g.slice(1)," Report")),m.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},D.length," item",D.length>1?"s":"")),D.map((l,d)=>m.createElement(View,{key:d,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:11,color:"#666"}},l.invoiceNumber)),m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),m.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},m.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},m.createElement(e,{style:{fontSize:12}},l.prasadName),m.createElement(e,{style:{fontSize:12}}," (qty: ",l.quantity,")")),m.createElement(e,{style:{fontSize:12,color:"#666"}},l.collectionMode))))),s.length>0&&m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString())),m.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.length," delivery",s.length>1?" items":" item")),s.map((l,d)=>m.createElement(View,{key:d,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.name),m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:11}},l.address)),l.phone&&m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:12}},"Ph: ",l.phone)),m.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},m.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",l.pujaDetails))))))},li=er;var tr=({startDate:o,templeName:n,data:a})=>!a||a.length===0?m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString())),m.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:8}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," label",a.length>1?"s":"")),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"center",gap:10,marginBottom:12,fontSize:9}},m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"NP"),"-Normal"),m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"SP"),"-Speed"),m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"IP"),"-International")),a.map(r=>m.createElement(View,{key:r.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:5}},m.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},r.name),m.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP")),m.createElement(View,{style:{marginBottom:5}},m.createElement(e,{style:{fontSize:11}},r.address)),m.createElement(e,{style:{fontSize:11,marginBottom:5}},r.phone),m.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),m.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",r.pujaDetails))))),ai=tr;var or=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:s,selectedPujaNames:g=[]})=>{let f=0,D=0,l=r.some(d=>d.bookings.some(t=>t.requires_coupon));return !r||r.length===0?m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:s}),g.length>0&&m.createElement(View,{style:{marginTop:10,marginBottom:10}},m.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),m.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:s,reportName:"",templeName:""}),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},m.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),g.length>0&&m.createElement(View,{style:{marginTop:10,marginBottom:5}},m.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),r.some(d=>d.bookings.some(t=>t.is_early_reminder))&&m.createElement(m.Fragment,null,m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),m.createElement(View,{style:{marginTop:10}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Date"))))),r.some(d=>d.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((d,t)=>d.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(D++,m.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,D)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},m.createElement(e,null,d.name)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,i.quantity)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},m.createElement(e,null,i.collectionMode||"")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},m.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),m.createElement(e,{style:{fontSize:12}},`${a}`),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((d,t)=>d.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(f=0,m.createElement(View,{key:t,style:{marginBottom:25}},m.createElement(View,null,m.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.bookings.length}`)),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Invoice No")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode"))),d.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(f++,m.createElement(View,{key:p,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,f)),m.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},m.createElement(View,{style:{display:"flex",flexDirection:"row"}},m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},m.createElement(e,null,i.invoiceNumber)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},m.createElement(e,null,i.devoteeName)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},m.createElement(e,null,i.nakshatra)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},m.createElement(e,null,i.quantity)),m.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},m.createElement(e,null,i.collectionMode||""))),i.priestNote&&m.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},m.createElement(e,null,i.priestNote))))))))))),l?m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Ae}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let d=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of d)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],P)=>{let R=p,j=R[0];return m.createElement(View,{key:i,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},m.createElement(e,{style:{fontWeight:"semibold"}},i),m.createElement(e,null,j.date?new Date(j.date).toDateString():o.toDateString())),m.createElement(e,null,j.phone_number)),m.createElement(View,{style:{height:15,width:"100%"}}),R.map((se,c)=>m.createElement(View,{key:c,style:{display:"flex",flexDirection:"row",marginTop:25}},m.createElement(e,null,`${se.devoteeName} ----- ${se.nakshatra} ----- ${se.pujaName}`))),m.createElement(View,null,m.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},gi=or;var rr=({startDate:o,templeName:n,pujas:a,reportTiming:r,selectedPujaNames:s=[]})=>{return !a||a.length===0?m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):m.createElement(Document,null,m.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},m.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},m.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),m.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),r&&m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," ","Report")),s.length>0&&m.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},m.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),m.createElement(e,{style:{fontSize:9,marginTop:2}},s.join(", "))),a.map((f,D)=>{let l=f.bookings.filter(d=>!d.is_early_reminder&&!d.requires_coupon);return l.length===0?null:m.createElement(View,{key:D,style:{marginBottom:20},wrap:false},m.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},m.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},f.name),m.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," booking",l.length>1?"s":"")),l.map((d,t)=>(m.createElement(View,{key:t,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},m.createElement(View,{style:{marginBottom:6}},m.createElement(e,{style:{fontSize:11,color:"#666"}},d.invoiceNumber)),m.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},d.devoteeName),m.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},m.createElement(e,{style:{fontSize:12}},d.nakshatra),m.createElement(e,{style:{fontSize:12}},"Qty: ",d.quantity)),d.collectionMode&&m.createElement(View,{style:{marginTop:4}},m.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",d.collectionMode)),d.priestNote&&m.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},m.createElement(e,{style:{fontSize:11,color:"#666"}},d.priestNote))))))}),m.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},m.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},yi=rr;var dr=o=>{let n=0,a=0,r=0;for(let s of o.items)s.paymentMethod!="INTERNATIONAL_CARD"&&s.platformFees>0&&(n+=s.platformFees,a+=s.platformFeesGST);return r=a+n,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Ae}),m.createElement(View,{style:{flexDirection:"row",width:"100%"}},m.createElement(View,{style:{width:"50%"}},m.createElement(Text,null,"INVOICE RECON"),m.createElement(Text,{style:{fontSize:12,marginTop:6}},o.templeName," "),m.createElement(Text,{style:{fontSize:12}},"Bookings from ",o.startDate.toDateString()," to"," ",o.endDate.toDateString()," ")),m.createElement(View,{style:{width:"50%",alignItems:"flex-end"}},m.createElement(Text,{style:{fontSize:12,fontWeight:"semibold"}},"Infinix AI Pvt Ltd"," "),m.createElement(Text,{style:{fontSize:12}},"GSTIN: 32AAICI0436P1ZG"," "))),m.createElement(Text,{style:{fontSize:10,backgroundColor:"#fffca6",marginTop:10}},"Bookings marked with yellow are not to be counted"),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},m.createElement(Text,null,"Sr no")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},m.createElement(Text,null,"Invoice Number")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},m.createElement(Text,null,"Booking Date")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},m.createElement(Text,null,"Platform Fees")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},m.createElement(Text,null,"Plt Fees GST")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},m.createElement(Text,null,"Total")),m.createElement(View,{style:{padding:3,width:"12%",borderRight:"1px solid #000"}},m.createElement(Text,null,"Pay Method")),m.createElement(View,{style:{padding:3,width:"19%"}},m.createElement(Text,null,"Transaction ID")))),o.items.map((s,g)=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${s.platformFees==0||s.paymentMethod=="INTERNATIONAL_CARD"?"#fffca6":""}`}},m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},m.createElement(Text,null,g+1)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},m.createElement(Text,null,s.invoiceNumber)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},m.createElement(Text,null,s.bookingDate)),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},m.createElement(Text,null,me(s.platformFees))),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},m.createElement(Text,null,me(s.platformFeesGST))),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},m.createElement(Text,null,me(s.platformFees+s.platformFeesGST))),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},m.createElement(Text,null,s.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),m.createElement(View,{style:{padding:3,width:"19%"}},m.createElement(Text,null,s.transactionID)))),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"semibold"}},m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},m.createElement(Text,null,"Total")),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},m.createElement(Text,null,me(n))),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},m.createElement(Text,null,me(a))),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},m.createElement(Text,null,me(r))),m.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}}),m.createElement(View,{style:{padding:3,width:"19%"}})),m.createElement(View,{style:{marginTop:10,fontSize:12}},m.createElement(Text,null,"Total Payable: ",me(r)))))},fi=dr;var gr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:s})=>m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,templeName:a,reportTiming:s,reportName:"Temple Prasad (Kitchen) Report"}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},m.createElement(e,null,"Prasad Name")),m.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},m.createElement(e,null,"Quantity"))),r.map((g,f)=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,f+1)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},m.createElement(e,null,g.name)),m.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},m.createElement(e,null,g.quantity))))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),xi=gr;var yr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayWiseTotals:g,summary:f})=>{let D=f?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),l=f?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),d=f?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.creditedAmount,0);return m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},m.createElement(View,{style:{marginBottom:12}},m.createElement(e,{style:{fontSize:9}},"Total Bookings Amount: ",D.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),m.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),m.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",d.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),s&&g&&g.length>0&&m.createElement(View,{style:{marginBottom:15}},m.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Day Wise Totals")),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Puja Amount")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Postal Charges")),m.createElement(View,{style:{padding:4,width:"25%"}},m.createElement(e,null,"Credited Amount"))),g.map((t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.dateDisplay)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:4,width:"25%"}},m.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),m.createElement(View,null,s&&m.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"All Bookings")),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},m.createElement(e,null,"Puja Amt")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},m.createElement(e,null,"Delivery")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},m.createElement(e,null,"Credited Amt")),m.createElement(View,{style:{padding:4,width:"20%"}},m.createElement(e,null,"Transaction ID"))),r.map((t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},m.createElement(e,null,i+1)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},m.createElement(e,null,t.date," ",t.time)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},m.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?m.createElement(View,{style:{padding:4,width:"58%"}},m.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):m.createElement(m.Fragment,null,m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},m.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},m.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},m.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),m.createElement(View,{style:{padding:4,width:"20%"}},m.createElement(e,null,t.transactionId))))))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},wi=yr;var wr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayGroups:g})=>{let f=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},D=r.map(f),l=()=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"18%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,"Address")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:4,width:"15%"}},m.createElement(e,null,"Amount"))),d=(t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},m.createElement(q,null,t.invoiceNumber)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"18%"}},m.createElement(e,null,t.devoteeName)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},m.createElement(e,null,t.address)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,t.pujaName)),m.createElement(View,{style:{padding:4,width:"15%"}},m.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),D.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},s&&g&&g.length>0?m.createElement(m.Fragment,null,g.map((t,i)=>{let p=t.items.map(f);return m.createElement(View,{key:t.dateKey,style:{marginBottom:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),m.createElement(e,{style:{fontSize:9}},t.count," delivery",t.count!==1?" items":" item")),l(),p.map((P,R)=>d(P,R)))})):m.createElement(m.Fragment,null,l(),D.map((t,i)=>d(t,i)))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},hi=wr;var Tr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:s,isDayWiseGrouped:g,dayGroups:f})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.invoiceNumber));let l=()=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,"Invoice Number")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,"Prasad Name")),m.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:4,width:"7%"}},m.createElement(e,null,"Mode"))),d=(t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,i+1)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,t.invoiceNumber)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},m.createElement(e,null,t.devoteeName)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},m.createElement(e,null,t.pujaName," - ",t.prasadName)),m.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},m.createElement(e,null,t.quantity)),m.createElement(View,{style:{padding:4,width:"7%"}},m.createElement(e,null,t.collectionMode)));return m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:s}),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},m.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g&&f&&f.length>0?m.createElement(m.Fragment,null,f.map((t,i)=>m.createElement(View,{key:t.dateKey,style:{marginBottom:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},m.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),m.createElement(e,{style:{fontSize:9}},t.count," item",t.count!==1?"s":"")),l(),t.items.map((p,P)=>d(p,P))))):m.createElement(m.Fragment,null,l(),r.map((t,i)=>d(t,i)))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},bi=Tr;var Vr=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:s,isDayWiseGrouped:g})=>{let f=0,D=0,l=r.some(d=>d.bookings.some(t=>t.requires_coupon));return !r||r.length===0?m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:s}),m.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:s,reportName:"",templeName:""}),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},m.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),r.some(d=>d.bookings.some(t=>t.is_early_reminder))&&m.createElement(m.Fragment,null,m.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),m.createElement(View,{style:{marginTop:8}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Date"))))),r.some(d=>d.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((d,t)=>d.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(D++,m.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,D)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},m.createElement(e,null,d.name)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,i.quantity)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},m.createElement(e,null,i.collectionMode||"")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},m.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,m.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),m.createElement(e,{style:{fontSize:10}},`${a}`),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((d,t)=>{if(d.bookings.every(j=>j.is_early_reminder||j.requires_coupon))return null;f=0;let i=d.bookings.some(j=>j.topping_name),p=g&&d.dayGroups&&d.dayGroups.length>0,P=(j=false)=>i?m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:j?void 0:"none"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},m.createElement(e,null,"Sr")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},m.createElement(e,null,"Devotee")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"31%"}},m.createElement(e,null,"Offerings"))):m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:j?void 0:"none"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Invoice No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode"))),R=(j,se,c)=>j.is_early_reminder||j.requires_coupon?null:i?m.createElement(View,{key:se,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},m.createElement(e,null,c)),m.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},m.createElement(e,null,j.invoiceNumber)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,j.devoteeName)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},m.createElement(e,null,j.nakshatra)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"31%"}},m.createElement(e,null,j.topping_name||""))):m.createElement(View,{key:se,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,c)),m.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},m.createElement(View,{style:{display:"flex",flexDirection:"row"}},m.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:`${20*1.11111}%`}},m.createElement(e,null,j.invoiceNumber)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},m.createElement(e,null,j.devoteeName)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},m.createElement(e,null,j.nakshatra)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},m.createElement(e,null,j.quantity)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},m.createElement(e,null,j.collectionMode||""))),j.priestNote&&m.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},m.createElement(e,null,j.priestNote))));return m.createElement(View,{key:t,style:{marginBottom:20}},m.createElement(View,{wrap:false,minPresenceAhead:15},m.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.totalBookings||d.bookings.length}`),!p&&P(true)),p?m.createElement(m.Fragment,null,d.dayGroups.map((j,se)=>{let c=0,Fe=j.items.filter(qe=>!qe.is_early_reminder&&!qe.requires_coupon);return Fe.length===0?null:m.createElement(View,{key:j.dateKey,style:{marginTop:se>0?12:0}},m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},j.dateDisplay),m.createElement(e,{style:{fontSize:8}},`${Fe.length} booking${Fe.length!==1?"s":""}`)),P(false),Fe.map((qe,lt)=>(c++,R(qe,lt,c))))})):m.createElement(m.Fragment,null,d.bookings.map((j,se)=>j.is_early_reminder||j.requires_coupon?null:(f++,R(j,se,f)))))}))),l?m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Ae}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let d=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of d)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],P)=>{let R=p,j=R[0];return m.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black",position:"relative"},wrap:false},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},m.createElement(e,{style:{fontWeight:"semibold"}},i),m.createElement(e,null,j.date?new Date(j.date).toDateString():o.toDateString())),m.createElement(e,null,j.phone_number)),m.createElement(View,{style:{height:10,width:"100%"}}),R.map((se,c)=>m.createElement(View,{key:c,style:{display:"flex",flexDirection:"row",marginTop:18}},m.createElement(e,null,`${se.devoteeName} ----- ${se.nakshatra} ----- ${se.pujaName}`))),m.createElement(View,null,m.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Di=Vr;var Pr=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:s})=>{let g=r.sort((f,D)=>{let l=f.nakshatras.length;return D.nakshatras.length-l});return m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:n,endDate:a,reportTiming:s,reportName:"Puja Summary",templeName:o}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.map((f,D)=>m.createElement(m.Fragment,null,m.createElement(View,{style:{marginBottom:20}},m.createElement(View,null,m.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${f.name} - ${f.totalCount}`)),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:4,fontSize:9,width:"20%",fontWeight:"semibold"}},m.createElement(e,null,"Quantity"))),f.nakshatras.map((l,d)=>m.createElement(m.Fragment,null,m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,d+1)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},m.createElement(e,null,l.name)),m.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},m.createElement(e,null,l.count))))))))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Vi=Pr;var zr=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:s,deliveryData:g,reportTiming:f})=>{g=g.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});let D=0,l=0,d=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&s.length==0&&g.length==0?m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:f,reportName:"Combined Report",templeName:a}),m.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):m.createElement(m.Fragment,null,m.createElement(Document,null,r.length>0&&m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:f,reportName:"",templeName:""}),r.some(t=>t.bookings.some(i=>i.is_early_reminder))&&m.createElement(m.Fragment,null,m.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),m.createElement(View,{style:{marginTop:8}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Date"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(p=>p.is_early_reminder&&!p.requires_coupon).map((p,P)=>(l++,m.createElement(View,{wrap:false,key:`${i}-${P}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,l)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},m.createElement(e,null,t.name)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,p.quantity)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},m.createElement(e,null,p.date?new Date(p.date).toDateString():"")))))):null,m.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),m.createElement(e,{style:{fontSize:10}},`${a}`),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((t,i)=>t.bookings.every(p=>p.is_early_reminder||p.requires_coupon)?null:(D=0,m.createElement(m.Fragment,null,m.createElement(View,{style:{marginBottom:20}},m.createElement(View,null,m.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${t.name} - ${t.bookings.length}`)),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Invoice No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty"))),t.bookings.map((p,P)=>p.is_early_reminder||p.requires_coupon?null:(D++,m.createElement(m.Fragment,null,m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,D)),m.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},m.createElement(View,{style:{display:"flex",flexDirection:"row"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},m.createElement(e,null,p.invoiceNumber)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${35*1.11111}%`}},m.createElement(e,null,p.devoteeName)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${25*1.11111}%`}},m.createElement(e,null,p.nakshatra)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${10*1.11111}%`}},m.createElement(e,null,p.quantity))),p.priestNote&&m.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},m.createElement(e,null,p.priestNote))))))))))))),r.length>0&&d&&m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Ae}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=r.flatMap(p=>p.bookings.filter(P=>P.requires_coupon).map(P=>({...P,pujaName:p.name}))),i={};for(let p of t)i[p.invoiceNumber]||(i[p.invoiceNumber]=[]),i[p.invoiceNumber].push(p);return Object.entries(i).map(([p,P],R)=>{let j=P,se=j[0];return m.createElement(View,{key:p,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black"},wrap:false},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},m.createElement(e,{style:{fontWeight:"semibold"}},p),m.createElement(e,null,se.date?new Date(se.date).toDateString():o.toDateString())),m.createElement(e,null,se.phone_number)),m.createElement(View,{style:{height:10,width:"100%"}}),j.map((c,Fe)=>m.createElement(View,{key:Fe,style:{display:"flex",flexDirection:"row",marginTop:18}},m.createElement(e,null,`${c.devoteeName} ----- ${c.nakshatra} ----- ${c.pujaName}`))))})})())),s.length>0&&m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:f,reportName:"Prasad Report",templeName:a}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,"Invoice Number")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,"Prasad Name")),m.createElement(View,{style:{padding:4,width:"10%"}},m.createElement(e,null,"Qty"))),s.map((t,i)=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,i+1)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},m.createElement(e,null,t.invoiceNumber)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,t.devoteeName)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},m.createElement(e,null,t.prasadName)),m.createElement(View,{style:{padding:4,width:"10%"}},m.createElement(e,null,t.quantity)))))),g.length>0&&m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:f,reportName:"Prasad Delivery Postal Report",templeName:a}),m.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},g&&g.map(t=>{let i=No.toDataURL(t.qrContent);return m.createElement(View,{wrap:false,key:t.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},m.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},m.createElement(View,null,m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.name),m.createElement(View,{style:{fontSize:8}},m.createElement(q,{splitat:"words"},t.address)),m.createElement(e,{style:{fontSize:8}},t.phone)),t.qrContent&&i?m.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},m.createElement(Image,{src:i,style:{width:40,height:40,minWidth:40,maxWidth:40}}),m.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),m.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),m.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",t.pujaDetails))})))))},Pi=zr;var Cr=({startDate:o,endDate:n,data:a})=>m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Temple Payment Report",templeName:""}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,"S.No.")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},m.createElement(e,null,"Temple Name")),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},m.createElement(e,null,"Bookings")),m.createElement(View,{style:{padding:4,width:"20%"}},m.createElement(e,null,"Revenue"))),a?.map((r,s)=>m.createElement(View,{key:s,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,s+1)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},m.createElement(e,null,r.name)),m.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},m.createElement(e,null,r.bookings)),m.createElement(View,{style:{padding:4,width:"20%"}},m.createElement(e,null,"\u20B9",r.revenue))))))),Ai=Cr;var vr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayGroups:g})=>{let f=()=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Date")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Settlement")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"UTR")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},m.createElement(e,null,"Invoice")),m.createElement(View,{style:{padding:4,width:"20%"}},m.createElement(e,null,"Settlement ID"))),D=(l,d)=>m.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,d+1)),m.createElement(View,{style:{padding:4,width:"15%",borderRight:"1px solid #000"}},m.createElement(e,null,l.date)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,l.settlement_amount)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%",fontSize:7}},m.createElement(e,null,l.utr.split("").map((t,i)=>m.createElement(e,{key:i},t)))),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},m.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((t,i)=>m.createElement(e,{key:i},t.number," (",t.amount,")")))),m.createElement(View,{style:{padding:4,width:"20%"}},m.createElement(e,null,l.settlement_id)));return m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),m.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},s&&g&&g.length>0?m.createElement(m.Fragment,null,g.map((l,d)=>m.createElement(View,{key:l.dateKey,style:{marginBottom:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},l.dateDisplay),m.createElement(e,{style:{fontSize:8}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotal)),f(),l.items.map((t,i)=>D(t,i))))):m.createElement(m.Fragment,null,f(),r.settlements.map((l,d)=>D(l,d)))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},zi=vr;var Er=({data:o})=>m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},m.createElement(View,{style:{backgroundColor:"#FFA823",width:15,height:"100%"}}),m.createElement(View,{style:{marginLeft:10,marginTop:8,marginBottom:0,flex:1}},m.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},o.templeName),m.createElement(e,{style:{fontSize:8}},o.templeAddress),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:4,marginTop:8,alignItems:"center"}},m.createElement(e,{style:{fontSize:8,marginTop:-4}},"Powered by"),m.createElement(Image,{style:{height:20,width:75,objectFit:"contain"},src:mt}))),o.qrContent?m.createElement(View,{style:{width:65}},m.createElement(Image,{style:{height:55,width:55,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:o.qrContent})):null),m.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},o.status==="confirmed"?m.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ut}):null,m.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),m.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),m.createElement(View,{style:{marginTop:8}},m.createElement(e,{style:{fontSize:9}},"Bill to:"),m.createElement(e,{style:{fontSize:9}},o.devoteeDetails.name),o.devoteeDetails.phone?m.createElement(e,{style:{fontSize:9}},o.devoteeDetails.phone):null,m.createElement(e,{style:{fontSize:9}},o.bookingDate)),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8,fontWeight:"semibold"}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},m.createElement(e,null,"Item Description")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},m.createElement(e,null,"Price")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},m.createElement(e,null,"Quantity")),m.createElement(View,{style:{padding:4,width:"20%",textAlign:"center"}},m.createElement(e,null,"Total"))),o.items.map((n,a)=>m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},n.pujaName?m.createElement(e,{style:{fontSize:9}},n.pujaName):null,n.devoteesName?m.createElement(e,{style:{fontSize:7,color:"#333333"}},n.devoteesName):null,n.pujaDate?m.createElement(e,{style:{fontSize:7,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?m.createElement(e,{style:{fontSize:7,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.timing}`:null):null),m.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement(e,{style:{}},n.basePujPrice)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement(e,{style:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),m.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement(e,{style:{}},n.totalPrice))))),m.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:15,marginHorizontal:15}},m.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:9}},m.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),m.createElement(e,null,o.paymentMethod)),m.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},m.createElement(View,{style:{width:"50%",textAlign:"right"}},m.createElement(e,null,"Subtotal: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.subTotal))),o.postalCharges?m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Postal Charges: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.postalCharges))):null,m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Payment Gateway Charges: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.paymentGatewayCharges))),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Platform Charges: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.platformCharges))),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"GST (18%): ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.gst))),m.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:4}}),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8,fontWeight:"bold"}},m.createElement(View,{style:{width:"70%",textAlign:"right"}},m.createElement(e,null,"Total: ")),m.createElement(View,{style:{width:"30%",textAlign:"right"}},m.createElement(e,null,o.totalAmount))))),o.prasadCollectionMode?m.createElement(View,{style:{marginBottom:4}},m.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?m.createElement(m.Fragment,null,m.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.prasads.evening.length>0)?m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:20}},m.createElement(View,{style:{backgroundColor:"#FF266F",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold",color:"white"}},"Prasadsam Details")),o.prasads.morning.length>0?m.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"}},m.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Morning:"),o.prasads.morning.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.prasads.afternoon.length>0?m.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"}},m.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Afternoon:"),o.prasads.afternoon.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.prasads.evening.length>0?m.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"}},m.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Evening:"),o.prasads.evening.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.instructions.length>0?m.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:15,fontSize:7,border:"1px solid #757575"}},m.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:8,paddingVertical:4}},m.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),m.createElement(View,{style:{display:"flex",flexDirection:"column",gap:4,marginVertical:8,paddingHorizontal:8}},o.instructions.map((n,a)=>m.createElement(e,{key:a,style:{fontSize:7}},a+1,") ",n.instruction)))):null,m.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15}},m.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Terms and Conditions:"),m.createElement(e,{style:{fontSize:7,marginLeft:4}},"https://www.bookmypuja.app/terms-and-condition")))),ki=Er;var $r=({startDate:o,endDate:n,templeName:a,data:r})=>m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,marginTop:8,fontSize:7}},m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),m.createElement(e,null,m.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),r&&r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},r.map(s=>{let g=s.qrContent,f=No.toDataURL(g);return m.createElement(View,{wrap:false,key:s.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},m.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},m.createElement(View,null,m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},s.name),m.createElement(View,{style:{fontSize:8}},m.createElement(q,{splitat:"words"},s.address)),m.createElement(e,{style:{fontSize:8}},s.phone)),s.qrContent&&f?m.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},m.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},s.deliveryMode==="speedpost"?"SP":s.deliveryMode==="international-post"?"IP":"NP"),m.createElement(Image,{src:f,style:{width:40,height:40,minWidth:40,maxWidth:40}}),m.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),m.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),m.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",s.pujaDetails))})):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))),Ni=$r;var Gr=({startDate:o,endDate:n,templeName:a,data:r})=>m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Invoice No")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Amount")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"Payment Date")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},m.createElement(e,null,"Settlement Date")),m.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},m.createElement(e,null,"Bank UTR No"))),r.map((s,g)=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,g+1)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(q,null,s.invoiceNo)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(q,null,s.amount)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},m.createElement(q,null,s.paymentDate)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},m.createElement(q,null,s.settlementDate)),m.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},m.createElement(q,null,s.bankUtrNo))))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Ci=Gr;var Ur=({startDate:o,endDate:n,templeName:a,data:r})=>m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:6,fontWeight:"semibold"}},m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Invoice Number")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Base Amount")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Platform Fees")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Platform Fees GST")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Gateway Charges")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Gateway GST")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Payment Mode")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Booking Date")),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(e,null,"Settlement Date")),m.createElement(View,{style:{padding:2,borderRight:"none",width:"12%"}},m.createElement(e,null,"UTR Number"))),r.map((s,g)=>m.createElement(View,{key:g,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:6}},m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},m.createElement(e,null,g+1)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.invoiceNumber)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.baseAmount)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.platformFees)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.platformFeesGST)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.gatewayCharges)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.gatewayChargesGST)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},m.createElement(q,null,s.paymentMode)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},m.createElement(q,null,s.bookingDate)),m.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},m.createElement(q,null,s.settlementDate)),m.createElement(View,{style:{padding:2,width:"12%"}},m.createElement(q,null,s.utrNumber))))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Fi=Ur;var Yr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:s,dayGroups:g,summary:f})=>{let D=r.reduce((l,d)=>l+d.quantity,0);return m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},m.createElement(View,{style:{marginBottom:20}},s&&m.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Monthly Summary")),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Total Count")),m.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},m.createElement(e,null,"Remarks"))),r.map((l,d)=>m.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,d+1)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},m.createElement(e,null,l.name)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,l.quantity)),m.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9,fontWeight:"bold",backgroundColor:"#f0f0f0"}},m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null)),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},m.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),m.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,{style:{fontWeight:"bold"}},D)),m.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),s&&g&&g.length>0&&m.createElement(View,null,m.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),g.map((l,d)=>m.createElement(View,{key:l.dateKey,style:{marginBottom:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},m.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.dateDisplay),m.createElement(e,{style:{fontSize:10}},"Day Total: ",l.dayTotal)),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,"Count")),m.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},m.createElement(e,null,"Amount"))),l.items.map((t,i)=>m.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(e,null,i+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},m.createElement(e,null,t.name)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},m.createElement(e,null,t.quantity)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},m.createElement(e,null,me(t.amount||0))))))))):m.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Bi=Yr;var Xr=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:s,selectedPujaNames:g=[]})=>{let f=0,D=0,l=r.some(d=>d.bookings.some(t=>t.requires_coupon));return !r||r.length===0?m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:s}),g.length>0&&m.createElement(View,{style:{marginTop:8,marginBottom:8}},m.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),m.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range and pujas"))):m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:s,reportName:"",templeName:""}),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},m.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),g.length>0&&m.createElement(View,{style:{marginTop:8,marginBottom:4}},m.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),r.some(d=>d.bookings.some(t=>t.is_early_reminder))&&m.createElement(m.Fragment,null,m.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),m.createElement(View,{style:{marginTop:8}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},m.createElement(e,null,"Puja Name")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Date"))))),r.some(d=>d.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((d,t)=>d.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(D++,m.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,D)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},m.createElement(e,null,d.name)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,i.quantity)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},m.createElement(e,null,i.collectionMode||"")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},m.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,m.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Custom Puja Report"),m.createElement(e,{style:{fontSize:10}},`${a}`),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((d,t)=>d.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(f=0,m.createElement(View,{key:t,style:{marginBottom:20}},m.createElement(View,null,m.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.bookings.length}`)),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Sr No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},m.createElement(e,null,"Invoice No")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},m.createElement(e,null,"Devotee Name")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},m.createElement(e,null,"Nakshatra")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},m.createElement(e,null,"Qty")),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},m.createElement(e,null,"Mode"))),d.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(f++,m.createElement(View,{key:p,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},m.createElement(e,null,f)),m.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},m.createElement(View,{style:{display:"flex",flexDirection:"row"}},m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},m.createElement(e,null,i.invoiceNumber)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},m.createElement(e,null,i.devoteeName)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},m.createElement(e,null,i.nakshatra)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},m.createElement(e,null,i.quantity)),m.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},m.createElement(e,null,i.collectionMode||""))),i.priestNote&&m.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},m.createElement(e,null,i.priestNote))))))))))),l?m.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},m.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Ae}),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let d=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of d)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],P)=>{let R=p,j=R[0];return m.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black",position:"relative"},wrap:false},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},m.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},m.createElement(e,{style:{fontWeight:"semibold"}},i),m.createElement(e,null,j.date?new Date(j.date).toDateString():o.toDateString())),m.createElement(e,null,j.phone_number)),m.createElement(View,{style:{height:10,width:"100%"}}),R.map((se,c)=>m.createElement(View,{key:c,style:{display:"flex",flexDirection:"row",marginTop:18}},m.createElement(e,null,`${se.devoteeName} ----- ${se.nakshatra} ----- ${se.pujaName}`))),m.createElement(View,null,m.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},ji=Xr;var tn=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:s})=>{let g=r[0].shares.length,f=50/(g||1),D=0,l=0,d=new Array(g).fill(0);return m.createElement(m.Fragment,null,m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o,endDate:n,reportTiming:s,reportName:"Share Report",templeName:a}),r.length<=0?m.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,r.length>0?m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black"}},m.createElement(View,{style:{width:"5%",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Sr")),m.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Puja Name")),m.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Price")),m.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Count")),r[0].shares.map((t,i)=>m.createElement(View,{style:{width:`${f}}%`,borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.key))),m.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),r.map((t,i)=>(D+=t.count,l+=t.total,t.shares.forEach((p,P)=>{d[P]+=p.value;}),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",borderTop:"none"}},m.createElement(View,{style:{width:"5%",padding:4}},m.createElement(e,{style:{fontSize:8}},i+1)),m.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8}},t.pujaName)),m.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8}},me(t.price))),m.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8}},t.count)),t.shares.map((p,P)=>m.createElement(View,{style:{width:`${f}}%`,borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8}},me(p.value)))),m.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8}},me(t.total)))))),m.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",fontWeight:"bold",borderTop:"none"}},m.createElement(View,{style:{width:"33%",padding:4}},m.createElement(e,{style:{fontSize:8}},"Total")),m.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},D)),d.map((t,i)=>m.createElement(View,{style:{width:`${f}}%`,borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8}},me(t)))),m.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},m.createElement(e,{style:{fontSize:8}},me(l))))):null)))},Wi=tn;var nn=o=>{let n=0,a=0;return o.data.items.forEach(r=>{n+=r.quantity,a+=r.total;}),m.createElement(Document,null,m.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},m.createElement(I,{startDate:o.startDate,endDate:o.endDate,reportName:"Advance Goods Report",templeName:o.templeName,showGeneratedAt:true}),m.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},o.data.multiplier.name," ="," ",me(o.data.multiplier.rate)),m.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"bold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(Text,null,"Sr no")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(Text,null,"Date")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},m.createElement(Text,null,"Quantity")),m.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},m.createElement(Text,null,"Amount"))),o.data.items.map((r,s)=>m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},m.createElement(Text,null,s+1)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},m.createElement(Text,null,r.date)),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},m.createElement(Text,null,r.quantity)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},m.createElement(Text,null,me(r.total))))),m.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},m.createElement(Text,null,"Total")),m.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},m.createElement(Text,null,n)),m.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},m.createElement(Text,null,me(a)))))))},Ei=nn;var _i={kitchen:{A4:Et,A5:xi},transaction:{A4:ct,A5:wi},"prasad-delivery":{A4:Lt,A5:hi,"110mm":ri},prasad:{A4:yt,A5:bi,"110mm":ti},"puja-detailed":{A4:ft,A5:Di,"110mm":Xt},"puja-summary":{A4:$t,A5:Vi},"combined-report":{A4:Ot,A5:Pi,"110mm":li},"multi-temple-payment":{A4:Gt,A5:Ai},"settlements-report":{A4:Ht,A5:zi},invoice:{A4:Kt,A5:ki},"postal-report":{A4:xt,A5:Ni,"110mm":ai},"payment-settlement-report":{A4:Ut,A5:Ci},"invoice-breakup":{A4:Qt,A5:Fi},"puja-count":{A4:Jt,A5:Bi},"custom-report":{A4:gi,A5:ji,"110mm":yi},"invoice-recon":{A4:fi},"share-report":{A4:Wi},"advance-goods":{A4:Ei}},qi=class{constructor(n,a){bt(this,"option");bt(this,"size");this.option=n,this.size=a,[{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:s,src:g})=>Font.register({family:s,src:g})),Font.register({family:"Noto Sans",fontWeight:"normal",src:zt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:kt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Nt});}async print(n){let r=_i[this.option][this.size],s=m.createElement(r,{...n}),g=pdf(s).toBlob();return g.then(f=>{var D=URL.createObjectURL(f);if(window!=null){let l=window.open(D,"_blank");setTimeout(()=>{l?.print();},1e3);}}),g}async getBlob(n){let r=_i[this.option][this.size],s=m.createElement(r,{...n});return pdf(s).toBlob()}};
2
+ export{Ji as A4Print,to as T2Inch,qi 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.38",
4
+ "version": "0.4.40",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",