@bookmypuja-tech/bmp-pdf 0.4.29 → 0.4.31

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
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 To from'qrcode';var ji=Object.defineProperty;var Ei=(o,n,a)=>n in o?ji(o,n,{enumerable:true,configurable:true,writable:true,value:a}):o[n]=a;var mt=(o,n,a)=>Ei(o,typeof n!="symbol"?n+"":n,a);var ve=o=>{typeof o=="string"&&(o=new Date(o));let n={day:"2-digit",month:"short",year:"numeric"};return o.toLocaleDateString("en-GB",n).replace(",","")};var ce=(o,n=false)=>{if(!n){if(o>=1e7)return `\u20B9${(o/1e7).toFixed(2)}Cr`;if(o>=1e5)return `\u20B9${(o/1e5).toFixed(2)}L`}return o.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:o%1===0?0:2})};var Se="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",nt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",lt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Tt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Dt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Vt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var st="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",dt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",ut={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:nt});Font.register({family:"Roboto",fontWeight:"bold",src:lt});var St=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"}}),$i=({data:o,dates:n})=>{let a=ve(n[0])===ve(n[1]);return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:St.page},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Se}),g.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),g.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",a?ve(n[0]):`${ve(n[0])} - ${ve(n[1])}`),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},o?o.map((r,d)=>g.createElement(View,{wrap:false,key:d,style:St.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(d+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"}},r.participantName),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},r.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"}},r.pujaName)),a?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},ve(r.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},g.createElement(Text,null,"Priest Note: ",r.priestNote)):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},g.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",r.amount),r.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)))},Mi=$i;Font.register({family:"Roboto",fontWeight:"normal",src:nt});Font.register({family:"Roboto",fontWeight:"bold",src:lt});var ne=1,et=25*ne,Pt=StyleSheet.create({page:{padding:10*ne,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ne,paddingHorizontal:10*ne,fontSize:et,border:`${5*ne}px solid black`,borderRadius:5*ne,width:"100%",display:"flex",flexDirection:"column"}}),Ui=({data:o,dates:n})=>{let a=ve(n[0])===ve(n[1]);return g.createElement(Document,null,g.createElement(Page,{dpi:200,size:[457*ne],style:Pt.page},g.createElement(Image,{fixed:true,style:{height:55*ne,width:274*ne,marginBottom:10*ne,marginHorizontal:"auto"},src:Se}),g.createElement(Text,{style:{fontSize:25*ne,marginBottom:5*ne,marginHorizontal:"auto"}},"Puja List"),g.createElement(Text,{style:{fontSize:20*ne,marginBottom:5*ne,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",a?ve(n[0]):`${ve(n[0])} - ${ve(n[1])}`),g.createElement(Text,{style:{fontSize:17*ne,marginBottom:20*ne,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ne}},o?o.map((r,d)=>g.createElement(View,{wrap:false,key:d,style:Pt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ne}},g.createElement(Text,{style:{opacity:.6,marginRight:10*ne}},"#",(d+1).toString().padStart(2,"0")),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ne}},r.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ne,paddingHorizontal:5*ne,borderRadius:5*ne,marginTop:3*ne}},g.createElement(Text,{style:{color:"#ffffff",fontSize:et}},"Pending")):null,g.createElement(Text,{style:{fontWeight:"bold",fontSize:et}},"Rs ",r.amount))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ne,gap:3*ne}},g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},r.participantName),g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},r.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ne}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},r.pujaName)),a?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},ve(r.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ne}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ne}},g.createElement(Text,null,"Priest Note: ",r.priestNote)):null))):null)))},Qi=Ui;var Yi={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},Zi=({style:o={},children:n})=>{let a=l=>{let t=maxBy(Object.entries(Yi),([i,p])=>{let _=l.match(p);return _?_.length:0});return t?t[0]:"Latin"},r=l=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(l));function d(l){return l.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let u=l=>{let t=[],i=null,p="";for(let _ of l){_=d(_);let ge=a(_);ge!==i?(p&&t.push({text:p,script:i}),i=ge,p=_):p+=_;}return p&&t.push({text:p,script:i}),t},h=[];n&&typeof n=="string"&&!Array.isArray(n)&&!r(n)&&u(n).forEach((t,i)=>{let p=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;h.push(g.createElement(Text,{key:i,style:{fontFamily:p}},t.text));});let V=[],s={fontFamily:"Noto Sans"};return Array.isArray(o)?V=[...o,s]:o&&Object.keys(o).length>0?V=[o,s]:V=[s],g.createElement(Text,{style:V},h?.length?h:n)},e=Zi;var Ri=({startDate:o,endDate:n,reportTiming:a,templeName:r,reportName:d,showGeneratedAt:u=true})=>g.createElement(g.Fragment,null,g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:Se}),u&&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: ",o.toDateString()," - ",n.toDateString()):g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",o.toDateString()),a&&Object.keys(ut).includes(a)?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},ut[a]," Report"):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},d),g.createElement(e,{style:{fontSize:12}},`${r}`)),P=Ri;var io=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,templeName:a,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((u,h)=>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,h+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,u.name)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,u.quantity))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Nt=io;var no=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayWiseTotals:u,summary:h})=>{let V=h?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),s=h?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),l=h?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+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(P,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.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: ",V.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&u&&u.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"))),u.map((t,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,t.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.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,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"25%"}},g.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,d&&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"))),r.map((t,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,t.date," ",t.time)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,t.invoiceNumber)),t.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,t.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,(t.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,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,t.transactionId))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Ct=no;var po=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},V=r.map(h),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,"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:"18%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Address")),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,"Amount"))),l=(t,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(t.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(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.address)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.pujaName)),g.createElement(View,{style:{padding:6,width:"15%"}},g.createElement(e,null,t.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(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),V.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((t,i)=>{let p=t.items.map(h);return g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:10}},t.count," delivery",t.count!==1?" items":" item")),s(),p.map((_,ge)=>l(_,ge)))})):g.createElement(g.Fragment,null,s(),V.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ft=po;var mo=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d,isDayWiseGrouped:u,dayGroups:h})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.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"))),l=(t,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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,t.pujaName," - ",t.prasadName)),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,t.collectionMode)));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:d}),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")),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u&&h&&h.length>0?g.createElement(g.Fragment,null,h.map((t,i)=>g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:10}},t.count," item",t.count!==1?"s":"")),s(),t.items.map((p,_)=>l(p,_))))):g.createElement(g.Fragment,null,s(),r.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Bt=mo;var yo=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,isDayWiseGrouped:u})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:d}),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,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:d,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")),r.some(l=>l.bookings.some(t=>t.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"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.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}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((l,t)=>{if(l.bookings.every(D=>D.is_early_reminder||D.requires_coupon))return null;h=0;let i=l.bookings.some(D=>D.topping_name),p=u&&l.dayGroups&&l.dayGroups.length>0,_=(D=false)=>i?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?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:"30%"}},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:"none",fontWeight:"semibold",width:"31%"}},g.createElement(e,null,"Offerings"))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?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"))),ge=(D,Q,de)=>D.is_early_reminder||D.requires_coupon?null:i?g.createElement(View,{key:Q,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,de)),g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},g.createElement(e,null,D.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"31%"}},g.createElement(e,null,D.topping_name||""))):g.createElement(View,{key:Q,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,de)),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,D.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,D.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,D.collectionMode||""))),D.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,D.priestNote))));return g.createElement(View,{key:t,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"}},`${l.name} - ${l.totalBookings||l.bookings.length}`),!p&&_(true)),p?g.createElement(g.Fragment,null,l.dayGroups.map((D,Q)=>{let de=0,je=D.items.filter(Ge=>!Ge.is_early_reminder&&!Ge.requires_coupon);return je.length===0?null:g.createElement(View,{key:D.dateKey,style:{marginTop:Q>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"}},D.dateDisplay),g.createElement(e,{style:{fontSize:9}},`${je.length} booking${je.length!==1?"s":""}`)),_(false),je.map((Ge,gt)=>(de++,ge(Ge,gt,de))))})):g.createElement(g.Fragment,null,l.bookings.map((D,Q)=>D.is_early_reminder||D.requires_coupon?null:(h++,ge(D,Q,h)))))}))),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:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Wt=yo;var wo=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:d})=>{let u=r.sort((h,V)=>{let s=h.nakshatras.length;return V.nakshatras.length-s});return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:n,endDate:a,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.map((h,V)=>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"}},`${h.name} - ${h.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"))),h.nakshatras.map((s,l)=>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,l+1)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},g.createElement(e,null,s.count))))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},jt=wo;var bo=({children:o,splitat:n})=>{if(!o||typeof o!="string")return null;let a="";return n=="words"&&(a=" "),g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},o.split(a).map((r,d)=>g.createElement(g.Fragment,null,g.createElement(e,{key:d},r,n=="words"?" ":"")))))},G=bo;var Do=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:d,deliveryData:u,reportTiming:h})=>{u=u.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});let V=0,s=0,l=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&u.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Combined Report",templeName:a}),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,r.length>0&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"",templeName:""}),r.some(t=>t.bookings.some(i=>i.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:"60%"}},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:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(p=>p.is_early_reminder&&!p.requires_coupon).map((p,_)=>(s++,g.createElement(View,{wrap:false,key:`${i}-${_}`,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,s)),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,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,p.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,p.date?new Date(p.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((t,i)=>t.bookings.every(p=>p.is_early_reminder||p.requires_coupon)?null:(V=0,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"}},`${t.name} - ${t.bookings.length}`)),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:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty"))),t.bookings.map((p,_)=>p.is_early_reminder||p.requires_coupon?null:(V++,g.createElement(g.Fragment,null,g.createElement(View,{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,V)),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:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,p.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${35*1.11111}%`}},g.createElement(e,null,p.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${25*1.11111}%`}},g.createElement(e,null,p.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${10*1.11111}%`}},g.createElement(e,null,p.quantity))),p.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,p.priestNote))))))))))))),r.length>0&&l&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let t=r.flatMap(p=>p.bookings.filter(_=>_.requires_coupon).map(_=>({..._,pujaName:p.name}))),i={};for(let p of t)i[p.invoiceNumber]||(i[p.invoiceNumber]=[]),i[p.invoiceNumber].push(p);return Object.entries(i).map(([p,_],ge)=>{let D=_,Q=D[0];return g.createElement(View,{key:p,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black"},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"}},p),g.createElement(e,null,Q.date?new Date(Q.date).toDateString():o.toDateString())),g.createElement(e,null,Q.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),D.map((de,je)=>g.createElement(View,{key:je,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${de.devoteeName} ----- ${de.nakshatra} ----- ${de.pujaName}`))))})})())),d.length>0&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Report",templeName:a}),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,"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:"30%"}},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%"}},g.createElement(e,null,"Qty"))),d.map((t,i)=>g.createElement(View,{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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.prasadName)),g.createElement(View,{style:{padding:6,width:"10%"}},g.createElement(e,null,t.quantity)))))),u.length>0&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Delivery Postal Report",templeName:a}),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},u&&u.map(t=>{let i=To.toDataURL(t.qrContent);return g.createElement(View,{wrap:false,key:t.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},g.createElement(View,null,g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.name),g.createElement(View,{style:{fontSize:10}},g.createElement(G,{splitat:"words"},t.address)),g.createElement(e,{style:{fontSize:10}},t.phone)),t.qrContent&&i?g.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(Image,{src:i,style:{width:50,height:50,minWidth:50,maxWidth:50}}),g.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",t.pujaDetails))})))))},_t=Do;var Io=({startDate:o,endDate:n,data:a})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,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"))),a?.map((r,d)=>g.createElement(View,{key:d,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,d+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,r.bookings)),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"\u20B9",r.revenue))))))),Lt=Io;var ko=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=()=>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,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Settlement")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Settlement ID"))),V=(s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},g.createElement(e,null,s.date)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.settlement_amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},g.createElement(e,null,s.utr.split("").map((t,i)=>g.createElement(e,{key:i},t)))),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((t,i)=>g.createElement(e,{key:i},t.number," (",t.amount,")")))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,s.settlement_id)));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),g.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((s,l)=>g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:10}},s.count," settlement",s.count!==1?"s":""," | Total: ",s.dayTotal)),h(),s.items.map((t,i)=>V(t,i))))):g.createElement(g.Fragment,null,h(),r.settlements.map((s,l)=>V(s,l)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=ko;var Co=({data:o})=>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"}},o.templeName),g.createElement(e,{style:{fontSize:10}},o.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:st}))),o.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:o.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},o.status==="confirmed"?g.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:dt}):null,g.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),g.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:10}},g.createElement(e,{style:{fontSize:11}},"Bill to:"),g.createElement(e,{style:{fontSize:11}},o.devoteeDetails.name),o.devoteeDetails.phone?g.createElement(e,{style:{fontSize:11}},o.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:11}},o.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"))),o.items.map((n,a)=>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),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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.prasads.evening.length>0)?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")),o.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:"),o.prasads.morning.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.afternoon.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.evening.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.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}},o.instructions.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+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")))),$t=Co;var jo=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),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")),r&&r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},r.map(d=>{let u=d.qrContent,h=To.toDataURL(u);return g.createElement(View,{wrap:false,key:d.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},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"}},d.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},d.address)),g.createElement(e,{style:{fontSize:10}},d.phone)),d.qrContent&&h?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}},d.deliveryMode==="speedpost"?"SP":d.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:h,style:{width:50,height:50,minWidth:50,maxWidth:50}}),g.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",d.pujaDetails))})):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),Mt=jo;var _o=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.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"))),r.map((d,u)=>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,u+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.invoiceNo)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.paymentDate)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(G,null,d.bankUtrNo))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ot=_o;var $o=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.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"))),r.map((d,u)=>g.createElement(View,{key:u,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,u+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.baseAmount)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFees)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFeesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayCharges)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayChargesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.paymentMode)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(G,null,d.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:3,width:"12%"}},g.createElement(G,null,d.utrNumber))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ht=$o;var Ho=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u,summary:h})=>{let V=r.reduce((s,l)=>s+l.quantity,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{marginBottom:25}},d&&g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Monthly 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,"Remarks"))),r.map((s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),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"}},V)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),d&&u&&u.length>0&&g.createElement(View,null,g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),u.map((s,l)=>g.createElement(View,{key:s.dateKey,style:{marginBottom:20}},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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:10}},"Day Total: ",s.dayTotal)),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"))),s.items.map((t,i)=>g.createElement(View,{key:i,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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,t.name)),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:"20%"}},g.createElement(e,null,ce(t.amount||0))))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Gt=Ho;var Go=({startDate:o,templeName:n,pujas:a,reportTiming:r})=>{return !a||a.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"}},o.toLocaleDateString()),r&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," Report")),a.map((u,h)=>{let V=u.bookings.filter(s=>!s.is_early_reminder&&!s.requires_coupon);return V.length===0?null:g.createElement(View,{key:h,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"}},u.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.length," booking",V.length>1?"s":"")),V.map((s,l)=>(g.createElement(View,{key:l,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",marginBottom:s.topping_name?6:0}},g.createElement(e,{style:{fontSize:12}},s.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",s.quantity)),s.topping_name&&g.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},g.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",s.topping_name)),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))))))})))},Qt=Go;var Ko=({startDate:o,templeName:n,data:a,reportTiming:r,isDayWiseGrouped:d,dayGroups:u})=>{if(!a||a.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let h=a.sort((s,l)=>s.invoiceNumber.localeCompare(l.invoiceNumber)),V=(s,l)=>g.createElement(View,{key:l,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",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},s.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",s.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},s.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"}},o.toLocaleDateString()),r&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.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}},h.length," item",h.length>1?"s":"")),d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((s,l)=>g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:11}},s.count," item",s.count!==1?"s":""))),s.items.map((t,i)=>V(t,i))))):g.createElement(g.Fragment,null,h.map((s,l)=>V(s,l)))))},Zt=Ko;var Uo=({startDate:o,templeName:n,data:a,isDayWiseGrouped:r,dayGroups:d})=>{let u=s=>{let l="";try{let t=JSON.parse(s.address);l=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{l=s.address;}return {...s,address:l}},h=a.map(u);if(!h||h.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 V=(s,l)=>g.createElement(View,{key:l,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.devoteeName),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},s.address)),s.phoneNumber&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",s.phoneNumber)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",s.note||s.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"}},o.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}},h.length," delivery",h.length>1?" items":" item")),r&&d&&d.length>0?g.createElement(g.Fragment,null,d.map((s,l)=>{let t=s.items.map(u);return g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:11}},s.count," item",s.count!==1?"s":""))),t.map((i,p)=>V(i,p)))})):g.createElement(g.Fragment,null,h.map((s,l)=>V(s,l)))))},ei=Uo;var Qo=({startDate:o,templeName:n,pujaData:a,prasadData:r,deliveryData:d,reportTiming:u})=>{if(a.length===0&&r.length===0&&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 V=r.sort((s,l)=>s.invoiceNumber.localeCompare(l.invoiceNumber));return g.createElement(Document,null,a.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),u&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},u.charAt(0).toUpperCase()+u.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")),a.map((s,l)=>{let t=s.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return t.length===0?null:g.createElement(View,{key:l,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},s.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((i,p)=>(g.createElement(View,{key:p,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))))))})),r.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"}},o.toLocaleDateString()),u&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},u.charAt(0).toUpperCase()+u.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}},V.length," item",V.length>1?"s":"")),V.map((s,l)=>g.createElement(View,{key:l,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",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},s.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",s.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},s.collectionMode))))),d.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"}},o.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}},d.length," delivery",d.length>1?" items":" item")),d.map((s,l)=>g.createElement(View,{key:l,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.name),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},s.address)),s.phone&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",s.phone)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",s.pujaDetails))))))},ii=Qo;var Jo=({startDate:o,templeName:n,data:a})=>!a||a.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"}},o.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}},a.length," label",a.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")),a.map(r=>g.createElement(View,{key:r.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"}},r.name),g.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP")),g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11}},r.address)),g.createElement(e,{style:{fontSize:11,marginBottom:5}},r.phone),g.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),g.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",r.pujaDetails))))),ni=Jo;var Zo=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,selectedPujaNames:u=[]})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:d}),u.length>0&&g.createElement(View,{style:{marginTop:10,marginBottom:10}},g.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),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(P,{startDate:o,endDate:n,reportTiming:d,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")),u.length>0&&g.createElement(View,{style:{marginTop:10,marginBottom:5}},g.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),r.some(l=>l.bookings.some(t=>t.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"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.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}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((l,t)=>l.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(h=0,g.createElement(View,{key:t,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"}},`${l.name} - ${l.bookings.length}`)),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:"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"))),l.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(h++,g.createElement(View,{key:p,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,h)),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:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,i.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,i.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,i.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,i.collectionMode||""))),i.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,i.priestNote))))))))))),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:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},si=Zo;var Xo=({startDate:o,templeName:n,pujas:a,reportTiming:r,selectedPujaNames:d=[]})=>{return !a||a.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"}},o.toLocaleDateString()),r&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," ","Report")),d.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}},d.join(", "))),a.map((h,V)=>{let s=h.bookings.filter(l=>!l.is_early_reminder&&!l.requires_coupon);return s.length===0?null:g.createElement(View,{key:V,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"}},h.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.length," booking",s.length>1?"s":"")),s.map((l,t)=>(g.createElement(View,{key:t,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"}},l.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},l.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",l.quantity)),l.collectionMode&&g.createElement(View,{style:{marginTop:4}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",l.collectionMode)),l.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},l.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"))))},ai=Xo;var ir=o=>{let n=0,a=0,r=0;for(let d of o.items)d.paymentMethod!="INTERNATIONAL_CARD"&&d.platformFees>0&&(n+=d.platformFees,a+=d.platformFeesGST);return r=a+n,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:Se}),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}},o.templeName," "),g.createElement(Text,{style:{fontSize:12}},"Bookings from ",o.startDate.toDateString()," to"," ",o.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",marginTop:10}},"Bookings 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:"15%"}},g.createElement(Text,null,"Booking Date")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"Platform Fees")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,"Plt Fees GST")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"Total")),g.createElement(View,{style:{padding:3,width:"15%",borderRight:"1px solid #000"}},g.createElement(Text,null,"Payment Method")),g.createElement(View,{style:{padding:3,width:"16%"}},g.createElement(Text,null,"Transaction ID")))),o.items.map((d,u)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${d.platformFees==0||d.paymentMethod=="INTERNATIONAL_CARD"?"#fffca6":""}`}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,u+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,null,d.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,null,d.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(d.platformFees))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,ce(d.platformFeesGST))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(d.platformFees+d.platformFeesGST))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,null,d.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),g.createElement(View,{style:{padding:3,width:"16%"}},g.createElement(Text,null,d.transactionID)))),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:"15%"}}),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(n))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,ce(a))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(r))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),g.createElement(View,{style:{padding:3,width:"16%"}})),g.createElement(View,{style:{marginTop:10,fontSize:12}},g.createElement(Text,null,"Total Payable: ",ce(r)))))},gi=ir;var nr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,templeName:a,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((u,h)=>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,h+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,u.name)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,u.quantity))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),mi=nr;var dr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayWiseTotals:u,summary:h})=>{let V=h?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),s=h?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),l=h?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+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(P,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.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: ",V.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&u&&u.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"))),u.map((t,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,t.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.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,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"25%"}},g.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,d&&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"))),r.map((t,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,t.date," ",t.time)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,t.invoiceNumber)),t.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,t.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,(t.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,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,t.transactionId))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},ui=dr;var gr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},V=r.map(h),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,"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:"18%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Address")),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,"Amount"))),l=(t,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%"}},g.createElement(e,null,new Date(t.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(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.address)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.pujaName)),g.createElement(View,{style:{padding:4,width:"15%"}},g.createElement(e,null,t.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(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),V.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((t,i)=>{let p=t.items.map(h);return g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:9}},t.count," delivery",t.count!==1?" items":" item")),s(),p.map((_,ge)=>l(_,ge)))})):g.createElement(g.Fragment,null,s(),V.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},yi=gr;var yr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d,isDayWiseGrouped:u,dayGroups:h})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.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"))),l=(t,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%"}},g.createElement(e,null,i+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,t.pujaName," - ",t.prasadName)),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,t.collectionMode)));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:d}),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")),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u&&h&&h.length>0?g.createElement(g.Fragment,null,h.map((t,i)=>g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:9}},t.count," item",t.count!==1?"s":"")),s(),t.items.map((p,_)=>l(p,_))))):g.createElement(g.Fragment,null,s(),r.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},fi=yr;var xr=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,isDayWiseGrouped:u})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:d}),g.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:d,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")),r.some(l=>l.bookings.some(t=>t.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:8}},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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,i.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((l,t)=>{if(l.bookings.every(D=>D.is_early_reminder||D.requires_coupon))return null;h=0;let i=l.bookings.some(D=>D.topping_name),p=u&&l.dayGroups&&l.dayGroups.length>0,_=(D=false)=>i?g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?void 0:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"31%"}},g.createElement(e,null,"Offerings"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?void 0:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode"))),ge=(D,Q,de)=>D.is_early_reminder||D.requires_coupon?null:i?g.createElement(View,{key:Q,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,de)),g.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},g.createElement(e,null,D.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"31%"}},g.createElement(e,null,D.topping_name||""))):g.createElement(View,{key:Q,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,de)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,D.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,D.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,D.collectionMode||""))),D.priestNote&&g.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,D.priestNote))));return g.createElement(View,{key:t,style:{marginBottom:20}},g.createElement(View,{wrap:false,minPresenceAhead:15},g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${l.name} - ${l.totalBookings||l.bookings.length}`),!p&&_(true)),p?g.createElement(g.Fragment,null,l.dayGroups.map((D,Q)=>{let de=0,je=D.items.filter(Ge=>!Ge.is_early_reminder&&!Ge.requires_coupon);return je.length===0?null:g.createElement(View,{key:D.dateKey,style:{marginTop:Q>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:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},D.dateDisplay),g.createElement(e,{style:{fontSize:8}},`${je.length} booking${je.length!==1?"s":""}`)),_(false),je.map((Ge,gt)=>(de++,ge(Ge,gt,de))))})):g.createElement(g.Fragment,null,l.bookings.map((D,Q)=>D.is_early_reminder||D.requires_coupon?null:(h++,ge(D,Q,h)))))}))),s?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[0];return g.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},wi=xr;var br=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:d})=>{let u=r.sort((h,V)=>{let s=h.nakshatras.length;return V.nakshatras.length-s});return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:n,endDate:a,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.map((h,V)=>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"}},`${h.name} - ${h.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"))),h.nakshatras.map((s,l)=>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,l+1)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},g.createElement(e,null,s.count))))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},hi=br;var Dr=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:d,deliveryData:u,reportTiming:h})=>{u=u.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});let V=0,s=0,l=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&u.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Combined Report",templeName:a}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(g.Fragment,null,g.createElement(Document,null,r.length>0&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"",templeName:""}),r.some(t=>t.bookings.some(i=>i.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:8}},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:"10%"}},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,"Puja Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(p=>p.is_early_reminder&&!p.requires_coupon).map((p,_)=>(s++,g.createElement(View,{wrap:false,key:`${i}-${_}`,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,s)),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,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,p.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,p.date?new Date(p.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((t,i)=>t.bookings.every(p=>p.is_early_reminder||p.requires_coupon)?null:(V=0,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"}},`${t.name} - ${t.bookings.length}`)),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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty"))),t.bookings.map((p,_)=>p.is_early_reminder||p.requires_coupon?null:(V++,g.createElement(g.Fragment,null,g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,V)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,p.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${35*1.11111}%`}},g.createElement(e,null,p.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${25*1.11111}%`}},g.createElement(e,null,p.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${10*1.11111}%`}},g.createElement(e,null,p.quantity))),p.priestNote&&g.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,p.priestNote))))))))))))),r.length>0&&l&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=r.flatMap(p=>p.bookings.filter(_=>_.requires_coupon).map(_=>({..._,pujaName:p.name}))),i={};for(let p of t)i[p.invoiceNumber]||(i[p.invoiceNumber]=[]),i[p.invoiceNumber].push(p);return Object.entries(i).map(([p,_],ge)=>{let D=_,Q=D[0];return g.createElement(View,{key:p,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black"},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"}},p),g.createElement(e,null,Q.date?new Date(Q.date).toDateString():o.toDateString())),g.createElement(e,null,Q.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),D.map((de,je)=>g.createElement(View,{key:je,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${de.devoteeName} ----- ${de.nakshatra} ----- ${de.pujaName}`))))})})())),d.length>0&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Report",templeName:a}),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,"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:"30%"}},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%"}},g.createElement(e,null,"Qty"))),d.map((t,i)=>g.createElement(View,{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,i+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.prasadName)),g.createElement(View,{style:{padding:4,width:"10%"}},g.createElement(e,null,t.quantity)))))),u.length>0&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Delivery Postal Report",templeName:a}),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},u&&u.map(t=>{let i=To.toDataURL(t.qrContent);return g.createElement(View,{wrap:false,key:t.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},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"}},t.name),g.createElement(View,{style:{fontSize:8}},g.createElement(G,{splitat:"words"},t.address)),g.createElement(e,{style:{fontSize:8}},t.phone)),t.qrContent&&i?g.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(Image,{src:i,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: ",t.pujaDetails))})))))},Di=Dr;var Ir=({startDate:o,endDate:n,data:a})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,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"))),a?.map((r,d)=>g.createElement(View,{key:d,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,d+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,r.bookings)),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"\u20B9",r.revenue))))))),Vi=Ir;var kr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=()=>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,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Settlement")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Settlement ID"))),V=(s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:4,width:"15%",borderRight:"1px solid #000"}},g.createElement(e,null,s.date)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.settlement_amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%",fontSize:7}},g.createElement(e,null,s.utr.split("").map((t,i)=>g.createElement(e,{key:i},t)))),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((t,i)=>g.createElement(e,{key:i},t.number," (",t.amount,")")))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,s.settlement_id)));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),g.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((s,l)=>g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:8}},s.count," settlement",s.count!==1?"s":""," | ",s.dayTotal)),h(),s.items.map((t,i)=>V(t,i))))):g.createElement(g.Fragment,null,h(),r.settlements.map((s,l)=>V(s,l)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Si=kr;var Cr=({data:o})=>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"}},o.templeName),g.createElement(e,{style:{fontSize:8}},o.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:st}))),o.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:o.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},o.status==="confirmed"?g.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:dt}):null,g.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),g.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:8}},g.createElement(e,{style:{fontSize:9}},"Bill to:"),g.createElement(e,{style:{fontSize:9}},o.devoteeDetails.name),o.devoteeDetails.phone?g.createElement(e,{style:{fontSize:9}},o.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:9}},o.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"))),o.items.map((n,a)=>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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?g.createElement(View,{style:{marginBottom:4}},g.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.prasads.evening.length>0)?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")),o.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:"),o.prasads.morning.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.afternoon.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.evening.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.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}},o.instructions.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:7}},a+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")))),Ii=Cr;var jr=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),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")),r&&r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},r.map(d=>{let u=d.qrContent,h=To.toDataURL(u);return g.createElement(View,{wrap:false,key:d.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},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"}},d.name),g.createElement(View,{style:{fontSize:8}},g.createElement(G,{splitat:"words"},d.address)),g.createElement(e,{style:{fontSize:8}},d.phone)),d.qrContent&&h?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}},d.deliveryMode==="speedpost"?"SP":d.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:h,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: ",d.pujaDetails))})):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))),Pi=jr;var _r=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.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"))),r.map((d,u)=>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,u+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.invoiceNo)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.paymentDate)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(G,null,d.bankUtrNo))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),zi=_r;var $r=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.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"))),r.map((d,u)=>g.createElement(View,{key:u,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,u+1)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.invoiceNumber)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.baseAmount)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFees)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFeesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayCharges)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayChargesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.paymentMode)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(G,null,d.bookingDate)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:2,width:"12%"}},g.createElement(G,null,d.utrNumber))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),ki=$r;var Hr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u,summary:h})=>{let V=r.reduce((s,l)=>s+l.quantity,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{marginBottom:20}},d&&g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Monthly Summary")),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:"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,"Remarks"))),r.map((s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9,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"}},V)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),d&&u&&u.length>0&&g.createElement(View,null,g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),u.map((s,l)=>g.createElement(View,{key:s.dateKey,style:{marginBottom:20}},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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:10}},"Day Total: ",s.dayTotal)),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"))),s.items.map((t,i)=>g.createElement(View,{key:i,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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,t.name)),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:"20%"}},g.createElement(e,null,ce(t.amount||0))))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Ai=Hr;var Kr=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,selectedPujaNames:u=[]})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:d}),u.length>0&&g.createElement(View,{style:{marginTop:8,marginBottom:8}},g.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),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(P,{startDate:o,endDate:n,reportTiming:d,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")),u.length>0&&g.createElement(View,{style:{marginTop:8,marginBottom:4}},g.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),r.some(l=>l.bookings.some(t=>t.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:8}},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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,i.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:10}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((l,t)=>l.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(h=0,g.createElement(View,{key:t,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"}},`${l.name} - ${l.bookings.length}`)),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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode"))),l.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(h++,g.createElement(View,{key:p,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,h)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,i.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,i.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,i.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,i.collectionMode||""))),i.priestNote&&g.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,i.priestNote))))))))))),s?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[0];return g.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Ci=Kr;var vi={kitchen:{A4:Nt,A5:mi},transaction:{A4:Ct,A5:ui},"prasad-delivery":{A4:Ft,A5:yi,"110mm":ei},prasad:{A4:Bt,A5:fi,"110mm":Zt},"puja-detailed":{A4:Wt,A5:wi,"110mm":Qt},"puja-summary":{A4:jt,A5:hi},"combined-report":{A4:_t,A5:Di,"110mm":ii},"multi-temple-payment":{A4:Lt,A5:Vi},"settlements-report":{A4:qt,A5:Si},invoice:{A4:$t,A5:Ii},"postal-report":{A4:Mt,A5:Pi,"110mm":ni},"payment-settlement-report":{A4:Ot,A5:zi},"invoice-breakup":{A4:Ht,A5:ki},"puja-count":{A4:Gt,A5:Ai},"custom-report":{A4:si,A5:Ci,"110mm":ai},"invoice-recon":{A4:gi}},Wi=class{constructor(n,a){mt(this,"option");mt(this,"size");this.option=n,this.size=a,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:d,src:u})=>Font.register({family:d,src:u})),Font.register({family:"Noto Sans",fontWeight:"normal",src:Tt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Dt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Vt});}async print(n){let r=vi[this.option][this.size],d=g.createElement(r,{...n}),u=pdf(d).toBlob();return u.then(h=>{var V=URL.createObjectURL(h);if(window!=null){let s=window.open(V,"_blank");setTimeout(()=>{s?.print();},1e3);}}),u}async getBlob(n){let r=vi[this.option][this.size],d=g.createElement(r,{...n});return pdf(d).toBlob()}};
1
+ import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import g from'react';import {maxBy}from'lodash';import To from'qrcode';var ji=Object.defineProperty;var Ei=(o,n,a)=>n in o?ji(o,n,{enumerable:true,configurable:true,writable:true,value:a}):o[n]=a;var mt=(o,n,a)=>Ei(o,typeof n!="symbol"?n+"":n,a);var ve=o=>{typeof o=="string"&&(o=new Date(o));let n={day:"2-digit",month:"short",year:"numeric"};return o.toLocaleDateString("en-GB",n).replace(",","")};var ce=(o,n=false)=>{if(!n){if(o>=1e7)return `\u20B9${(o/1e7).toFixed(2)}Cr`;if(o>=1e5)return `\u20B9${(o/1e5).toFixed(2)}L`}return o.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:o%1===0?0:2})};var Se="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",nt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",lt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Tt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",Dt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Vt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var st="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",dt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",ut={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:nt});Font.register({family:"Roboto",fontWeight:"bold",src:lt});var St=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"}}),$i=({data:o,dates:n})=>{let a=ve(n[0])===ve(n[1]);return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:St.page},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Se}),g.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),g.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",a?ve(n[0]):`${ve(n[0])} - ${ve(n[1])}`),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},o?o.map((r,d)=>g.createElement(View,{wrap:false,key:d,style:St.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(d+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"}},r.participantName),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},r.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"}},r.pujaName)),a?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},ve(r.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},g.createElement(Text,null,"Priest Note: ",r.priestNote)):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},g.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",r.amount),r.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)))},Mi=$i;Font.register({family:"Roboto",fontWeight:"normal",src:nt});Font.register({family:"Roboto",fontWeight:"bold",src:lt});var ne=1,et=25*ne,Pt=StyleSheet.create({page:{padding:10*ne,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ne,paddingHorizontal:10*ne,fontSize:et,border:`${5*ne}px solid black`,borderRadius:5*ne,width:"100%",display:"flex",flexDirection:"column"}}),Ui=({data:o,dates:n})=>{let a=ve(n[0])===ve(n[1]);return g.createElement(Document,null,g.createElement(Page,{dpi:200,size:[457*ne],style:Pt.page},g.createElement(Image,{fixed:true,style:{height:55*ne,width:274*ne,marginBottom:10*ne,marginHorizontal:"auto"},src:Se}),g.createElement(Text,{style:{fontSize:25*ne,marginBottom:5*ne,marginHorizontal:"auto"}},"Puja List"),g.createElement(Text,{style:{fontSize:20*ne,marginBottom:5*ne,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",a?ve(n[0]):`${ve(n[0])} - ${ve(n[1])}`),g.createElement(Text,{style:{fontSize:17*ne,marginBottom:20*ne,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ne}},o?o.map((r,d)=>g.createElement(View,{wrap:false,key:d,style:Pt.pujaTile},g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ne}},g.createElement(Text,{style:{opacity:.6,marginRight:10*ne}},"#",(d+1).toString().padStart(2,"0")),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ne}},r.paymentStatus=="pending"?g.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ne,paddingHorizontal:5*ne,borderRadius:5*ne,marginTop:3*ne}},g.createElement(Text,{style:{color:"#ffffff",fontSize:et}},"Pending")):null,g.createElement(Text,{style:{fontWeight:"bold",fontSize:et}},"Rs ",r.amount))),g.createElement(View,{style:{flexGrow:1}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ne,gap:3*ne}},g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},r.participantName),g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},"-"),g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},r.participantNakshatra)),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ne}},g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},g.createElement(Text,null,"Puja name : "),g.createElement(Text,{style:{fontSize:et,fontWeight:"bold"}},r.pujaName)),a?null:g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},g.createElement(Text,null,"Date: "),g.createElement(Text,{style:{fontWeight:"bold"}},ve(r.date)))),g.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ne}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?g.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ne}},g.createElement(Text,null,"Priest Note: ",r.priestNote)):null))):null)))},Qi=Ui;var Yi={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},Zi=({style:o={},children:n})=>{let a=l=>{let t=maxBy(Object.entries(Yi),([i,p])=>{let _=l.match(p);return _?_.length:0});return t?t[0]:"Latin"},r=l=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(l));function d(l){return l.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let u=l=>{let t=[],i=null,p="";for(let _ of l){_=d(_);let ge=a(_);ge!==i?(p&&t.push({text:p,script:i}),i=ge,p=_):p+=_;}return p&&t.push({text:p,script:i}),t},h=[];n&&typeof n=="string"&&!Array.isArray(n)&&!r(n)&&u(n).forEach((t,i)=>{let p=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;h.push(g.createElement(Text,{key:i,style:{fontFamily:p}},t.text));});let V=[],s={fontFamily:"Noto Sans"};return Array.isArray(o)?V=[...o,s]:o&&Object.keys(o).length>0?V=[o,s]:V=[s],g.createElement(Text,{style:V},h?.length?h:n)},e=Zi;var Ri=({startDate:o,endDate:n,reportTiming:a,templeName:r,reportName:d,showGeneratedAt:u=true})=>g.createElement(g.Fragment,null,g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:Se}),u&&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: ",o.toDateString()," - ",n.toDateString()):g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",o.toDateString()),a&&Object.keys(ut).includes(a)?g.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},ut[a]," Report"):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},d),g.createElement(e,{style:{fontSize:12}},`${r}`)),P=Ri;var io=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,templeName:a,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((u,h)=>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,h+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,u.name)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},g.createElement(e,null,u.quantity))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Nt=io;var no=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayWiseTotals:u,summary:h})=>{let V=h?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),s=h?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),l=h?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+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(P,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.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: ",V.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&u&&u.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"))),u.map((t,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,t.dateDisplay)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.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,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"25%"}},g.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,d&&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"))),r.map((t,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,t.date," ",t.time)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,t.invoiceNumber)),t.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,t.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,(t.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,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,t.transactionId))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Ct=no;var po=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},V=r.map(h),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,"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:"18%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Address")),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,"Amount"))),l=(t,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(t.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(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.address)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.pujaName)),g.createElement(View,{style:{padding:6,width:"15%"}},g.createElement(e,null,t.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(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),V.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((t,i)=>{let p=t.items.map(h);return g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:10}},t.count," delivery",t.count!==1?" items":" item")),s(),p.map((_,ge)=>l(_,ge)))})):g.createElement(g.Fragment,null,s(),V.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ft=po;var mo=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d,isDayWiseGrouped:u,dayGroups:h})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.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"))),l=(t,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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},g.createElement(e,null,t.pujaName," - ",t.prasadName)),g.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:6,width:"7%"}},g.createElement(e,null,t.collectionMode)));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:d}),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")),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u&&h&&h.length>0?g.createElement(g.Fragment,null,h.map((t,i)=>g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:10}},t.count," item",t.count!==1?"s":"")),s(),t.items.map((p,_)=>l(p,_))))):g.createElement(g.Fragment,null,s(),r.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Bt=mo;var yo=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,isDayWiseGrouped:u})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:d}),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,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:d,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")),r.some(l=>l.bookings.some(t=>t.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"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.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}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((l,t)=>{if(l.bookings.every(D=>D.is_early_reminder||D.requires_coupon))return null;h=0;let i=l.bookings.some(D=>D.topping_name),p=u&&l.dayGroups&&l.dayGroups.length>0,_=(D=false)=>i?g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?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:"30%"}},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:"none",fontWeight:"semibold",width:"31%"}},g.createElement(e,null,"Offerings"))):g.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?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"))),ge=(D,Q,de)=>D.is_early_reminder||D.requires_coupon?null:i?g.createElement(View,{key:Q,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,de)),g.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},g.createElement(e,null,D.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"31%"}},g.createElement(e,null,D.topping_name||""))):g.createElement(View,{key:Q,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,de)),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,D.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,D.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,D.collectionMode||""))),D.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,D.priestNote))));return g.createElement(View,{key:t,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"}},`${l.name} - ${l.totalBookings||l.bookings.length}`),!p&&_(true)),p?g.createElement(g.Fragment,null,l.dayGroups.map((D,Q)=>{let de=0,je=D.items.filter(Ge=>!Ge.is_early_reminder&&!Ge.requires_coupon);return je.length===0?null:g.createElement(View,{key:D.dateKey,style:{marginTop:Q>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"}},D.dateDisplay),g.createElement(e,{style:{fontSize:9}},`${je.length} booking${je.length!==1?"s":""}`)),_(false),je.map((Ge,gt)=>(de++,ge(Ge,gt,de))))})):g.createElement(g.Fragment,null,l.bookings.map((D,Q)=>D.is_early_reminder||D.requires_coupon?null:(h++,ge(D,Q,h)))))}))),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:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Wt=yo;var wo=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:d})=>{let u=r.sort((h,V)=>{let s=h.nakshatras.length;return V.nakshatras.length-s});return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:n,endDate:a,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.map((h,V)=>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"}},`${h.name} - ${h.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"))),h.nakshatras.map((s,l)=>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,l+1)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},g.createElement(e,null,s.count))))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},jt=wo;var bo=({children:o,splitat:n})=>{if(!o||typeof o!="string")return null;let a="";return n=="words"&&(a=" "),g.createElement(g.Fragment,null,g.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},o.split(a).map((r,d)=>g.createElement(g.Fragment,null,g.createElement(e,{key:d},r,n=="words"?" ":"")))))},G=bo;var Do=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:d,deliveryData:u,reportTiming:h})=>{u=u.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});let V=0,s=0,l=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&u.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Combined Report",templeName:a}),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,r.length>0&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"",templeName:""}),r.some(t=>t.bookings.some(i=>i.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:"60%"}},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:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(p=>p.is_early_reminder&&!p.requires_coupon).map((p,_)=>(s++,g.createElement(View,{wrap:false,key:`${i}-${_}`,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,s)),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,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,p.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},g.createElement(e,null,p.date?new Date(p.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),g.createElement(e,{style:{fontSize:12}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((t,i)=>t.bookings.every(p=>p.is_early_reminder||p.requires_coupon)?null:(V=0,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"}},`${t.name} - ${t.bookings.length}`)),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:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty"))),t.bookings.map((p,_)=>p.is_early_reminder||p.requires_coupon?null:(V++,g.createElement(g.Fragment,null,g.createElement(View,{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,V)),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:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,p.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${35*1.11111}%`}},g.createElement(e,null,p.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${25*1.11111}%`}},g.createElement(e,null,p.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${10*1.11111}%`}},g.createElement(e,null,p.quantity))),p.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,p.priestNote))))))))))))),r.length>0&&l&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let t=r.flatMap(p=>p.bookings.filter(_=>_.requires_coupon).map(_=>({..._,pujaName:p.name}))),i={};for(let p of t)i[p.invoiceNumber]||(i[p.invoiceNumber]=[]),i[p.invoiceNumber].push(p);return Object.entries(i).map(([p,_],ge)=>{let D=_,Q=D[0];return g.createElement(View,{key:p,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black"},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"}},p),g.createElement(e,null,Q.date?new Date(Q.date).toDateString():o.toDateString())),g.createElement(e,null,Q.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),D.map((de,je)=>g.createElement(View,{key:je,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${de.devoteeName} ----- ${de.nakshatra} ----- ${de.pujaName}`))))})})())),d.length>0&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Report",templeName:a}),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,"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:"30%"}},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%"}},g.createElement(e,null,"Qty"))),d.map((t,i)=>g.createElement(View,{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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.prasadName)),g.createElement(View,{style:{padding:6,width:"10%"}},g.createElement(e,null,t.quantity)))))),u.length>0&&g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Delivery Postal Report",templeName:a}),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},u&&u.map(t=>{let i=To.toDataURL(t.qrContent);return g.createElement(View,{wrap:false,key:t.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},g.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},g.createElement(View,null,g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.name),g.createElement(View,{style:{fontSize:10}},g.createElement(G,{splitat:"words"},t.address)),g.createElement(e,{style:{fontSize:10}},t.phone)),t.qrContent&&i?g.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(Image,{src:i,style:{width:50,height:50,minWidth:50,maxWidth:50}}),g.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",t.pujaDetails))})))))},_t=Do;var Io=({startDate:o,endDate:n,data:a})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,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"))),a?.map((r,d)=>g.createElement(View,{key:d,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,d+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,r.bookings)),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"\u20B9",r.revenue))))))),Lt=Io;var ko=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=()=>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,"Date")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Settlement")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,"Settlement ID"))),V=(s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},g.createElement(e,null,s.date)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.settlement_amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},g.createElement(e,null,s.utr.split("").map((t,i)=>g.createElement(e,{key:i},t)))),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((t,i)=>g.createElement(e,{key:i},t.number," (",t.amount,")")))),g.createElement(View,{style:{padding:6,width:"20%"}},g.createElement(e,null,s.settlement_id)));return g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),g.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((s,l)=>g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:10}},s.count," settlement",s.count!==1?"s":""," | Total: ",s.dayTotal)),h(),s.items.map((t,i)=>V(t,i))))):g.createElement(g.Fragment,null,h(),r.settlements.map((s,l)=>V(s,l)))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=ko;var Co=({data:o})=>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"}},o.templeName),g.createElement(e,{style:{fontSize:10}},o.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:st}))),o.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:o.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},o.status==="confirmed"?g.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:dt}):null,g.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),g.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:10}},g.createElement(e,{style:{fontSize:11}},"Bill to:"),g.createElement(e,{style:{fontSize:11}},o.devoteeDetails.name),o.devoteeDetails.phone?g.createElement(e,{style:{fontSize:11}},o.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:11}},o.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"))),o.items.map((n,a)=>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),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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.prasads.evening.length>0)?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")),o.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:"),o.prasads.morning.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.afternoon.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.evening.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:10}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.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}},o.instructions.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+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")))),$t=Co;var jo=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),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")),r&&r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20,width:"100%",gap:20,flexWrap:"wrap"}},r.map(d=>{let u=d.qrContent,h=To.toDataURL(u);return g.createElement(View,{wrap:false,key:d.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},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"}},d.name),g.createElement(View,{style:{fontSize:10}},g.createElement(e,{style:{fontSize:10}},d.address)),g.createElement(e,{style:{fontSize:10}},d.phone)),d.qrContent&&h?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}},d.deliveryMode==="speedpost"?"SP":d.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:h,style:{width:50,height:50,minWidth:50,maxWidth:50}}),g.createElement(e,{style:{fontSize:7}},"BookMyPuja")):null),g.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),g.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",d.pujaDetails))})):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))),Mt=jo;var _o=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.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"))),r.map((d,u)=>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,u+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.invoiceNo)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.amount)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.paymentDate)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},g.createElement(G,null,d.bankUtrNo))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ot=_o;var $o=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.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"))),r.map((d,u)=>g.createElement(View,{key:u,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,u+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.baseAmount)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFees)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFeesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayCharges)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayChargesGST)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.paymentMode)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(G,null,d.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:3,width:"12%"}},g.createElement(G,null,d.utrNumber))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ht=$o;var Ho=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u,summary:h})=>{let V=r.reduce((s,l)=>s+l.quantity,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.createElement(View,{style:{marginBottom:25}},d&&g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Monthly 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,"Remarks"))),r.map((s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.quantity)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),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"}},V)),g.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}}))),d&&u&&u.length>0&&g.createElement(View,null,g.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),u.map((s,l)=>g.createElement(View,{key:s.dateKey,style:{marginBottom:20}},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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:10}},"Day Total: ",s.dayTotal)),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"))),s.items.map((t,i)=>g.createElement(View,{key:i,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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,t.name)),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:"20%"}},g.createElement(e,null,ce(t.amount||0))))))))):g.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Gt=Ho;var Go=({startDate:o,templeName:n,pujas:a,reportTiming:r})=>{return !a||a.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"}},o.toLocaleDateString()),r&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," Report")),a.map((u,h)=>{let V=u.bookings.filter(s=>!s.is_early_reminder&&!s.requires_coupon);return V.length===0?null:g.createElement(View,{key:h,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"}},u.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},V.length," booking",V.length>1?"s":"")),V.map((s,l)=>(g.createElement(View,{key:l,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",marginBottom:s.topping_name?6:0}},g.createElement(e,{style:{fontSize:12}},s.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",s.quantity)),s.topping_name&&g.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},g.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",s.topping_name)),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))))))})))},Qt=Go;var Ko=({startDate:o,templeName:n,data:a,reportTiming:r,isDayWiseGrouped:d,dayGroups:u})=>{if(!a||a.length===0)return g.createElement(Document,null,g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let h=a.sort((s,l)=>s.invoiceNumber.localeCompare(l.invoiceNumber)),V=(s,l)=>g.createElement(View,{key:l,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",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},s.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",s.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},s.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"}},o.toLocaleDateString()),r&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.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}},h.length," item",h.length>1?"s":"")),d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((s,l)=>g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:11}},s.count," item",s.count!==1?"s":""))),s.items.map((t,i)=>V(t,i))))):g.createElement(g.Fragment,null,h.map((s,l)=>V(s,l)))))},Zt=Ko;var Uo=({startDate:o,templeName:n,data:a,isDayWiseGrouped:r,dayGroups:d})=>{let u=s=>{let l="";try{let t=JSON.parse(s.address);l=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{l=s.address;}return {...s,address:l}},h=a.map(u);if(!h||h.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 V=(s,l)=>g.createElement(View,{key:l,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.devoteeName),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},s.address)),s.phoneNumber&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",s.phoneNumber)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",s.note||s.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"}},o.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}},h.length," delivery",h.length>1?" items":" item")),r&&d&&d.length>0?g.createElement(g.Fragment,null,d.map((s,l)=>{let t=s.items.map(u);return g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:11}},s.count," item",s.count!==1?"s":""))),t.map((i,p)=>V(i,p)))})):g.createElement(g.Fragment,null,h.map((s,l)=>V(s,l)))))},ei=Uo;var Qo=({startDate:o,templeName:n,pujaData:a,prasadData:r,deliveryData:d,reportTiming:u})=>{if(a.length===0&&r.length===0&&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 V=r.sort((s,l)=>s.invoiceNumber.localeCompare(l.invoiceNumber));return g.createElement(Document,null,a.length>0&&g.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},g.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},g.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},n),g.createElement(e,{style:{fontSize:12,textAlign:"center"}},o.toLocaleDateString()),u&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},u.charAt(0).toUpperCase()+u.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")),a.map((s,l)=>{let t=s.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return t.length===0?null:g.createElement(View,{key:l,style:{marginBottom:20},wrap:false},g.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},s.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((i,p)=>(g.createElement(View,{key:p,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))))))})),r.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"}},o.toLocaleDateString()),u&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},u.charAt(0).toUpperCase()+u.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}},V.length," item",V.length>1?"s":"")),V.map((s,l)=>g.createElement(View,{key:l,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",alignItems:"center"}},g.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},g.createElement(e,{style:{fontSize:12}},s.prasadName),g.createElement(e,{style:{fontSize:12}}," (qty: ",s.quantity,")")),g.createElement(e,{style:{fontSize:12,color:"#666"}},s.collectionMode))))),d.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"}},o.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}},d.length," delivery",d.length>1?" items":" item")),d.map((s,l)=>g.createElement(View,{key:l,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},s.name),g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:11}},s.address)),s.phone&&g.createElement(View,{style:{marginBottom:6}},g.createElement(e,{style:{fontSize:12}},"Ph: ",s.phone)),g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",s.pujaDetails))))))},ii=Qo;var Jo=({startDate:o,templeName:n,data:a})=>!a||a.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"}},o.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}},a.length," label",a.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")),a.map(r=>g.createElement(View,{key:r.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"}},r.name),g.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP")),g.createElement(View,{style:{marginBottom:5}},g.createElement(e,{style:{fontSize:11}},r.address)),g.createElement(e,{style:{fontSize:11,marginBottom:5}},r.phone),g.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),g.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",r.pujaDetails))))),ni=Jo;var Zo=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,selectedPujaNames:u=[]})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:d}),u.length>0&&g.createElement(View,{style:{marginTop:10,marginBottom:10}},g.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),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(P,{startDate:o,endDate:n,reportTiming:d,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")),u.length>0&&g.createElement(View,{style:{marginTop:10,marginBottom:5}},g.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),r.some(l=>l.bookings.some(t=>t.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"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.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}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((l,t)=>l.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(h=0,g.createElement(View,{key:t,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"}},`${l.name} - ${l.bookings.length}`)),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:"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"))),l.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(h++,g.createElement(View,{key:p,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,h)),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:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,i.invoiceNumber)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,i.devoteeName)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,i.nakshatra)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,i.collectionMode||""))),i.priestNote&&g.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,i.priestNote))))))))))),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:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:15,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:25}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},si=Zo;var Xo=({startDate:o,templeName:n,pujas:a,reportTiming:r,selectedPujaNames:d=[]})=>{return !a||a.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"}},o.toLocaleDateString()),r&&g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," ","Report")),d.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}},d.join(", "))),a.map((h,V)=>{let s=h.bookings.filter(l=>!l.is_early_reminder&&!l.requires_coupon);return s.length===0?null:g.createElement(View,{key:V,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"}},h.name),g.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},s.length," booking",s.length>1?"s":"")),s.map((l,t)=>(g.createElement(View,{key:t,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"}},l.invoiceNumber)),g.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),g.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},g.createElement(e,{style:{fontSize:12}},l.nakshatra),g.createElement(e,{style:{fontSize:12}},"Qty: ",l.quantity)),l.collectionMode&&g.createElement(View,{style:{marginTop:4}},g.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",l.collectionMode)),l.priestNote&&g.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},g.createElement(e,{style:{fontSize:11,color:"#666"}},l.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"))))},ai=Xo;var ir=o=>{let n=0,a=0,r=0;for(let d of o.items)d.paymentMethod!="INTERNATIONAL_CARD"&&d.platformFees>0&&(n+=d.platformFees,a+=d.platformFeesGST);return r=a+n,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:Se}),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}},o.templeName," "),g.createElement(Text,{style:{fontSize:12}},"Bookings from ",o.startDate.toDateString()," to"," ",o.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",marginTop:10}},"Bookings 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:"15%"}},g.createElement(Text,null,"Booking Date")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"Platform Fees")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,"Plt Fees GST")),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,"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:"19%"}},g.createElement(Text,null,"Transaction ID")))),o.items.map((d,u)=>g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${d.platformFees==0||d.paymentMethod=="INTERNATIONAL_CARD"?"#fffca6":""}`}},g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},g.createElement(Text,null,u+1)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,null,d.invoiceNumber)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},g.createElement(Text,null,d.bookingDate)),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(d.platformFees))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,ce(d.platformFeesGST))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(d.platformFees+d.platformFeesGST))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,d.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),g.createElement(View,{style:{padding:3,width:"19%"}},g.createElement(Text,null,d.transactionID)))),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:"15%"}}),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(n))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},g.createElement(Text,null,ce(a))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},g.createElement(Text,null,ce(r))),g.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}}),g.createElement(View,{style:{padding:3,width:"19%"}})),g.createElement(View,{style:{marginTop:10,fontSize:12}},g.createElement(Text,null,"Total Payable: ",ce(r)))))},gi=ir;var nr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,templeName:a,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((u,h)=>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,h+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},g.createElement(e,null,u.name)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},g.createElement(e,null,u.quantity))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),mi=nr;var dr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayWiseTotals:u,summary:h})=>{let V=h?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),s=h?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),l=h?.totalCreditedAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+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(P,{startDate:o,endDate:n,reportName:"Transactions Report",templeName:a}),r.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: ",V.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",s.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),g.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&u&&u.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"))),u.map((t,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,t.dateDisplay)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.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,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"25%"}},g.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),g.createElement(View,null,d&&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"))),r.map((t,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,t.date," ",t.time)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},g.createElement(e,null,t.invoiceNumber)),t.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,t.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,(t.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,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,t.transactionId))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},ui=dr;var gr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},V=r.map(h),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,"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:"18%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,"Address")),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,"Amount"))),l=(t,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%"}},g.createElement(e,null,new Date(t.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(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"18%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},g.createElement(e,null,t.address)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.pujaName)),g.createElement(View,{style:{padding:4,width:"15%"}},g.createElement(e,null,t.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(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Address",templeName:a}),V.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((t,i)=>{let p=t.items.map(h);return g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:9}},t.count," delivery",t.count!==1?" items":" item")),s(),p.map((_,ge)=>l(_,ge)))})):g.createElement(g.Fragment,null,s(),V.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},yi=gr;var yr=({startDate:o,endDate:n,templeName:a,data:r,reportTiming:d,isDayWiseGrouped:u,dayGroups:h})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.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"))),l=(t,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%"}},g.createElement(e,null,i+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},g.createElement(e,null,t.pujaName," - ",t.prasadName)),g.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},g.createElement(e,null,t.quantity)),g.createElement(View,{style:{padding:4,width:"7%"}},g.createElement(e,null,t.collectionMode)));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Report",templeName:a,reportTiming:d}),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")),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u&&h&&h.length>0?g.createElement(g.Fragment,null,h.map((t,i)=>g.createElement(View,{key:t.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"}},t.dateDisplay),g.createElement(e,{style:{fontSize:9}},t.count," item",t.count!==1?"s":"")),s(),t.items.map((p,_)=>l(p,_))))):g.createElement(g.Fragment,null,s(),r.map((t,i)=>l(t,i)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},fi=yr;var xr=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,isDayWiseGrouped:u})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Puja List",templeName:a,reportTiming:d}),g.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:d,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")),r.some(l=>l.bookings.some(t=>t.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:8}},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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,i.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((l,t)=>{if(l.bookings.every(D=>D.is_early_reminder||D.requires_coupon))return null;h=0;let i=l.bookings.some(D=>D.topping_name),p=u&&l.dayGroups&&l.dayGroups.length>0,_=(D=false)=>i?g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?void 0:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},g.createElement(e,null,"Sr")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Devotee")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"31%"}},g.createElement(e,null,"Offerings"))):g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:D?void 0:"none"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode"))),ge=(D,Q,de)=>D.is_early_reminder||D.requires_coupon?null:i?g.createElement(View,{key:Q,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},g.createElement(e,null,de)),g.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},g.createElement(e,null,D.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"31%"}},g.createElement(e,null,D.topping_name||""))):g.createElement(View,{key:Q,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,de)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,D.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,D.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,D.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,D.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,D.collectionMode||""))),D.priestNote&&g.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,D.priestNote))));return g.createElement(View,{key:t,style:{marginBottom:20}},g.createElement(View,{wrap:false,minPresenceAhead:15},g.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${l.name} - ${l.totalBookings||l.bookings.length}`),!p&&_(true)),p?g.createElement(g.Fragment,null,l.dayGroups.map((D,Q)=>{let de=0,je=D.items.filter(Ge=>!Ge.is_early_reminder&&!Ge.requires_coupon);return je.length===0?null:g.createElement(View,{key:D.dateKey,style:{marginTop:Q>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:4}},g.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},D.dateDisplay),g.createElement(e,{style:{fontSize:8}},`${je.length} booking${je.length!==1?"s":""}`)),_(false),je.map((Ge,gt)=>(de++,ge(Ge,gt,de))))})):g.createElement(g.Fragment,null,l.bookings.map((D,Q)=>D.is_early_reminder||D.requires_coupon?null:(h++,ge(D,Q,h)))))}))),s?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[0];return g.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},wi=xr;var br=({templeName:o,startDate:n,endDate:a,pujas:r,reportTiming:d})=>{let u=r.sort((h,V)=>{let s=h.nakshatras.length;return V.nakshatras.length-s});return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:n,endDate:a,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.map((h,V)=>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"}},`${h.name} - ${h.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"))),h.nakshatras.map((s,l)=>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,l+1)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},g.createElement(e,null,s.count))))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},hi=br;var Dr=({startDate:o,endDate:n,templeName:a,pujaData:r,prasadData:d,deliveryData:u,reportTiming:h})=>{u=u.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});let V=0,s=0,l=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&u.length==0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Combined Report",templeName:a}),g.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):g.createElement(g.Fragment,null,g.createElement(Document,null,r.length>0&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"",templeName:""}),r.some(t=>t.bookings.some(i=>i.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:8}},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:"10%"}},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,"Puja Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(p=>p.is_early_reminder&&!p.requires_coupon).map((p,_)=>(s++,g.createElement(View,{wrap:false,key:`${i}-${_}`,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,s)),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,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,p.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,p.date?new Date(p.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),g.createElement(e,{style:{fontSize:10}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((t,i)=>t.bookings.every(p=>p.is_early_reminder||p.requires_coupon)?null:(V=0,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"}},`${t.name} - ${t.bookings.length}`)),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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty"))),t.bookings.map((p,_)=>p.is_early_reminder||p.requires_coupon?null:(V++,g.createElement(g.Fragment,null,g.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,V)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,p.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${35*1.11111}%`}},g.createElement(e,null,p.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${25*1.11111}%`}},g.createElement(e,null,p.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${10*1.11111}%`}},g.createElement(e,null,p.quantity))),p.priestNote&&g.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,p.priestNote))))))))))))),r.length>0&&l&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=r.flatMap(p=>p.bookings.filter(_=>_.requires_coupon).map(_=>({..._,pujaName:p.name}))),i={};for(let p of t)i[p.invoiceNumber]||(i[p.invoiceNumber]=[]),i[p.invoiceNumber].push(p);return Object.entries(i).map(([p,_],ge)=>{let D=_,Q=D[0];return g.createElement(View,{key:p,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black"},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"}},p),g.createElement(e,null,Q.date?new Date(Q.date).toDateString():o.toDateString())),g.createElement(e,null,Q.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),D.map((de,je)=>g.createElement(View,{key:je,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${de.devoteeName} ----- ${de.nakshatra} ----- ${de.pujaName}`))))})})())),d.length>0&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Report",templeName:a}),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,"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:"30%"}},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%"}},g.createElement(e,null,"Qty"))),d.map((t,i)=>g.createElement(View,{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,i+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},g.createElement(e,null,t.invoiceNumber)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.devoteeName)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},g.createElement(e,null,t.prasadName)),g.createElement(View,{style:{padding:4,width:"10%"}},g.createElement(e,null,t.quantity)))))),u.length>0&&g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportTiming:h,reportName:"Prasad Delivery Postal Report",templeName:a}),g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},u&&u.map(t=>{let i=To.toDataURL(t.qrContent);return g.createElement(View,{wrap:false,key:t.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},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"}},t.name),g.createElement(View,{style:{fontSize:8}},g.createElement(G,{splitat:"words"},t.address)),g.createElement(e,{style:{fontSize:8}},t.phone)),t.qrContent&&i?g.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},g.createElement(Image,{src:i,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: ",t.pujaDetails))})))))},Di=Dr;var Ir=({startDate:o,endDate:n,data:a})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,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"))),a?.map((r,d)=>g.createElement(View,{key:d,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,d+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},g.createElement(e,null,r.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},g.createElement(e,null,r.bookings)),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"\u20B9",r.revenue))))))),Vi=Ir;var kr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u})=>{let h=()=>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,"Date")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,"Settlement")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(e,null,"UTR")),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},g.createElement(e,null,"Invoice")),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,"Settlement ID"))),V=(s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:4,width:"15%",borderRight:"1px solid #000"}},g.createElement(e,null,s.date)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.settlement_amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%",fontSize:7}},g.createElement(e,null,s.utr.split("").map((t,i)=>g.createElement(e,{key:i},t)))),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},g.createElement(View,{style:{display:"flex",flexDirection:"column"}},s.invoices.map((t,i)=>g.createElement(e,{key:i},t.number," (",t.amount,")")))),g.createElement(View,{style:{padding:4,width:"20%"}},g.createElement(e,null,s.settlement_id)));return g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Settlements Report",templeName:a}),g.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&u&&u.length>0?g.createElement(g.Fragment,null,u.map((s,l)=>g.createElement(View,{key:s.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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:8}},s.count," settlement",s.count!==1?"s":""," | ",s.dayTotal)),h(),s.items.map((t,i)=>V(t,i))))):g.createElement(g.Fragment,null,h(),r.settlements.map((s,l)=>V(s,l)))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Si=kr;var Cr=({data:o})=>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"}},o.templeName),g.createElement(e,{style:{fontSize:8}},o.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:st}))),o.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:o.qrContent})):null),g.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},o.status==="confirmed"?g.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:dt}):null,g.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",o.invoiceNumber),g.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),g.createElement(View,{style:{marginTop:8}},g.createElement(e,{style:{fontSize:9}},"Bill to:"),g.createElement(e,{style:{fontSize:9}},o.devoteeDetails.name),o.devoteeDetails.phone?g.createElement(e,{style:{fontSize:9}},o.devoteeDetails.phone):null,g.createElement(e,{style:{fontSize:9}},o.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"))),o.items.map((n,a)=>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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?g.createElement(View,{style:{marginBottom:4}},g.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.prasads.evening.length>0)?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")),o.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:"),o.prasads.morning.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.afternoon.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null,o.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:"),o.prasads.evening.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:8}},a+1,". ",n.name," (",n.timings,")"))):null):null,o.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}},o.instructions.map((n,a)=>g.createElement(e,{key:a,style:{fontSize:7}},a+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")))),Ii=Cr;var jr=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Prasad Delivery Postal Report",templeName:a}),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")),r&&r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},r.map(d=>{let u=d.qrContent,h=To.toDataURL(u);return g.createElement(View,{wrap:false,key:d.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},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"}},d.name),g.createElement(View,{style:{fontSize:8}},g.createElement(G,{splitat:"words"},d.address)),g.createElement(e,{style:{fontSize:8}},d.phone)),d.qrContent&&h?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}},d.deliveryMode==="speedpost"?"SP":d.deliveryMode==="international-post"?"IP":"NP"),g.createElement(Image,{src:h,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: ",d.pujaDetails))})):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))),Pi=jr;var _r=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Payment Settlement Report",templeName:a}),r.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"))),r.map((d,u)=>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,u+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.invoiceNo)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(G,null,d.amount)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.paymentDate)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},g.createElement(G,null,d.bankUtrNo))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),zi=_r;var $r=({startDate:o,endDate:n,templeName:a,data:r})=>g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Invoice Level Breakup",templeName:a}),r.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"))),r.map((d,u)=>g.createElement(View,{key:u,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,u+1)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.invoiceNumber)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.baseAmount)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFees)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.platformFeesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayCharges)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.gatewayChargesGST)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},g.createElement(G,null,d.paymentMode)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(G,null,d.bookingDate)),g.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},g.createElement(G,null,d.settlementDate)),g.createElement(View,{style:{padding:2,width:"12%"}},g.createElement(G,null,d.utrNumber))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),ki=$r;var Hr=({startDate:o,endDate:n,templeName:a,data:r,isDayWiseGrouped:d,dayGroups:u,summary:h})=>{let V=r.reduce((s,l)=>s+l.quantity,0);return g.createElement(g.Fragment,null,g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Total Puja Count Report",templeName:a}),r.length>0?g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.createElement(View,{style:{marginBottom:20}},d&&g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Monthly Summary")),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:"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,"Remarks"))),r.map((s,l)=>g.createElement(View,{key:l,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},g.createElement(e,null,l+1)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},g.createElement(e,null,s.name)),g.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},g.createElement(e,null,s.quantity)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),g.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9,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"}},V)),g.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),d&&u&&u.length>0&&g.createElement(View,null,g.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},g.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),u.map((s,l)=>g.createElement(View,{key:s.dateKey,style:{marginBottom:20}},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"}},s.dateDisplay),g.createElement(e,{style:{fontSize:10}},"Day Total: ",s.dayTotal)),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"))),s.items.map((t,i)=>g.createElement(View,{key:i,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,i+1)),g.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},g.createElement(e,null,t.name)),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:"20%"}},g.createElement(e,null,ce(t.amount||0))))))))):g.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Ai=Hr;var Kr=({startDate:o,endDate:n,templeName:a,pujas:r,reportTiming:d,selectedPujaNames:u=[]})=>{let h=0,V=0,s=r.some(l=>l.bookings.some(t=>t.requires_coupon));return !r||r.length===0?g.createElement(Document,null,g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(P,{startDate:o,endDate:n,reportName:"Custom Puja Report",templeName:a,reportTiming:d}),u.length>0&&g.createElement(View,{style:{marginTop:8,marginBottom:8}},g.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),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(P,{startDate:o,endDate:n,reportTiming:d,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")),u.length>0&&g.createElement(View,{style:{marginTop:8,marginBottom:4}},g.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",u.join(", "))),r.some(l=>l.bookings.some(t=>t.is_early_reminder))&&g.createElement(g.Fragment,null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),g.createElement(View,{style:{marginTop:8}},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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},g.createElement(e,null,"Puja Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Date"))))),r.some(l=>l.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((l,t)=>l.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(V++,g.createElement(View,{key:`${t}-${p}`,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,V)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},g.createElement(e,null,l.name)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},g.createElement(e,null,i.collectionMode||"")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},g.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,g.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Custom Puja Report"),g.createElement(e,{style:{fontSize:10}},`${a}`),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((l,t)=>l.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(h=0,g.createElement(View,{key:t,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"}},`${l.name} - ${l.bookings.length}`)),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:"10%"}},g.createElement(e,null,"Sr No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},g.createElement(e,null,"Invoice No")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},g.createElement(e,null,"Devotee Name")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},g.createElement(e,null,"Nakshatra")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},g.createElement(e,null,"Qty")),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},g.createElement(e,null,"Mode"))),l.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(h++,g.createElement(View,{key:p,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},g.createElement(e,null,h)),g.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},g.createElement(View,{style:{display:"flex",flexDirection:"row"}},g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},g.createElement(e,null,i.invoiceNumber)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},g.createElement(e,null,i.devoteeName)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},g.createElement(e,null,i.nakshatra)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},g.createElement(e,null,i.quantity)),g.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},g.createElement(e,null,i.collectionMode||""))),i.priestNote&&g.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},g.createElement(e,null,i.priestNote))))))))))),s?g.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},g.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Se}),g.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let l=r.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of l)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],_)=>{let ge=p,D=ge[0];return g.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,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,D.date?new Date(D.date).toDateString():o.toDateString())),g.createElement(e,null,D.phone_number)),g.createElement(View,{style:{height:10,width:"100%"}}),ge.map((Q,de)=>g.createElement(View,{key:de,style:{display:"flex",flexDirection:"row",marginTop:18}},g.createElement(e,null,`${Q.devoteeName} ----- ${Q.nakshatra} ----- ${Q.pujaName}`))),g.createElement(View,null,g.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Ci=Kr;var vi={kitchen:{A4:Nt,A5:mi},transaction:{A4:Ct,A5:ui},"prasad-delivery":{A4:Ft,A5:yi,"110mm":ei},prasad:{A4:Bt,A5:fi,"110mm":Zt},"puja-detailed":{A4:Wt,A5:wi,"110mm":Qt},"puja-summary":{A4:jt,A5:hi},"combined-report":{A4:_t,A5:Di,"110mm":ii},"multi-temple-payment":{A4:Lt,A5:Vi},"settlements-report":{A4:qt,A5:Si},invoice:{A4:$t,A5:Ii},"postal-report":{A4:Mt,A5:Pi,"110mm":ni},"payment-settlement-report":{A4:Ot,A5:zi},"invoice-breakup":{A4:Ht,A5:ki},"puja-count":{A4:Gt,A5:Ai},"custom-report":{A4:si,A5:Ci,"110mm":ai},"invoice-recon":{A4:gi}},Wi=class{constructor(n,a){mt(this,"option");mt(this,"size");this.option=n,this.size=a,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:d,src:u})=>Font.register({family:d,src:u})),Font.register({family:"Noto Sans",fontWeight:"normal",src:Tt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:Dt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Vt});}async print(n){let r=vi[this.option][this.size],d=g.createElement(r,{...n}),u=pdf(d).toBlob();return u.then(h=>{var V=URL.createObjectURL(h);if(window!=null){let s=window.open(V,"_blank");setTimeout(()=>{s?.print();},1e3);}}),u}async getBlob(n){let r=vi[this.option][this.size],d=g.createElement(r,{...n});return pdf(d).toBlob()}};
2
2
  export{Mi as A4Print,Qi as T2Inch,Wi as reportPrinter};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bookmypuja-tech/bmp-pdf",
3
3
  "description": "PDF Report Generation for Temple360 and T-360 by BookMyPuja",
4
- "version": "0.4.29",
4
+ "version": "0.4.31",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",