@bookmypuja-tech/bmp-pdf 0.4.96 → 0.4.97

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
@@ -352,6 +352,7 @@ interface IPujaCountReportProps {
352
352
  templeName: string;
353
353
  data: IPujaCountData[];
354
354
  dayGroups?: IDayGroup$2[];
355
+ specialNotesForSummary?: string[];
355
356
  summary?: {
356
357
  totalCount: number;
357
358
  pujaCount: number;
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import g from'react';import {maxBy}from'lodash';import Kt from'qrcode';var Ui=Object.defineProperty;var Gi=(i,r,f)=>r in i?Ui(i,r,{enumerable:true,configurable:true,writable:true,value:f}):i[r]=f;var Vt=(i,r,f)=>Gi(i,typeof r!="symbol"?r+"":r,f);var qe=i=>{typeof i=="string"&&(i=new Date(i));let r={day:"2-digit",month:"short",year:"numeric"};return i.toLocaleDateString("en-GB",r).replace(",","")};var _=(i,r=false,f=false)=>{if(!r){if(i>=1e7)return `\u20B9${(i/1e7).toFixed(2)}Cr`;if(i>=1e5)return `\u20B9${(i/1e5).toFixed(2)}L`}return i.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:f?2:i%1===0?0:2})};var je="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",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",At="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Bt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Ft="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var gt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",mt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",St={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:pt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var vt=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"}}),Ri=({data:i,dates:r})=>{let f=qe(r[0])===qe(r[1]);return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:vt.page},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),g.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",f?qe(r[0]):`${qe(r[0])} - ${qe(r[1])}`),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},i?i.map((s,p)=>g.createElement(View,{wrap:false,key:p,style:vt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(p+1).toString().padStart(2,"0"))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.participantName),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.pujaName)),f?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},qe(s.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),s.priestNote!==""&&s.priestNote!==null&&s.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},g.createElement(Text,null,"Priest Note: ",s.priestNote)):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},g.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",s.amount),s.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},g.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},eo=Ri;Font.register({family:"Roboto",fontWeight:"normal",src:pt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var ue=1,rt=25*ue,jt=StyleSheet.create({page:{padding:10*ue,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ue,paddingHorizontal:10*ue,fontSize:rt,border:`${5*ue}px solid black`,borderRadius:5*ue,width:"100%",display:"flex",flexDirection:"column"}}),no=({data:i,dates:r})=>{let f=qe(r[0])===qe(r[1]);return g.createElement(Document,null,g.createElement(Page,{dpi:200,size:[457*ue],style:jt.page},g.createElement(Image,{fixed:true,style:{height:55*ue,width:274*ue,marginBottom:10*ue,marginHorizontal:"auto"},src:je}),g.createElement(Text,{style:{fontSize:25*ue,marginBottom:5*ue,marginHorizontal:"auto"}},"Puja List"),g.createElement(Text,{style:{fontSize:20*ue,marginBottom:5*ue,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",f?qe(r[0]):`${qe(r[0])} - ${qe(r[1])}`),g.createElement(Text,{style:{fontSize:17*ue,marginBottom:20*ue,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ue}},i?i.map((s,p)=>g.createElement(View,{wrap:false,key:p,style:jt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ue}},g.createElement(Text,{style:{opacity:.6,marginRight:10*ue}},"#",(p+1).toString().padStart(2,"0")),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ue}},s.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ue,paddingHorizontal:5*ue,borderRadius:5*ue,marginTop:3*ue}},g.createElement(Text,{style:{color:"#ffffff",fontSize:rt}},"Pending")):null,g.createElement(Text,{style:{fontWeight:"bold",fontSize:rt}},"Rs ",s.amount))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ue,gap:3*ue}},g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},s.participantName),g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},s.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ue}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},s.pujaName)),f?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},qe(s.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ue}}),s.priestNote!==""&&s.priestNote!==null&&s.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ue}},g.createElement(Text,null,"Priest Note: ",s.priestNote)):null))):null)))},lo=no;var po={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},ao=({style:i={},children:r})=>{let f=u=>{let o=maxBy(Object.entries(po),([a,d])=>{let S=u.match(d);return S?S.length:0});return o?o[0]:"Latin"},s=u=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(a=>a.test(u));function p(u){return u.replace(/[\uFF01-\uFF5E]/g,o=>`${String.fromCharCode(o.charCodeAt(0)-65248)} `)}let D=u=>{let o=[],a=null,d="";for(let S of u){S=p(S);let k=f(S);k!==a?(d&&o.push({text:d,script:a}),a=k,d=S):d+=S;}return d&&o.push({text:d,script:a}),o},n=[];r&&typeof r=="string"&&!Array.isArray(r)&&!s(r)&&D(r).forEach((o,a)=>{let d=o.script==="Latin"||!o.script?"Noto Sans":`Noto Sans ${o.script}`;n.push(g.createElement(Text,{key:a,style:{fontFamily:d}},o.text));});let l=[],t={fontFamily:"Noto Sans"};return Array.isArray(i)?l=[...i,t]:i&&Object.keys(i).length>0?l=[i,t]:l=[t],g.createElement(Text,{style:l},n?.length?n:r)},e=ao;var mo=({startDate:i,endDate:r,reportTiming:f,templeName:s,reportName:p,showGeneratedAt:D=true})=>g.createElement(g.Fragment,null,g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:je}),D&&g.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),r?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",i.toDateString()," - ",r.toDateString()):g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",i.toDateString()),f&&Object.keys(St).includes(f)?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},St[f]," Report"):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},p),g.createElement(e,{style:{fontSize:12}},`${s}`)),j=mo;var yo=({startDate:i,endDate:r,templeName:f,data:s,reportTiming:p})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,templeName:f,reportTiming:p,reportName:"Temple Prasad (Kitchen) Report"}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,"Quantity"))),s.map((D,n)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,n+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,D.name)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,D.quantity))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),qt=yo;var ho=({startDate:i,endDate:r,templeName:f,data:s,isDayWiseGrouped:p,dayWiseTotals:D,summary:n})=>{let l=n?.totalBookingsAmount??s.reduce((o,a)=>a.status==="cancelled"?o:o+a.bookingAmount,0),t=n?.totalPostalCharges??s.reduce((o,a)=>a.status==="cancelled"?o:o+(a.postalCharges||0),0),u=n?.totalCreditedAmount??s.reduce((o,a)=>a.status==="cancelled"?o:o+a.creditedAmount,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Report",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:10}},"Total Bookings Amount: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",t.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",u.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p&&D&&D.length>0&&g.createElement(View,{style:{marginBottom:20}},g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"Day Wise Totals")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Puja Amount")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Postal Charges")),g.createElement(View,{style:{padding:6,width:"25%"}},g.createElement(e,null,"Credited Amount"))),D.map((o,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"25%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,p&&g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"All Bookings")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Puja Amt")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,"Delivery")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,"Credited Amt")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Transaction ID"))),s.map((o,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,a+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,o.date," ",o.time)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,o.invoiceNumber)),o.status=="cancelled"?g.createElement(View,{style:{padding:6,width:"58%"}},g.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,o.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,(o.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,o.transactionId))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Mt=ho;var To=({children:i,splitat:r})=>{if(!i||typeof i!="string")return null;let f="";return r=="words"&&(f=" "),g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},i.split(f).map((s,p)=>g.createElement(g.Fragment,null,g.createElement(e,{key:p},s,r=="words"?" ":"")))))},U=To;var So=({startDate:i,endDate:r,templeName:f,data:s,isDayWiseGrouped:p,dayGroups:D})=>{let n=o=>{let a="";try{let d=JSON.parse(o.address);a=`${d.address}, ${d.locality}, ${d.state} - ${d.pincode}`;}catch(d){console.error("Error parsing address:",d),a=o.address;}return {...o,address:a}},l=s.map(n),t=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Post Type")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,width:"15%"}},g.createElement(e,null,"Postal Amnt"))),u=(o,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,new Date(o.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(U,null,o.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,o.devoteeName),g.createElement(e,{style:{fontSize:8,marginTop:4}},o.address)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,o.postType)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,o.pujaName)),g.createElement(View,{style:{padding:6,width:"15%"}},g.createElement(e,null,o.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Address",templeName:f}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p&&D&&D.length>0?g.createElement(g.Fragment,null,D.map((o,a)=>{let d=o.items.map(n);return g.createElement(View,{key:o.dateKey,style:{marginBottom:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},o.dateDisplay),g.createElement(e,{style:{fontSize:10}},o.count," delivery",o.count!==1?" items":" item")),t(),d.map((S,k)=>u(S,k)))})):g.createElement(g.Fragment,null,t(),l.map((o,a)=>u(o,a)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},$t=So;var Io=({startDate:i,endDate:r,templeName:f,data:s,reportTiming:p,isDayWiseGrouped:D,dayGroups:n,isEmbed:l=false})=>{s.sort((d,S)=>d.invoiceNumber.localeCompare(S.invoiceNumber));let u=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,"Mode"))),o=(d,S)=>g.createElement(View,{key:S,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,S+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,d.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,d.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,d.pujaName," - ",d.prasadName)),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,d.collectionMode))),a=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Report",templeName:f,reportTiming:p}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},D&&n&&n.length>0?g.createElement(g.Fragment,null,n.map((d,S)=>g.createElement(View,{key:d.dateKey,style:{marginBottom:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},d.dateDisplay),g.createElement(e,{style:{fontSize:10}},d.count," item",d.count!==1?"s":"")),u(),d.items.map((k,b)=>o(k,b))))):g.createElement(g.Fragment,null,u(),s.map((d,S)=>o(d,S)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return l?a:g.createElement(Document,null,a)},ut=Io;var Co=({startDate:i,endDate:r,templeName:f,pujas:s,reportTiming:p,isDayWiseGrouped:D,isEmbed:n=false,hideInvoiceAndDate:l=false})=>{let t=0,u=0,o=s.some(d=>d.bookings.some(S=>S.requires_coupon));if(!s||s.length===0){let d=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja List",templeName:f,reportTiming:p}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return n?d:g.createElement(Document,null,d)}let a=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:p,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:8}},"C = Collec | D = Distribute | P = Postal")),s.some(d=>d.bookings.some(S=>S.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(d=>d.bookings.some(S=>S.is_early_reminder&&!S.requires_coupon))?s.flatMap((d,S)=>d.bookings.filter(k=>k.is_early_reminder&&!k.requires_coupon).map((k,b)=>(u++,g.createElement(View,{key:`${S}-${b}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,u)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,d.name)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,k.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,k.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,k.date?new Date(k.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${f}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},s.map((d,S)=>{if(d.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;t=0;let k=d.bookings.some(z=>z.topping_name),b=D&&d.dayGroups&&d.dayGroups.length>0,G=(z=false)=>k?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"7%":"5%"}},g.createElement(e,null,"Sr")),!l&&g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"33%":"27%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"28%":"22%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"27%":"29%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty"))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),l?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"40%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Date")))),$=(z,R,Q)=>z.is_early_reminder||z.requires_coupon?null:k?g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"7%":"5%"}},g.createElement(e,null,Q)),!l&&g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"33%":"27%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"28%":"22%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"27%":"29%"}},g.createElement(e,null,z.topping_name||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},g.createElement(e,null,z.quantity))):g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,Q)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},l?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"40%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"16%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"16%"}},g.createElement(e,null,z.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:"15%"}},g.createElement(e,null,z.date?new Date(z.date).toLocaleDateString():"")))),z.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,z.priestNote))));return g.createElement(View,{key:S,style:{marginBottom:25}},g.createElement(View,{wrap:false,minPresenceAhead:20},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.totalBookings||d.bookings.length}`),!b&&G(true)),b?g.createElement(g.Fragment,null,d.dayGroups.map((z,R)=>{let Q=0,be=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return be.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:R>0?15:0}},g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:6}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},z.dateDisplay),g.createElement(e,{style:{fontSize:9}},`${be.length} booking${be.length!==1?"s":""}`)),G(false),be.map((Fe,Dt)=>(Q++,$(Fe,Dt,Q))))})):g.createElement(g.Fragment,null,(()=>{if(k){let z=d.bookings.filter(Q=>!Q.is_early_reminder&&!Q.requires_coupon),R=new Map;return z.forEach(Q=>{let be=`${Q.invoiceNumber}|${Q.devoteeName}|${Q.nakshatra}|${Q.topping_name||""}`;if(R.has(be)){let Fe=R.get(be);Fe.quantity=(parseInt(Fe.quantity)+parseInt(Q.quantity)).toString();}else R.set(be,{...Q});}),Array.from(R.values()).map((Q,be)=>(t++,$(Q,be,t)))}else return d.bookings.map((z,R)=>z.is_early_reminder||z.requires_coupon?null:(t++,$(z,R,t)))})()))}))),o?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let d=s.flatMap(k=>k.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:k.name}))),S={};for(let k of d)S[k.invoiceNumber]||(S[k.invoiceNumber]=[]),S[k.invoiceNumber].push(k);return Object.entries(S).map(([k,b],G)=>{let $=b,z=$[0],R=$.length<=5;return g.createElement(View,{key:k,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!R},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},g.createElement(e,{style:{fontWeight:"semibold"}},k),g.createElement(e,null,z.date?new Date(z.date).toDateString():i.toDateString())),g.createElement(e,null,z.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),$.map((Q,be)=>g.createElement(View,{key:be,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return n?a:g.createElement(Document,null,a)},ft=Co;var Bo=({templeName:i,startDate:r,endDate:f,pujas:s,reportTiming:p})=>{let D=s.sort((n,l)=>{let t=n.nakshatras.length;return l.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:r,endDate:f,reportTiming:p,reportName:"Puja Summary",templeName:i}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},D.map((n,l)=>g.createElement(g.Fragment,null,g.createElement(View,{style:{marginBottom:25}},g.createElement(View,null,g.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${n.name} - ${n.totalCount}`)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},g.createElement(e,null,"Quantity"))),n.nakshatras.map((t,u)=>g.createElement(g.Fragment,null,g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,t.name)),g.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},g.createElement(e,null,t.count))))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ot=Bo;var Wo=({startDate:i,endDate:r,templeName:f,data:s,isEmbed:p=false})=>{let D=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Postal Report",templeName:f}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:15,marginTop:10,fontSize:9}},g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),s&&s.length>0?g.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let n=s.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),l=s.filter(o=>o.deliveryMode==="international-post"),t=s.filter(o=>o.deliveryMode==="speedpost"),u=o=>g.createElement(g.Fragment,null,o.map((a,d)=>{let S=a.qrContent,k=Kt.toDataURL(S);if(d%2===0){let b=o[d+1];return g.createElement(View,{key:`row-${d}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:20,marginBottom:20}},g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},g.createElement(View,{style:{width:240}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},a.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},a.address)),g.createElement(e,{style:{fontSize:10}},a.phone)),g.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},a.deliveryMode==="speedpost"?"SP":a.deliveryMode==="international-post"?"IP":"NP"),a.qrContent&&k?g.createElement(Image,{src:k,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,g.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",a.pujaDetails)),b&&(()=>{let G=Kt.toDataURL(b.qrContent);return g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},g.createElement(View,{style:{width:240}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},b.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},b.address)),g.createElement(e,{style:{fontSize:10}},b.phone)),g.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},b.deliveryMode==="speedpost"?"SP":b.deliveryMode==="international-post"?"IP":"NP"),b.qrContent&&G?g.createElement(Image,{src:G,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,g.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",b.pujaDetails))})())}return null}));return g.createElement(g.Fragment,null,n.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",n.length),u(n)),l.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"International Post (IP) - ",l.length),u(l)),t.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",t.length),u(t)))})()):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return p?D:g.createElement(Document,null,D)},yt=Wo;var Eo=({startDate:i,endDate:r,templeName:f,pujaData:s,prasadData:p,deliveryData:D,reportTiming:n})=>{D=D.map(o=>{let a="";try{let d=JSON.parse(o.address);a=`${d.address}, ${d.locality}, ${d.state} - ${d.pincode}`;}catch(d){console.error("Error parsing address:",d),a=o.address;}return {...o,address:a}});s.some(o=>o.bookings.some(a=>a.requires_coupon));return s.length==0&&p.length==0&&D.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:n,reportName:"Combined Report",templeName:f}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(g.Fragment,null,g.createElement(Document,null,s.length>0&&ft({startDate:i,endDate:r,templeName:f,pujas:s,isEmbed:true}),p.length>0&&ut({startDate:i,endDate:r,templeName:f,data:p,isEmbed:true}),D.length>0&&yt({startDate:i,endDate:r,templeName:f,data:D,isEmbed:true})))},Ut=Eo;var qo=({startDate:i,endDate:r,data:f})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Temple Payment Report",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"S.No.")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,"Temple Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Bookings")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Revenue"))),f?.map((s,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,p+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,s.bookings)),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"\u20B9",s.revenue))))))),Gt=qo;var co=({startDate:i,endDate:r,templeName:f,data:s})=>{let p=g.useMemo(()=>{let l=[],t=new Map;return s.settlements.forEach(u=>{let o=u.date;t.has(o)||t.set(o,{dateKey:o,dateDisplay:o,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let a=t.get(o);a.items.push(u),a.count++;let d=a.items.reduce((S,k)=>S+k.settlement_amount,0);a.dayTotal=String(d),a.dayTotalVerbose=a.items.map(S=>S.settlement_amount).join(" + ")+" = "+_(d);}),t.forEach(u=>l.push(u)),l},[s.settlements]),D=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Gateway Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},g.createElement(e,null,"Invoices")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Settlement Amt"))),n=(l,t)=>g.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,t+1,". ",l.paymentGateway),g.createElement(e,{style:{fontSize:8,color:"#666",marginTop:2}},l.settlement_id)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},g.createElement(e,null,l.utr.split("").map((u,o)=>g.createElement(e,{key:o},u)))),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%",fontSize:9}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((u,o)=>g.createElement(e,{key:o},u.number," (",_(u.amount),")")))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,_(l.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Settlements Report",templeName:f}),g.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",s.totalCreditedAmount),s.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.map(l=>g.createElement(View,{key:l.dateKey,style:{marginBottom:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.dateDisplay),g.createElement(e,{style:{fontSize:10}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotalVerbose)),D(),l.items.map((t,u)=>n(t,u))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Jt=co;var Ko=({data:i})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},g.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),g.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},i.templeName),g.createElement(e,{style:{fontSize:10}},i.templeAddress),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},g.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),g.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:gt}))),i.qrContent?g.createElement(View,{style:{width:85}},g.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:i.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},i.status==="confirmed"?g.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:mt}):null,g.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",i.invoiceNumber),g.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",i.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:10}},g.createElement(e,{style:{fontSize:11}},"Bill to:"),g.createElement(e,{style:{fontSize:11}},i.devoteeDetails.name),i.devoteeDetails.phone?g.createElement(e,{style:{fontSize:11}},i.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:11}},i.bookingDate)),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},g.createElement(e,null,"Item Description")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Price")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Quantity")),g.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},g.createElement(e,null,"Total"))),i.items.map((r,f)=>g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},r.pujaName?g.createElement(e,{style:{fontSize:11}},r.pujaName):null,r.devoteesName?g.createElement(e,{style:{fontSize:9,color:"#333333"}},r.devoteesName):null,r.pujaDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},r.pujaDate," ",r.timing?`- ${r.timing}`:null):null,r.repeatEndDate&&r.repeatStartDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},r.repeatStartDate," to ",r.repeatEndDate," ",r.timing?`- ${r.timing}`:null):null,r.refNo?g.createElement(e,{style:{fontSize:9,color:"#333333"}},"Reference No: ",r.refNo):null,r.customRemark?g.createElement(e,{style:{fontSize:9,fontWeight:"semibold",color:"#ff0000"}},"Remark : ",r.customRemark):null),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.basePujPrice)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},`${r.quantity?r.quantity:""}${r.repeatCount?` x ${r.repeatCount}`:""}`)),g.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.totalPrice))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},g.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),g.createElement(e,null,i.paymentMethod)),g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"50%",textAlign:"right"}},g.createElement(e,null,"Subtotal: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.subTotal))),i.postalCharges?g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Postal Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.postalCharges))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Payment Gateway Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.paymentGatewayCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Platform Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.platformCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"GST (18%): ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.gst))),g.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Total: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.totalAmount))))),i.prasadCollectionMode?g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",i.prasadCollectionMode)):null,i.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",i.devoteeDetails.address)):null,i.prasads&&(i.prasads.morning.length>0||i.prasads.afternoon.length>0||i.prasads.evening.length>0)?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},g.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),i.prasads.morning.length>0?g.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"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),i.prasads.morning.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:10}},f+1,". ",r.name," (",r.timings,")"))):null,i.prasads.afternoon.length>0?g.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"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),i.prasads.afternoon.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:10}},f+1,". ",r.name," (",r.timings,")"))):null,i.prasads.evening.length>0?g.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"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),i.prasads.evening.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:10}},f+1,". ",r.name," (",r.timings,")"))):null):null,i.instructions.length>0?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},g.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},g.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),g.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},i.instructions.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:8}},f+1,") ",r.instruction)))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),g.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),Yt=Ko;var Go=({startDate:i,endDate:r,templeName:f,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Settlement Report",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Amount")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Payment Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(e,null,"Bank UTR No"))),s.map((p,D)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,D+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,p.invoiceNo)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,p.amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,p.paymentDate)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,p.settlementDate)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(U,null,p.bankUtrNo))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Zt=Go;var Zo=({startDate:i,endDate:r,templeName:f,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Invoice Level Breakup",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Base Amount")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees GST")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway Charges")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway GST")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Payment Mode")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Booking Date")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},g.createElement(e,null,"UTR Number"))),s.map((p,D)=>g.createElement(View,{key:D,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,D+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.baseAmount)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.platformFees)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.platformFeesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.gatewayCharges)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.gatewayChargesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.paymentMode)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(U,null,p.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(U,null,p.settlementDate)),g.createElement(View,{style:{padding:3,width:"12%"}},g.createElement(U,null,p.utrNumber))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Xt=Zo;var Ro=({startDate:i,endDate:r,templeName:f,data:s,dayGroups:p,summary:D})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja Count Summary Report",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},s.length>0&&p&&p.length==1&&g.createElement(ei,{dayGroup:p[0]}),p&&p.length>1?g.createElement(View,{style:{marginBottom:25}},g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,"Total Amount"))),(()=>{let n=new Map;return p.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.entries()).map(([l,t],u)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,l)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},(()=>{let n=new Map;return p.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.quantity,0)})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;return p.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.amount,0)})())))),p.some(n=>n.dayPostalCarrierFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,(()=>{let n=p.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(n.length===0)return "";let l=[0,0,0];return n.forEach(t=>{t&&(l[0]+=t[0],l[1]+=t[1],l[2]+=t[2]);}),`${l.join("+")}`})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(p.reduce((n,l)=>n+(l.dayPostalCarrierFees||0),0))))),p.some(n=>n.dayPostalTempleFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Service (Temple)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(p.reduce((n,l)=>n+(l.dayPostalTempleFees||0),0))))),(()=>{let n=new Map;return p.forEach(l=>{l.otherChargesBreakup?.forEach(t=>{let u=n.get(t.name)||{count:0,amount:0};n.set(t.name,{count:u.count+(t.count||0),amount:u.amount+t.amount});});}),n.size===0?null:Array.from(n.entries()).map(([l,t])=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},l)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.count>0?t.count:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}})),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;p.forEach(o=>{o.items.forEach(a=>{let d=n.get(a.name)||{quantity:0,amount:0};n.set(a.name,{quantity:d.quantity+a.quantity,amount:d.amount+(a.amount||0)});});});let l=Array.from(n.values()).reduce((o,a)=>o+a.amount,0),t=p.reduce((o,a)=>o+((a.dayPostalCarrierFees||0)+(a.dayPostalTempleFees||0)),0),u=p.reduce((o,a)=>{let d=a.otherChargesBreakup?.reduce((S,k)=>S+k.amount,0)||0;return o+d},0);return l+t+u})())))),g.createElement(View,{style:{marginTop:10}},p.flatMap(n=>n.specialNotes?.map(l=>l.includes("postal charge")?g.createElement(e,{style:{fontSize:8,marginBottom:2}},n.dateKey,": ",l):null)))):null,p&&p.length>1&&g.createElement(View,{break:true,style:{marginBottom:25}},g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,"Puja Amount"))),p.map((n,l)=>g.createElement(View,{key:n.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,n.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.items.reduce((t,u)=>t+u.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,_(n.dayPujaTotal))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},p.reduce((n,l)=>n+l.items.reduce((t,u)=>t+u.quantity,0),0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(p.reduce((n,l)=>n+l.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")),s.length>0&&p&&p.length>1&&p.map((n,l)=>g.createElement(Page,{key:n.dateKey,size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},l===0&&g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),g.createElement(ei,{dayGroup:n}))))),ei=({dayGroup:i})=>g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},i.dateDisplay)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Count")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,"Amount"))),i.items.map((r,f)=>g.createElement(View,{key:f,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,f+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount||0))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.items.reduce((r,f)=>r+f.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPujaTotal)))),i.dayPostalTempleFees||i.dayPostalCarrierFees?g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.postalChargesBreakup?`${i.postalChargesBreakup.map(r=>r||0).join("+")}`:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalCarrierFees)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Service (Temple)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalTempleFees))))):null,i.otherChargesBreakup?.length?g.createElement(g.Fragment,null,i.otherChargesBreakup.map((r,f)=>g.createElement(View,{key:f,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.count?r.count:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount)))))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Grand Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayGrandTotal)))),i.specialNotes&&i.specialNotes.length>0?g.createElement(View,{style:{marginTop:10}},g.createElement(e,{style:{fontSize:8,marginBottom:2}},"Notes:"),i.specialNotes.map(r=>g.createElement(e,{style:{fontSize:8,marginBottom:2}},r))):null),ti=Ro;var er=({startDate:i,templeName:r,pujas:f,reportTiming:s})=>{return !f||f.length===0?g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),s&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," Report")),f.map((D,n)=>{let l=D.bookings.filter(t=>!t.is_early_reminder&&!t.requires_coupon);return l.length===0?null:g.createElement(View,{key:n,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},D.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," booking",l.length>1?"s":"")),l.map((t,u)=>(g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:t.topping_name?6:0}},g.createElement(e,{style:{fontSize:12}},t.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",t.quantity)),t.topping_name&&g.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},g.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",t.topping_name)),t.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.priestNote))))))})))},ri=er;var tr=({startDate:i,templeName:r,data:f,reportTiming:s,isDayWiseGrouped:p,dayGroups:D})=>{if(!f||f.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let n=f.sort((t,u)=>t.invoiceNumber.localeCompare(u.invoiceNumber)),l=(t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},t.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",t.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},t.collectionMode)));return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),s&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," Report")),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," item",n.length>1?"s":"")),p&&D&&D.length>0?g.createElement(g.Fragment,null,D.map((t,u)=>g.createElement(View,{key:t.dateKey,style:{marginBottom:12}},g.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},t.dateDisplay),g.createElement(e,{style:{fontSize:11}},t.count," item",t.count!==1?"s":""))),t.items.map((o,a)=>l(o,a))))):g.createElement(g.Fragment,null,n.map((t,u)=>l(t,u)))))},si=tr;var ir=({startDate:i,templeName:r,data:f,isDayWiseGrouped:s,dayGroups:p})=>{let D=t=>{let u="";try{let o=JSON.parse(t.address);u=`${o.address}, ${o.locality}, ${o.state} - ${o.pincode}`;}catch{u=t.address;}return {...t,address:u}},n=f.map(D);if(!n||n.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let l=(t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},t.address)),t.phoneNumber&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",t.phoneNumber)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",t.note||t.pujaName)));return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString())),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," delivery",n.length>1?" items":" item")),s&&p&&p.length>0?g.createElement(g.Fragment,null,p.map((t,u)=>{let o=t.items.map(D);return g.createElement(View,{key:t.dateKey,style:{marginBottom:12}},g.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},t.dateDisplay),g.createElement(e,{style:{fontSize:11}},t.count," item",t.count!==1?"s":""))),o.map((a,d)=>l(a,d)))})):g.createElement(g.Fragment,null,n.map((t,u)=>l(t,u)))))},ai=ir;var or=({startDate:i,templeName:r,pujaData:f,prasadData:s,deliveryData:p,reportTiming:D})=>{if(f.length===0&&s.length===0&&p.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let l=s.sort((t,u)=>t.invoiceNumber.localeCompare(u.invoiceNumber));return g.createElement(Document,null,f.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),D&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},D.charAt(0).toUpperCase()+D.slice(1)," Report")),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),f.map((t,u)=>{let o=t.bookings.filter(a=>!a.is_early_reminder&&!a.requires_coupon);return o.length===0?null:g.createElement(View,{key:u,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},t.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},o.length," booking",o.length>1?"s":"")),o.map((a,d)=>(g.createElement(View,{key:d,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},a.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},a.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},a.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",a.quantity)),a.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},a.priestNote))))))})),s.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),D&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},D.charAt(0).toUpperCase()+D.slice(1)," Report")),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," item",l.length>1?"s":"")),l.map((t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},t.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",t.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},t.collectionMode))))),p.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString())),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},p.length," delivery",p.length>1?" items":" item")),p.map((t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.name),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},t.address)),t.phone&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",t.phone)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",t.pujaDetails))))))},mi=or;var rr=({startDate:i,templeName:r,data:f})=>!f||f.length===0?g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString())),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},f.length," label",f.length>1?"s":"")),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"center",gap:10,marginBottom:12,fontSize:9}},g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"NP"),"-Normal"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"SP"),"-Speed"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"IP"),"-International")),f.map(s=>g.createElement(View,{key:s.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:5}},g.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},s.name),g.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},s.deliveryMode==="speedpost"?"SP":s.deliveryMode==="international-post"?"IP":"NP")),g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11}},s.address)),g.createElement(e,{style:{fontSize:11,marginBottom:5}},s.phone),g.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),g.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",s.pujaDetails))))),yi=rr;var lr=({startDate:i,endDate:r,templeName:f,pujas:s,reportTiming:p,selectedPujaNames:D=[],hideInvoiceAndDate:n=false})=>{let l=0,t=0,u=s.some(o=>o.bookings.some(a=>a.requires_coupon));return !s||s.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Custom Puja Report",templeName:f,reportTiming:p}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:p,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),s.some(o=>o.bookings.some(a=>a.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(o=>o.bookings.some(a=>a.is_early_reminder&&!a.requires_coupon))?s.flatMap((o,a)=>o.bookings.filter(d=>d.is_early_reminder&&!d.requires_coupon).map((d,S)=>(t++,g.createElement(View,{key:`${a}-${S}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,t)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,o.name)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,d.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,d.date?new Date(d.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:12}},`${f}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},s.map((o,a)=>{if(o.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;l=0;let d=o.bookings.some(b=>b.topping_name),S=(b=false)=>d?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"7%":"5%"}},g.createElement(e,null,"Sr")),!n&&g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"28%":"22%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"23%":"18%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"32%":"25%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:n?"none":"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),!n&&g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Date"))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"12%":"8%"}},g.createElement(e,null,"Sr No")),n?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"88%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"40%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"92%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Date")))),k=(b,G,$)=>b.is_early_reminder||b.requires_coupon?null:d?g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"7%":"5%"}},g.createElement(e,null,$)),!n&&g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"28%":"22%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"23%":"18%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"32%":"25%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:n?"none":"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),!n&&g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:"15%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():""))):g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"12%":"8%"}},g.createElement(e,null,$)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:n?"88%":"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},n?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"40%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"16%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"16%"}},g.createElement(e,null,b.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:"15%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():"")))),b.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,b.priestNote))));return g.createElement(View,{key:a,style:{marginBottom:25}},g.createElement(View,{wrap:false,minPresenceAhead:20},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.bookings.length}`),S(true)),g.createElement(g.Fragment,null,(()=>{if(d){let b=o.bookings.filter($=>!$.is_early_reminder&&!$.requires_coupon),G=new Map;return b.forEach($=>{let z=`${$.invoiceNumber}|${$.devoteeName}|${$.nakshatra}|${$.topping_name||""}`;if(G.has(z)){let R=G.get(z);R.quantity=(parseInt(R.quantity)+parseInt($.quantity)).toString();}else G.set(z,{...$});}),Array.from(G.values()).map(($,z)=>(l++,k($,z,l)))}else return o.bookings.map((b,G)=>b.is_early_reminder||b.requires_coupon?null:(l++,k(b,G,l)))})()))}))),u?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let o=s.flatMap(d=>d.bookings.filter(S=>S.requires_coupon).map(S=>({...S,pujaName:d.name}))),a={};for(let d of o)a[d.invoiceNumber]||(a[d.invoiceNumber]=[]),a[d.invoiceNumber].push(d);return Object.entries(a).map(([d,S])=>{let k=S,b=k[0];return g.createElement(View,{key:d,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},g.createElement(e,{style:{fontWeight:"semibold"}},d),g.createElement(e,null,b.date?new Date(b.date).toDateString():i.toDateString())),g.createElement(e,null,b.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),k.map((G,$)=>g.createElement(View,{key:$,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${G.devoteeName} ----- ${G.nakshatra} ----- ${G.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},wi=lr;var sr=({startDate:i,templeName:r,pujas:f,reportTiming:s,selectedPujaNames:p=[]})=>{return !f||f.length===0?g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),s&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," ","Report")),p.length>0&&g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),g.createElement(e,{style:{fontSize:9,marginTop:2}},p.join(", "))),f.map((n,l)=>{let t=n.bookings.filter(u=>!u.is_early_reminder&&!u.requires_coupon);return t.length===0?null:g.createElement(View,{key:l,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},n.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((u,o)=>(g.createElement(View,{key:o,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},u.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},u.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},u.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",u.quantity)),u.collectionMode&&g.createElement(View,{style:{marginTop:4}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",u.collectionMode)),u.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},u.priestNote))))))}),g.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},g.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},Ti=sr;var gr=i=>{let r=0,f=0,s=0,p=0,D=0,n=0;for(let t of i.items)r+=t.platformFees,f+=t.platformFeesGST,p+=t.invoiceTotal,t.exclude&&(D+=t.platformFees,n+=t.platformFeesGST);s=f+r;let l=n+D;return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(View,{style:{flexDirection:"row",width:"100%"}},g.createElement(View,{style:{width:"50%"}},g.createElement(Text,null,"INVOICE RECON"),g.createElement(Text,{style:{fontSize:12,marginTop:6}},i.templeName," "),g.createElement(Text,{style:{fontSize:12}},"Bookings from ",i.startDate.toDateString()," to"," ",i.endDate.toDateString()," ")),g.createElement(View,{style:{width:"50%",alignItems:"flex-end"}},g.createElement(Text,{style:{fontSize:12,fontWeight:"semibold"}},"Infinix AI Pvt Ltd"," "),g.createElement(Text,{style:{fontSize:12}},"GSTIN: 32AAICI0436P1ZG"," "))),g.createElement(Text,{style:{fontSize:10,backgroundColor:"#fffca6",textDecoration:"line-through",marginTop:10}},"Bookings crossed out / marked with yellow are not to be counted"),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,"Sr no")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,null,"Invoice Number")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%",fontSize:7}},g.createElement(Text,null,"Booking Date")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"Inv Total")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"PF Total")),g.createElement(View,{style:{padding:3,width:"12%",borderRight:"1px solid #000"}},g.createElement(Text,null,"Pay Method")),g.createElement(View,{style:{padding:3,width:"17%",borderRight:"1px solid #000"}},g.createElement(Text,null,"Transaction ID")),g.createElement(View,{style:{padding:3,width:"16%"}},g.createElement(Text,null,"Settlement ID")))),i.items.map((t,u)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:t.exclude?"#fffca6":"transparent"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,u+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,{style:{textDecoration:t.exclude?"line-through":"none"}},t.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}},g.createElement(Text,null,t.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(t.invoiceTotal))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(t.platformFees)," +"," ",_(t.platformFeesGST))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,t.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),g.createElement(View,{style:{padding:3,width:"17%",fontSize:6,borderRight:"1px solid #000"}},g.createElement(Text,null,t.transactionID)),g.createElement(View,{style:{padding:3,width:"16%",fontSize:6}},g.createElement(Text,null,t.settlementID)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,"Total")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}}),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(p))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(s))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"17%"}}),g.createElement(View,{style:{padding:3,width:"16%"}})),g.createElement(View,{style:{marginTop:20,width:"50%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:4}},g.createElement(Text,{style:{fontSize:10,width:"60%"}},"Total Platform Fees (Subtotal)"),g.createElement(Text,{style:{fontSize:10,width:"40%"}},_(s))),g.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:4}},g.createElement(Text,{style:{fontSize:10,width:"60%"}},"Deductions (Excluded)"),g.createElement(Text,{style:{fontSize:10,width:"40%"}},"- ",_(l))),g.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:6,borderTop:"1px solid #000",borderBottom:"1px solid #000"}},g.createElement(Text,{style:{fontSize:10,width:"60%",fontWeight:"semibold"}},"Total Payable"),g.createElement(Text,{style:{fontSize:10,width:"40%",fontWeight:"semibold"}},_(s-l))))))},Di=gr;var fr=({startDate:i,endDate:r,templeName:f,data:s,reportTiming:p})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,templeName:f,reportTiming:p,reportName:"Temple Prasad (Kitchen) Report"}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,"Quantity"))),s.map((D,n)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,n+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,D.name)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,D.quantity))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Vi=fr;var wr=({startDate:i,endDate:r,templeName:f,data:s,isDayWiseGrouped:p,dayWiseTotals:D,summary:n})=>{let l=n?.totalBookingsAmount??s.reduce((o,a)=>a.status==="cancelled"?o:o+a.bookingAmount,0),t=n?.totalPostalCharges??s.reduce((o,a)=>a.status==="cancelled"?o:o+(a.postalCharges||0),0),u=n?.totalCreditedAmount??s.reduce((o,a)=>a.status==="cancelled"?o:o+a.creditedAmount,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Report",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:9}},"Total Bookings Amount: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",t.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",u.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p&&D&&D.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Day Wise Totals")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Puja Amount")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Postal Charges")),g.createElement(View,{style:{padding:4,width:"25%"}},g.createElement(e,null,"Credited Amount"))),D.map((o,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"25%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,p&&g.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"All Bookings")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Puja Amt")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,"Delivery")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,"Credited Amt")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Transaction ID"))),s.map((o,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,a+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,o.date," ",o.time)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,o.invoiceNumber)),o.status=="cancelled"?g.createElement(View,{style:{padding:4,width:"58%"}},g.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,o.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,(o.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,o.transactionId))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Si=wr;var Tr=({startDate:i,endDate:r,templeName:f,data:s,isDayWiseGrouped:p,dayGroups:D})=>{let n=o=>{let a="";try{let d=JSON.parse(o.address);a=`${d.address}, ${d.locality}, ${d.state} - ${d.pincode}`;}catch(d){console.error("Error parsing address:",d),a=o.address;}return {...o,address:a}},l=s.map(n),t=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Post Type")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,width:"15%"}},g.createElement(e,null,"Postal Amnt"))),u=(o,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%",fontSize:6}},g.createElement(U,null,new Date(o.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(U,null,o.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,o.devoteeName),g.createElement(e,{style:{fontSize:7,marginTop:3}},o.address)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,o.postType)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,o.pujaName)),g.createElement(View,{style:{padding:4,width:"15%"}},g.createElement(e,null,o.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Address",templeName:f}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p&&D&&D.length>0?g.createElement(g.Fragment,null,D.map((o,a)=>{let d=o.items.map(n);return g.createElement(View,{key:o.dateKey,style:{marginBottom:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},o.dateDisplay),g.createElement(e,{style:{fontSize:9}},o.count," delivery",o.count!==1?" items":" item")),t(),d.map((S,k)=>u(S,k)))})):g.createElement(g.Fragment,null,t(),l.map((o,a)=>u(o,a)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},zi=Tr;var Sr=({startDate:i,endDate:r,templeName:f,data:s,reportTiming:p,isDayWiseGrouped:D,dayGroups:n,isEmbed:l=false})=>{s.sort((d,S)=>d.invoiceNumber.localeCompare(S.invoiceNumber));let u=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,"Mode"))),o=(d,S)=>g.createElement(View,{key:S,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,S+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,d.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,d.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,d.pujaName," - ",d.prasadName)),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,d.collectionMode))),a=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Report",templeName:f,reportTiming:p}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},D&&n&&n.length>0?g.createElement(g.Fragment,null,n.map((d,S)=>g.createElement(View,{key:d.dateKey,style:{marginBottom:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},d.dateDisplay),g.createElement(e,{style:{fontSize:9}},d.count," item",d.count!==1?"s":"")),u(),d.items.map((k,b)=>o(k,b))))):g.createElement(g.Fragment,null,u(),s.map((d,S)=>o(d,S)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return l?a:g.createElement(Document,null,a)},wt=Sr;var Pr=({startDate:i,endDate:r,templeName:f,pujas:s,reportTiming:p,isDayWiseGrouped:D,isEmbed:n=false,hideInvoiceAndDate:l=false})=>{let t=0,u=0,o=s.some(d=>d.bookings.some(S=>S.requires_coupon));if(!s||s.length===0){let d=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja List",templeName:f,reportTiming:p}),g.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"));return n?d:g.createElement(Document,null,d)}let a=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:p,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.some(d=>d.bookings.some(S=>S.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:4}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(d=>d.bookings.some(S=>S.is_early_reminder&&!S.requires_coupon))?s.flatMap((d,S)=>d.bookings.filter(k=>k.is_early_reminder&&!k.requires_coupon).map((k,b)=>(u++,g.createElement(View,{key:`${S}-${b}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,u)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,d.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,k.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,k.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,k.date?new Date(k.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${f}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},s.map((d,S)=>{if(d.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;t=0;let k=d.bookings.some(z=>z.topping_name),b=D&&d.dayGroups&&d.dayGroups.length>0,G=(z=false)=>k?g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"8%":"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"32%":"24%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"28%":"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"27%":"34%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:l?"none":"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),!l&&g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},g.createElement(e,null,"Invoice"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),l?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"42%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Date")))),$=(z,R,Q)=>z.is_early_reminder||z.requires_coupon?null:k?g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:l?"8%":"5%"}},g.createElement(e,null,Q)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:l?"32%":"24%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:l?"28%":"20%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:l?"27%":"34%"}},g.createElement(e,null,z.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:l?"none":"1px solid black",width:"5%"}},g.createElement(e,null,z.quantity)),!l&&g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},g.createElement(e,null,z.invoiceNumber))):g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,Q)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},l?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"42%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"15%"}},g.createElement(e,null,z.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:"16%"}},g.createElement(e,null,z.date?new Date(z.date).toLocaleDateString():"")))),z.priestNote&&g.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,z.priestNote))));return g.createElement(View,{key:S,style:{marginBottom:10}},g.createElement(View,{wrap:false,minPresenceAhead:15},g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.totalBookings||d.bookings.length}`),!b&&G(true)),b?g.createElement(g.Fragment,null,d.dayGroups.map((z,R)=>{let Q=0,be=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return be.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:R>0?12:0}},g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:2}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},z.dateDisplay),g.createElement(e,{style:{fontSize:8}},`${be.length} booking${be.length!==1?"s":""}`)),G(false),be.map((Fe,Dt)=>(Q++,$(Fe,Dt,Q))))})):g.createElement(g.Fragment,null,(()=>{if(k){let z=d.bookings.filter(Q=>!Q.is_early_reminder&&!Q.requires_coupon),R=new Map;return z.forEach(Q=>{let be=`${Q.invoiceNumber}|${Q.devoteeName}|${Q.nakshatra}|${Q.topping_name||""}`;if(R.has(be)){let Fe=R.get(be);Fe.quantity=(parseInt(Fe.quantity)+parseInt(Q.quantity)).toString();}else R.set(be,{...Q});}),Array.from(R.values()).map((Q,be)=>{t=t||1;let Fe=t;return t+=Number(Q.quantity)||1,$(Q,be,Fe)})}else return d.bookings.map((z,R)=>z.is_early_reminder||z.requires_coupon?null:(t++,$(z,R,t)))})()))}))),o?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let d=s.flatMap(k=>k.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:k.name}))),S={};for(let k of d)S[k.invoiceNumber]||(S[k.invoiceNumber]=[]),S[k.invoiceNumber].push(k);return Object.entries(S).map(([k,b],G)=>{let $=b,z=$[0],R=$.length<=5;return g.createElement(View,{key:k,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:!R},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},g.createElement(e,{style:{fontWeight:"semibold"}},k),g.createElement(e,null,z.date?new Date(z.date).toDateString():i.toDateString())),g.createElement(e,null,z.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),$.map((Q,be)=>g.createElement(View,{key:be,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return n?a:g.createElement(Document,null,a)},ht=Pr;var Cr=({templeName:i,startDate:r,endDate:f,pujas:s,reportTiming:p})=>{let D=s.sort((n,l)=>{let t=n.nakshatras.length;return l.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:r,endDate:f,reportTiming:p,reportName:"Puja Summary",templeName:i}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},D.map((n,l)=>g.createElement(g.Fragment,null,g.createElement(View,{style:{marginBottom:20}},g.createElement(View,null,g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${n.name} - ${n.totalCount}`)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,width:"20%",fontWeight:"semibold"}},g.createElement(e,null,"Quantity"))),n.nakshatras.map((t,u)=>g.createElement(g.Fragment,null,g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,t.name)),g.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},g.createElement(e,null,t.count))))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Ii=Cr;var Br=({startDate:i,endDate:r,templeName:f,data:s,isEmbed:p=false})=>{let D=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Postal Report",templeName:f}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,marginTop:8,fontSize:7}},g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),s&&s.length>0?g.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let n=s.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),l=s.filter(o=>o.deliveryMode==="international-post"),t=s.filter(o=>o.deliveryMode==="speedpost"),u=o=>g.createElement(g.Fragment,null,o.map((a,d)=>{let S=a.qrContent,k=Kt.toDataURL(S);if(d%2===0){let b=o[d+1];return g.createElement(View,{key:`row-${d}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:15,marginBottom:15}},g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},a.name),g.createElement(View,{style:{fontSize:8}},g.createElement(U,{splitat:"words"},a.address)),g.createElement(e,{style:{fontSize:8}},a.phone)),a.qrContent&&k?g.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},a.deliveryMode==="speedpost"?"SP":a.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:k,style:{width:40,height:40,minWidth:40,maxWidth:40}}),g.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",a.pujaDetails)),b&&(()=>{let G=Kt.toDataURL(b.qrContent);return g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},b.name),g.createElement(View,{style:{fontSize:8}},g.createElement(U,{splitat:"words"},b.address)),g.createElement(e,{style:{fontSize:8}},b.phone)),b.qrContent&&G?g.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},b.deliveryMode==="speedpost"?"SP":b.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:G,style:{width:40,height:40,minWidth:40,maxWidth:40}}),g.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",b.pujaDetails))})())}return null}));return g.createElement(g.Fragment,null,n.length>0&&g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",n.length),u(n)),l.length>0&&g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"International Post (IP) - ",l.length),u(l)),t.length>0&&g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",t.length),u(t)))})()):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return p?D:g.createElement(Document,null,D)},bt=Br;var vr=({startDate:i,endDate:r,templeName:f,pujaData:s,prasadData:p,deliveryData:D,reportTiming:n})=>(D=D.map(l=>{let t="";try{let u=JSON.parse(l.address);t=`${u.address}, ${u.locality}, ${u.state} - ${u.pincode}`;}catch(u){console.error("Error parsing address:",u),t=l.address;}return {...l,address:t}}),s.length==0&&p.length==0&&D.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:n,reportName:"Combined Report",templeName:f}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(Document,null,s.length>0&&ht({startDate:i,endDate:r,templeName:f,pujas:s,reportTiming:n,isEmbed:true}),p.length>0&&wt({startDate:i,endDate:r,templeName:f,data:p,reportTiming:n,isEmbed:true}),D.length>0&&bt({startDate:i,endDate:r,templeName:f,data:D,isEmbed:true}))),Ai=vr;var Er=({startDate:i,endDate:r,data:f})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Temple Payment Report",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"S.No.")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,"Temple Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Bookings")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Revenue"))),f?.map((s,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,p+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,s.bookings)),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"\u20B9",s.revenue))))))),Bi=Er;var qr=({startDate:i,endDate:r,templeName:f,data:s})=>{let p=g.useMemo(()=>{let l=[],t=new Map;return s.settlements.forEach(u=>{let o=u.date;t.has(o)||t.set(o,{dateKey:o,dateDisplay:o,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let a=t.get(o);a.items.push(u),a.count++;let d=a.items.reduce((S,k)=>S+k.settlement_amount,0);a.dayTotal=String(d),a.dayTotalVerbose=a.items.map(S=>S.settlement_amount).join(" + ")+" = "+_(d);}),t.forEach(u=>l.push(u)),l},[s.settlements]),D=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Gateway Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%"}},g.createElement(e,null,"Invoices")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Settlement Amt"))),n=(l,t)=>g.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,t+1,". ",l.paymentGateway),g.createElement(e,{style:{fontSize:6,color:"#666",marginTop:2}},l.settlement_id)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},g.createElement(e,null,l.utr.split("").map((u,o)=>g.createElement(e,{key:o},u)))),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%",fontSize:7}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((u,o)=>g.createElement(e,{key:o},u.number," (",_(u.amount),")")))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,_(l.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Settlements Report",templeName:f}),g.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",s.totalCreditedAmount),s.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.map(l=>g.createElement(View,{key:l.dateKey,style:{marginBottom:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},l.dateDisplay),g.createElement(e,{style:{fontSize:8}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotalVerbose)),D(),l.items.map((t,u)=>n(t,u))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Fi=qr;var cr=({data:i})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},g.createElement(View,{style:{backgroundColor:"#FFA823",width:15,height:"100%"}}),g.createElement(View,{style:{marginLeft:10,marginTop:8,marginBottom:0,flex:1}},g.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},i.templeName),g.createElement(e,{style:{fontSize:8}},i.templeAddress),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:4,marginTop:8,alignItems:"center"}},g.createElement(e,{style:{fontSize:8,marginTop:-4}},"Powered by"),g.createElement(Image,{style:{height:20,width:75,objectFit:"contain"},src:gt}))),i.qrContent?g.createElement(View,{style:{width:65}},g.createElement(Image,{style:{height:55,width:55,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:i.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},i.status==="confirmed"?g.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:mt}):null,g.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",i.invoiceNumber),g.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",i.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:8}},g.createElement(e,{style:{fontSize:9}},"Bill to:"),g.createElement(e,{style:{fontSize:9}},i.devoteeDetails.name),i.devoteeDetails.phone?g.createElement(e,{style:{fontSize:9}},i.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:9}},i.bookingDate)),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},g.createElement(e,null,"Item Description")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Price")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Quantity")),g.createElement(View,{style:{padding:4,width:"20%",textAlign:"center"}},g.createElement(e,null,"Total"))),i.items.map((r,f)=>g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},r.pujaName?g.createElement(e,{style:{fontSize:9}},r.pujaName):null,r.devoteesName?g.createElement(e,{style:{fontSize:7,color:"#333333"}},r.devoteesName):null,r.pujaDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},r.pujaDate," ",r.timing?`- ${r.timing}`:null):null,r.repeatEndDate&&r.repeatStartDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},r.repeatStartDate," to ",r.repeatEndDate," ",r.timing?`- ${r.timing}`:null):null),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.basePujPrice)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},`${r.quantity?r.quantity:""}${r.repeatCount?` x ${r.repeatCount}`:""}`)),g.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.totalPrice))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:15,marginHorizontal:15}},g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:9}},g.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),g.createElement(e,null,i.paymentMethod)),g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"50%",textAlign:"right"}},g.createElement(e,null,"Subtotal: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.subTotal))),i.postalCharges?g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Postal Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.postalCharges))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Payment Gateway Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.paymentGatewayCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Platform Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.platformCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"GST (18%): ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.gst))),g.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:4}}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Total: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.totalAmount))))),i.prasadCollectionMode?g.createElement(View,{style:{marginBottom:4}},g.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",i.prasadCollectionMode)):null,i.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",i.devoteeDetails.address)):null,i.prasads&&(i.prasads.morning.length>0||i.prasads.afternoon.length>0||i.prasads.evening.length>0)?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:20}},g.createElement(View,{style:{backgroundColor:"#FF266F",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold",color:"white"}},"Prasadsam Details")),i.prasads.morning.length>0?g.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"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Morning:"),i.prasads.morning.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:8}},f+1,". ",r.name," (",r.timings,")"))):null,i.prasads.afternoon.length>0?g.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"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Afternoon:"),i.prasads.afternoon.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:8}},f+1,". ",r.name," (",r.timings,")"))):null,i.prasads.evening.length>0?g.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"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Evening:"),i.prasads.evening.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:8}},f+1,". ",r.name," (",r.timings,")"))):null):null,i.instructions.length>0?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:15,fontSize:7,border:"1px solid #757575"}},g.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:8,paddingVertical:4}},g.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),g.createElement(View,{style:{display:"flex",flexDirection:"column",gap:4,marginVertical:8,paddingHorizontal:8}},i.instructions.map((r,f)=>g.createElement(e,{key:f,style:{fontSize:7}},f+1,") ",r.instruction)))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Terms and Conditions:"),g.createElement(e,{style:{fontSize:7,marginLeft:4}},"https://www.bookmypuja.app/terms-and-condition")))),vi=cr;var Kr=({startDate:i,endDate:r,templeName:f,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Settlement Report",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Amount")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Payment Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(e,null,"Bank UTR No"))),s.map((p,D)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,D+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,p.invoiceNo)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,p.amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,p.paymentDate)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,p.settlementDate)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(U,null,p.bankUtrNo))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Wi=Kr;var Gr=({startDate:i,endDate:r,templeName:f,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Invoice Level Breakup",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:6,fontWeight:"semibold"}},g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Base Amount")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees GST")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway Charges")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway GST")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Payment Mode")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Booking Date")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:2,borderRight:"none",width:"12%"}},g.createElement(e,null,"UTR Number"))),s.map((p,D)=>g.createElement(View,{key:D,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:6}},g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,D+1)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.invoiceNumber)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.baseAmount)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.platformFees)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.platformFeesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.gatewayCharges)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.gatewayChargesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,p.paymentMode)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(U,null,p.bookingDate)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(U,null,p.settlementDate)),g.createElement(View,{style:{padding:2,width:"12%"}},g.createElement(U,null,p.utrNumber))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),ji=Gr;var Yr=({startDate:i,endDate:r,templeName:f,data:s,dayGroups:p,summary:D})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja Count Summary Report",templeName:f}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},s.length>0&&p&&p.length==1&&g.createElement(_i,{dayGroup:p[0]}),p&&p.length>1?g.createElement(View,{style:{marginBottom:20}},g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,"Total Amount"))),(()=>{let n=new Map;return p.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.entries()).map(([l,t],u)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,l)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},(()=>{let n=new Map;return p.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.quantity,0)})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;return p.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.amount,0)})())))),p.some(n=>n.dayPostalCarrierFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,(()=>{let n=p.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(n.length===0)return "";let l=[0,0,0];return n.forEach(t=>{t&&(l[0]+=t[0],l[1]+=t[1],l[2]+=t[2]);}),`${l.join("+")}`})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(p.reduce((n,l)=>n+(l.dayPostalCarrierFees||0),0))))),p.some(n=>n.dayPostalTempleFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Service (Temple)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(p.reduce((n,l)=>n+(l.dayPostalTempleFees||0),0))))),(()=>{let n=new Map;return p.forEach(l=>{l.otherChargesBreakup?.forEach(t=>{let u=n.get(t.name)||{count:0,amount:0};n.set(t.name,{count:u.count+(t.count||0),amount:u.amount+t.amount});});}),n.size===0?null:Array.from(n.entries()).map(([l,t])=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},l)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.count>0?t.count:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}})),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;p.forEach(o=>{o.items.forEach(a=>{let d=n.get(a.name)||{quantity:0,amount:0};n.set(a.name,{quantity:d.quantity+a.quantity,amount:d.amount+(a.amount||0)});});});let l=Array.from(n.values()).reduce((o,a)=>o+a.amount,0),t=p.reduce((o,a)=>o+((a.dayPostalCarrierFees||0)+(a.dayPostalTempleFees||0)),0),u=p.reduce((o,a)=>{let d=a.otherChargesBreakup?.reduce((S,k)=>S+k.amount,0)||0;return o+d},0);return l+t+u})())))),g.createElement(View,{style:{marginTop:8}},p.flatMap(n=>n.specialNotes?.map(l=>l.includes("postal charge")?g.createElement(e,{style:{fontSize:7,marginBottom:2}},n.dateKey,": ",l):null)))):null,p&&p.length>1&&g.createElement(View,{style:{marginBottom:20}},g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,"Puja Amount"))),p.map((n,l)=>g.createElement(View,{key:n.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,n.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.items.reduce((t,u)=>t+u.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,_(n.dayPujaTotal))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},p.reduce((n,l)=>n+l.items.reduce((t,u)=>t+u.quantity,0),0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(p.reduce((n,l)=>n+l.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")),s.length>0&&p&&p.length>1&&p.map((n,l)=>g.createElement(Page,{key:n.dateKey,size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},l===0&&g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),g.createElement(_i,{dayGroup:n}))))),_i=({dayGroup:i})=>g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid #000",borderBottom:"none"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},i.dateDisplay)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,"Amount"))),i.items.map((r,f)=>g.createElement(View,{key:f,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,f+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount||0))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.items.reduce((r,f)=>r+f.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPujaTotal)))),i.dayPostalTempleFees||i.dayPostalCarrierFees?g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.postalChargesBreakup?`${i.postalChargesBreakup.map(r=>r||0).join("+")}`:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalCarrierFees)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Service (Temple)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalTempleFees))))):null,i.otherChargesBreakup?.length?g.createElement(g.Fragment,null,i.otherChargesBreakup.map((r,f)=>g.createElement(View,{key:f,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.count?r.count:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount)))))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Grand Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayGrandTotal)))),i.specialNotes&&i.specialNotes.length>0?g.createElement(View,{style:{marginTop:8}},g.createElement(e,{style:{fontSize:7,marginBottom:2}},"Notes:"),i.specialNotes.map(r=>g.createElement(e,{style:{fontSize:7,marginBottom:2}},r))):null),Li=Yr;var Xr=({startDate:i,endDate:r,templeName:f,pujas:s,reportTiming:p,selectedPujaNames:D=[],hideInvoiceAndDate:n=false})=>{let l=0,t=0,u=s.some(o=>o.bookings.some(a=>a.requires_coupon));return !s||s.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Custom Puja Report",templeName:f,reportTiming:p}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range and pujas"))):g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:p,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.some(o=>o.bookings.some(a=>a.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:4}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(o=>o.bookings.some(a=>a.is_early_reminder&&!a.requires_coupon))?s.flatMap((o,a)=>o.bookings.filter(d=>d.is_early_reminder&&!d.requires_coupon).map((d,S)=>(t++,g.createElement(View,{key:`${a}-${S}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,t)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,o.name)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,d.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,d.date?new Date(d.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:10}},`${f}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},s.map((o,a)=>{if(o.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;l=0;let d=o.bookings.some(b=>b.topping_name),S=(b=false)=>d?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"7%":"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"30%":"20%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"22%":"16%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"36%":"30%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:n?"none":"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),!n&&g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"14%"}},g.createElement(e,null,"Date")))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"10%":"8%"}},g.createElement(e,null,"Sr No")),n?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"42%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"92%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Date")))),k=(b,G,$)=>b.is_early_reminder||b.requires_coupon?null:d?g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:n?"7%":"5%"}},g.createElement(e,null,$)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:n?"30%":"20%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:n?"22%":"16%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:n?"36%":"30%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:n?"none":"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),!n&&g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:"14%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():"")))):g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:n?"10%":"8%"}},g.createElement(e,null,$)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:n?"90%":"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},n?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"42%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"15%"}},g.createElement(e,null,b.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",width:"18%"}},g.createElement(U,null,b.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:"16%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():"")))),b.priestNote&&g.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,b.priestNote))));return g.createElement(View,{key:a,style:{marginBottom:10}},g.createElement(View,{wrap:false,minPresenceAhead:20},g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.bookings.length}`),S(true)),g.createElement(g.Fragment,null,(()=>{if(d){let b=o.bookings.filter($=>!$.is_early_reminder&&!$.requires_coupon),G=new Map;return b.forEach($=>{let z=`${$.invoiceNumber}|${$.devoteeName}|${$.nakshatra}|${$.topping_name||""}`;if(G.has(z)){let R=G.get(z);R.quantity=(parseInt(R.quantity)+parseInt($.quantity)).toString();}else G.set(z,{...$});}),Array.from(G.values()).map(($,z)=>{l=l||1;let R=l;return l+=Number($.quantity)||1,k($,z,R)})}else return o.bookings.map((b,G)=>b.is_early_reminder||b.requires_coupon?null:(l++,k(b,G,l)))})()))}))),u?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let o=s.flatMap(d=>d.bookings.filter(S=>S.requires_coupon).map(S=>({...S,pujaName:d.name}))),a={};for(let d of o)a[d.invoiceNumber]||(a[d.invoiceNumber]=[]),a[d.invoiceNumber].push(d);return Object.entries(a).map(([d,S])=>{let k=S,b=k[0];return g.createElement(View,{key:d,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:false},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},g.createElement(e,{style:{fontWeight:"semibold"}},d),g.createElement(e,null,b.date?new Date(b.date).toDateString():i.toDateString())),g.createElement(e,null,b.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),k.map((G,$)=>g.createElement(View,{key:$,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${G.devoteeName} ----- ${G.nakshatra} ----- ${G.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Mi=Xr;var tn=({startDate:i,endDate:r,templeName:f,data:s,reportTiming:p})=>{let D=s.items[0].shares.length,n=50/(D||1),l=0,t=0,u=new Array(D).fill(0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:p,reportName:"Share Report",templeName:f}),s.items.length<=0?g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,s.items.length>0?g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black"}},g.createElement(View,{style:{width:"5%",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Sr")),g.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Puja Name")),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Price")),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Count")),s.items[0].shares.map((o,a)=>g.createElement(View,{style:{width:`${n}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},o.key))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),s.items.map((o,a)=>(l+=o.count,t+=o.total,o.shares.forEach((d,S)=>{u[S]+=d.value;}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{width:"5%",padding:4}},g.createElement(e,{style:{fontSize:8}},a+1)),g.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},o.pujaName)),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(o.price))),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},o.count)),o.shares.map((d,S)=>g.createElement(View,{style:{width:`${n}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(d.value)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(o.total)))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",fontWeight:"bold",borderTop:"none"}},g.createElement(View,{style:{width:"33%",padding:4}},g.createElement(e,{style:{fontSize:8}},"Total")),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},l)),u.map((o,a)=>g.createElement(View,{style:{width:`${n}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(o)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(t))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},g.createElement(View,{style:{width:"30%"}},u.map((o,a)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",paddingBottom:"2px"}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},s.items[0].shares[a].key)),g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},_(o,true,true))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",fontWeight:"bold",borderBottom:"1px solid black",borderTop:"1px solid black",marginTop:"2px"}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},"Total")),g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},_(t,true,true))))),g.createElement(View,{style:{width:"35%"}},s.options?.right_side_table?.map((o,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2,...s.options?.right_side_table&&a==s.options?.right_side_table?.length-1?{borderBottom:"1px solid black",borderTop:"1px solid black"}:{}}},o.map((d,S)=>g.createElement(View,{style:{width:`${100/o.length}%`}},g.createElement(e,{style:{fontSize:9,...S==1?{textAlign:"right"}:{}}},d)))))),g.createElement(View,{style:{width:"1%"}})),s.options?.footer_paragraph&&g.createElement(View,{style:{marginTop:50}},g.createElement(e,{style:{fontSize:10}},s.options.footer_paragraph))):null)))},$i=tn;var nn=i=>{let r=0,f=0;return i.data.items.forEach(s=>{r+=s.quantity,f+=s.total;}),g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i.startDate,endDate:i.endDate,reportName:"Advance Goods Report",templeName:i.templeName,showGeneratedAt:true}),g.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},i.data.multiplier.name," ="," ",_(i.data.multiplier.rate)),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Text,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,"Quantity")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,"Amount"))),i.data.items.map((s,p)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,p+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Text,null,s.date)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,s.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,_(s.total))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},g.createElement(Text,null,"Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,r)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,_(f)))))))},ci=nn;var Ki={kitchen:{A4:qt,A5:Vi},transaction:{A4:Mt,A5:Si},"prasad-delivery":{A4:$t,A5:zi,"110mm":ai},prasad:{A4:ut,A5:wt,"110mm":si},"puja-detailed":{A4:ft,A5:ht,"110mm":ri},"puja-summary":{A4:Ot,A5:Ii},"combined-report":{A4:Ut,A5:Ai,"110mm":mi},"multi-temple-payment":{A4:Gt,A5:Bi},"settlements-report":{A4:Jt,A5:Fi},invoice:{A4:Yt,A5:vi},"postal-report":{A4:yt,A5:bt,"110mm":yi},"payment-settlement-report":{A4:Zt,A5:Wi},"invoice-breakup":{A4:Xt,A5:ji},"puja-count":{A4:ti,A5:Li},"custom-report":{A4:wi,A5:Mi,"110mm":Ti},"invoice-recon":{A4:Di},"share-report":{A4:$i},"advance-goods":{A4:ci}},Qi=class{constructor(r,f){Vt(this,"option");Vt(this,"size");this.option=r,this.size=f,[{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:p,src:D})=>Font.register({family:p,src:D})),Font.register({family:"Noto Sans",fontWeight:"normal",src:At}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Bt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Ft});}async print(r){let s=Ki[this.option][this.size],p=g.createElement(s,{...r}),D=pdf(p).toBlob();return D.then(n=>{var l=URL.createObjectURL(n);if(window!=null){let t=window.open(l,"_blank");setTimeout(()=>{t?.print();},1e3);}}),D}async getBlob(r){let s=Ki[this.option][this.size],p=g.createElement(s,{...r});return pdf(p).toBlob()}};
1
+ import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import g from'react';import {maxBy}from'lodash';import Kt from'qrcode';var Ui=Object.defineProperty;var Gi=(i,r,y)=>r in i?Ui(i,r,{enumerable:true,configurable:true,writable:true,value:y}):i[r]=y;var Vt=(i,r,y)=>Gi(i,typeof r!="symbol"?r+"":r,y);var qe=i=>{typeof i=="string"&&(i=new Date(i));let r={day:"2-digit",month:"short",year:"numeric"};return i.toLocaleDateString("en-GB",r).replace(",","")};var _=(i,r=false,y=false)=>{if(!r){if(i>=1e7)return `\u20B9${(i/1e7).toFixed(2)}Cr`;if(i>=1e5)return `\u20B9${(i/1e5).toFixed(2)}L`}return i.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:y?2:i%1===0?0:2})};var je="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",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",At="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Bt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Ft="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var gt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",mt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",St={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:pt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var vt=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"}}),Ri=({data:i,dates:r})=>{let y=qe(r[0])===qe(r[1]);return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:vt.page},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),g.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",y?qe(r[0]):`${qe(r[0])} - ${qe(r[1])}`),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},i?i.map((s,a)=>g.createElement(View,{wrap:false,key:a,style:vt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(a+1).toString().padStart(2,"0"))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.participantName),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},s.pujaName)),y?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},qe(s.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),s.priestNote!==""&&s.priestNote!==null&&s.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},g.createElement(Text,null,"Priest Note: ",s.priestNote)):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},g.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",s.amount),s.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},g.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},eo=Ri;Font.register({family:"Roboto",fontWeight:"normal",src:pt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var ue=1,rt=25*ue,jt=StyleSheet.create({page:{padding:10*ue,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ue,paddingHorizontal:10*ue,fontSize:rt,border:`${5*ue}px solid black`,borderRadius:5*ue,width:"100%",display:"flex",flexDirection:"column"}}),no=({data:i,dates:r})=>{let y=qe(r[0])===qe(r[1]);return g.createElement(Document,null,g.createElement(Page,{dpi:200,size:[457*ue],style:jt.page},g.createElement(Image,{fixed:true,style:{height:55*ue,width:274*ue,marginBottom:10*ue,marginHorizontal:"auto"},src:je}),g.createElement(Text,{style:{fontSize:25*ue,marginBottom:5*ue,marginHorizontal:"auto"}},"Puja List"),g.createElement(Text,{style:{fontSize:20*ue,marginBottom:5*ue,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",y?qe(r[0]):`${qe(r[0])} - ${qe(r[1])}`),g.createElement(Text,{style:{fontSize:17*ue,marginBottom:20*ue,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ue}},i?i.map((s,a)=>g.createElement(View,{wrap:false,key:a,style:jt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ue}},g.createElement(Text,{style:{opacity:.6,marginRight:10*ue}},"#",(a+1).toString().padStart(2,"0")),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ue}},s.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ue,paddingHorizontal:5*ue,borderRadius:5*ue,marginTop:3*ue}},g.createElement(Text,{style:{color:"#ffffff",fontSize:rt}},"Pending")):null,g.createElement(Text,{style:{fontWeight:"bold",fontSize:rt}},"Rs ",s.amount))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ue,gap:3*ue}},g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},s.participantName),g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},s.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ue}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:rt,fontWeight:"bold"}},s.pujaName)),y?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},qe(s.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ue}}),s.priestNote!==""&&s.priestNote!==null&&s.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ue}},g.createElement(Text,null,"Priest Note: ",s.priestNote)):null))):null)))},lo=no;var po={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},ao=({style:i={},children:r})=>{let y=u=>{let o=maxBy(Object.entries(po),([p,d])=>{let S=u.match(d);return S?S.length:0});return o?o[0]:"Latin"},s=u=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(p=>p.test(u));function a(u){return u.replace(/[\uFF01-\uFF5E]/g,o=>`${String.fromCharCode(o.charCodeAt(0)-65248)} `)}let T=u=>{let o=[],p=null,d="";for(let S of u){S=a(S);let k=y(S);k!==p?(d&&o.push({text:d,script:p}),p=k,d=S):d+=S;}return d&&o.push({text:d,script:p}),o},n=[];r&&typeof r=="string"&&!Array.isArray(r)&&!s(r)&&T(r).forEach((o,p)=>{let d=o.script==="Latin"||!o.script?"Noto Sans":`Noto Sans ${o.script}`;n.push(g.createElement(Text,{key:p,style:{fontFamily:d}},o.text));});let l=[],t={fontFamily:"Noto Sans"};return Array.isArray(i)?l=[...i,t]:i&&Object.keys(i).length>0?l=[i,t]:l=[t],g.createElement(Text,{style:l},n?.length?n:r)},e=ao;var mo=({startDate:i,endDate:r,reportTiming:y,templeName:s,reportName:a,showGeneratedAt:T=true})=>g.createElement(g.Fragment,null,g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:je}),T&&g.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),r?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",i.toDateString()," - ",r.toDateString()):g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",i.toDateString()),y&&Object.keys(St).includes(y)?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},St[y]," Report"):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},a),g.createElement(e,{style:{fontSize:12}},`${s}`)),j=mo;var fo=({startDate:i,endDate:r,templeName:y,data:s,reportTiming:a})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,templeName:y,reportTiming:a,reportName:"Temple Prasad (Kitchen) Report"}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,"Quantity"))),s.map((T,n)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,n+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,T.name)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,T.quantity))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),qt=fo;var ho=({startDate:i,endDate:r,templeName:y,data:s,isDayWiseGrouped:a,dayWiseTotals:T,summary:n})=>{let l=n?.totalBookingsAmount??s.reduce((o,p)=>p.status==="cancelled"?o:o+p.bookingAmount,0),t=n?.totalPostalCharges??s.reduce((o,p)=>p.status==="cancelled"?o:o+(p.postalCharges||0),0),u=n?.totalCreditedAmount??s.reduce((o,p)=>p.status==="cancelled"?o:o+p.creditedAmount,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Report",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:10}},"Total Bookings Amount: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",t.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",u.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),a&&T&&T.length>0&&g.createElement(View,{style:{marginBottom:20}},g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"Day Wise Totals")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Puja Amount")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Postal Charges")),g.createElement(View,{style:{padding:6,width:"25%"}},g.createElement(e,null,"Credited Amount"))),T.map((o,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"25%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,a&&g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"All Bookings")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Puja Amt")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,"Delivery")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,"Credited Amt")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Transaction ID"))),s.map((o,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,p+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,o.date," ",o.time)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,o.invoiceNumber)),o.status=="cancelled"?g.createElement(View,{style:{padding:6,width:"58%"}},g.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,o.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,(o.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,o.transactionId))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Mt=ho;var To=({children:i,splitat:r})=>{if(!i||typeof i!="string")return null;let y="";return r=="words"&&(y=" "),g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},i.split(y).map((s,a)=>g.createElement(g.Fragment,null,g.createElement(e,{key:a},s,r=="words"?" ":"")))))},U=To;var So=({startDate:i,endDate:r,templeName:y,data:s,isDayWiseGrouped:a,dayGroups:T})=>{let n=o=>{let p="";try{let d=JSON.parse(o.address);p=`${d.address}, ${d.locality}, ${d.state} - ${d.pincode}`;}catch(d){console.error("Error parsing address:",d),p=o.address;}return {...o,address:p}},l=s.map(n),t=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Post Type")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,width:"15%"}},g.createElement(e,null,"Postal Amnt"))),u=(o,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,new Date(o.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},g.createElement(U,null,o.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,o.devoteeName),g.createElement(e,{style:{fontSize:8,marginTop:4}},o.address)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,o.postType)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,o.pujaName)),g.createElement(View,{style:{padding:6,width:"15%"}},g.createElement(e,null,o.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Address",templeName:y}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a&&T&&T.length>0?g.createElement(g.Fragment,null,T.map((o,p)=>{let d=o.items.map(n);return g.createElement(View,{key:o.dateKey,style:{marginBottom:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},o.dateDisplay),g.createElement(e,{style:{fontSize:10}},o.count," delivery",o.count!==1?" items":" item")),t(),d.map((S,k)=>u(S,k)))})):g.createElement(g.Fragment,null,t(),l.map((o,p)=>u(o,p)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},$t=So;var Io=({startDate:i,endDate:r,templeName:y,data:s,reportTiming:a,isDayWiseGrouped:T,dayGroups:n,isEmbed:l=false})=>{s.sort((d,S)=>d.invoiceNumber.localeCompare(S.invoiceNumber));let u=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,"Mode"))),o=(d,S)=>g.createElement(View,{key:S,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,S+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,d.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,d.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,d.pujaName," - ",d.prasadName)),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,d.collectionMode))),p=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Report",templeName:y,reportTiming:a}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},T&&n&&n.length>0?g.createElement(g.Fragment,null,n.map((d,S)=>g.createElement(View,{key:d.dateKey,style:{marginBottom:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},d.dateDisplay),g.createElement(e,{style:{fontSize:10}},d.count," item",d.count!==1?"s":"")),u(),d.items.map((k,b)=>o(k,b))))):g.createElement(g.Fragment,null,u(),s.map((d,S)=>o(d,S)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return l?p:g.createElement(Document,null,p)},ut=Io;var Co=({startDate:i,endDate:r,templeName:y,pujas:s,reportTiming:a,isDayWiseGrouped:T,isEmbed:n=false,hideInvoiceAndDate:l=false})=>{let t=0,u=0,o=s.some(d=>d.bookings.some(S=>S.requires_coupon));if(!s||s.length===0){let d=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja List",templeName:y,reportTiming:a}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return n?d:g.createElement(Document,null,d)}let p=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:a,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:8}},"C = Collec | D = Distribute | P = Postal")),s.some(d=>d.bookings.some(S=>S.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(d=>d.bookings.some(S=>S.is_early_reminder&&!S.requires_coupon))?s.flatMap((d,S)=>d.bookings.filter(k=>k.is_early_reminder&&!k.requires_coupon).map((k,b)=>(u++,g.createElement(View,{key:`${S}-${b}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,u)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,d.name)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,k.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,k.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,k.date?new Date(k.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${y}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},s.map((d,S)=>{if(d.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;t=0;let k=d.bookings.some(z=>z.topping_name),b=T&&d.dayGroups&&d.dayGroups.length>0,G=(z=false)=>k?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"7%":"5%"}},g.createElement(e,null,"Sr")),!l&&g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"33%":"27%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"28%":"22%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:l?"27%":"29%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty"))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),l?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"40%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Date")))),$=(z,R,Q)=>z.is_early_reminder||z.requires_coupon?null:k?g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"7%":"5%"}},g.createElement(e,null,Q)),!l&&g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"33%":"27%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"28%":"22%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:l?"27%":"29%"}},g.createElement(e,null,z.topping_name||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},g.createElement(e,null,z.quantity))):g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,Q)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},l?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"40%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"16%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"16%"}},g.createElement(e,null,z.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:"15%"}},g.createElement(e,null,z.date?new Date(z.date).toLocaleDateString():"")))),z.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,z.priestNote))));return g.createElement(View,{key:S,style:{marginBottom:25}},g.createElement(View,{wrap:false,minPresenceAhead:20},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.totalBookings||d.bookings.length}`),!b&&G(true)),b?g.createElement(g.Fragment,null,d.dayGroups.map((z,R)=>{let Q=0,be=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return be.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:R>0?15:0}},g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:6}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},z.dateDisplay),g.createElement(e,{style:{fontSize:9}},`${be.length} booking${be.length!==1?"s":""}`)),G(false),be.map((Fe,Dt)=>(Q++,$(Fe,Dt,Q))))})):g.createElement(g.Fragment,null,(()=>{if(k){let z=d.bookings.filter(Q=>!Q.is_early_reminder&&!Q.requires_coupon),R=new Map;return z.forEach(Q=>{let be=`${Q.invoiceNumber}|${Q.devoteeName}|${Q.nakshatra}|${Q.topping_name||""}`;if(R.has(be)){let Fe=R.get(be);Fe.quantity=(parseInt(Fe.quantity)+parseInt(Q.quantity)).toString();}else R.set(be,{...Q});}),Array.from(R.values()).map((Q,be)=>(t++,$(Q,be,t)))}else return d.bookings.map((z,R)=>z.is_early_reminder||z.requires_coupon?null:(t++,$(z,R,t)))})()))}))),o?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let d=s.flatMap(k=>k.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:k.name}))),S={};for(let k of d)S[k.invoiceNumber]||(S[k.invoiceNumber]=[]),S[k.invoiceNumber].push(k);return Object.entries(S).map(([k,b],G)=>{let $=b,z=$[0],R=$.length<=5;return g.createElement(View,{key:k,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!R},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},g.createElement(e,{style:{fontWeight:"semibold"}},k),g.createElement(e,null,z.date?new Date(z.date).toDateString():i.toDateString())),g.createElement(e,null,z.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),$.map((Q,be)=>g.createElement(View,{key:be,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return n?p:g.createElement(Document,null,p)},yt=Co;var Bo=({templeName:i,startDate:r,endDate:y,pujas:s,reportTiming:a})=>{let T=s.sort((n,l)=>{let t=n.nakshatras.length;return l.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:r,endDate:y,reportTiming:a,reportName:"Puja Summary",templeName:i}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},T.map((n,l)=>g.createElement(g.Fragment,null,g.createElement(View,{style:{marginBottom:25}},g.createElement(View,null,g.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${n.name} - ${n.totalCount}`)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},g.createElement(e,null,"Quantity"))),n.nakshatras.map((t,u)=>g.createElement(g.Fragment,null,g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,t.name)),g.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},g.createElement(e,null,t.count))))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ot=Bo;var Wo=({startDate:i,endDate:r,templeName:y,data:s,isEmbed:a=false})=>{let T=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Postal Report",templeName:y}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:15,marginTop:10,fontSize:9}},g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),s&&s.length>0?g.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let n=s.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),l=s.filter(o=>o.deliveryMode==="international-post"),t=s.filter(o=>o.deliveryMode==="speedpost"),u=o=>g.createElement(g.Fragment,null,o.map((p,d)=>{let S=p.qrContent,k=Kt.toDataURL(S);if(d%2===0){let b=o[d+1];return g.createElement(View,{key:`row-${d}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:20,marginBottom:20}},g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},g.createElement(View,{style:{width:240}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},p.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},p.address)),g.createElement(e,{style:{fontSize:10}},p.phone)),g.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},p.deliveryMode==="speedpost"?"SP":p.deliveryMode==="international-post"?"IP":"NP"),p.qrContent&&k?g.createElement(Image,{src:k,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,g.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",p.pujaDetails)),b&&(()=>{let G=Kt.toDataURL(b.qrContent);return g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},g.createElement(View,{style:{width:240}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},b.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},b.address)),g.createElement(e,{style:{fontSize:10}},b.phone)),g.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},b.deliveryMode==="speedpost"?"SP":b.deliveryMode==="international-post"?"IP":"NP"),b.qrContent&&G?g.createElement(Image,{src:G,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,g.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",b.pujaDetails))})())}return null}));return g.createElement(g.Fragment,null,n.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",n.length),u(n)),l.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"International Post (IP) - ",l.length),u(l)),t.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",t.length),u(t)))})()):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return a?T:g.createElement(Document,null,T)},ft=Wo;var Eo=({startDate:i,endDate:r,templeName:y,pujaData:s,prasadData:a,deliveryData:T,reportTiming:n})=>{T=T.map(o=>{let p="";try{let d=JSON.parse(o.address);p=`${d.address}, ${d.locality}, ${d.state} - ${d.pincode}`;}catch(d){console.error("Error parsing address:",d),p=o.address;}return {...o,address:p}});s.some(o=>o.bookings.some(p=>p.requires_coupon));return s.length==0&&a.length==0&&T.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:n,reportName:"Combined Report",templeName:y}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(g.Fragment,null,g.createElement(Document,null,s.length>0&&yt({startDate:i,endDate:r,templeName:y,pujas:s,isEmbed:true}),a.length>0&&ut({startDate:i,endDate:r,templeName:y,data:a,isEmbed:true}),T.length>0&&ft({startDate:i,endDate:r,templeName:y,data:T,isEmbed:true})))},Ut=Eo;var qo=({startDate:i,endDate:r,data:y})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Temple Payment Report",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"S.No.")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,"Temple Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Bookings")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Revenue"))),y?.map((s,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,a+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,s.bookings)),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"\u20B9",s.revenue))))))),Gt=qo;var co=({startDate:i,endDate:r,templeName:y,data:s})=>{let a=g.useMemo(()=>{let l=[],t=new Map;return s.settlements.forEach(u=>{let o=u.date;t.has(o)||t.set(o,{dateKey:o,dateDisplay:o,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let p=t.get(o);p.items.push(u),p.count++;let d=p.items.reduce((S,k)=>S+k.settlement_amount,0);p.dayTotal=String(d),p.dayTotalVerbose=p.items.map(S=>S.settlement_amount).join(" + ")+" = "+_(d);}),t.forEach(u=>l.push(u)),l},[s.settlements]),T=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Gateway Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},g.createElement(e,null,"Invoices")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Settlement Amt"))),n=(l,t)=>g.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,t+1,". ",l.paymentGateway),g.createElement(e,{style:{fontSize:8,color:"#666",marginTop:2}},l.settlement_id)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},g.createElement(e,null,l.utr.split("").map((u,o)=>g.createElement(e,{key:o},u)))),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%",fontSize:9}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((u,o)=>g.createElement(e,{key:o},u.number," (",_(u.amount),")")))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,_(l.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Settlements Report",templeName:y}),g.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",s.totalCreditedAmount),s.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},a.map(l=>g.createElement(View,{key:l.dateKey,style:{marginBottom:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},l.dateDisplay),g.createElement(e,{style:{fontSize:10}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotalVerbose)),T(),l.items.map((t,u)=>n(t,u))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Jt=co;var Ko=({data:i})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},g.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),g.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},i.templeName),g.createElement(e,{style:{fontSize:10}},i.templeAddress),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},g.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),g.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:gt}))),i.qrContent?g.createElement(View,{style:{width:85}},g.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:i.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},i.status==="confirmed"?g.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:mt}):null,g.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",i.invoiceNumber),g.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",i.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:10}},g.createElement(e,{style:{fontSize:11}},"Bill to:"),g.createElement(e,{style:{fontSize:11}},i.devoteeDetails.name),i.devoteeDetails.phone?g.createElement(e,{style:{fontSize:11}},i.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:11}},i.bookingDate)),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},g.createElement(e,null,"Item Description")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Price")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Quantity")),g.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},g.createElement(e,null,"Total"))),i.items.map((r,y)=>g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},r.pujaName?g.createElement(e,{style:{fontSize:11}},r.pujaName):null,r.devoteesName?g.createElement(e,{style:{fontSize:9,color:"#333333"}},r.devoteesName):null,r.pujaDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},r.pujaDate," ",r.timing?`- ${r.timing}`:null):null,r.repeatEndDate&&r.repeatStartDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},r.repeatStartDate," to ",r.repeatEndDate," ",r.timing?`- ${r.timing}`:null):null,r.refNo?g.createElement(e,{style:{fontSize:9,color:"#333333"}},"Reference No: ",r.refNo):null,r.customRemark?g.createElement(e,{style:{fontSize:9,fontWeight:"semibold",color:"#ff0000"}},"Remark : ",r.customRemark):null),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.basePujPrice)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},`${r.quantity?r.quantity:""}${r.repeatCount?` x ${r.repeatCount}`:""}`)),g.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.totalPrice))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},g.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),g.createElement(e,null,i.paymentMethod)),g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"50%",textAlign:"right"}},g.createElement(e,null,"Subtotal: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.subTotal))),i.postalCharges?g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Postal Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.postalCharges))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Payment Gateway Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.paymentGatewayCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Platform Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.platformCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"GST (18%): ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.gst))),g.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Total: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.totalAmount))))),i.prasadCollectionMode?g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",i.prasadCollectionMode)):null,i.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",i.devoteeDetails.address)):null,i.prasads&&(i.prasads.morning.length>0||i.prasads.afternoon.length>0||i.prasads.evening.length>0)?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},g.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),i.prasads.morning.length>0?g.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"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),i.prasads.morning.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",r.name," (",r.timings,")"))):null,i.prasads.afternoon.length>0?g.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"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),i.prasads.afternoon.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",r.name," (",r.timings,")"))):null,i.prasads.evening.length>0?g.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"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),i.prasads.evening.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:10}},y+1,". ",r.name," (",r.timings,")"))):null):null,i.instructions.length>0?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},g.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},g.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),g.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},i.instructions.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:8}},y+1,") ",r.instruction)))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),g.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),Yt=Ko;var Go=({startDate:i,endDate:r,templeName:y,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Settlement Report",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Amount")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Payment Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(e,null,"Bank UTR No"))),s.map((a,T)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,T+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,a.invoiceNo)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,a.amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,a.paymentDate)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,a.settlementDate)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(U,null,a.bankUtrNo))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Zt=Go;var Zo=({startDate:i,endDate:r,templeName:y,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Invoice Level Breakup",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Base Amount")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees GST")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway Charges")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway GST")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Payment Mode")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Booking Date")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},g.createElement(e,null,"UTR Number"))),s.map((a,T)=>g.createElement(View,{key:T,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,T+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.baseAmount)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.platformFees)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.platformFeesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.gatewayCharges)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.gatewayChargesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.paymentMode)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(U,null,a.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(U,null,a.settlementDate)),g.createElement(View,{style:{padding:3,width:"12%"}},g.createElement(U,null,a.utrNumber))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Xt=Zo;var Ro=({startDate:i,endDate:r,templeName:y,data:s,dayGroups:a,specialNotesForSummary:T})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja Count Summary Report",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},s.length>0&&a&&a.length==1&&g.createElement(ei,{dayGroup:a[0]}),a&&a.length>1?g.createElement(View,{style:{marginBottom:25}},g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,"Total Amount"))),(()=>{let n=new Map;return a.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.entries()).map(([l,t],u)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,l)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},(()=>{let n=new Map;return a.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.quantity,0)})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;return a.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.amount,0)})())))),a.some(n=>n.dayPostalCarrierFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,(()=>{let n=a.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(n.length===0)return "";let l=[0,0,0];return n.forEach(t=>{t&&(l[0]+=t[0],l[1]+=t[1],l[2]+=t[2]);}),`${l.join("+")}`})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(a.reduce((n,l)=>n+(l.dayPostalCarrierFees||0),0))))),a.some(n=>n.dayPostalTempleFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Service (Temple)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(a.reduce((n,l)=>n+(l.dayPostalTempleFees||0),0))))),(()=>{let n=new Map;return a.forEach(l=>{l.otherChargesBreakup?.forEach(t=>{let u=n.get(t.name)||{count:0,amount:0};n.set(t.name,{count:u.count+(t.count||0),amount:u.amount+t.amount});});}),n.size===0?null:Array.from(n.entries()).map(([l,t])=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},l)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.count>0?t.count:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}})),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;a.forEach(o=>{o.items.forEach(p=>{let d=n.get(p.name)||{quantity:0,amount:0};n.set(p.name,{quantity:d.quantity+p.quantity,amount:d.amount+(p.amount||0)});});});let l=Array.from(n.values()).reduce((o,p)=>o+p.amount,0),t=a.reduce((o,p)=>o+((p.dayPostalCarrierFees||0)+(p.dayPostalTempleFees||0)),0),u=a.reduce((o,p)=>{let d=p.otherChargesBreakup?.reduce((S,k)=>S+k.amount,0)||0;return o+d},0);return l+t+u})())))),g.createElement(View,{style:{marginTop:10}},T?.map(n=>n.includes("postal charge")?g.createElement(e,{style:{fontSize:8,marginBottom:2}},n):null))):null,a&&a.length>1&&g.createElement(View,{break:true,style:{marginBottom:25}},g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,"Puja Amount"))),a.map((n,l)=>g.createElement(View,{key:n.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,n.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.items.reduce((t,u)=>t+u.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,_(n.dayPujaTotal))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},a.reduce((n,l)=>n+l.items.reduce((t,u)=>t+u.quantity,0),0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(a.reduce((n,l)=>n+l.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")),s.length>0&&a&&a.length>1&&a.map((n,l)=>g.createElement(Page,{key:n.dateKey,size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},l===0&&g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),g.createElement(ei,{dayGroup:n}))))),ei=({dayGroup:i})=>g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},i.dateDisplay)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Count")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,"Amount"))),i.items.map((r,y)=>g.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,y+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount||0))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.items.reduce((r,y)=>r+y.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPujaTotal)))),i.dayPostalTempleFees||i.dayPostalCarrierFees?g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.postalChargesBreakup?`${i.postalChargesBreakup.map(r=>r||0).join("+")}`:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalCarrierFees)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Service (Temple)")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalTempleFees))))):null,i.otherChargesBreakup?.length?g.createElement(g.Fragment,null,i.otherChargesBreakup.map((r,y)=>g.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.count?r.count:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount)))))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Grand Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayGrandTotal)))),i.specialNotes&&i.specialNotes.length>0?g.createElement(View,{style:{marginTop:10}},g.createElement(e,{style:{fontSize:8,marginBottom:2}},"Notes:"),i.specialNotes.map(r=>g.createElement(e,{style:{fontSize:8,marginBottom:2}},r))):null),ti=Ro;var er=({startDate:i,templeName:r,pujas:y,reportTiming:s})=>{return !y||y.length===0?g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),s&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," Report")),y.map((T,n)=>{let l=T.bookings.filter(t=>!t.is_early_reminder&&!t.requires_coupon);return l.length===0?null:g.createElement(View,{key:n,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},T.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," booking",l.length>1?"s":"")),l.map((t,u)=>(g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:t.topping_name?6:0}},g.createElement(e,{style:{fontSize:12}},t.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",t.quantity)),t.topping_name&&g.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},g.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",t.topping_name)),t.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.priestNote))))))})))},ri=er;var tr=({startDate:i,templeName:r,data:y,reportTiming:s,isDayWiseGrouped:a,dayGroups:T})=>{if(!y||y.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let n=y.sort((t,u)=>t.invoiceNumber.localeCompare(u.invoiceNumber)),l=(t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},t.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",t.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},t.collectionMode)));return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),s&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," Report")),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," item",n.length>1?"s":"")),a&&T&&T.length>0?g.createElement(g.Fragment,null,T.map((t,u)=>g.createElement(View,{key:t.dateKey,style:{marginBottom:12}},g.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},t.dateDisplay),g.createElement(e,{style:{fontSize:11}},t.count," item",t.count!==1?"s":""))),t.items.map((o,p)=>l(o,p))))):g.createElement(g.Fragment,null,n.map((t,u)=>l(t,u)))))},si=tr;var ir=({startDate:i,templeName:r,data:y,isDayWiseGrouped:s,dayGroups:a})=>{let T=t=>{let u="";try{let o=JSON.parse(t.address);u=`${o.address}, ${o.locality}, ${o.state} - ${o.pincode}`;}catch{u=t.address;}return {...t,address:u}},n=y.map(T);if(!n||n.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let l=(t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},t.address)),t.phoneNumber&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",t.phoneNumber)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",t.note||t.pujaName)));return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString())),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},n.length," delivery",n.length>1?" items":" item")),s&&a&&a.length>0?g.createElement(g.Fragment,null,a.map((t,u)=>{let o=t.items.map(T);return g.createElement(View,{key:t.dateKey,style:{marginBottom:12}},g.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},t.dateDisplay),g.createElement(e,{style:{fontSize:11}},t.count," item",t.count!==1?"s":""))),o.map((p,d)=>l(p,d)))})):g.createElement(g.Fragment,null,n.map((t,u)=>l(t,u)))))},ai=ir;var or=({startDate:i,templeName:r,pujaData:y,prasadData:s,deliveryData:a,reportTiming:T})=>{if(y.length===0&&s.length===0&&a.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let l=s.sort((t,u)=>t.invoiceNumber.localeCompare(u.invoiceNumber));return g.createElement(Document,null,y.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),T&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},T.charAt(0).toUpperCase()+T.slice(1)," Report")),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),y.map((t,u)=>{let o=t.bookings.filter(p=>!p.is_early_reminder&&!p.requires_coupon);return o.length===0?null:g.createElement(View,{key:u,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},t.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},o.length," booking",o.length>1?"s":"")),o.map((p,d)=>(g.createElement(View,{key:d,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},p.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},p.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},p.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",p.quantity)),p.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},p.priestNote))))))})),s.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),T&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},T.charAt(0).toUpperCase()+T.slice(1)," Report")),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," item",l.length>1?"s":"")),l.map((t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},t.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},t.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",t.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},t.collectionMode))))),a.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString())),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," delivery",a.length>1?" items":" item")),a.map((t,u)=>g.createElement(View,{key:u,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},t.name),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},t.address)),t.phone&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",t.phone)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",t.pujaDetails))))))},mi=or;var rr=({startDate:i,templeName:r,data:y})=>!y||y.length===0?g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString())),g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},y.length," label",y.length>1?"s":"")),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"center",gap:10,marginBottom:12,fontSize:9}},g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"NP"),"-Normal"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"SP"),"-Speed"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"IP"),"-International")),y.map(s=>g.createElement(View,{key:s.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:5}},g.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},s.name),g.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},s.deliveryMode==="speedpost"?"SP":s.deliveryMode==="international-post"?"IP":"NP")),g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11}},s.address)),g.createElement(e,{style:{fontSize:11,marginBottom:5}},s.phone),g.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),g.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",s.pujaDetails))))),fi=rr;var lr=({startDate:i,endDate:r,templeName:y,pujas:s,reportTiming:a,selectedPujaNames:T=[],hideInvoiceAndDate:n=false})=>{let l=0,t=0,u=s.some(o=>o.bookings.some(p=>p.requires_coupon));return !s||s.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Custom Puja Report",templeName:y,reportTiming:a}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:a,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),s.some(o=>o.bookings.some(p=>p.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(o=>o.bookings.some(p=>p.is_early_reminder&&!p.requires_coupon))?s.flatMap((o,p)=>o.bookings.filter(d=>d.is_early_reminder&&!d.requires_coupon).map((d,S)=>(t++,g.createElement(View,{key:`${p}-${S}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,t)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,o.name)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,d.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,d.date?new Date(d.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:12}},`${y}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},s.map((o,p)=>{if(o.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;l=0;let d=o.bookings.some(b=>b.topping_name),S=(b=false)=>d?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"7%":"5%"}},g.createElement(e,null,"Sr")),!n&&g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"28%":"22%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"23%":"18%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"32%":"25%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:n?"none":"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),!n&&g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Date"))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:n?"12%":"8%"}},g.createElement(e,null,"Sr No")),n?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"88%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"40%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"92%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Date")))),k=(b,G,$)=>b.is_early_reminder||b.requires_coupon?null:d?g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"7%":"5%"}},g.createElement(e,null,$)),!n&&g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"28%":"22%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"23%":"18%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"32%":"25%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:n?"none":"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),!n&&g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:"15%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():""))):g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:n?"12%":"8%"}},g.createElement(e,null,$)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:n?"88%":"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},n?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"40%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"16%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"16%"}},g.createElement(e,null,b.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:"15%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():"")))),b.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,b.priestNote))));return g.createElement(View,{key:p,style:{marginBottom:25}},g.createElement(View,{wrap:false,minPresenceAhead:20},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.bookings.length}`),S(true)),g.createElement(g.Fragment,null,(()=>{if(d){let b=o.bookings.filter($=>!$.is_early_reminder&&!$.requires_coupon),G=new Map;return b.forEach($=>{let z=`${$.invoiceNumber}|${$.devoteeName}|${$.nakshatra}|${$.topping_name||""}`;if(G.has(z)){let R=G.get(z);R.quantity=(parseInt(R.quantity)+parseInt($.quantity)).toString();}else G.set(z,{...$});}),Array.from(G.values()).map(($,z)=>(l++,k($,z,l)))}else return o.bookings.map((b,G)=>b.is_early_reminder||b.requires_coupon?null:(l++,k(b,G,l)))})()))}))),u?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let o=s.flatMap(d=>d.bookings.filter(S=>S.requires_coupon).map(S=>({...S,pujaName:d.name}))),p={};for(let d of o)p[d.invoiceNumber]||(p[d.invoiceNumber]=[]),p[d.invoiceNumber].push(d);return Object.entries(p).map(([d,S])=>{let k=S,b=k[0];return g.createElement(View,{key:d,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},g.createElement(e,{style:{fontWeight:"semibold"}},d),g.createElement(e,null,b.date?new Date(b.date).toDateString():i.toDateString())),g.createElement(e,null,b.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),k.map((G,$)=>g.createElement(View,{key:$,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${G.devoteeName} ----- ${G.nakshatra} ----- ${G.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},wi=lr;var sr=({startDate:i,templeName:r,pujas:y,reportTiming:s,selectedPujaNames:a=[]})=>{return !y||y.length===0?g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},r),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),s&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.charAt(0).toUpperCase()+s.slice(1)," ","Report")),a.length>0&&g.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),g.createElement(e,{style:{fontSize:9,marginTop:2}},a.join(", "))),y.map((n,l)=>{let t=n.bookings.filter(u=>!u.is_early_reminder&&!u.requires_coupon);return t.length===0?null:g.createElement(View,{key:l,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},n.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((u,o)=>(g.createElement(View,{key:o,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11,color:"#666"}},u.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},u.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},u.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",u.quantity)),u.collectionMode&&g.createElement(View,{style:{marginTop:4}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",u.collectionMode)),u.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},u.priestNote))))))}),g.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},g.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},Ti=sr;var gr=i=>{let r=0,y=0,s=0,a=0,T=0,n=0;for(let t of i.items)r+=t.platformFees,y+=t.platformFeesGST,a+=t.invoiceTotal,t.exclude&&(T+=t.platformFees,n+=t.platformFeesGST);s=y+r;let l=n+T;return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:je}),g.createElement(View,{style:{flexDirection:"row",width:"100%"}},g.createElement(View,{style:{width:"50%"}},g.createElement(Text,null,"INVOICE RECON"),g.createElement(Text,{style:{fontSize:12,marginTop:6}},i.templeName," "),g.createElement(Text,{style:{fontSize:12}},"Bookings from ",i.startDate.toDateString()," to"," ",i.endDate.toDateString()," ")),g.createElement(View,{style:{width:"50%",alignItems:"flex-end"}},g.createElement(Text,{style:{fontSize:12,fontWeight:"semibold"}},"Infinix AI Pvt Ltd"," "),g.createElement(Text,{style:{fontSize:12}},"GSTIN: 32AAICI0436P1ZG"," "))),g.createElement(Text,{style:{fontSize:10,backgroundColor:"#fffca6",textDecoration:"line-through",marginTop:10}},"Bookings crossed out / marked with yellow are not to be counted"),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,"Sr no")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,null,"Invoice Number")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%",fontSize:7}},g.createElement(Text,null,"Booking Date")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"Inv Total")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"PF Total")),g.createElement(View,{style:{padding:3,width:"12%",borderRight:"1px solid #000"}},g.createElement(Text,null,"Pay Method")),g.createElement(View,{style:{padding:3,width:"17%",borderRight:"1px solid #000"}},g.createElement(Text,null,"Transaction ID")),g.createElement(View,{style:{padding:3,width:"16%"}},g.createElement(Text,null,"Settlement ID")))),i.items.map((t,u)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:t.exclude?"#fffca6":"transparent"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,u+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,{style:{textDecoration:t.exclude?"line-through":"none"}},t.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}},g.createElement(Text,null,t.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(t.invoiceTotal))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(t.platformFees)," +"," ",_(t.platformFeesGST))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,t.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),g.createElement(View,{style:{padding:3,width:"17%",fontSize:6,borderRight:"1px solid #000"}},g.createElement(Text,null,t.transactionID)),g.createElement(View,{style:{padding:3,width:"16%",fontSize:6}},g.createElement(Text,null,t.settlementID)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,"Total")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}}),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(a))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,_(s))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"17%"}}),g.createElement(View,{style:{padding:3,width:"16%"}})),g.createElement(View,{style:{marginTop:20,width:"50%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:4}},g.createElement(Text,{style:{fontSize:10,width:"60%"}},"Total Platform Fees (Subtotal)"),g.createElement(Text,{style:{fontSize:10,width:"40%"}},_(s))),g.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:4}},g.createElement(Text,{style:{fontSize:10,width:"60%"}},"Deductions (Excluded)"),g.createElement(Text,{style:{fontSize:10,width:"40%"}},"- ",_(l))),g.createElement(View,{style:{display:"flex",flexDirection:"row",paddingVertical:6,borderTop:"1px solid #000",borderBottom:"1px solid #000"}},g.createElement(Text,{style:{fontSize:10,width:"60%",fontWeight:"semibold"}},"Total Payable"),g.createElement(Text,{style:{fontSize:10,width:"40%",fontWeight:"semibold"}},_(s-l))))))},Di=gr;var yr=({startDate:i,endDate:r,templeName:y,data:s,reportTiming:a})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,templeName:y,reportTiming:a,reportName:"Temple Prasad (Kitchen) Report"}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,"Quantity"))),s.map((T,n)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,n+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,T.name)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,T.quantity))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Vi=yr;var wr=({startDate:i,endDate:r,templeName:y,data:s,isDayWiseGrouped:a,dayWiseTotals:T,summary:n})=>{let l=n?.totalBookingsAmount??s.reduce((o,p)=>p.status==="cancelled"?o:o+p.bookingAmount,0),t=n?.totalPostalCharges??s.reduce((o,p)=>p.status==="cancelled"?o:o+(p.postalCharges||0),0),u=n?.totalCreditedAmount??s.reduce((o,p)=>p.status==="cancelled"?o:o+p.creditedAmount,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Report",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:9}},"Total Bookings Amount: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",t.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",u.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),a&&T&&T.length>0&&g.createElement(View,{style:{marginBottom:15}},g.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Day Wise Totals")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Puja Amount")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Postal Charges")),g.createElement(View,{style:{padding:4,width:"25%"}},g.createElement(e,null,"Credited Amount"))),T.map((o,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,o.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"25%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,a&&g.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"All Bookings")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Puja Amt")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,"Delivery")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,"Credited Amt")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Transaction ID"))),s.map((o,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},g.createElement(e,null,p+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,o.date," ",o.time)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,o.invoiceNumber)),o.status=="cancelled"?g.createElement(View,{style:{padding:4,width:"58%"}},g.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,o.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},g.createElement(e,null,(o.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},g.createElement(e,null,o.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,o.transactionId))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Si=wr;var Tr=({startDate:i,endDate:r,templeName:y,data:s,isDayWiseGrouped:a,dayGroups:T})=>{let n=o=>{let p="";try{let d=JSON.parse(o.address);p=`${d.address}, ${d.locality}, ${d.state} - ${d.pincode}`;}catch(d){console.error("Error parsing address:",d),p=o.address;}return {...o,address:p}},l=s.map(n),t=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Post Type")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,width:"15%"}},g.createElement(e,null,"Postal Amnt"))),u=(o,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%",fontSize:6}},g.createElement(U,null,new Date(o.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},g.createElement(U,null,o.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,o.devoteeName),g.createElement(e,{style:{fontSize:7,marginTop:3}},o.address)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,o.postType)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,o.pujaName)),g.createElement(View,{style:{padding:4,width:"15%"}},g.createElement(e,null,o.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Address",templeName:y}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a&&T&&T.length>0?g.createElement(g.Fragment,null,T.map((o,p)=>{let d=o.items.map(n);return g.createElement(View,{key:o.dateKey,style:{marginBottom:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},o.dateDisplay),g.createElement(e,{style:{fontSize:9}},o.count," delivery",o.count!==1?" items":" item")),t(),d.map((S,k)=>u(S,k)))})):g.createElement(g.Fragment,null,t(),l.map((o,p)=>u(o,p)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},zi=Tr;var Sr=({startDate:i,endDate:r,templeName:y,data:s,reportTiming:a,isDayWiseGrouped:T,dayGroups:n,isEmbed:l=false})=>{s.sort((d,S)=>d.invoiceNumber.localeCompare(S.invoiceNumber));let u=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,"Prasad Name")),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,"Mode"))),o=(d,S)=>g.createElement(View,{key:S,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,S+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,d.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,d.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,d.pujaName," - ",d.prasadName)),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,d.collectionMode))),p=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Report",templeName:y,reportTiming:a}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},T&&n&&n.length>0?g.createElement(g.Fragment,null,n.map((d,S)=>g.createElement(View,{key:d.dateKey,style:{marginBottom:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},d.dateDisplay),g.createElement(e,{style:{fontSize:9}},d.count," item",d.count!==1?"s":"")),u(),d.items.map((k,b)=>o(k,b))))):g.createElement(g.Fragment,null,u(),s.map((d,S)=>o(d,S)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return l?p:g.createElement(Document,null,p)},wt=Sr;var Pr=({startDate:i,endDate:r,templeName:y,pujas:s,reportTiming:a,isDayWiseGrouped:T,isEmbed:n=false,hideInvoiceAndDate:l=false})=>{let t=0,u=0,o=s.some(d=>d.bookings.some(S=>S.requires_coupon));if(!s||s.length===0){let d=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja List",templeName:y,reportTiming:a}),g.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"));return n?d:g.createElement(Document,null,d)}let p=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:a,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.some(d=>d.bookings.some(S=>S.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:4}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(d=>d.bookings.some(S=>S.is_early_reminder&&!S.requires_coupon))?s.flatMap((d,S)=>d.bookings.filter(k=>k.is_early_reminder&&!k.requires_coupon).map((k,b)=>(u++,g.createElement(View,{key:`${S}-${b}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,u)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,d.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,k.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,k.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,k.date?new Date(k.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${y}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},s.map((d,S)=>{if(d.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;t=0;let k=d.bookings.some(z=>z.topping_name),b=T&&d.dayGroups&&d.dayGroups.length>0,G=(z=false)=>k?g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"8%":"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"32%":"24%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"28%":"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:l?"27%":"34%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:l?"none":"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),!l&&g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},g.createElement(e,null,"Invoice"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:z?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),l?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"42%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Date")))),$=(z,R,Q)=>z.is_early_reminder||z.requires_coupon?null:k?g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:l?"8%":"5%"}},g.createElement(e,null,Q)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:l?"32%":"24%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:l?"28%":"20%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:l?"27%":"34%"}},g.createElement(e,null,z.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:l?"none":"1px solid black",width:"5%"}},g.createElement(e,null,z.quantity)),!l&&g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},g.createElement(e,null,z.invoiceNumber))):g.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,Q)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},l?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"42%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"15%"}},g.createElement(e,null,z.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,z.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:"16%"}},g.createElement(e,null,z.date?new Date(z.date).toLocaleDateString():"")))),z.priestNote&&g.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,z.priestNote))));return g.createElement(View,{key:S,style:{marginBottom:10}},g.createElement(View,{wrap:false,minPresenceAhead:15},g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${d.name} - ${d.totalBookings||d.bookings.length}`),!b&&G(true)),b?g.createElement(g.Fragment,null,d.dayGroups.map((z,R)=>{let Q=0,be=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return be.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:R>0?12:0}},g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:2}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},z.dateDisplay),g.createElement(e,{style:{fontSize:8}},`${be.length} booking${be.length!==1?"s":""}`)),G(false),be.map((Fe,Dt)=>(Q++,$(Fe,Dt,Q))))})):g.createElement(g.Fragment,null,(()=>{if(k){let z=d.bookings.filter(Q=>!Q.is_early_reminder&&!Q.requires_coupon),R=new Map;return z.forEach(Q=>{let be=`${Q.invoiceNumber}|${Q.devoteeName}|${Q.nakshatra}|${Q.topping_name||""}`;if(R.has(be)){let Fe=R.get(be);Fe.quantity=(parseInt(Fe.quantity)+parseInt(Q.quantity)).toString();}else R.set(be,{...Q});}),Array.from(R.values()).map((Q,be)=>{t=t||1;let Fe=t;return t+=Number(Q.quantity)||1,$(Q,be,Fe)})}else return d.bookings.map((z,R)=>z.is_early_reminder||z.requires_coupon?null:(t++,$(z,R,t)))})()))}))),o?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let d=s.flatMap(k=>k.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:k.name}))),S={};for(let k of d)S[k.invoiceNumber]||(S[k.invoiceNumber]=[]),S[k.invoiceNumber].push(k);return Object.entries(S).map(([k,b],G)=>{let $=b,z=$[0],R=$.length<=5;return g.createElement(View,{key:k,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:!R},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},g.createElement(e,{style:{fontWeight:"semibold"}},k),g.createElement(e,null,z.date?new Date(z.date).toDateString():i.toDateString())),g.createElement(e,null,z.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),$.map((Q,be)=>g.createElement(View,{key:be,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return n?p:g.createElement(Document,null,p)},ht=Pr;var Cr=({templeName:i,startDate:r,endDate:y,pujas:s,reportTiming:a})=>{let T=s.sort((n,l)=>{let t=n.nakshatras.length;return l.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:r,endDate:y,reportTiming:a,reportName:"Puja Summary",templeName:i}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},T.map((n,l)=>g.createElement(g.Fragment,null,g.createElement(View,{style:{marginBottom:20}},g.createElement(View,null,g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${n.name} - ${n.totalCount}`)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,width:"20%",fontWeight:"semibold"}},g.createElement(e,null,"Quantity"))),n.nakshatras.map((t,u)=>g.createElement(g.Fragment,null,g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,t.name)),g.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},g.createElement(e,null,t.count))))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Ii=Cr;var Br=({startDate:i,endDate:r,templeName:y,data:s,isEmbed:a=false})=>{let T=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Prasad Delivery Postal Report",templeName:y}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,marginTop:8,fontSize:7}},g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),g.createElement(e,null,g.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),s&&s.length>0?g.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let n=s.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),l=s.filter(o=>o.deliveryMode==="international-post"),t=s.filter(o=>o.deliveryMode==="speedpost"),u=o=>g.createElement(g.Fragment,null,o.map((p,d)=>{let S=p.qrContent,k=Kt.toDataURL(S);if(d%2===0){let b=o[d+1];return g.createElement(View,{key:`row-${d}`,wrap:false,style:{display:"flex",flexDirection:"row",width:"100%",gap:15,marginBottom:15}},g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},p.name),g.createElement(View,{style:{fontSize:8}},g.createElement(U,{splitat:"words"},p.address)),g.createElement(e,{style:{fontSize:8}},p.phone)),p.qrContent&&k?g.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},p.deliveryMode==="speedpost"?"SP":p.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:k,style:{width:40,height:40,minWidth:40,maxWidth:40}}),g.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",p.pujaDetails)),b&&(()=>{let G=Kt.toDataURL(b.qrContent);return g.createElement(View,{style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},b.name),g.createElement(View,{style:{fontSize:8}},g.createElement(U,{splitat:"words"},b.address)),g.createElement(e,{style:{fontSize:8}},b.phone)),b.qrContent&&G?g.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},b.deliveryMode==="speedpost"?"SP":b.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:G,style:{width:40,height:40,minWidth:40,maxWidth:40}}),g.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",b.pujaDetails))})())}return null}));return g.createElement(g.Fragment,null,n.length>0&&g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",n.length),u(n)),l.length>0&&g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"International Post (IP) - ",l.length),u(l)),t.length>0&&g.createElement(View,{style:{marginBottom:12}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",t.length),u(t)))})()):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return a?T:g.createElement(Document,null,T)},bt=Br;var vr=({startDate:i,endDate:r,templeName:y,pujaData:s,prasadData:a,deliveryData:T,reportTiming:n})=>(T=T.map(l=>{let t="";try{let u=JSON.parse(l.address);t=`${u.address}, ${u.locality}, ${u.state} - ${u.pincode}`;}catch(u){console.error("Error parsing address:",u),t=l.address;}return {...l,address:t}}),s.length==0&&a.length==0&&T.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:n,reportName:"Combined Report",templeName:y}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(Document,null,s.length>0&&ht({startDate:i,endDate:r,templeName:y,pujas:s,reportTiming:n,isEmbed:true}),a.length>0&&wt({startDate:i,endDate:r,templeName:y,data:a,reportTiming:n,isEmbed:true}),T.length>0&&bt({startDate:i,endDate:r,templeName:y,data:T,isEmbed:true}))),Ai=vr;var Er=({startDate:i,endDate:r,data:y})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Temple Payment Report",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,"S.No.")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,"Temple Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,"Bookings")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Revenue"))),y?.map((s,a)=>g.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,a+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,s.bookings)),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"\u20B9",s.revenue))))))),Bi=Er;var qr=({startDate:i,endDate:r,templeName:y,data:s})=>{let a=g.useMemo(()=>{let l=[],t=new Map;return s.settlements.forEach(u=>{let o=u.date;t.has(o)||t.set(o,{dateKey:o,dateDisplay:o,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let p=t.get(o);p.items.push(u),p.count++;let d=p.items.reduce((S,k)=>S+k.settlement_amount,0);p.dayTotal=String(d),p.dayTotalVerbose=p.items.map(S=>S.settlement_amount).join(" + ")+" = "+_(d);}),t.forEach(u=>l.push(u)),l},[s.settlements]),T=()=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Gateway Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%"}},g.createElement(e,null,"Invoices")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Settlement Amt"))),n=(l,t)=>g.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,t+1,". ",l.paymentGateway),g.createElement(e,{style:{fontSize:6,color:"#666",marginTop:2}},l.settlement_id)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},g.createElement(e,null,l.utr.split("").map((u,o)=>g.createElement(e,{key:o},u)))),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%",fontSize:7}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},l.invoices.map((u,o)=>g.createElement(e,{key:o},u.number," (",_(u.amount),")")))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,_(l.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Settlements Report",templeName:y}),g.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",s.totalCreditedAmount),s.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},a.map(l=>g.createElement(View,{key:l.dateKey,style:{marginBottom:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},l.dateDisplay),g.createElement(e,{style:{fontSize:8}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotalVerbose)),T(),l.items.map((t,u)=>n(t,u))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Fi=qr;var cr=({data:i})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},g.createElement(View,{style:{backgroundColor:"#FFA823",width:15,height:"100%"}}),g.createElement(View,{style:{marginLeft:10,marginTop:8,marginBottom:0,flex:1}},g.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},i.templeName),g.createElement(e,{style:{fontSize:8}},i.templeAddress),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:4,marginTop:8,alignItems:"center"}},g.createElement(e,{style:{fontSize:8,marginTop:-4}},"Powered by"),g.createElement(Image,{style:{height:20,width:75,objectFit:"contain"},src:gt}))),i.qrContent?g.createElement(View,{style:{width:65}},g.createElement(Image,{style:{height:55,width:55,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:i.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},i.status==="confirmed"?g.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:mt}):null,g.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",i.invoiceNumber),g.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",i.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:8}},g.createElement(e,{style:{fontSize:9}},"Bill to:"),g.createElement(e,{style:{fontSize:9}},i.devoteeDetails.name),i.devoteeDetails.phone?g.createElement(e,{style:{fontSize:9}},i.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:9}},i.bookingDate)),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},g.createElement(e,null,"Item Description")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Price")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},g.createElement(e,null,"Quantity")),g.createElement(View,{style:{padding:4,width:"20%",textAlign:"center"}},g.createElement(e,null,"Total"))),i.items.map((r,y)=>g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},r.pujaName?g.createElement(e,{style:{fontSize:9}},r.pujaName):null,r.devoteesName?g.createElement(e,{style:{fontSize:7,color:"#333333"}},r.devoteesName):null,r.pujaDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},r.pujaDate," ",r.timing?`- ${r.timing}`:null):null,r.repeatEndDate&&r.repeatStartDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},r.repeatStartDate," to ",r.repeatEndDate," ",r.timing?`- ${r.timing}`:null):null),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.basePujPrice)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},`${r.quantity?r.quantity:""}${r.repeatCount?` x ${r.repeatCount}`:""}`)),g.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},r.totalPrice))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:15,marginHorizontal:15}},g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:9}},g.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),g.createElement(e,null,i.paymentMethod)),g.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"50%",textAlign:"right"}},g.createElement(e,null,"Subtotal: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.subTotal))),i.postalCharges?g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Postal Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.postalCharges))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Payment Gateway Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.paymentGatewayCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Platform Charges: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.platformCharges))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"GST (18%): ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.gst))),g.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:4}}),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{width:"70%",textAlign:"right"}},g.createElement(e,null,"Total: ")),g.createElement(View,{style:{width:"30%",textAlign:"right"}},g.createElement(e,null,i.totalAmount))))),i.prasadCollectionMode?g.createElement(View,{style:{marginBottom:4}},g.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",i.prasadCollectionMode)):null,i.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",i.devoteeDetails.address)):null,i.prasads&&(i.prasads.morning.length>0||i.prasads.afternoon.length>0||i.prasads.evening.length>0)?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:20}},g.createElement(View,{style:{backgroundColor:"#FF266F",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold",color:"white"}},"Prasadsam Details")),i.prasads.morning.length>0?g.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"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Morning:"),i.prasads.morning.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",r.name," (",r.timings,")"))):null,i.prasads.afternoon.length>0?g.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"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Afternoon:"),i.prasads.afternoon.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",r.name," (",r.timings,")"))):null,i.prasads.evening.length>0?g.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"}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Evening:"),i.prasads.evening.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:8}},y+1,". ",r.name," (",r.timings,")"))):null):null,i.instructions.length>0?g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:15,fontSize:7,border:"1px solid #757575"}},g.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:8,paddingVertical:4}},g.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),g.createElement(View,{style:{display:"flex",flexDirection:"column",gap:4,marginVertical:8,paddingHorizontal:8}},i.instructions.map((r,y)=>g.createElement(e,{key:y,style:{fontSize:7}},y+1,") ",r.instruction)))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15}},g.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Terms and Conditions:"),g.createElement(e,{style:{fontSize:7,marginLeft:4}},"https://www.bookmypuja.app/terms-and-condition")))),vi=cr;var Kr=({startDate:i,endDate:r,templeName:y,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Payment Settlement Report",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Amount")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Payment Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(e,null,"Bank UTR No"))),s.map((a,T)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,T+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,a.invoiceNo)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(U,null,a.amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,a.paymentDate)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(U,null,a.settlementDate)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(U,null,a.bankUtrNo))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Wi=Kr;var Gr=({startDate:i,endDate:r,templeName:y,data:s})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Invoice Level Breakup",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:6,fontWeight:"semibold"}},g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Invoice Number")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Base Amount")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Platform Fees GST")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway Charges")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Gateway GST")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Payment Mode")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Booking Date")),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(e,null,"Settlement Date")),g.createElement(View,{style:{padding:2,borderRight:"none",width:"12%"}},g.createElement(e,null,"UTR Number"))),s.map((a,T)=>g.createElement(View,{key:T,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:6}},g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},g.createElement(e,null,T+1)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.invoiceNumber)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.baseAmount)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.platformFees)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.platformFeesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.gatewayCharges)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.gatewayChargesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(U,null,a.paymentMode)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(U,null,a.bookingDate)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(U,null,a.settlementDate)),g.createElement(View,{style:{padding:2,width:"12%"}},g.createElement(U,null,a.utrNumber))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),ji=Gr;var Yr=({startDate:i,endDate:r,templeName:y,data:s,dayGroups:a,specialNotesForSummary:T})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Puja Count Summary Report",templeName:y}),s.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},s.length>0&&a&&a.length==1&&g.createElement(_i,{dayGroup:a[0]}),a&&a.length>1?g.createElement(View,{style:{marginBottom:20}},g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,"Total Amount"))),(()=>{let n=new Map;return a.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.entries()).map(([l,t],u)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,u+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,l)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},(()=>{let n=new Map;return a.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.quantity,0)})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;return a.forEach(l=>{l.items.forEach(t=>{let u=n.get(t.name)||{quantity:0,amount:0};n.set(t.name,{quantity:u.quantity+t.quantity,amount:u.amount+(t.amount||0)});});}),Array.from(n.values()).reduce((l,t)=>l+t.amount,0)})())))),a.some(n=>n.dayPostalCarrierFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,(()=>{let n=a.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(n.length===0)return "";let l=[0,0,0];return n.forEach(t=>{t&&(l[0]+=t[0],l[1]+=t[1],l[2]+=t[2]);}),`${l.join("+")}`})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(a.reduce((n,l)=>n+(l.dayPostalCarrierFees||0),0))))),a.some(n=>n.dayPostalTempleFees>0)&&g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Postal Service (Temple)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(a.reduce((n,l)=>n+(l.dayPostalTempleFees||0),0))))),(()=>{let n=new Map;return a.forEach(l=>{l.otherChargesBreakup?.forEach(t=>{let u=n.get(t.name)||{count:0,amount:0};n.set(t.name,{count:u.count+(t.count||0),amount:u.amount+t.amount});});}),n.size===0?null:Array.from(n.entries()).map(([l,t])=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},l)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,t.count>0?t.count:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(t.amount)))))})(),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}})),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_((()=>{let n=new Map;a.forEach(o=>{o.items.forEach(p=>{let d=n.get(p.name)||{quantity:0,amount:0};n.set(p.name,{quantity:d.quantity+p.quantity,amount:d.amount+(p.amount||0)});});});let l=Array.from(n.values()).reduce((o,p)=>o+p.amount,0),t=a.reduce((o,p)=>o+((p.dayPostalCarrierFees||0)+(p.dayPostalTempleFees||0)),0),u=a.reduce((o,p)=>{let d=p.otherChargesBreakup?.reduce((S,k)=>S+k.amount,0)||0;return o+d},0);return l+t+u})())))),g.createElement(View,{style:{marginTop:8}},T?.map(n=>n.includes("postal charge")?g.createElement(e,{style:{fontSize:7,marginBottom:2}},n):null))):null,a&&a.length>1&&g.createElement(View,{style:{marginBottom:20}},g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Summary")),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Total Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,"Puja Amount"))),a.map((n,l)=>g.createElement(View,{key:n.dateKey,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,n.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.items.reduce((t,u)=>t+u.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,_(n.dayPujaTotal))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,{style:{fontWeight:"bold"}},"Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,{style:{fontWeight:"bold"}},a.reduce((n,l)=>n+l.items.reduce((t,u)=>t+u.quantity,0),0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},_(a.reduce((n,l)=>n+l.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")),s.length>0&&a&&a.length>1&&a.map((n,l)=>g.createElement(Page,{key:n.dateKey,size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},l===0&&g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),g.createElement(_i,{dayGroup:n}))))),_i=({dayGroup:i})=>g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid #000",borderBottom:"none"}},g.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},i.dateDisplay)),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,"Sr no")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Count")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,"Amount"))),i.items.map((r,y)=>g.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,y+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount||0))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Puja Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.items.reduce((r,y)=>r+y.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPujaTotal)))),i.dayPostalTempleFees||i.dayPostalCarrierFees?g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Charge (Carrier)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,i.postalChargesBreakup?`${i.postalChargesBreakup.map(r=>r||0).join("+")}`:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalCarrierFees)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Postal Service (Temple)")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayPostalTempleFees))))):null,i.otherChargesBreakup?.length?g.createElement(g.Fragment,null,i.otherChargesBreakup.map((r,y)=>g.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,r.count?r.count:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(r.amount)))))):null,g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,"Grand Total")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,_(i.dayGrandTotal)))),i.specialNotes&&i.specialNotes.length>0?g.createElement(View,{style:{marginTop:8}},g.createElement(e,{style:{fontSize:7,marginBottom:2}},"Notes:"),i.specialNotes.map(r=>g.createElement(e,{style:{fontSize:7,marginBottom:2}},r))):null),Li=Yr;var Xr=({startDate:i,endDate:r,templeName:y,pujas:s,reportTiming:a,selectedPujaNames:T=[],hideInvoiceAndDate:n=false})=>{let l=0,t=0,u=s.some(o=>o.bookings.some(p=>p.requires_coupon));return !s||s.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportName:"Custom Puja Report",templeName:y,reportTiming:a}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range and pujas"))):g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:a,reportName:"",templeName:""}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},g.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),s.some(o=>o.bookings.some(p=>p.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:4}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:4}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),s.some(o=>o.bookings.some(p=>p.is_early_reminder&&!p.requires_coupon))?s.flatMap((o,p)=>o.bookings.filter(d=>d.is_early_reminder&&!d.requires_coupon).map((d,S)=>(t++,g.createElement(View,{key:`${p}-${S}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,t)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,o.name)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,d.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,d.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,d.date?new Date(d.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:10}},`${y}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},s.map((o,p)=>{if(o.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;l=0;let d=o.bookings.some(b=>b.topping_name),S=(b=false)=>d?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"7%":"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"30%":"20%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"22%":"16%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"36%":"30%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:n?"none":"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),!n&&g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"14%"}},g.createElement(e,null,"Date")))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:b?void 0:"none"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:n?"10%":"8%"}},g.createElement(e,null,"Sr No")),n?g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"90%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"42%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"15%"}},g.createElement(e,null,"Mode"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"92%"}},g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"28%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"9%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Date")))),k=(b,G,$)=>b.is_early_reminder||b.requires_coupon?null:d?g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:n?"7%":"5%"}},g.createElement(e,null,$)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:n?"30%":"20%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:n?"22%":"16%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:n?"36%":"30%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:n?"none":"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),!n&&g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:"14%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():"")))):g.createElement(View,{key:G,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:n?"10%":"8%"}},g.createElement(e,null,$)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:n?"90%":"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},n?g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"42%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"15%"}},g.createElement(e,null,b.collectionMode||""))):g.createElement(g.Fragment,null,g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",width:"18%"}},g.createElement(U,null,b.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"9%"}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:"16%"}},g.createElement(e,null,b.date?new Date(b.date).toLocaleDateString():"")))),b.priestNote&&g.createElement(View,{style:{padding:2,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,b.priestNote))));return g.createElement(View,{key:p,style:{marginBottom:10}},g.createElement(View,{wrap:false,minPresenceAhead:20},g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:2,textAlign:"center",borderBottom:"none"}},`${o.name} - ${o.bookings.length}`),S(true)),g.createElement(g.Fragment,null,(()=>{if(d){let b=o.bookings.filter($=>!$.is_early_reminder&&!$.requires_coupon),G=new Map;return b.forEach($=>{let z=`${$.invoiceNumber}|${$.devoteeName}|${$.nakshatra}|${$.topping_name||""}`;if(G.has(z)){let R=G.get(z);R.quantity=(parseInt(R.quantity)+parseInt($.quantity)).toString();}else G.set(z,{...$});}),Array.from(G.values()).map(($,z)=>{l=l||1;let R=l;return l+=Number($.quantity)||1,k($,z,R)})}else return o.bookings.map((b,G)=>b.is_early_reminder||b.requires_coupon?null:(l++,k(b,G,l)))})()))}))),u?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:je}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let o=s.flatMap(d=>d.bookings.filter(S=>S.requires_coupon).map(S=>({...S,pujaName:d.name}))),p={};for(let d of o)p[d.invoiceNumber]||(p[d.invoiceNumber]=[]),p[d.invoiceNumber].push(d);return Object.entries(p).map(([d,S])=>{let k=S,b=k[0];return g.createElement(View,{key:d,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:false},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},g.createElement(e,{style:{fontWeight:"semibold"}},d),g.createElement(e,null,b.date?new Date(b.date).toDateString():i.toDateString())),g.createElement(e,null,b.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),k.map((G,$)=>g.createElement(View,{key:$,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${G.devoteeName} ----- ${G.nakshatra} ----- ${G.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Mi=Xr;var tn=({startDate:i,endDate:r,templeName:y,data:s,reportTiming:a})=>{let T=s.items[0].shares.length,n=50/(T||1),l=0,t=0,u=new Array(T).fill(0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i,endDate:r,reportTiming:a,reportName:"Share Report",templeName:y}),s.items.length<=0?g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,s.items.length>0?g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black"}},g.createElement(View,{style:{width:"5%",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Sr")),g.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Puja Name")),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Price")),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Count")),s.items[0].shares.map((o,p)=>g.createElement(View,{style:{width:`${n}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},o.key))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),s.items.map((o,p)=>(l+=o.count,t+=o.total,o.shares.forEach((d,S)=>{u[S]+=d.value;}),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",borderTop:"none"}},g.createElement(View,{style:{width:"5%",padding:4}},g.createElement(e,{style:{fontSize:8}},p+1)),g.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},o.pujaName)),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(o.price))),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},o.count)),o.shares.map((d,S)=>g.createElement(View,{style:{width:`${n}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(d.value)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(o.total)))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",fontWeight:"bold",borderTop:"none"}},g.createElement(View,{style:{width:"33%",padding:4}},g.createElement(e,{style:{fontSize:8}},"Total")),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},l)),u.map((o,p)=>g.createElement(View,{style:{width:`${n}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(o)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},_(t))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},g.createElement(View,{style:{width:"30%"}},u.map((o,p)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",paddingBottom:"2px"}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},s.items[0].shares[p].key)),g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},_(o,true,true))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",fontWeight:"bold",borderBottom:"1px solid black",borderTop:"1px solid black",marginTop:"2px"}},g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},"Total")),g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},_(t,true,true))))),g.createElement(View,{style:{width:"35%"}},s.options?.right_side_table?.map((o,p)=>g.createElement(View,{key:p,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2,...s.options?.right_side_table&&p==s.options?.right_side_table?.length-1?{borderBottom:"1px solid black",borderTop:"1px solid black"}:{}}},o.map((d,S)=>g.createElement(View,{style:{width:`${100/o.length}%`}},g.createElement(e,{style:{fontSize:9,...S==1?{textAlign:"right"}:{}}},d)))))),g.createElement(View,{style:{width:"1%"}})),s.options?.footer_paragraph&&g.createElement(View,{style:{marginTop:50}},g.createElement(e,{style:{fontSize:10}},s.options.footer_paragraph))):null)))},$i=tn;var nn=i=>{let r=0,y=0;return i.data.items.forEach(s=>{r+=s.quantity,y+=s.total;}),g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(j,{startDate:i.startDate,endDate:i.endDate,reportName:"Advance Goods Report",templeName:i.templeName,showGeneratedAt:true}),g.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},i.data.multiplier.name," ="," ",_(i.data.multiplier.rate)),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,"Sr no")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Text,null,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,"Quantity")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,"Amount"))),i.data.items.map((s,a)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,a+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Text,null,s.date)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,s.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,_(s.total))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},g.createElement(Text,null,"Total")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,r)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,_(y)))))))},ci=nn;var Ki={kitchen:{A4:qt,A5:Vi},transaction:{A4:Mt,A5:Si},"prasad-delivery":{A4:$t,A5:zi,"110mm":ai},prasad:{A4:ut,A5:wt,"110mm":si},"puja-detailed":{A4:yt,A5:ht,"110mm":ri},"puja-summary":{A4:Ot,A5:Ii},"combined-report":{A4:Ut,A5:Ai,"110mm":mi},"multi-temple-payment":{A4:Gt,A5:Bi},"settlements-report":{A4:Jt,A5:Fi},invoice:{A4:Yt,A5:vi},"postal-report":{A4:ft,A5:bt,"110mm":fi},"payment-settlement-report":{A4:Zt,A5:Wi},"invoice-breakup":{A4:Xt,A5:ji},"puja-count":{A4:ti,A5:Li},"custom-report":{A4:wi,A5:Mi,"110mm":Ti},"invoice-recon":{A4:Di},"share-report":{A4:$i},"advance-goods":{A4:ci}},Qi=class{constructor(r,y){Vt(this,"option");Vt(this,"size");this.option=r,this.size=y,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:a,src:T})=>Font.register({family:a,src:T})),Font.register({family:"Noto Sans",fontWeight:"normal",src:At}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Bt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Ft});}async print(r){let s=Ki[this.option][this.size],a=g.createElement(s,{...r}),T=pdf(a).toBlob();return T.then(n=>{var l=URL.createObjectURL(n);if(window!=null){let t=window.open(l,"_blank");setTimeout(()=>{t?.print();},1e3);}}),T}async getBlob(r){let s=Ki[this.option][this.size],a=g.createElement(s,{...r});return pdf(a).toBlob()}};
2
2
  export{eo as A4Print,lo 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.96",
4
+ "version": "0.4.97",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",