@bookmypuja-tech/bmp-pdf 0.4.92 → 0.4.93
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 +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
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 Ht from'qrcode';var Ui=Object.defineProperty;var Qi=(r,n,u)=>n in r?Ui(r,n,{enumerable:true,configurable:true,writable:true,value:u}):r[n]=u;var Dt=(r,n,u)=>Qi(r,typeof n!="symbol"?n+"":n,u);var _e=r=>{typeof r=="string"&&(r=new Date(r));let n={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("en-GB",n).replace(",","")};var v=(r,n=false,u=false)=>{if(!n){if(r>=1e7)return `\u20B9${(r/1e7).toFixed(2)}Cr`;if(r>=1e5)return `\u20B9${(r/1e5).toFixed(2)}L`}return r.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:u?2:r%1===0?0:2})};var We="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",dt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Nt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Ft="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var pt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",gt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Vt={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var Bt=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Xi=({data:r,dates:n})=>{let u=_e(n[0])===_e(n[1]);return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:Bt.page},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),g.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),g.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",u?_e(n[0]):`${_e(n[0])} - ${_e(n[1])}`),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},r?r.map((l,p)=>g.createElement(View,{wrap:false,key:p,style:Bt.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"}},l.participantName),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.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"}},l.pujaName)),u?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},_e(l.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},g.createElement(Text,null,"Priest Note: ",l.priestNote)):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},g.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",l.amount),l.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)))},Ri=Xi;Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var me=1,ot=25*me,Wt=StyleSheet.create({page:{padding:10*me,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*me,paddingHorizontal:10*me,fontSize:ot,border:`${5*me}px solid black`,borderRadius:5*me,width:"100%",display:"flex",flexDirection:"column"}}),ro=({data:r,dates:n})=>{let u=_e(n[0])===_e(n[1]);return g.createElement(Document,null,g.createElement(Page,{dpi:200,size:[457*me],style:Wt.page},g.createElement(Image,{fixed:true,style:{height:55*me,width:274*me,marginBottom:10*me,marginHorizontal:"auto"},src:We}),g.createElement(Text,{style:{fontSize:25*me,marginBottom:5*me,marginHorizontal:"auto"}},"Puja List"),g.createElement(Text,{style:{fontSize:20*me,marginBottom:5*me,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",u?_e(n[0]):`${_e(n[0])} - ${_e(n[1])}`),g.createElement(Text,{style:{fontSize:17*me,marginBottom:20*me,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*me}},r?r.map((l,p)=>g.createElement(View,{wrap:false,key:p,style:Wt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*me}},g.createElement(Text,{style:{opacity:.6,marginRight:10*me}},"#",(p+1).toString().padStart(2,"0")),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*me}},l.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*me,paddingHorizontal:5*me,borderRadius:5*me,marginTop:3*me}},g.createElement(Text,{style:{color:"#ffffff",fontSize:ot}},"Pending")):null,g.createElement(Text,{style:{fontWeight:"bold",fontSize:ot}},"Rs ",l.amount))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*me,gap:3*me}},g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantName),g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*me}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.pujaName)),u?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},_e(l.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*me}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*me}},g.createElement(Text,null,"Priest Note: ",l.priestNote)):null))):null)))},no=ro;var so={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:r={},children:n})=>{let u=s=>{let o=maxBy(Object.entries(so),([i,y])=>{let T=s.match(y);return T?T.length:0});return o?o[0]:"Latin"},l=s=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(s));function p(s){return s.replace(/[\uFF01-\uFF5E]/g,o=>`${String.fromCharCode(o.charCodeAt(0)-65248)} `)}let V=s=>{let o=[],i=null,y="";for(let T of s){T=p(T);let b=u(T);b!==i?(y&&o.push({text:y,script:i}),i=b,y=T):y+=T;}return y&&o.push({text:y,script:i}),o},d=[];n&&typeof n=="string"&&!Array.isArray(n)&&!l(n)&&V(n).forEach((o,i)=>{let y=o.script==="Latin"||!o.script?"Noto Sans":`Noto Sans ${o.script}`;d.push(g.createElement(Text,{key:i,style:{fontFamily:y}},o.text));});let a=[],t={fontFamily:"Noto Sans"};return Array.isArray(r)?a=[...r,t]:r&&Object.keys(r).length>0?a=[r,t]:a=[t],g.createElement(Text,{style:a},d?.length?d:n)},e=ao;var go=({startDate:r,endDate:n,reportTiming:u,templeName:l,reportName:p,showGeneratedAt:V=true})=>g.createElement(g.Fragment,null,g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:We}),V&&g.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),n?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",r.toDateString()," - ",n.toDateString()):g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",r.toDateString()),u&&Object.keys(Vt).includes(u)?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Vt[u]," Report"):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},p),g.createElement(e,{style:{fontSize:12}},`${l}`)),N=go;var yo=({startDate:r,endDate:n,templeName:u,data:l,reportTiming:p})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,templeName:u,reportTiming:p,reportName:"Temple Prasad (Kitchen) Report"}),l.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"))),l.map((V,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:"20%"}},g.createElement(e,null,d+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,V.name)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,V.quantity))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),_t=yo;var ho=({startDate:r,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayWiseTotals:V,summary:d})=>{let a=d?.totalBookingsAmount??l.reduce((o,i)=>i.status==="cancelled"?o:o+i.bookingAmount,0),t=d?.totalPostalCharges??l.reduce((o,i)=>i.status==="cancelled"?o:o+(i.postalCharges||0),0),s=d?.totalCreditedAmount??l.reduce((o,i)=>i.status==="cancelled"?o:o+i.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(N,{startDate:r,endDate:n,reportName:"Payment Report",templeName:u}),l.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: ",a.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: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p&&V&&V.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"))),V.map((o,i)=>g.createElement(View,{key:i,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"))),l.map((o,i)=>g.createElement(View,{key:i,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,i+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"))))},Lt=ho;var bo=({children:r,splitat:n})=>{if(!r||typeof r!="string")return null;let u="";return n=="words"&&(u=" "),g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},r.split(u).map((l,p)=>g.createElement(g.Fragment,null,g.createElement(e,{key:p},l,n=="words"?" ":"")))))},Q=bo;var Vo=({startDate:r,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayGroups:V})=>{let d=o=>{let i="";try{let y=JSON.parse(o.address);i=`${y.address}, ${y.locality}, ${y.state} - ${y.pincode}`;}catch(y){console.error("Error parsing address:",y),i=o.address;}return {...o,address:i}},a=l.map(d),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"))),s=(o,i)=>g.createElement(View,{key:i,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(Q,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(N,{startDate:r,endDate:n,reportName:"Prasad Delivery Address",templeName:u}),a.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p&&V&&V.length>0?g.createElement(g.Fragment,null,V.map((o,i)=>{let y=o.items.map(d);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(),y.map((T,b)=>s(T,b)))})):g.createElement(g.Fragment,null,t(),a.map((o,i)=>s(o,i)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=Vo;var Io=({startDate:r,endDate:n,templeName:u,data:l,reportTiming:p,isDayWiseGrouped:V,dayGroups:d,isEmbed:a=false})=>{l.sort((y,T)=>y.invoiceNumber.localeCompare(T.invoiceNumber));let s=()=>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=(y,T)=>g.createElement(View,{key:T,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,T+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,y.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,y.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,y.pujaName," - ",y.prasadName)),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,y.quantity)),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,y.collectionMode))),i=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Prasad Report",templeName:u,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")),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},V&&d&&d.length>0?g.createElement(g.Fragment,null,d.map((y,T)=>g.createElement(View,{key:y.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"}},y.dateDisplay),g.createElement(e,{style:{fontSize:10}},y.count," item",y.count!==1?"s":"")),s(),y.items.map((b,B)=>o(b,B))))):g.createElement(g.Fragment,null,s(),l.map((y,T)=>o(y,T)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return a?i:g.createElement(Document,null,i)},mt=Io;var Ao=({startDate:r,endDate:n,templeName:u,pujas:l,reportTiming:p,isDayWiseGrouped:V,isEmbed:d=false})=>{let a=0,t=0,s=l.some(i=>i.bookings.some(y=>y.requires_coupon));if(!l||l.length===0){let i=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Puja List",templeName:u,reportTiming:p}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return d?i:g.createElement(Document,null,i)}let o=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,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")),l.some(i=>i.bookings.some(y=>y.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"))))),l.some(i=>i.bookings.some(y=>y.is_early_reminder&&!y.requires_coupon))?l.flatMap((i,y)=>i.bookings.filter(T=>T.is_early_reminder&&!T.requires_coupon).map((T,b)=>(t++,g.createElement(View,{key:`${y}-${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,t)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,i.name)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,T.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,T.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,T.date?new Date(T.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((i,y)=>{if(i.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;a=0;let T=i.bookings.some(z=>z.topping_name),b=V&&i.dayGroups&&i.dayGroups.length>0,B=(z=false)=>T?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:"5%"}},g.createElement(e,null,"Sr")),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:"27%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"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")),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:"30%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},g.createElement(e,null,"Nakshatra")),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:"none",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode"))),_=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:T?g.createElement(View,{key:X,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:"5%"}},g.createElement(e,null,U)),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:"27%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"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:X,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,U)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,z.collectionMode||""))),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:y,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"}},`${i.name} - ${i.totalBookings||i.bookings.length}`),!b&&B(true)),b?g.createElement(g.Fragment,null,i.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return we.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:X>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}},`${we.length} booking${we.length!==1?"s":""}`)),B(false),we.map((Fe,Tt)=>(U++,_(Fe,Tt,U))))})):g.createElement(g.Fragment,null,(()=>{if(T){let z=i.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Fe=X.get(we);Fe.quantity=(parseInt(Fe.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>(a++,_(U,we,a)))}else return i.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(a++,_(z,X,a)))})()))}))),s?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let i=l.flatMap(T=>T.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:T.name}))),y={};for(let T of i)y[T.invoiceNumber]||(y[T.invoiceNumber]=[]),y[T.invoiceNumber].push(T);return Object.entries(y).map(([T,b],B)=>{let _=b,z=_[0],X=_.length<=5;return g.createElement(View,{key:T,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!X},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"}},T),g.createElement(e,null,z.date?new Date(z.date).toDateString():r.toDateString())),g.createElement(e,null,z.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),_.map((U,we)=>g.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.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 d?o:g.createElement(Document,null,o)},ut=Ao;var No=({templeName:r,startDate:n,endDate:u,pujas:l,reportTiming:p})=>{let V=l.sort((d,a)=>{let t=d.nakshatras.length;return a.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:n,endDate:u,reportTiming:p,reportName:"Puja Summary",templeName:r}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},V.map((d,a)=>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"}},`${d.name} - ${d.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"))),d.nakshatras.map((t,s)=>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,s+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")))},$t=No;var vo=({startDate:r,endDate:n,templeName:u,data:l,isEmbed:p=false})=>{let V=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:u}),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")),l&&l.length>0?g.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let d=l.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),a=l.filter(o=>o.deliveryMode==="international-post"),t=l.filter(o=>o.deliveryMode==="speedpost"),s=o=>g.createElement(g.Fragment,null,o.map((i,y)=>{let T=i.qrContent,b=Ht.toDataURL(T);if(y%2===0){let B=o[y+1];return g.createElement(View,{key:`row-${y}`,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"}},i.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},i.address)),g.createElement(e,{style:{fontSize:10}},i.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}},i.deliveryMode==="speedpost"?"SP":i.deliveryMode==="international-post"?"IP":"NP"),i.qrContent&&b?g.createElement(Image,{src:b,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: ",i.pujaDetails)),B&&(()=>{let _=Ht.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.createElement(Image,{src:_,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,d.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) - ",d.length),s(d)),a.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) - ",a.length),s(a)),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),s(t)))})()):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return p?V:g.createElement(Document,null,V)},yt=vo;var jo=({startDate:r,endDate:n,templeName:u,pujaData:l,prasadData:p,deliveryData:V,reportTiming:d})=>{V=V.map(o=>{let i="";try{let y=JSON.parse(o.address);i=`${y.address}, ${y.locality}, ${y.state} - ${y.pincode}`;}catch(y){console.error("Error parsing address:",y),i=o.address;}return {...o,address:i}});l.some(o=>o.bookings.some(i=>i.requires_coupon));return l.length==0&&p.length==0&&V.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportTiming:d,reportName:"Combined Report",templeName:u}),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,l.length>0&&ut({startDate:r,endDate:n,templeName:u,pujas:l,isEmbed:true}),p.length>0&&mt({startDate:r,endDate:n,templeName:u,data:p,isEmbed:true}),V.length>0&&yt({startDate:r,endDate:n,templeName:u,data:V,isEmbed:true})))},Ut=jo;var _o=({startDate:r,endDate:n,data:u})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,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"))),u?.map((l,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,l.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,l.bookings)),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"\u20B9",l.revenue))))))),Qt=_o;var Mo=({startDate:r,endDate:n,templeName:u,data:l})=>{let p=g.useMemo(()=>{let a=[],t=new Map;return l.settlements.forEach(s=>{let o=s.date;t.has(o)||t.set(o,{dateKey:o,dateDisplay:o,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let i=t.get(o);i.items.push(s),i.count++;let y=i.items.reduce((T,b)=>T+b.settlement_amount,0);i.dayTotal=String(y),i.dayTotalVerbose=i.items.map(T=>T.settlement_amount).join(" + ")+" = "+v(y);}),t.forEach(s=>a.push(s)),a},[l.settlements]),V=()=>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"))),d=(a,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,". ",a.paymentGateway),g.createElement(e,{style:{fontSize:8,color:"#666",marginTop:2}},a.settlement_id)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},g.createElement(e,null,a.utr.split("").map((s,o)=>g.createElement(e,{key:o},s)))),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%",fontSize:9}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},a.invoices.map((s,o)=>g.createElement(e,{key:o},s.number," (",v(s.amount),")")))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,v(a.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Settlements Report",templeName:u}),g.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.map(a=>g.createElement(View,{key:a.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"}},a.dateDisplay),g.createElement(e,{style:{fontSize:10}},a.count," settlement",a.count!==1?"s":""," | ",a.dayTotalVerbose)),V(),a.items.map((t,s)=>d(t,s))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Gt=Mo;var Ho=({data:r})=>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"}},r.templeName),g.createElement(e,{style:{fontSize:10}},r.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:pt}))),r.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:r.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},r.status==="confirmed"?g.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:gt}):null,g.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",r.invoiceNumber),g.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",r.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:10}},g.createElement(e,{style:{fontSize:11}},"Bill to:"),g.createElement(e,{style:{fontSize:11}},r.devoteeDetails.name),r.devoteeDetails.phone?g.createElement(e,{style:{fontSize:11}},r.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:11}},r.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"))),r.items.map((n,u)=>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%"}},n.pujaName?g.createElement(e,{style:{fontSize:11}},n.pujaName):null,n.devoteesName?g.createElement(e,{style:{fontSize:9,color:"#333333"}},n.devoteesName):null,n.pujaDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.timing}`:null):null,n.refNo?g.createElement(e,{style:{fontSize:9,color:"#333333"}},"Reference No: ",n.refNo):null,n.customRemark?g.createElement(e,{style:{fontSize:9,fontWeight:"semibold",color:"#ff0000"}},"Remark : ",n.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:{}},n.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:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),g.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},n.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,r.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,r.subTotal))),r.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,r.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,r.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,r.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,r.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,r.totalAmount))))),r.prasadCollectionMode?g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",r.prasadCollectionMode)):null,r.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",r.devoteeDetails.address)):null,r.prasads&&(r.prasads.morning.length>0||r.prasads.afternoon.length>0||r.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")),r.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:"),r.prasads.morning.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:10}},u+1,". ",n.name," (",n.timings,")"))):null,r.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:"),r.prasads.afternoon.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:10}},u+1,". ",n.name," (",n.timings,")"))):null,r.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:"),r.prasads.evening.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:10}},u+1,". ",n.name," (",n.timings,")"))):null):null,r.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}},r.instructions.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,") ",n.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")))),Jt=Ho;var Qo=({startDate:r,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Payment Settlement Report",templeName:u}),l.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"))),l.map((p,V)=>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,V+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.invoiceNo)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.paymentDate)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(Q,null,p.bankUtrNo))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Yt=Qo;var Yo=({startDate:r,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Invoice Level Breakup",templeName:u}),l.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"))),l.map((p,V)=>g.createElement(View,{key:V,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,V+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.baseAmount)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFees)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFeesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayCharges)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayChargesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.paymentMode)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(Q,null,p.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:3,width:"12%"}},g.createElement(Q,null,p.utrNumber))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Zt=Yo;var Xo=({startDate:r,endDate:n,templeName:u,data:l,dayGroups:p,summary:V})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Puja Count Summary Report",templeName:u}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},l.length>0&&p&&p.length==1&&g.createElement(Rt,{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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.entries()).map(([a,t],s)=>g.createElement(View,{key:a,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,s+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,a)),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,v(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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.quantity,0)})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v((()=>{let d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.amount,0)})())))),p.some(d=>d.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 d=p.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(d.length===0)return "";let a=[0,0,0];return d.forEach(t=>{t&&(a[0]+=t[0],a[1]+=t[1],a[2]+=t[2]);}),`${a.join("+")}`})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+(a.dayPostalCarrierFees||0),0))))),p.some(d=>d.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"}},v(p.reduce((d,a)=>d+(a.dayPostalTempleFees||0),0))))),(()=>{let d=new Map;return p.forEach(a=>{a.otherChargesBreakup?.forEach(t=>{let s=d.get(t.name)||{count:0,amount:0};d.set(t.name,{count:s.count+(t.count||0),amount:s.amount+t.amount});});}),d.size===0?null:Array.from(d.entries()).map(([a,t])=>g.createElement(View,{key:a,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"}},a)),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"}},v(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"}},v((()=>{let d=new Map;p.forEach(o=>{o.items.forEach(i=>{let y=d.get(i.name)||{quantity:0,amount:0};d.set(i.name,{quantity:y.quantity+i.quantity,amount:y.amount+(i.amount||0)});});});let a=Array.from(d.values()).reduce((o,i)=>o+i.amount,0),t=p.reduce((o,i)=>o+((i.dayPostalCarrierFees||0)+(i.dayPostalTempleFees||0)),0),s=p.reduce((o,i)=>{let y=i.otherChargesBreakup?.reduce((T,b)=>T+b.amount,0)||0;return o+y},0);return a+t+s})()))))):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((d,a)=>g.createElement(View,{key:d.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,a+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,d.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,d.items.reduce((t,s)=>t+s.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,v(d.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((d,a)=>d+a.items.reduce((t,s)=>t+s.quantity,0),0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+a.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")),l.length>0&&p&&p.length>1&&p.map((d,a)=>g.createElement(Page,{key:d.dateKey,size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},a===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(Rt,{dayGroup:d}))))),Rt=({dayGroup:r})=>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"}},r.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"))),r.items.map((n,u)=>g.createElement(View,{key:u,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:"55%"}},g.createElement(e,null,n.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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,r.items.reduce((n,u)=>n+u.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(r.dayPujaTotal)))),r.dayPostalTempleFees||r.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,r.postalChargesBreakup?`${r.postalChargesBreakup.map(n=>n||0).join("+")}`:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(r.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,v(r.dayPostalTempleFees))))):null,r.otherChargesBreakup?.length?g.createElement(g.Fragment,null,r.otherChargesBreakup.map((n,u)=>g.createElement(View,{key:u,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,n.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.count?n.count:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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,v(r.dayGrandTotal))))),ei=Xo;var Ro=({startDate:r,templeName:n,pujas:u,reportTiming:l})=>{return !u||u.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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),l&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),u.map((V,d)=>{let a=V.bookings.filter(t=>!t.is_early_reminder&&!t.requires_coupon);return a.length===0?null:g.createElement(View,{key:d,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"}},V.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," booking",a.length>1?"s":"")),a.map((t,s)=>(g.createElement(View,{key:s,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))))))})))},oi=Ro;var er=({startDate:r,templeName:n,data:u,reportTiming:l,isDayWiseGrouped:p,dayGroups:V})=>{if(!u||u.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 d=u.sort((t,s)=>t.invoiceNumber.localeCompare(s.invoiceNumber)),a=(t,s)=>g.createElement(View,{key:s,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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),l&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.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}},d.length," item",d.length>1?"s":"")),p&&V&&V.length>0?g.createElement(g.Fragment,null,V.map((t,s)=>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,i)=>a(o,i))))):g.createElement(g.Fragment,null,d.map((t,s)=>a(t,s)))))},li=er;var tr=({startDate:r,templeName:n,data:u,isDayWiseGrouped:l,dayGroups:p})=>{let V=t=>{let s="";try{let o=JSON.parse(t.address);s=`${o.address}, ${o.locality}, ${o.state} - ${o.pincode}`;}catch{s=t.address;}return {...t,address:s}},d=u.map(V);if(!d||d.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 a=(t,s)=>g.createElement(View,{key:s,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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.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}},d.length," delivery",d.length>1?" items":" item")),l&&p&&p.length>0?g.createElement(g.Fragment,null,p.map((t,s)=>{let o=t.items.map(V);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((i,y)=>a(i,y)))})):g.createElement(g.Fragment,null,d.map((t,s)=>a(t,s)))))},ai=tr;var ir=({startDate:r,templeName:n,pujaData:u,prasadData:l,deliveryData:p,reportTiming:V})=>{if(u.length===0&&l.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 a=l.sort((t,s)=>t.invoiceNumber.localeCompare(s.invoiceNumber));return g.createElement(Document,null,u.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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),V&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.charAt(0).toUpperCase()+V.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")),u.map((t,s)=>{let o=t.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return o.length===0?null:g.createElement(View,{key:s,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((i,y)=>(g.createElement(View,{key:y,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"}},i.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},i.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",i.quantity)),i.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},i.priestNote))))))})),l.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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),V&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.charAt(0).toUpperCase()+V.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}},a.length," item",a.length>1?"s":"")),a.map((t,s)=>g.createElement(View,{key:s,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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.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,s)=>g.createElement(View,{key:s,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))))))},gi=ir;var or=({startDate:r,templeName:n,data:u})=>!u||u.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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.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}},u.length," label",u.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")),u.map(l=>g.createElement(View,{key:l.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"}},l.name),g.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},l.deliveryMode==="speedpost"?"SP":l.deliveryMode==="international-post"?"IP":"NP")),g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11}},l.address)),g.createElement(e,{style:{fontSize:11,marginBottom:5}},l.phone),g.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),g.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",l.pujaDetails))))),yi=or;var nr=({startDate:r,endDate:n,templeName:u,pujas:l,reportTiming:p,selectedPujaNames:V=[]})=>{let d=0,a=0,t=l.some(s=>s.bookings.some(o=>o.requires_coupon));return !l||l.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Custom Puja Report",templeName:u,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(N,{startDate:r,endDate:n,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")),l.some(s=>s.bookings.some(o=>o.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"))))),l.some(s=>s.bookings.some(o=>o.is_early_reminder&&!o.requires_coupon))?l.flatMap((s,o)=>s.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,y)=>(a++,g.createElement(View,{key:`${o}-${y}`,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,a)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,i.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:12}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((s,o)=>{if(s.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;d=0;let i=s.bookings.some(b=>b.topping_name),y=(b=false)=>i?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:"5%"}},g.createElement(e,null,"Sr")),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:"22%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),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:"8%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"8%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"8%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Date"))),T=(b,B,_)=>b.is_early_reminder||b.requires_coupon?null:i?g.createElement(View,{key:B,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:"5%"}},g.createElement(e,null,_)),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:"22%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),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:B,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:"8%"}},g.createElement(e,null,_)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${18*1.11111}%`}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${24*1.11111}%`}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${18*1.11111}%`}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${8*1.11111}%`}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${8*1.11111}%`}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:`${16*1.11111}%`}},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:o,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"}},`${s.name} - ${s.bookings.length}`),y(true)),g.createElement(g.Fragment,null,(()=>{if(i){let b=s.bookings.filter(_=>!_.is_early_reminder&&!_.requires_coupon),B=new Map;return b.forEach(_=>{let z=`${_.invoiceNumber}|${_.devoteeName}|${_.nakshatra}|${_.topping_name||""}`;if(B.has(z)){let X=B.get(z);X.quantity=(parseInt(X.quantity)+parseInt(_.quantity)).toString();}else B.set(z,{..._});}),Array.from(B.values()).map((_,z)=>(d++,T(_,z,d)))}else return s.bookings.map((b,B)=>b.is_early_reminder||b.requires_coupon?null:(d++,T(b,B,d)))})()))}))),t?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let s=l.flatMap(i=>i.bookings.filter(y=>y.requires_coupon).map(y=>({...y,pujaName:i.name}))),o={};for(let i of s)o[i.invoiceNumber]||(o[i.invoiceNumber]=[]),o[i.invoiceNumber].push(i);return Object.entries(o).map(([i,y])=>{let T=y,b=T[0];return g.createElement(View,{key:i,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"}},i),g.createElement(e,null,b.date?new Date(b.date).toDateString():r.toDateString())),g.createElement(e,null,b.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),T.map((B,_)=>g.createElement(View,{key:_,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${B.devoteeName} ----- ${B.nakshatra} ----- ${B.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},xi=nr;var lr=({startDate:r,templeName:n,pujas:u,reportTiming:l,selectedPujaNames:p=[]})=>{return !u||u.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}},n),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},r.toLocaleDateString()),l&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.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(", "))),u.map((d,a)=>{let t=d.bookings.filter(s=>!s.is_early_reminder&&!s.requires_coupon);return t.length===0?null:g.createElement(View,{key:a,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}},t.length," booking",t.length>1?"s":"")),t.map((s,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"}},s.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},s.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",s.quantity)),s.collectionMode&&g.createElement(View,{style:{marginTop:4}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",s.collectionMode)),s.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},s.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"))))},bi=lr;var pr=r=>{let n=0,u=0,l=0,p=0,V=0,d=0;for(let t of r.items)n+=t.platformFees,u+=t.platformFeesGST,p+=t.invoiceTotal,t.exclude&&(V+=t.platformFees,d+=t.platformFeesGST);l=u+n;let a=d+V;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:We}),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}},r.templeName," "),g.createElement(Text,{style:{fontSize:12}},"Bookings from ",r.startDate.toDateString()," to"," ",r.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")))),r.items.map((t,s)=>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,s+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,v(t.invoiceTotal))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,v(t.platformFees)," +"," ",v(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,v(p))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,v(l))),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%"}},v(l))),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%"}},"- ",v(a))),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"}},v(l-a))))))},Ti=pr;var ur=({startDate:r,endDate:n,templeName:u,data:l,reportTiming:p})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,templeName:u,reportTiming:p,reportName:"Temple Prasad (Kitchen) Report"}),l.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"))),l.map((V,d)=>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,d+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,V.name)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,V.quantity))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Di=ur;var xr=({startDate:r,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayWiseTotals:V,summary:d})=>{let a=d?.totalBookingsAmount??l.reduce((o,i)=>i.status==="cancelled"?o:o+i.bookingAmount,0),t=d?.totalPostalCharges??l.reduce((o,i)=>i.status==="cancelled"?o:o+(i.postalCharges||0),0),s=d?.totalCreditedAmount??l.reduce((o,i)=>i.status==="cancelled"?o:o+i.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(N,{startDate:r,endDate:n,reportName:"Payment Report",templeName:u}),l.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: ",a.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: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p&&V&&V.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"))),V.map((o,i)=>g.createElement(View,{key:i,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"))),l.map((o,i)=>g.createElement(View,{key:i,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,i+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"))))},Vi=xr;var br=({startDate:r,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayGroups:V})=>{let d=o=>{let i="";try{let y=JSON.parse(o.address);i=`${y.address}, ${y.locality}, ${y.state} - ${y.pincode}`;}catch(y){console.error("Error parsing address:",y),i=o.address;}return {...o,address:i}},a=l.map(d),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"))),s=(o,i)=>g.createElement(View,{key:i,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(Q,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(Q,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(N,{startDate:r,endDate:n,reportName:"Prasad Delivery Address",templeName:u}),a.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p&&V&&V.length>0?g.createElement(g.Fragment,null,V.map((o,i)=>{let y=o.items.map(d);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(),y.map((T,b)=>s(T,b)))})):g.createElement(g.Fragment,null,t(),a.map((o,i)=>s(o,i)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Si=br;var Vr=({startDate:r,endDate:n,templeName:u,data:l,reportTiming:p,isDayWiseGrouped:V,dayGroups:d,isEmbed:a=false})=>{l.sort((y,T)=>y.invoiceNumber.localeCompare(T.invoiceNumber));let s=()=>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=(y,T)=>g.createElement(View,{key:T,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,T+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,y.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,y.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,y.pujaName," - ",y.prasadName)),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,y.quantity)),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,y.collectionMode))),i=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Prasad Report",templeName:u,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")),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},V&&d&&d.length>0?g.createElement(g.Fragment,null,d.map((y,T)=>g.createElement(View,{key:y.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"}},y.dateDisplay),g.createElement(e,{style:{fontSize:9}},y.count," item",y.count!==1?"s":"")),s(),y.items.map((b,B)=>o(b,B))))):g.createElement(g.Fragment,null,s(),l.map((y,T)=>o(y,T)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return a?i:g.createElement(Document,null,i)},xt=Vr;var Pr=({startDate:r,endDate:n,templeName:u,pujas:l,reportTiming:p,isDayWiseGrouped:V,isEmbed:d=false})=>{let a=0,t=0,s=l.some(i=>i.bookings.some(y=>y.requires_coupon));if(!l||l.length===0){let i=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Puja List",templeName:u,reportTiming:p}),g.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"));return d?i:g.createElement(Document,null,i)}let o=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,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")),l.some(i=>i.bookings.some(y=>y.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"))))),l.some(i=>i.bookings.some(y=>y.is_early_reminder&&!y.requires_coupon))?l.flatMap((i,y)=>i.bookings.filter(T=>T.is_early_reminder&&!T.requires_coupon).map((T,b)=>(t++,g.createElement(View,{key:`${y}-${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,t)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,i.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,T.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,T.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,T.date?new Date(T.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},l.map((i,y)=>{if(i.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;a=0;let T=i.bookings.some(z=>z.topping_name),b=V&&i.dayGroups&&i.dayGroups.length>0,B=(z=false)=>T?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:"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},g.createElement(e,null,"Devotee")),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:"34%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),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")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"36%"}},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:"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:9,borderRight:"none",fontWeight:"semibold",width:"17%"}},g.createElement(e,null,"Invoice No"))),_=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:T?g.createElement(View,{key:X,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:"5%"}},g.createElement(e,null,U)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"24%"}},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:12,borderRight:"1px solid black",width:"34%"}},g.createElement(e,null,z.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},g.createElement(e,null,z.invoiceNumber))):g.createElement(View,{key:X,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,U)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${36*1.11111}%`}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},g.createElement(e,null,z.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:`${17*1.11111}%`}},g.createElement(e,null,z.invoiceNumber))),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:y,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"}},`${i.name} - ${i.totalBookings||i.bookings.length}`),!b&&B(true)),b?g.createElement(g.Fragment,null,i.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Fe=>!Fe.is_early_reminder&&!Fe.requires_coupon);return we.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:X>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}},`${we.length} booking${we.length!==1?"s":""}`)),B(false),we.map((Fe,Tt)=>(U++,_(Fe,Tt,U))))})):g.createElement(g.Fragment,null,(()=>{if(T){let z=i.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Fe=X.get(we);Fe.quantity=(parseInt(Fe.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>{a=a||1;let Fe=a;return a+=Number(U.quantity)||1,_(U,we,Fe)})}else return i.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(a++,_(z,X,a)))})()))}))),s?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let i=l.flatMap(T=>T.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:T.name}))),y={};for(let T of i)y[T.invoiceNumber]||(y[T.invoiceNumber]=[]),y[T.invoiceNumber].push(T);return Object.entries(y).map(([T,b],B)=>{let _=b,z=_[0],X=_.length<=5;return g.createElement(View,{key:T,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:!X},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"}},T),g.createElement(e,null,z.date?new Date(z.date).toDateString():r.toDateString())),g.createElement(e,null,z.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),_.map((U,we)=>g.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.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 d?o:g.createElement(Document,null,o)},ht=Pr;var Ar=({templeName:r,startDate:n,endDate:u,pujas:l,reportTiming:p})=>{let V=l.sort((d,a)=>{let t=d.nakshatras.length;return a.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:n,endDate:u,reportTiming:p,reportName:"Puja Summary",templeName:r}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},V.map((d,a)=>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"}},`${d.name} - ${d.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"))),d.nakshatras.map((t,s)=>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,s+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=Ar;var Nr=({startDate:r,endDate:n,templeName:u,data:l,isEmbed:p=false})=>{let V=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:u}),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")),l&&l.length>0?g.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let d=l.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),a=l.filter(o=>o.deliveryMode==="international-post"),t=l.filter(o=>o.deliveryMode==="speedpost"),s=o=>g.createElement(g.Fragment,null,o.map((i,y)=>{let T=i.qrContent,b=Ht.toDataURL(T);if(y%2===0){let B=o[y+1];return g.createElement(View,{key:`row-${y}`,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"}},i.name),g.createElement(View,{style:{fontSize:8}},g.createElement(Q,{splitat:"words"},i.address)),g.createElement(e,{style:{fontSize:8}},i.phone)),i.qrContent&&b?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}},i.deliveryMode==="speedpost"?"SP":i.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:b,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: ",i.pujaDetails)),B&&(()=>{let _=Ht.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(Q,{splitat:"words"},B.address)),g.createElement(e,{style:{fontSize:8}},B.phone)),B.qrContent&&_?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:_,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,d.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) - ",d.length),s(d)),a.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) - ",a.length),s(a)),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),s(t)))})()):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return p?V:g.createElement(Document,null,V)},wt=Nr;var Br=({startDate:r,endDate:n,templeName:u,pujaData:l,prasadData:p,deliveryData:V,reportTiming:d})=>(V=V.map(a=>{let t="";try{let s=JSON.parse(a.address);t=`${s.address}, ${s.locality}, ${s.state} - ${s.pincode}`;}catch(s){console.error("Error parsing address:",s),t=a.address;}return {...a,address:t}}),l.length==0&&p.length==0&&V.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportTiming:d,reportName:"Combined Report",templeName:u}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(Document,null,l.length>0&&ht({startDate:r,endDate:n,templeName:u,pujas:l,reportTiming:d,isEmbed:true}),p.length>0&&xt({startDate:r,endDate:n,templeName:u,data:p,reportTiming:d,isEmbed:true}),V.length>0&&wt({startDate:r,endDate:n,templeName:u,data:V,isEmbed:true}))),ki=Br;var jr=({startDate:r,endDate:n,data:u})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,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"))),u?.map((l,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,l.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,l.bookings)),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"\u20B9",l.revenue))))))),Ni=jr;var _r=({startDate:r,endDate:n,templeName:u,data:l})=>{let p=g.useMemo(()=>{let a=[],t=new Map;return l.settlements.forEach(s=>{let o=s.date;t.has(o)||t.set(o,{dateKey:o,dateDisplay:o,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let i=t.get(o);i.items.push(s),i.count++;let y=i.items.reduce((T,b)=>T+b.settlement_amount,0);i.dayTotal=String(y),i.dayTotalVerbose=i.items.map(T=>T.settlement_amount).join(" + ")+" = "+v(y);}),t.forEach(s=>a.push(s)),a},[l.settlements]),V=()=>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"))),d=(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:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,t+1,". ",a.paymentGateway),g.createElement(e,{style:{fontSize:6,color:"#666",marginTop:2}},a.settlement_id)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},g.createElement(e,null,a.utr.split("").map((s,o)=>g.createElement(e,{key:o},s)))),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%",fontSize:7}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},a.invoices.map((s,o)=>g.createElement(e,{key:o},s.number," (",v(s.amount),")")))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,v(a.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Settlements Report",templeName:u}),g.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.map(a=>g.createElement(View,{key:a.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"}},a.dateDisplay),g.createElement(e,{style:{fontSize:8}},a.count," settlement",a.count!==1?"s":""," | ",a.dayTotalVerbose)),V(),a.items.map((t,s)=>d(t,s))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Fi=_r;var Mr=({data:r})=>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"}},r.templeName),g.createElement(e,{style:{fontSize:8}},r.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:pt}))),r.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:r.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},r.status==="confirmed"?g.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:gt}):null,g.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",r.invoiceNumber),g.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",r.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:8}},g.createElement(e,{style:{fontSize:9}},"Bill to:"),g.createElement(e,{style:{fontSize:9}},r.devoteeDetails.name),r.devoteeDetails.phone?g.createElement(e,{style:{fontSize:9}},r.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:9}},r.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"))),r.items.map((n,u)=>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%"}},n.pujaName?g.createElement(e,{style:{fontSize:9}},n.pujaName):null,n.devoteesName?g.createElement(e,{style:{fontSize:7,color:"#333333"}},n.devoteesName):null,n.pujaDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.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:{}},n.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:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),g.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},n.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,r.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,r.subTotal))),r.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,r.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,r.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,r.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,r.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,r.totalAmount))))),r.prasadCollectionMode?g.createElement(View,{style:{marginBottom:4}},g.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",r.prasadCollectionMode)):null,r.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",r.devoteeDetails.address)):null,r.prasads&&(r.prasads.morning.length>0||r.prasads.afternoon.length>0||r.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")),r.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:"),r.prasads.morning.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,". ",n.name," (",n.timings,")"))):null,r.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:"),r.prasads.afternoon.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,". ",n.name," (",n.timings,")"))):null,r.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:"),r.prasads.evening.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,". ",n.name," (",n.timings,")"))):null):null,r.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}},r.instructions.map((n,u)=>g.createElement(e,{key:u,style:{fontSize:7}},u+1,") ",n.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")))),Bi=Mr;var Hr=({startDate:r,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Payment Settlement Report",templeName:u}),l.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"))),l.map((p,V)=>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,V+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.invoiceNo)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.paymentDate)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(Q,null,p.bankUtrNo))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),vi=Hr;var Qr=({startDate:r,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Invoice Level Breakup",templeName:u}),l.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"))),l.map((p,V)=>g.createElement(View,{key:V,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,V+1)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.invoiceNumber)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.baseAmount)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFees)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFeesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayCharges)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayChargesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.paymentMode)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(Q,null,p.bookingDate)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:2,width:"12%"}},g.createElement(Q,null,p.utrNumber))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Wi=Qr;var Jr=({startDate:r,endDate:n,templeName:u,data:l,dayGroups:p,summary:V})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Puja Count Summary Report",templeName:u}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},l.length>0&&p&&p.length==1&&g.createElement(Ei,{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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.entries()).map(([a,t],s)=>g.createElement(View,{key:a,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,s+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,a)),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,v(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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.quantity,0)})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v((()=>{let d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.amount,0)})())))),p.some(d=>d.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 d=p.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(d.length===0)return "";let a=[0,0,0];return d.forEach(t=>{t&&(a[0]+=t[0],a[1]+=t[1],a[2]+=t[2]);}),`${a.join("+")}`})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+(a.dayPostalCarrierFees||0),0))))),p.some(d=>d.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"}},v(p.reduce((d,a)=>d+(a.dayPostalTempleFees||0),0))))),(()=>{let d=new Map;return p.forEach(a=>{a.otherChargesBreakup?.forEach(t=>{let s=d.get(t.name)||{count:0,amount:0};d.set(t.name,{count:s.count+(t.count||0),amount:s.amount+t.amount});});}),d.size===0?null:Array.from(d.entries()).map(([a,t])=>g.createElement(View,{key:a,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"}},a)),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"}},v(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"}},v((()=>{let d=new Map;p.forEach(o=>{o.items.forEach(i=>{let y=d.get(i.name)||{quantity:0,amount:0};d.set(i.name,{quantity:y.quantity+i.quantity,amount:y.amount+(i.amount||0)});});});let a=Array.from(d.values()).reduce((o,i)=>o+i.amount,0),t=p.reduce((o,i)=>o+((i.dayPostalCarrierFees||0)+(i.dayPostalTempleFees||0)),0),s=p.reduce((o,i)=>{let y=i.otherChargesBreakup?.reduce((T,b)=>T+b.amount,0)||0;return o+y},0);return a+t+s})()))))):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((d,a)=>g.createElement(View,{key:d.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,a+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,d.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,d.items.reduce((t,s)=>t+s.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,v(d.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((d,a)=>d+a.items.reduce((t,s)=>t+s.quantity,0),0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+a.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")),l.length>0&&p&&p.length>1&&p.map((d,a)=>g.createElement(Page,{key:d.dateKey,size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},a===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(Ei,{dayGroup:d}))))),Ei=({dayGroup:r})=>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"}},r.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"))),r.items.map((n,u)=>g.createElement(View,{key:u,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:"55%"}},g.createElement(e,null,n.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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,r.items.reduce((n,u)=>n+u.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(r.dayPujaTotal)))),r.dayPostalTempleFees||r.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,r.postalChargesBreakup?`${r.postalChargesBreakup.map(n=>n||0).join("+")}`:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(r.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,v(r.dayPostalTempleFees))))):null,r.otherChargesBreakup?.length?g.createElement(g.Fragment,null,r.otherChargesBreakup.map((n,u)=>g.createElement(View,{key:u,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,n.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.count?n.count:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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,v(r.dayGrandTotal))))),ci=Jr;var Zr=({startDate:r,endDate:n,templeName:u,pujas:l,reportTiming:p,selectedPujaNames:V=[]})=>{let d=0,a=0,t=l.some(s=>s.bookings.some(o=>o.requires_coupon));return !l||l.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r,endDate:n,reportName:"Custom Puja Report",templeName:u,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(N,{startDate:r,endDate:n,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")),l.some(s=>s.bookings.some(o=>o.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"))))),l.some(s=>s.bookings.some(o=>o.is_early_reminder&&!o.requires_coupon))?l.flatMap((s,o)=>s.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,y)=>(a++,g.createElement(View,{key:`${o}-${y}`,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,a)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,i.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:10}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},l.map((s,o)=>{if(s.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;d=0;let i=s.bookings.some(b=>b.topping_name),y=(b=false)=>i?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:"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),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:"8%"}},g.createElement(e,null,"Sr 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:"16%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"8%"}},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:"1px solid black",fontWeight:"semibold",width:"13%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))),T=(b,B,_)=>b.is_early_reminder||b.requires_coupon?null:i?g.createElement(View,{key:B,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:"5%"}},g.createElement(e,null,_)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"16%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),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:B,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:"8%"}},g.createElement(e,null,_)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${28*1.11111}%`}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${16*1.11111}%`}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${8*1.11111}%`}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",width:`${13*1.11111}%`}},g.createElement(Q,null,b.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:`${20*1.11111}%`}},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:o,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"}},`${s.name} - ${s.bookings.length}`),y(true)),g.createElement(g.Fragment,null,(()=>{if(i){let b=s.bookings.filter(_=>!_.is_early_reminder&&!_.requires_coupon),B=new Map;return b.forEach(_=>{let z=`${_.invoiceNumber}|${_.devoteeName}|${_.nakshatra}|${_.topping_name||""}`;if(B.has(z)){let X=B.get(z);X.quantity=(parseInt(X.quantity)+parseInt(_.quantity)).toString();}else B.set(z,{..._});}),Array.from(B.values()).map((_,z)=>{d=d||1;let X=d;return d+=Number(_.quantity)||1,T(_,z,X)})}else return s.bookings.map((b,B)=>b.is_early_reminder||b.requires_coupon?null:(d++,T(b,B,d)))})()))}))),t?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let s=l.flatMap(i=>i.bookings.filter(y=>y.requires_coupon).map(y=>({...y,pujaName:i.name}))),o={};for(let i of s)o[i.invoiceNumber]||(o[i.invoiceNumber]=[]),o[i.invoiceNumber].push(i);return Object.entries(o).map(([i,y])=>{let T=y,b=T[0];return g.createElement(View,{key:i,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"}},i),g.createElement(e,null,b.date?new Date(b.date).toDateString():r.toDateString())),g.createElement(e,null,b.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),T.map((B,_)=>g.createElement(View,{key:_,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${B.devoteeName} ----- ${B.nakshatra} ----- ${B.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Li=Zr;var en=({startDate:r,endDate:n,templeName:u,data:l,reportTiming:p})=>{let V=l.items[0].shares.length,d=50/(V||1),a=0,t=0,s=new Array(V).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(N,{startDate:r,endDate:n,reportTiming:p,reportName:"Share Report",templeName:u}),l.items.length<=0?g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,l.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")),l.items[0].shares.map((o,i)=>g.createElement(View,{style:{width:`${d}}%`,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"))),l.items.map((o,i)=>(a+=o.count,t+=o.total,o.shares.forEach((y,T)=>{s[T]+=y.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}},i+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}},v(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((y,T)=>g.createElement(View,{style:{width:`${d}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(y.value)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(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"}},a)),s.map((o,i)=>g.createElement(View,{style:{width:`${d}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(o)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(t))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},g.createElement(View,{style:{width:"30%"}},s.map((o,i)=>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}},l.items[0].shares[i].key)),g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},v(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}},v(t,true,true))))),g.createElement(View,{style:{width:"35%"}},l.options?.right_side_table?.map((o,i)=>g.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2,...l.options?.right_side_table&&i==l.options?.right_side_table?.length-1?{borderBottom:"1px solid black",borderTop:"1px solid black"}:{}}},o.map((y,T)=>g.createElement(View,{style:{width:`${100/o.length}%`}},g.createElement(e,{style:{fontSize:9,...T==1?{textAlign:"right"}:{}}},y)))))),g.createElement(View,{style:{width:"1%"}})),l.options?.footer_paragraph&&g.createElement(View,{style:{marginTop:50}},g.createElement(e,{style:{fontSize:10}},l.options.footer_paragraph))):null)))},qi=en;var rn=r=>{let n=0,u=0;return r.data.items.forEach(l=>{n+=l.quantity,u+=l.total;}),g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:r.startDate,endDate:r.endDate,reportName:"Advance Goods Report",templeName:r.templeName,showGeneratedAt:true}),g.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},r.data.multiplier.name," ="," ",v(r.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"))),r.data.items.map((l,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,l.date)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,l.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,v(l.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,n)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,v(u)))))))},Mi=rn;var Hi={kitchen:{A4:_t,A5:Di},transaction:{A4:Lt,A5:Vi},"prasad-delivery":{A4:qt,A5:Si,"110mm":ai},prasad:{A4:mt,A5:xt,"110mm":li},"puja-detailed":{A4:ut,A5:ht,"110mm":oi},"puja-summary":{A4:$t,A5:Ii},"combined-report":{A4:Ut,A5:ki,"110mm":gi},"multi-temple-payment":{A4:Qt,A5:Ni},"settlements-report":{A4:Gt,A5:Fi},invoice:{A4:Jt,A5:Bi},"postal-report":{A4:yt,A5:wt,"110mm":yi},"payment-settlement-report":{A4:Yt,A5:vi},"invoice-breakup":{A4:Zt,A5:Wi},"puja-count":{A4:ei,A5:ci},"custom-report":{A4:xi,A5:Li,"110mm":bi},"invoice-recon":{A4:Ti},"share-report":{A4:qi},"advance-goods":{A4:Mi}},Ki=class{constructor(n,u){Dt(this,"option");Dt(this,"size");this.option=n,this.size=u,[{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:V})=>Font.register({family:p,src:V})),Font.register({family:"Noto Sans",fontWeight:"normal",src:kt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Nt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Ft});}async print(n){let l=Hi[this.option][this.size],p=g.createElement(l,{...n}),V=pdf(p).toBlob();return V.then(d=>{var a=URL.createObjectURL(d);if(window!=null){let t=window.open(a,"_blank");setTimeout(()=>{t?.print();},1e3);}}),V}async getBlob(n){let l=Hi[this.option][this.size],p=g.createElement(l,{...n});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 Ht from'qrcode';var Ui=Object.defineProperty;var Qi=(i,n,u)=>n in i?Ui(i,n,{enumerable:true,configurable:true,writable:true,value:u}):i[n]=u;var Dt=(i,n,u)=>Qi(i,typeof n!="symbol"?n+"":n,u);var _e=i=>{typeof i=="string"&&(i=new Date(i));let n={day:"2-digit",month:"short",year:"numeric"};return i.toLocaleDateString("en-GB",n).replace(",","")};var v=(i,n=false,u=false)=>{if(!n){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:u?2:i%1===0?0:2})};var We="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",dt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Nt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Bt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var pt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",gt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Vt={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var Ft=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Xi=({data:i,dates:n})=>{let u=_e(n[0])===_e(n[1]);return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:Ft.page},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),g.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),g.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",u?_e(n[0]):`${_e(n[0])} - ${_e(n[1])}`),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},i?i.map((l,p)=>g.createElement(View,{wrap:false,key:p,style:Ft.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"}},l.participantName),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.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"}},l.pujaName)),u?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},_e(l.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},g.createElement(Text,null,"Priest Note: ",l.priestNote)):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},g.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",l.amount),l.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)))},Ri=Xi;Font.register({family:"Roboto",fontWeight:"normal",src:dt});Font.register({family:"Roboto",fontWeight:"bold",src:at});var me=1,ot=25*me,Wt=StyleSheet.create({page:{padding:10*me,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*me,paddingHorizontal:10*me,fontSize:ot,border:`${5*me}px solid black`,borderRadius:5*me,width:"100%",display:"flex",flexDirection:"column"}}),ro=({data:i,dates:n})=>{let u=_e(n[0])===_e(n[1]);return g.createElement(Document,null,g.createElement(Page,{dpi:200,size:[457*me],style:Wt.page},g.createElement(Image,{fixed:true,style:{height:55*me,width:274*me,marginBottom:10*me,marginHorizontal:"auto"},src:We}),g.createElement(Text,{style:{fontSize:25*me,marginBottom:5*me,marginHorizontal:"auto"}},"Puja List"),g.createElement(Text,{style:{fontSize:20*me,marginBottom:5*me,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",u?_e(n[0]):`${_e(n[0])} - ${_e(n[1])}`),g.createElement(Text,{style:{fontSize:17*me,marginBottom:20*me,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*me}},i?i.map((l,p)=>g.createElement(View,{wrap:false,key:p,style:Wt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*me}},g.createElement(Text,{style:{opacity:.6,marginRight:10*me}},"#",(p+1).toString().padStart(2,"0")),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*me}},l.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*me,paddingHorizontal:5*me,borderRadius:5*me,marginTop:3*me}},g.createElement(Text,{style:{color:"#ffffff",fontSize:ot}},"Pending")):null,g.createElement(Text,{style:{fontWeight:"bold",fontSize:ot}},"Rs ",l.amount))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*me,gap:3*me}},g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantName),g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*me}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.pujaName)),u?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},_e(l.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*me}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*me}},g.createElement(Text,null,"Priest Note: ",l.priestNote)):null))):null)))},no=ro;var so={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:n})=>{let u=s=>{let r=maxBy(Object.entries(so),([o,y])=>{let T=s.match(y);return T?T.length:0});return r?r[0]:"Latin"},l=s=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(o=>o.test(s));function p(s){return s.replace(/[\uFF01-\uFF5E]/g,r=>`${String.fromCharCode(r.charCodeAt(0)-65248)} `)}let V=s=>{let r=[],o=null,y="";for(let T of s){T=p(T);let b=u(T);b!==o?(y&&r.push({text:y,script:o}),o=b,y=T):y+=T;}return y&&r.push({text:y,script:o}),r},d=[];n&&typeof n=="string"&&!Array.isArray(n)&&!l(n)&&V(n).forEach((r,o)=>{let y=r.script==="Latin"||!r.script?"Noto Sans":`Noto Sans ${r.script}`;d.push(g.createElement(Text,{key:o,style:{fontFamily:y}},r.text));});let a=[],t={fontFamily:"Noto Sans"};return Array.isArray(i)?a=[...i,t]:i&&Object.keys(i).length>0?a=[i,t]:a=[t],g.createElement(Text,{style:a},d?.length?d:n)},e=ao;var go=({startDate:i,endDate:n,reportTiming:u,templeName:l,reportName:p,showGeneratedAt:V=true})=>g.createElement(g.Fragment,null,g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:We}),V&&g.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),n?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",i.toDateString()," - ",n.toDateString()):g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",i.toDateString()),u&&Object.keys(Vt).includes(u)?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Vt[u]," Report"):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},p),g.createElement(e,{style:{fontSize:12}},`${l}`)),N=go;var yo=({startDate:i,endDate:n,templeName:u,data:l,reportTiming:p})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,templeName:u,reportTiming:p,reportName:"Temple Prasad (Kitchen) Report"}),l.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"))),l.map((V,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:"20%"}},g.createElement(e,null,d+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,V.name)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,V.quantity))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),_t=yo;var ho=({startDate:i,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayWiseTotals:V,summary:d})=>{let a=d?.totalBookingsAmount??l.reduce((r,o)=>o.status==="cancelled"?r:r+o.bookingAmount,0),t=d?.totalPostalCharges??l.reduce((r,o)=>o.status==="cancelled"?r:r+(o.postalCharges||0),0),s=d?.totalCreditedAmount??l.reduce((r,o)=>o.status==="cancelled"?r:r+o.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(N,{startDate:i,endDate:n,reportName:"Payment Report",templeName:u}),l.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: ",a.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: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p&&V&&V.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"))),V.map((r,o)=>g.createElement(View,{key:o,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,r.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,r.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,r.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"25%"}},g.createElement(e,null,r.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"))),l.map((r,o)=>g.createElement(View,{key:o,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,o+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,r.date," ",r.time)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,r.invoiceNumber)),r.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,r.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,(r.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,r.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,r.transactionId))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Lt=ho;var bo=({children:i,splitat:n})=>{if(!i||typeof i!="string")return null;let u="";return n=="words"&&(u=" "),g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},i.split(u).map((l,p)=>g.createElement(g.Fragment,null,g.createElement(e,{key:p},l,n=="words"?" ":"")))))},Q=bo;var Vo=({startDate:i,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayGroups:V})=>{let d=r=>{let o="";try{let y=JSON.parse(r.address);o=`${y.address}, ${y.locality}, ${y.state} - ${y.pincode}`;}catch(y){console.error("Error parsing address:",y),o=r.address;}return {...r,address:o}},a=l.map(d),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"))),s=(r,o)=>g.createElement(View,{key:o,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(r.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(Q,null,r.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,r.devoteeName),g.createElement(e,{style:{fontSize:8,marginTop:4}},r.address)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,r.postType)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,r.pujaName)),g.createElement(View,{style:{padding:6,width:"15%"}},g.createElement(e,null,r.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(N,{startDate:i,endDate:n,reportName:"Prasad Delivery Address",templeName:u}),a.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p&&V&&V.length>0?g.createElement(g.Fragment,null,V.map((r,o)=>{let y=r.items.map(d);return g.createElement(View,{key:r.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"}},r.dateDisplay),g.createElement(e,{style:{fontSize:10}},r.count," delivery",r.count!==1?" items":" item")),t(),y.map((T,b)=>s(T,b)))})):g.createElement(g.Fragment,null,t(),a.map((r,o)=>s(r,o)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=Vo;var Io=({startDate:i,endDate:n,templeName:u,data:l,reportTiming:p,isDayWiseGrouped:V,dayGroups:d,isEmbed:a=false})=>{l.sort((y,T)=>y.invoiceNumber.localeCompare(T.invoiceNumber));let s=()=>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"))),r=(y,T)=>g.createElement(View,{key:T,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,T+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,y.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,y.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,y.pujaName," - ",y.prasadName)),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,y.quantity)),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,y.collectionMode))),o=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Prasad Report",templeName:u,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")),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},V&&d&&d.length>0?g.createElement(g.Fragment,null,d.map((y,T)=>g.createElement(View,{key:y.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"}},y.dateDisplay),g.createElement(e,{style:{fontSize:10}},y.count," item",y.count!==1?"s":"")),s(),y.items.map((b,F)=>r(b,F))))):g.createElement(g.Fragment,null,s(),l.map((y,T)=>r(y,T)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return a?o:g.createElement(Document,null,o)},mt=Io;var Ao=({startDate:i,endDate:n,templeName:u,pujas:l,reportTiming:p,isDayWiseGrouped:V,isEmbed:d=false})=>{let a=0,t=0,s=l.some(o=>o.bookings.some(y=>y.requires_coupon));if(!l||l.length===0){let o=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Puja List",templeName:u,reportTiming:p}),g.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return d?o:g.createElement(Document,null,o)}let r=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,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")),l.some(o=>o.bookings.some(y=>y.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"))))),l.some(o=>o.bookings.some(y=>y.is_early_reminder&&!y.requires_coupon))?l.flatMap((o,y)=>o.bookings.filter(T=>T.is_early_reminder&&!T.requires_coupon).map((T,b)=>(t++,g.createElement(View,{key:`${y}-${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,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,T.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,T.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,T.date?new Date(T.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((o,y)=>{if(o.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;a=0;let T=o.bookings.some(z=>z.topping_name),b=V&&o.dayGroups&&o.dayGroups.length>0,F=(z=false)=>T?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:"5%"}},g.createElement(e,null,"Sr")),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:"27%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"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")),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:"30%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},g.createElement(e,null,"Nakshatra")),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:"none",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode"))),_=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:T?g.createElement(View,{key:X,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:"5%"}},g.createElement(e,null,U)),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:"27%"}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"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:X,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,U)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,z.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,z.collectionMode||""))),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:y,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.totalBookings||o.bookings.length}`),!b&&F(true)),b?g.createElement(g.Fragment,null,o.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Be=>!Be.is_early_reminder&&!Be.requires_coupon);return we.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:X>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}},`${we.length} booking${we.length!==1?"s":""}`)),F(false),we.map((Be,Tt)=>(U++,_(Be,Tt,U))))})):g.createElement(g.Fragment,null,(()=>{if(T){let z=o.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Be=X.get(we);Be.quantity=(parseInt(Be.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>(a++,_(U,we,a)))}else return o.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(a++,_(z,X,a)))})()))}))),s?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let o=l.flatMap(T=>T.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:T.name}))),y={};for(let T of o)y[T.invoiceNumber]||(y[T.invoiceNumber]=[]),y[T.invoiceNumber].push(T);return Object.entries(y).map(([T,b],F)=>{let _=b,z=_[0],X=_.length<=5;return g.createElement(View,{key:T,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!X},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"}},T),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((U,we)=>g.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.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 d?r:g.createElement(Document,null,r)},ut=Ao;var No=({templeName:i,startDate:n,endDate:u,pujas:l,reportTiming:p})=>{let V=l.sort((d,a)=>{let t=d.nakshatras.length;return a.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:n,endDate:u,reportTiming:p,reportName:"Puja Summary",templeName:i}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},V.map((d,a)=>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"}},`${d.name} - ${d.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"))),d.nakshatras.map((t,s)=>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,s+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")))},$t=No;var vo=({startDate:i,endDate:n,templeName:u,data:l,isEmbed:p=false})=>{let V=g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:u}),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")),l&&l.length>0?g.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let d=l.filter(r=>!r.deliveryMode||r.deliveryMode==="normal-post"),a=l.filter(r=>r.deliveryMode==="international-post"),t=l.filter(r=>r.deliveryMode==="speedpost"),s=r=>g.createElement(g.Fragment,null,r.map((o,y)=>{let T=o.qrContent,b=Ht.toDataURL(T);if(y%2===0){let F=r[y+1];return g.createElement(View,{key:`row-${y}`,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"}},o.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},o.address)),g.createElement(e,{style:{fontSize:10}},o.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}},o.deliveryMode==="speedpost"?"SP":o.deliveryMode==="international-post"?"IP":"NP"),o.qrContent&&b?g.createElement(Image,{src:b,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: ",o.pujaDetails)),F&&(()=>{let _=Ht.toDataURL(F.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"}},F.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},F.address)),g.createElement(e,{style:{fontSize:10}},F.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}},F.deliveryMode==="speedpost"?"SP":F.deliveryMode==="international-post"?"IP":"NP"),F.qrContent&&_?g.createElement(Image,{src:_,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: ",F.pujaDetails))})())}return null}));return g.createElement(g.Fragment,null,d.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) - ",d.length),s(d)),a.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) - ",a.length),s(a)),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),s(t)))})()):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return p?V:g.createElement(Document,null,V)},yt=vo;var jo=({startDate:i,endDate:n,templeName:u,pujaData:l,prasadData:p,deliveryData:V,reportTiming:d})=>{V=V.map(r=>{let o="";try{let y=JSON.parse(r.address);o=`${y.address}, ${y.locality}, ${y.state} - ${y.pincode}`;}catch(y){console.error("Error parsing address:",y),o=r.address;}return {...r,address:o}});l.some(r=>r.bookings.some(o=>o.requires_coupon));return l.length==0&&p.length==0&&V.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportTiming:d,reportName:"Combined Report",templeName:u}),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,l.length>0&&ut({startDate:i,endDate:n,templeName:u,pujas:l,isEmbed:true}),p.length>0&&mt({startDate:i,endDate:n,templeName:u,data:p,isEmbed:true}),V.length>0&&yt({startDate:i,endDate:n,templeName:u,data:V,isEmbed:true})))},Ut=jo;var _o=({startDate:i,endDate:n,data:u})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,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"))),u?.map((l,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,l.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,l.bookings)),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"\u20B9",l.revenue))))))),Qt=_o;var Mo=({startDate:i,endDate:n,templeName:u,data:l})=>{let p=g.useMemo(()=>{let a=[],t=new Map;return l.settlements.forEach(s=>{let r=s.date;t.has(r)||t.set(r,{dateKey:r,dateDisplay:r,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let o=t.get(r);o.items.push(s),o.count++;let y=o.items.reduce((T,b)=>T+b.settlement_amount,0);o.dayTotal=String(y),o.dayTotalVerbose=o.items.map(T=>T.settlement_amount).join(" + ")+" = "+v(y);}),t.forEach(s=>a.push(s)),a},[l.settlements]),V=()=>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"))),d=(a,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,". ",a.paymentGateway),g.createElement(e,{style:{fontSize:8,color:"#666",marginTop:2}},a.settlement_id)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},g.createElement(e,null,a.utr.split("").map((s,r)=>g.createElement(e,{key:r},s)))),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%",fontSize:9}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},a.invoices.map((s,r)=>g.createElement(e,{key:r},s.number," (",v(s.amount),")")))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,v(a.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Settlements Report",templeName:u}),g.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},p.map(a=>g.createElement(View,{key:a.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"}},a.dateDisplay),g.createElement(e,{style:{fontSize:10}},a.count," settlement",a.count!==1?"s":""," | ",a.dayTotalVerbose)),V(),a.items.map((t,s)=>d(t,s))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Gt=Mo;var Ho=({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:pt}))),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:gt}):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((n,u)=>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%"}},n.pujaName?g.createElement(e,{style:{fontSize:11}},n.pujaName):null,n.devoteesName?g.createElement(e,{style:{fontSize:9,color:"#333333"}},n.devoteesName):null,n.pujaDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?g.createElement(e,{style:{fontSize:9,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.timing}`:null):null,n.refNo?g.createElement(e,{style:{fontSize:9,color:"#333333"}},"Reference No: ",n.refNo):null,n.customRemark?g.createElement(e,{style:{fontSize:9,fontWeight:"semibold",color:"#ff0000"}},"Remark : ",n.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:{}},n.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:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),g.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:10}},u+1,". ",n.name," (",n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:10}},u+1,". ",n.name," (",n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:10}},u+1,". ",n.name," (",n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,") ",n.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")))),Jt=Ho;var Qo=({startDate:i,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Payment Settlement Report",templeName:u}),l.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"))),l.map((p,V)=>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,V+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.invoiceNo)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.paymentDate)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(Q,null,p.bankUtrNo))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Yt=Qo;var Yo=({startDate:i,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Invoice Level Breakup",templeName:u}),l.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"))),l.map((p,V)=>g.createElement(View,{key:V,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,V+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.baseAmount)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFees)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFeesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayCharges)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayChargesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.paymentMode)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(Q,null,p.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:3,width:"12%"}},g.createElement(Q,null,p.utrNumber))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Zt=Yo;var Xo=({startDate:i,endDate:n,templeName:u,data:l,dayGroups:p,summary:V})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Puja Count Summary Report",templeName:u}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},l.length>0&&p&&p.length==1&&g.createElement(Rt,{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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.entries()).map(([a,t],s)=>g.createElement(View,{key:a,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,s+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,a)),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,v(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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.quantity,0)})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v((()=>{let d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.amount,0)})())))),p.some(d=>d.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 d=p.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(d.length===0)return "";let a=[0,0,0];return d.forEach(t=>{t&&(a[0]+=t[0],a[1]+=t[1],a[2]+=t[2]);}),`${a.join("+")}`})())),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+(a.dayPostalCarrierFees||0),0))))),p.some(d=>d.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"}},v(p.reduce((d,a)=>d+(a.dayPostalTempleFees||0),0))))),(()=>{let d=new Map;return p.forEach(a=>{a.otherChargesBreakup?.forEach(t=>{let s=d.get(t.name)||{count:0,amount:0};d.set(t.name,{count:s.count+(t.count||0),amount:s.amount+t.amount});});}),d.size===0?null:Array.from(d.entries()).map(([a,t])=>g.createElement(View,{key:a,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"}},a)),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"}},v(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"}},v((()=>{let d=new Map;p.forEach(r=>{r.items.forEach(o=>{let y=d.get(o.name)||{quantity:0,amount:0};d.set(o.name,{quantity:y.quantity+o.quantity,amount:y.amount+(o.amount||0)});});});let a=Array.from(d.values()).reduce((r,o)=>r+o.amount,0),t=p.reduce((r,o)=>r+((o.dayPostalCarrierFees||0)+(o.dayPostalTempleFees||0)),0),s=p.reduce((r,o)=>{let y=o.otherChargesBreakup?.reduce((T,b)=>T+b.amount,0)||0;return r+y},0);return a+t+s})()))))):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((d,a)=>g.createElement(View,{key:d.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,a+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,d.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,d.items.reduce((t,s)=>t+s.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,null,v(d.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((d,a)=>d+a.items.reduce((t,s)=>t+s.quantity,0),0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+a.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")),l.length>0&&p&&p.length>1&&p.map((d,a)=>g.createElement(Page,{key:d.dateKey,size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},a===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(Rt,{dayGroup:d}))))),Rt=({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((n,u)=>g.createElement(View,{key:u,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:"55%"}},g.createElement(e,null,n.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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((n,u)=>n+u.quantity,0))),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(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(n=>n||0).join("+")}`:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(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,v(i.dayPostalTempleFees))))):null,i.otherChargesBreakup?.length?g.createElement(g.Fragment,null,i.otherChargesBreakup.map((n,u)=>g.createElement(View,{key:u,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,n.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.count?n.count:"")),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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,v(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(n=>g.createElement(e,{style:{fontSize:8,marginBottom:2}},n))):null),ei=Xo;var Ro=({startDate:i,templeName:n,pujas:u,reportTiming:l})=>{return !u||u.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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),l&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),u.map((V,d)=>{let a=V.bookings.filter(t=>!t.is_early_reminder&&!t.requires_coupon);return a.length===0?null:g.createElement(View,{key:d,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"}},V.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," booking",a.length>1?"s":"")),a.map((t,s)=>(g.createElement(View,{key:s,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))))))})))},oi=Ro;var er=({startDate:i,templeName:n,data:u,reportTiming:l,isDayWiseGrouped:p,dayGroups:V})=>{if(!u||u.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 d=u.sort((t,s)=>t.invoiceNumber.localeCompare(s.invoiceNumber)),a=(t,s)=>g.createElement(View,{key:s,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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),l&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.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}},d.length," item",d.length>1?"s":"")),p&&V&&V.length>0?g.createElement(g.Fragment,null,V.map((t,s)=>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((r,o)=>a(r,o))))):g.createElement(g.Fragment,null,d.map((t,s)=>a(t,s)))))},li=er;var tr=({startDate:i,templeName:n,data:u,isDayWiseGrouped:l,dayGroups:p})=>{let V=t=>{let s="";try{let r=JSON.parse(t.address);s=`${r.address}, ${r.locality}, ${r.state} - ${r.pincode}`;}catch{s=t.address;}return {...t,address:s}},d=u.map(V);if(!d||d.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 a=(t,s)=>g.createElement(View,{key:s,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}},n),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}},d.length," delivery",d.length>1?" items":" item")),l&&p&&p.length>0?g.createElement(g.Fragment,null,p.map((t,s)=>{let r=t.items.map(V);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":""))),r.map((o,y)=>a(o,y)))})):g.createElement(g.Fragment,null,d.map((t,s)=>a(t,s)))))},ai=tr;var ir=({startDate:i,templeName:n,pujaData:u,prasadData:l,deliveryData:p,reportTiming:V})=>{if(u.length===0&&l.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 a=l.sort((t,s)=>t.invoiceNumber.localeCompare(s.invoiceNumber));return g.createElement(Document,null,u.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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),V&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.charAt(0).toUpperCase()+V.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")),u.map((t,s)=>{let r=t.bookings.filter(o=>!o.is_early_reminder&&!o.requires_coupon);return r.length===0?null:g.createElement(View,{key:s,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}},r.length," booking",r.length>1?"s":"")),r.map((o,y)=>(g.createElement(View,{key:y,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"}},o.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},o.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",o.quantity)),o.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},o.priestNote))))))})),l.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}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),V&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.charAt(0).toUpperCase()+V.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}},a.length," item",a.length>1?"s":"")),a.map((t,s)=>g.createElement(View,{key:s,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}},n),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,s)=>g.createElement(View,{key:s,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))))))},gi=ir;var or=({startDate:i,templeName:n,data:u})=>!u||u.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}},n),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}},u.length," label",u.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")),u.map(l=>g.createElement(View,{key:l.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"}},l.name),g.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},l.deliveryMode==="speedpost"?"SP":l.deliveryMode==="international-post"?"IP":"NP")),g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11}},l.address)),g.createElement(e,{style:{fontSize:11,marginBottom:5}},l.phone),g.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),g.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",l.pujaDetails))))),yi=or;var nr=({startDate:i,endDate:n,templeName:u,pujas:l,reportTiming:p,selectedPujaNames:V=[]})=>{let d=0,a=0,t=l.some(s=>s.bookings.some(r=>r.requires_coupon));return !l||l.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Custom Puja Report",templeName:u,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(N,{startDate:i,endDate:n,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")),l.some(s=>s.bookings.some(r=>r.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"))))),l.some(s=>s.bookings.some(r=>r.is_early_reminder&&!r.requires_coupon))?l.flatMap((s,r)=>s.bookings.filter(o=>o.is_early_reminder&&!o.requires_coupon).map((o,y)=>(a++,g.createElement(View,{key:`${r}-${y}`,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,a)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,o.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,o.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,o.date?new Date(o.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:12}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((s,r)=>{if(s.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;d=0;let o=s.bookings.some(b=>b.topping_name),y=(b=false)=>o?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:"5%"}},g.createElement(e,null,"Sr")),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:"22%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),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:"8%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"18%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"8%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"8%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Date"))),T=(b,F,_)=>b.is_early_reminder||b.requires_coupon?null:o?g.createElement(View,{key:F,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:"5%"}},g.createElement(e,null,_)),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:"22%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),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:F,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:"8%"}},g.createElement(e,null,_)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${18*1.11111}%`}},g.createElement(e,null,b.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${24*1.11111}%`}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${18*1.11111}%`}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${8*1.11111}%`}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${8*1.11111}%`}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:6,fontSize:8,borderRight:"none",width:`${16*1.11111}%`}},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:r,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"}},`${s.name} - ${s.bookings.length}`),y(true)),g.createElement(g.Fragment,null,(()=>{if(o){let b=s.bookings.filter(_=>!_.is_early_reminder&&!_.requires_coupon),F=new Map;return b.forEach(_=>{let z=`${_.invoiceNumber}|${_.devoteeName}|${_.nakshatra}|${_.topping_name||""}`;if(F.has(z)){let X=F.get(z);X.quantity=(parseInt(X.quantity)+parseInt(_.quantity)).toString();}else F.set(z,{..._});}),Array.from(F.values()).map((_,z)=>(d++,T(_,z,d)))}else return s.bookings.map((b,F)=>b.is_early_reminder||b.requires_coupon?null:(d++,T(b,F,d)))})()))}))),t?g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let s=l.flatMap(o=>o.bookings.filter(y=>y.requires_coupon).map(y=>({...y,pujaName:o.name}))),r={};for(let o of s)r[o.invoiceNumber]||(r[o.invoiceNumber]=[]),r[o.invoiceNumber].push(o);return Object.entries(r).map(([o,y])=>{let T=y,b=T[0];return g.createElement(View,{key:o,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"}},o),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%"}}),T.map((F,_)=>g.createElement(View,{key:_,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${F.devoteeName} ----- ${F.nakshatra} ----- ${F.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},xi=nr;var lr=({startDate:i,templeName:n,pujas:u,reportTiming:l,selectedPujaNames:p=[]})=>{return !u||u.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}},n),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},i.toLocaleDateString()),l&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.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(", "))),u.map((d,a)=>{let t=d.bookings.filter(s=>!s.is_early_reminder&&!s.requires_coupon);return t.length===0?null:g.createElement(View,{key:a,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}},t.length," booking",t.length>1?"s":"")),t.map((s,r)=>(g.createElement(View,{key:r,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"}},s.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},s.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",s.quantity)),s.collectionMode&&g.createElement(View,{style:{marginTop:4}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",s.collectionMode)),s.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},s.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"))))},bi=lr;var pr=i=>{let n=0,u=0,l=0,p=0,V=0,d=0;for(let t of i.items)n+=t.platformFees,u+=t.platformFeesGST,p+=t.invoiceTotal,t.exclude&&(V+=t.platformFees,d+=t.platformFeesGST);l=u+n;let a=d+V;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:We}),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,s)=>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,s+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,v(t.invoiceTotal))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,v(t.platformFees)," +"," ",v(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,v(p))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,v(l))),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%"}},v(l))),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%"}},"- ",v(a))),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"}},v(l-a))))))},Ti=pr;var ur=({startDate:i,endDate:n,templeName:u,data:l,reportTiming:p})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,templeName:u,reportTiming:p,reportName:"Temple Prasad (Kitchen) Report"}),l.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"))),l.map((V,d)=>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,d+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,V.name)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,V.quantity))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Di=ur;var xr=({startDate:i,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayWiseTotals:V,summary:d})=>{let a=d?.totalBookingsAmount??l.reduce((r,o)=>o.status==="cancelled"?r:r+o.bookingAmount,0),t=d?.totalPostalCharges??l.reduce((r,o)=>o.status==="cancelled"?r:r+(o.postalCharges||0),0),s=d?.totalCreditedAmount??l.reduce((r,o)=>o.status==="cancelled"?r:r+o.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(N,{startDate:i,endDate:n,reportName:"Payment Report",templeName:u}),l.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: ",a.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: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),p&&V&&V.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"))),V.map((r,o)=>g.createElement(View,{key:o,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,r.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,r.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,r.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"25%"}},g.createElement(e,null,r.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"))),l.map((r,o)=>g.createElement(View,{key:o,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,o+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},g.createElement(e,null,r.date," ",r.time)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,r.invoiceNumber)),r.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,r.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,(r.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,r.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,r.transactionId))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Vi=xr;var br=({startDate:i,endDate:n,templeName:u,data:l,isDayWiseGrouped:p,dayGroups:V})=>{let d=r=>{let o="";try{let y=JSON.parse(r.address);o=`${y.address}, ${y.locality}, ${y.state} - ${y.pincode}`;}catch(y){console.error("Error parsing address:",y),o=r.address;}return {...r,address:o}},a=l.map(d),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"))),s=(r,o)=>g.createElement(View,{key:o,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(Q,null,new Date(r.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(Q,null,r.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},g.createElement(e,null,r.devoteeName),g.createElement(e,{style:{fontSize:7,marginTop:3}},r.address)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,r.postType)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,r.pujaName)),g.createElement(View,{style:{padding:4,width:"15%"}},g.createElement(e,null,r.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(N,{startDate:i,endDate:n,reportName:"Prasad Delivery Address",templeName:u}),a.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p&&V&&V.length>0?g.createElement(g.Fragment,null,V.map((r,o)=>{let y=r.items.map(d);return g.createElement(View,{key:r.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"}},r.dateDisplay),g.createElement(e,{style:{fontSize:9}},r.count," delivery",r.count!==1?" items":" item")),t(),y.map((T,b)=>s(T,b)))})):g.createElement(g.Fragment,null,t(),a.map((r,o)=>s(r,o)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Si=br;var Vr=({startDate:i,endDate:n,templeName:u,data:l,reportTiming:p,isDayWiseGrouped:V,dayGroups:d,isEmbed:a=false})=>{l.sort((y,T)=>y.invoiceNumber.localeCompare(T.invoiceNumber));let s=()=>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"))),r=(y,T)=>g.createElement(View,{key:T,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,T+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,y.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,y.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,y.pujaName," - ",y.prasadName)),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,y.quantity)),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,y.collectionMode))),o=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Prasad Report",templeName:u,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")),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},V&&d&&d.length>0?g.createElement(g.Fragment,null,d.map((y,T)=>g.createElement(View,{key:y.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"}},y.dateDisplay),g.createElement(e,{style:{fontSize:9}},y.count," item",y.count!==1?"s":"")),s(),y.items.map((b,F)=>r(b,F))))):g.createElement(g.Fragment,null,s(),l.map((y,T)=>r(y,T)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return a?o:g.createElement(Document,null,o)},xt=Vr;var Pr=({startDate:i,endDate:n,templeName:u,pujas:l,reportTiming:p,isDayWiseGrouped:V,isEmbed:d=false})=>{let a=0,t=0,s=l.some(o=>o.bookings.some(y=>y.requires_coupon));if(!l||l.length===0){let o=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Puja List",templeName:u,reportTiming:p}),g.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"));return d?o:g.createElement(Document,null,o)}let r=g.createElement(g.Fragment,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,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")),l.some(o=>o.bookings.some(y=>y.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"))))),l.some(o=>o.bookings.some(y=>y.is_early_reminder&&!y.requires_coupon))?l.flatMap((o,y)=>o.bookings.filter(T=>T.is_early_reminder&&!T.requires_coupon).map((T,b)=>(t++,g.createElement(View,{key:`${y}-${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,t)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,o.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,T.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,T.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,T.date?new Date(T.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},l.map((o,y)=>{if(o.bookings.every(z=>z.is_early_reminder||z.requires_coupon))return null;a=0;let T=o.bookings.some(z=>z.topping_name),b=V&&o.dayGroups&&o.dayGroups.length>0,F=(z=false)=>T?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:"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"24%"}},g.createElement(e,null,"Devotee")),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:"34%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),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")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"36%"}},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:"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:9,borderRight:"none",fontWeight:"semibold",width:"17%"}},g.createElement(e,null,"Invoice No"))),_=(z,X,U)=>z.is_early_reminder||z.requires_coupon?null:T?g.createElement(View,{key:X,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:"5%"}},g.createElement(e,null,U)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"24%"}},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:12,borderRight:"1px solid black",width:"34%"}},g.createElement(e,null,z.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:"12%"}},g.createElement(e,null,z.invoiceNumber))):g.createElement(View,{key:X,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,U)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${36*1.11111}%`}},g.createElement(e,null,z.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,z.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,z.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},g.createElement(e,null,z.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:6,borderRight:"none",width:`${17*1.11111}%`}},g.createElement(e,null,z.invoiceNumber))),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:y,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"}},`${o.name} - ${o.totalBookings||o.bookings.length}`),!b&&F(true)),b?g.createElement(g.Fragment,null,o.dayGroups.map((z,X)=>{let U=0,we=z.items.filter(Be=>!Be.is_early_reminder&&!Be.requires_coupon);return we.length===0?null:g.createElement(View,{key:z.dateKey,style:{marginTop:X>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}},`${we.length} booking${we.length!==1?"s":""}`)),F(false),we.map((Be,Tt)=>(U++,_(Be,Tt,U))))})):g.createElement(g.Fragment,null,(()=>{if(T){let z=o.bookings.filter(U=>!U.is_early_reminder&&!U.requires_coupon),X=new Map;return z.forEach(U=>{let we=`${U.invoiceNumber}|${U.devoteeName}|${U.nakshatra}|${U.topping_name||""}`;if(X.has(we)){let Be=X.get(we);Be.quantity=(parseInt(Be.quantity)+parseInt(U.quantity)).toString();}else X.set(we,{...U});}),Array.from(X.values()).map((U,we)=>{a=a||1;let Be=a;return a+=Number(U.quantity)||1,_(U,we,Be)})}else return o.bookings.map((z,X)=>z.is_early_reminder||z.requires_coupon?null:(a++,_(z,X,a)))})()))}))),s?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let o=l.flatMap(T=>T.bookings.filter(b=>b.requires_coupon).map(b=>({...b,pujaName:T.name}))),y={};for(let T of o)y[T.invoiceNumber]||(y[T.invoiceNumber]=[]),y[T.invoiceNumber].push(T);return Object.entries(y).map(([T,b],F)=>{let _=b,z=_[0],X=_.length<=5;return g.createElement(View,{key:T,style:{marginBottom:4,fontSize:13,padding:4,border:"1px dotted black",position:"relative"},wrap:!X},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"}},T),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((U,we)=>g.createElement(View,{key:we,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${U.devoteeName} ----- ${U.nakshatra} ----- ${U.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 d?r:g.createElement(Document,null,r)},ht=Pr;var Ar=({templeName:i,startDate:n,endDate:u,pujas:l,reportTiming:p})=>{let V=l.sort((d,a)=>{let t=d.nakshatras.length;return a.nakshatras.length-t});return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:n,endDate:u,reportTiming:p,reportName:"Puja Summary",templeName:i}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},V.map((d,a)=>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"}},`${d.name} - ${d.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"))),d.nakshatras.map((t,s)=>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,s+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=Ar;var Nr=({startDate:i,endDate:n,templeName:u,data:l,isEmbed:p=false})=>{let V=g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:u}),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")),l&&l.length>0?g.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let d=l.filter(r=>!r.deliveryMode||r.deliveryMode==="normal-post"),a=l.filter(r=>r.deliveryMode==="international-post"),t=l.filter(r=>r.deliveryMode==="speedpost"),s=r=>g.createElement(g.Fragment,null,r.map((o,y)=>{let T=o.qrContent,b=Ht.toDataURL(T);if(y%2===0){let F=r[y+1];return g.createElement(View,{key:`row-${y}`,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"}},o.name),g.createElement(View,{style:{fontSize:8}},g.createElement(Q,{splitat:"words"},o.address)),g.createElement(e,{style:{fontSize:8}},o.phone)),o.qrContent&&b?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}},o.deliveryMode==="speedpost"?"SP":o.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:b,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: ",o.pujaDetails)),F&&(()=>{let _=Ht.toDataURL(F.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"}},F.name),g.createElement(View,{style:{fontSize:8}},g.createElement(Q,{splitat:"words"},F.address)),g.createElement(e,{style:{fontSize:8}},F.phone)),F.qrContent&&_?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}},F.deliveryMode==="speedpost"?"SP":F.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:_,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: ",F.pujaDetails))})())}return null}));return g.createElement(g.Fragment,null,d.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) - ",d.length),s(d)),a.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) - ",a.length),s(a)),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),s(t)))})()):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"));return p?V:g.createElement(Document,null,V)},wt=Nr;var Fr=({startDate:i,endDate:n,templeName:u,pujaData:l,prasadData:p,deliveryData:V,reportTiming:d})=>(V=V.map(a=>{let t="";try{let s=JSON.parse(a.address);t=`${s.address}, ${s.locality}, ${s.state} - ${s.pincode}`;}catch(s){console.error("Error parsing address:",s),t=a.address;}return {...a,address:t}}),l.length==0&&p.length==0&&V.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportTiming:d,reportName:"Combined Report",templeName:u}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(Document,null,l.length>0&&ht({startDate:i,endDate:n,templeName:u,pujas:l,reportTiming:d,isEmbed:true}),p.length>0&&xt({startDate:i,endDate:n,templeName:u,data:p,reportTiming:d,isEmbed:true}),V.length>0&&wt({startDate:i,endDate:n,templeName:u,data:V,isEmbed:true}))),ki=Fr;var jr=({startDate:i,endDate:n,data:u})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,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"))),u?.map((l,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,l.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,l.bookings)),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"\u20B9",l.revenue))))))),Ni=jr;var _r=({startDate:i,endDate:n,templeName:u,data:l})=>{let p=g.useMemo(()=>{let a=[],t=new Map;return l.settlements.forEach(s=>{let r=s.date;t.has(r)||t.set(r,{dateKey:r,dateDisplay:r,items:[],count:0,dayTotal:"0",dayTotalVerbose:""});let o=t.get(r);o.items.push(s),o.count++;let y=o.items.reduce((T,b)=>T+b.settlement_amount,0);o.dayTotal=String(y),o.dayTotalVerbose=o.items.map(T=>T.settlement_amount).join(" + ")+" = "+v(y);}),t.forEach(s=>a.push(s)),a},[l.settlements]),V=()=>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"))),d=(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:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,t+1,". ",a.paymentGateway),g.createElement(e,{style:{fontSize:6,color:"#666",marginTop:2}},a.settlement_id)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},g.createElement(e,null,a.utr.split("").map((s,r)=>g.createElement(e,{key:r},s)))),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"30%",fontSize:7}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},a.invoices.map((s,r)=>g.createElement(e,{key:r},s.number," (",v(s.amount),")")))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,v(a.settlement_amount))));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Settlements Report",templeName:u}),g.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},p.map(a=>g.createElement(View,{key:a.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"}},a.dateDisplay),g.createElement(e,{style:{fontSize:8}},a.count," settlement",a.count!==1?"s":""," | ",a.dayTotalVerbose)),V(),a.items.map((t,s)=>d(t,s))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Bi=_r;var Mr=({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:pt}))),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:gt}):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((n,u)=>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%"}},n.pujaName?g.createElement(e,{style:{fontSize:9}},n.pujaName):null,n.devoteesName?g.createElement(e,{style:{fontSize:7,color:"#333333"}},n.devoteesName):null,n.pujaDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},n.pujaDate," ",n.timing?`- ${n.timing}`:null):null,n.repeatEndDate&&n.repeatStartDate?g.createElement(e,{style:{fontSize:7,color:"#333333"}},n.repeatStartDate," to ",n.repeatEndDate," ",n.timing?`- ${n.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:{}},n.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:{}},`${n.quantity?n.quantity:""}${n.repeatCount?` x ${n.repeatCount}`:""}`)),g.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},g.createElement(e,{style:{}},n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,". ",n.name," (",n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,". ",n.name," (",n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:8}},u+1,". ",n.name," (",n.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((n,u)=>g.createElement(e,{key:u,style:{fontSize:7}},u+1,") ",n.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")))),Fi=Mr;var Hr=({startDate:i,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Payment Settlement Report",templeName:u}),l.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"))),l.map((p,V)=>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,V+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.invoiceNo)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(Q,null,p.amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.paymentDate)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(Q,null,p.bankUtrNo))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),vi=Hr;var Qr=({startDate:i,endDate:n,templeName:u,data:l})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Invoice Level Breakup",templeName:u}),l.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"))),l.map((p,V)=>g.createElement(View,{key:V,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,V+1)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.invoiceNumber)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.baseAmount)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFees)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.platformFeesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayCharges)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.gatewayChargesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(Q,null,p.paymentMode)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(Q,null,p.bookingDate)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(Q,null,p.settlementDate)),g.createElement(View,{style:{padding:2,width:"12%"}},g.createElement(Q,null,p.utrNumber))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Wi=Qr;var Jr=({startDate:i,endDate:n,templeName:u,data:l,dayGroups:p,summary:V})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Puja Count Summary Report",templeName:u}),l.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},l.length>0&&p&&p.length==1&&g.createElement(Ei,{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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.entries()).map(([a,t],s)=>g.createElement(View,{key:a,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,s+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,a)),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,v(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 d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.quantity,0)})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v((()=>{let d=new Map;return p.forEach(a=>{a.items.forEach(t=>{let s=d.get(t.name)||{quantity:0,amount:0};d.set(t.name,{quantity:s.quantity+t.quantity,amount:s.amount+(t.amount||0)});});}),Array.from(d.values()).reduce((a,t)=>a+t.amount,0)})())))),p.some(d=>d.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 d=p.filter(t=>t.postalChargesBreakup).map(t=>t.postalChargesBreakup);if(d.length===0)return "";let a=[0,0,0];return d.forEach(t=>{t&&(a[0]+=t[0],a[1]+=t[1],a[2]+=t[2]);}),`${a.join("+")}`})())),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+(a.dayPostalCarrierFees||0),0))))),p.some(d=>d.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"}},v(p.reduce((d,a)=>d+(a.dayPostalTempleFees||0),0))))),(()=>{let d=new Map;return p.forEach(a=>{a.otherChargesBreakup?.forEach(t=>{let s=d.get(t.name)||{count:0,amount:0};d.set(t.name,{count:s.count+(t.count||0),amount:s.amount+t.amount});});}),d.size===0?null:Array.from(d.entries()).map(([a,t])=>g.createElement(View,{key:a,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"}},a)),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"}},v(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"}},v((()=>{let d=new Map;p.forEach(r=>{r.items.forEach(o=>{let y=d.get(o.name)||{quantity:0,amount:0};d.set(o.name,{quantity:y.quantity+o.quantity,amount:y.amount+(o.amount||0)});});});let a=Array.from(d.values()).reduce((r,o)=>r+o.amount,0),t=p.reduce((r,o)=>r+((o.dayPostalCarrierFees||0)+(o.dayPostalTempleFees||0)),0),s=p.reduce((r,o)=>{let y=o.otherChargesBreakup?.reduce((T,b)=>T+b.amount,0)||0;return r+y},0);return a+t+s})()))))):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((d,a)=>g.createElement(View,{key:d.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,a+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,d.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,d.items.reduce((t,s)=>t+s.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,null,v(d.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((d,a)=>d+a.items.reduce((t,s)=>t+s.quantity,0),0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},g.createElement(e,{style:{fontWeight:"bold"}},v(p.reduce((d,a)=>d+a.dayPujaTotal,0))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")),l.length>0&&p&&p.length>1&&p.map((d,a)=>g.createElement(Page,{key:d.dateKey,size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},a===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(Ei,{dayGroup:d}))))),Ei=({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((n,u)=>g.createElement(View,{key:u,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:"55%"}},g.createElement(e,null,n.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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((n,u)=>n+u.quantity,0))),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(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(n=>n||0).join("+")}`:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(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,v(i.dayPostalTempleFees))))):null,i.otherChargesBreakup?.length?g.createElement(g.Fragment,null,i.otherChargesBreakup.map((n,u)=>g.createElement(View,{key:u,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,n.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,n.count?n.count:"")),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,v(n.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,v(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(n=>g.createElement(e,{style:{fontSize:7,marginBottom:2}},n))):null),ci=Jr;var Zr=({startDate:i,endDate:n,templeName:u,pujas:l,reportTiming:p,selectedPujaNames:V=[]})=>{let d=0,a=0,t=l.some(s=>s.bookings.some(r=>r.requires_coupon));return !l||l.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(N,{startDate:i,endDate:n,reportName:"Custom Puja Report",templeName:u,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(N,{startDate:i,endDate:n,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")),l.some(s=>s.bookings.some(r=>r.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"))))),l.some(s=>s.bookings.some(r=>r.is_early_reminder&&!r.requires_coupon))?l.flatMap((s,r)=>s.bookings.filter(o=>o.is_early_reminder&&!o.requires_coupon).map((o,y)=>(a++,g.createElement(View,{key:`${r}-${y}`,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,a)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,o.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,o.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,o.date?new Date(o.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:11,fontWeight:"bold",marginTop:8}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:10}},`${u}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4}},l.map((s,r)=>{if(s.bookings.every(b=>b.is_early_reminder||b.requires_coupon))return null;d=0;let o=s.bookings.some(b=>b.topping_name),y=(b=false)=>o?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:"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"16%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Offerings")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Qty")),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:"8%"}},g.createElement(e,null,"Sr 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:"16%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"8%"}},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:"1px solid black",fontWeight:"semibold",width:"13%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:2,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))),T=(b,F,_)=>b.is_early_reminder||b.requires_coupon?null:o?g.createElement(View,{key:F,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:"5%"}},g.createElement(e,null,_)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"16%"}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,b.topping_name||"")),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,b.quantity)),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:F,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:"8%"}},g.createElement(e,null,_)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"92%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:2,fontSize:12,borderRight:"1px solid black",width:`${28*1.11111}%`}},g.createElement(e,null,b.devoteeName)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${16*1.11111}%`}},g.createElement(e,null,b.nakshatra)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${8*1.11111}%`}},g.createElement(e,null,b.quantity)),g.createElement(View,{style:{padding:2,fontSize:10,borderRight:"1px solid black",width:`${7*1.11111}%`}},g.createElement(e,null,b.collectionMode||"")),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"1px solid black",width:`${13*1.11111}%`}},g.createElement(Q,null,b.invoiceNumber)),g.createElement(View,{style:{padding:2,fontSize:7,borderRight:"none",width:`${20*1.11111}%`}},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:r,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"}},`${s.name} - ${s.bookings.length}`),y(true)),g.createElement(g.Fragment,null,(()=>{if(o){let b=s.bookings.filter(_=>!_.is_early_reminder&&!_.requires_coupon),F=new Map;return b.forEach(_=>{let z=`${_.invoiceNumber}|${_.devoteeName}|${_.nakshatra}|${_.topping_name||""}`;if(F.has(z)){let X=F.get(z);X.quantity=(parseInt(X.quantity)+parseInt(_.quantity)).toString();}else F.set(z,{..._});}),Array.from(F.values()).map((_,z)=>{d=d||1;let X=d;return d+=Number(_.quantity)||1,T(_,z,X)})}else return s.bookings.map((b,F)=>b.is_early_reminder||b.requires_coupon?null:(d++,T(b,F,d)))})()))}))),t?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:4},src:We}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:4,gap:12}},(()=>{let s=l.flatMap(o=>o.bookings.filter(y=>y.requires_coupon).map(y=>({...y,pujaName:o.name}))),r={};for(let o of s)r[o.invoiceNumber]||(r[o.invoiceNumber]=[]),r[o.invoiceNumber].push(o);return Object.entries(r).map(([o,y])=>{let T=y,b=T[0];return g.createElement(View,{key:o,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"}},o),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%"}}),T.map((F,_)=>g.createElement(View,{key:_,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${F.devoteeName} ----- ${F.nakshatra} ----- ${F.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Li=Zr;var en=({startDate:i,endDate:n,templeName:u,data:l,reportTiming:p})=>{let V=l.items[0].shares.length,d=50/(V||1),a=0,t=0,s=new Array(V).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(N,{startDate:i,endDate:n,reportTiming:p,reportName:"Share Report",templeName:u}),l.items.length<=0?g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,l.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")),l.items[0].shares.map((r,o)=>g.createElement(View,{style:{width:`${d}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},r.key))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),l.items.map((r,o)=>(a+=r.count,t+=r.total,r.shares.forEach((y,T)=>{s[T]+=y.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}},o+1)),g.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},r.pujaName)),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(r.price))),g.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},r.count)),r.shares.map((y,T)=>g.createElement(View,{style:{width:`${d}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(y.value)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(r.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"}},a)),s.map((r,o)=>g.createElement(View,{style:{width:`${d}}%`,borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(r)))),g.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},g.createElement(e,{style:{fontSize:8}},v(t))))),g.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},g.createElement(View,{style:{width:"30%"}},s.map((r,o)=>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}},l.items[0].shares[o].key)),g.createElement(View,null,g.createElement(e,{style:{fontSize:8}},v(r,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}},v(t,true,true))))),g.createElement(View,{style:{width:"35%"}},l.options?.right_side_table?.map((r,o)=>g.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2,...l.options?.right_side_table&&o==l.options?.right_side_table?.length-1?{borderBottom:"1px solid black",borderTop:"1px solid black"}:{}}},r.map((y,T)=>g.createElement(View,{style:{width:`${100/r.length}%`}},g.createElement(e,{style:{fontSize:9,...T==1?{textAlign:"right"}:{}}},y)))))),g.createElement(View,{style:{width:"1%"}})),l.options?.footer_paragraph&&g.createElement(View,{style:{marginTop:50}},g.createElement(e,{style:{fontSize:10}},l.options.footer_paragraph))):null)))},qi=en;var rn=i=>{let n=0,u=0;return i.data.items.forEach(l=>{n+=l.quantity,u+=l.total;}),g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(N,{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," ="," ",v(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((l,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,l.date)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(Text,null,l.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,v(l.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,n)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},g.createElement(Text,null,v(u)))))))},Mi=rn;var Hi={kitchen:{A4:_t,A5:Di},transaction:{A4:Lt,A5:Vi},"prasad-delivery":{A4:qt,A5:Si,"110mm":ai},prasad:{A4:mt,A5:xt,"110mm":li},"puja-detailed":{A4:ut,A5:ht,"110mm":oi},"puja-summary":{A4:$t,A5:Ii},"combined-report":{A4:Ut,A5:ki,"110mm":gi},"multi-temple-payment":{A4:Qt,A5:Ni},"settlements-report":{A4:Gt,A5:Bi},invoice:{A4:Jt,A5:Fi},"postal-report":{A4:yt,A5:wt,"110mm":yi},"payment-settlement-report":{A4:Yt,A5:vi},"invoice-breakup":{A4:Zt,A5:Wi},"puja-count":{A4:ei,A5:ci},"custom-report":{A4:xi,A5:Li,"110mm":bi},"invoice-recon":{A4:Ti},"share-report":{A4:qi},"advance-goods":{A4:Mi}},Ki=class{constructor(n,u){Dt(this,"option");Dt(this,"size");this.option=n,this.size=u,[{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:V})=>Font.register({family:p,src:V})),Font.register({family:"Noto Sans",fontWeight:"normal",src:kt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Nt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Bt});}async print(n){let l=Hi[this.option][this.size],p=g.createElement(l,{...n}),V=pdf(p).toBlob();return V.then(d=>{var a=URL.createObjectURL(d);if(window!=null){let t=window.open(a,"_blank");setTimeout(()=>{t?.print();},1e3);}}),V}async getBlob(n){let l=Hi[this.option][this.size],p=g.createElement(l,{...n});return pdf(p).toBlob()}};
|
|
2
2
|
export{Ri as A4Print,no as T2Inch,Ki as reportPrinter};
|
package/package.json
CHANGED