anarock-widgets 1.0.180 → 1.0.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +18 -5
- package/dist/index.umd.js +61 -61
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -359,4 +359,4 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
359
359
|
*
|
|
360
360
|
* This source code is licensed under the ISC license.
|
|
361
361
|
* See the LICENSE file in the root directory of this source tree.
|
|
362
|
-
*/const Tde=[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]],Mde=aa("waves-ladder",Tde);$n.register(Oo,Eo,El,Yr);const Nde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return g.jsxs(Ae,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:g.jsx(xde,{className:"!text-[24px] text-[#8B5CF6]"}),children:[g.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),g.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),g.jsx("div",{className:"h-[110px]",children:g.jsx(Pl,{data:t,options:n})})]})};function jde(){return g.jsx(Ae,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:g.jsx(C5,{className:"!text-[24px] text-[#FA7E28]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),g.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[g.jsx(VC,{}),8,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsxs("div",{className:"mt-[16px]",children:[g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Rde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return g.jsx(Ae,{className:"h-[324px]",title:"Amenities",period:"Today",icon:g.jsx(Mde,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&g.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?g.jsx(VC,{}):g.jsx(w3,{}),u,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[g.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&g.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):g.jsx("div",{className:"flex items-center justify-center h-[120px]",children:g.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}$n.register(Oo,Eo,El,Yr,Jr);function Ide({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[],l=[];for(let d=0;d<n.length;d++)r.push(n[d].level),i.push(Number(n[d].open)),o.push(Number(n[d].in_progress)),a.push(Number(n[d].on_hold)),s.push(Number(n[d].closed)),l.push(Number(n[d].cancelled));const c={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Closed",data:s,backgroundColor:"#10B981",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:l,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},u={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:d=>Math.round(d)}}}};return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:g.jsx(D3,{className:"!text-[24px] text-[#3C81F6]"}),children:g.jsx("div",{className:"h-full",children:g.jsx(Pl,{data:c,options:u})})})}const Fde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return g.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:g.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[g.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),g.jsx("div",{children:n.name}),g.jsx("div",{className:"ml-2",children:n.value})]})})};function Lde({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:g.jsx(Dv,{className:"!text-[24px] text-[#EF4444]"}),children:g.jsxs("div",{className:"flex h-full items-center gap-4",children:[g.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Fde,{}),wrapperStyle:{zIndex:1e3}})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[g.jsx("div",{children:r(n.completed)}),g.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),g.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>g.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const pk={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function hk({title:e,color:t,rows:n=[],children:r}){const i=g.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[g.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[g.jsx(Qp,{className:`text-[20px] ${t}`}),g.jsx("div",{children:e??""})]}),g.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>g.jsxs("div",{className:"flex justify-between text-[14px]",children:[g.jsx("div",{children:o??""}),g.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return g.jsx(Kj,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function $de({data:e}){const t=e&&Object.keys(e).length?e:pk,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):pk.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return g.jsx(Ae,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:g.jsx(Qp,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col mt-2",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),g.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),g.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),g.jsx(hk,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),g.jsx(hk,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),g.jsx("div",{className:"w-full h-[179px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(bx,{data:i??[],children:[g.jsx(Hr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),g.jsx(xr,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),g.jsx(nr,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(on,{}),g.jsx(Wo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),g.jsx(Wo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const rr=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return g.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[t&&g.jsx("div",{className:c,children:t}),g.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&g.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[g.jsx(_de,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),g.jsx(WR,{size:16,className:"cursor-pointer",onClick:p}),g.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),g.jsx(zR,{size:16,className:"cursor-pointer",onClick:m})]})]}),g.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&g.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})},Bde=({color:e})=>g.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),Wde=({active:e,payload:t})=>!e||!t||!t.length?null:g.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>g.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[g.jsx(Bde,{color:n.color}),n.name,": ",g.jsx("div",{className:"font-semibold",children:n.value})]},r))});function zde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return g.jsx(rr,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[g.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),g.jsx("div",{className:"h-[184px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Wde,{}),wrapperStyle:{zIndex:9999}})]})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),g.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),g.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function VR({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return g.jsx(rr,{className:n,title:e,titleWeight:"semi-bold",children:g.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[g.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[g.jsx("div",{children:"Point"}),g.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>g.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),g.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function Vde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return g.jsx(rr,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"8 8",vertical:!1}),g.jsx(ux,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(nr,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"value",barSize:60,children:n.map((o,a)=>g.jsx(Vt,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}const Hde=({active:e,payload:t})=>e&&t&&t.length?g.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{children:t[0].payload.name}),g.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,Yde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return g.jsx("g",{transform:`translate(${e},${t})`,children:g.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>g.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function Ude({data:e=[]}){const t=e&&e.length>0,n=t?e.map(i=>({name:i.category_name,value:i.total_complaints})):[{name:"No Data Found",value:0}],r=Math.max(...n.map(i=>i.value),0);return g.jsx(rr,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:g.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,layout:"vertical",children:[g.jsx(Hr,{strokeDasharray:"3 3",horizontal:!1}),g.jsx(xr,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:g.jsx(Yde,{})}),g.jsx(on,{content:g.jsx(Hde,{}),cursor:{fill:"transparent"}}),g.jsx(Nn,{dataKey:"value",barSize:36,children:n.map((i,o)=>g.jsx(Vt,{fill:t&&i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}function Kde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const s=i?.trim().startsWith("-")?"#DC2626":"#16A34A";return g.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[e&&g.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(e,{className:"h-[20px] w-[20px]"})}),g.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),g.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&g.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&g.jsx("div",{className:"text-[12px] leading-[16px] font-medium",style:{color:s},children:i}),o&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const qde=[{day:"01 Feb",visitors:1250},{day:"02 Feb",visitors:1e3},{day:"03 Feb",visitors:1250},{day:"04 Feb",visitors:1050},{day:"05 Feb",visitors:900},{day:"06 Feb",visitors:1020},{day:"07 Feb",visitors:800}],Gde=()=>{const[e,t]=k.useState(new Date),[n,r]=k.useState(!1),o=(u=>{const d=new Date(u||new Date);return d?.setDate?.((d?.getDate?.()||0)-6),d})(e),a=u=>{try{return u?.toLocaleDateString?.("en-GB",{day:"2-digit",month:"short"})||""}catch{return""}},s=()=>{const u=new Date(e||new Date);u?.setDate?.((u?.getDate?.()||0)-7),t(u)},l=()=>{const u=new Date(e||new Date);u?.setDate?.((u?.getDate?.()||0)+7),t(u)},c=()=>{r(u=>!u)};return g.jsxs(rr,{title:"Weekly Visitor Pattern",period:`${a(o)} - ${a(e)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:s,onNextClick:l,onCalendarClick:c,children:[n&&g.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:g.jsx(BC,{selected:e||new Date,onChange:u=>{t(u||new Date),r(!1)},inline:!0})}),g.jsx("div",{className:"w-full h-[260px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(sne,{data:qde||[],margin:{top:10,right:10,left:0,bottom:0},children:[g.jsx("defs",{children:g.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),g.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,domain:[0,1800],ticks:[0,200,400,600,800,1e3,1200,1400,1600,1800]}),g.jsx(on,{}),g.jsx(kN,{type:"monotone",dataKey:"visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Xde=[{name:"Google",visitors:1e3},{name:"Uber",visitors:3500},{name:"ANAROCK",visitors:2e3},{name:"Flipkart",visitors:8e3},{name:"HP",visitors:1650}],Qde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Xde:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.visitors)||0;o>r&&(r=o)}return g.jsx(rr,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,tickFormatter:i=>i===0?"0":`${(i||0)/1e3}K`}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"visitors",maxBarSize:55,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function Zde({data:e}){return g.jsx("div",{className:"h-full",children:e.map((t,n)=>{const i=parseFloat(t.delta)>0;return g.jsx(Ae,{iconClassName:"!gap-[8px]",title:g.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:g.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),g.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[g.jsx("div",{style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:t.delta}),g.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Jde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],efe=({x:e,y:t,payload:n})=>g.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:g.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function tfe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Jde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return g.jsx(Ae,{title:"Bookings",icon:g.jsx(Ade,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[g.jsx(xr,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:g.jsx(efe,{})}),g.jsx(Nn,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const nfe=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function rfe({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?nfe:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return g.jsx(rr,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),g.jsx(xr,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(nr,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`₹ ${i??0}`}),g.jsx(Nn,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const ife=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],zd=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function ofe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??ife,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return g.jsx(rr,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?g.jsx("div",{className:"col-span-12 flex items-center justify-center h-full",children:g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"})}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-span-5 h-[240px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>g.jsx(Vt,{fill:zd?.[l%zd?.length]},`cell-${l}`))}),g.jsx(on,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),g.jsx("div",{className:"col-span-7",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[g.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[g.jsx("div",{children:"Amenity"}),g.jsx("div",{className:"text-right",children:"Revenue"})]}),g.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>g.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:zd?.[l%zd?.length]}}),g.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),g.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Vd=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],afe=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],sfe=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})):afe.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[240px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsxs("div",{className:"flex items-center justify-between gap-8",children:[g.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsx(_o,{children:g.jsx(Mi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>g.jsx(Vt,{fill:i.color},o))})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[g.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),g.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),g.jsx("div",{className:"flex-1 max-w-[280px]",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),g.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),g.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},lfe=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[260px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?g.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1}),g.jsx(xr,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(nr,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),g.jsx(fh,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>g.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px"},children:a}),wrapperStyle:{paddingTop:"18px"}}),g.jsx(Nn,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),g.jsx(Nn,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),g.jsx(Nn,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),g.jsx(Nn,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),g.jsx(Nn,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})},ec=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function cfe(){const t=ec.find(n=>n.name==="Completed")?.value||0;return g.jsx(rr,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:ec,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:ec.map((n,r)=>g.jsx(Vt,{fill:n.color},`cell-${r}`))}),g.jsx(on,{formatter:n=>n.toLocaleString()})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),g.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex flex-col w-full text-[14px]",children:ec.map((n,r)=>g.jsxs("div",{className:`flex items-center justify-between py-[10px] ${r!==ec.length-1?"border-b border-[#F1F5F9]":""}`,children:[g.jsxs("div",{className:"flex items-center gap-[10px]",children:[g.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:n.color}}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}function ufe(){return g.jsx(rr,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[g.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),g.jsxs("div",{className:"mt-4 ",children:[g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000]",children:g.jsx("div",{children:"4 - Danger"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] ",children:g.jsx("div",{children:"3 - High"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] ",children:g.jsx("div",{children:"1 - Low"})})]})]})]})})}function dfe({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%",color:"bg-green-100 text-green-600"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"25%",color:"bg-blue-100 text-blue-600"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return g.jsxs("div",{className:"w-full bg-white rounded-xl shadow-md overflow-hidden",children:[g.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>g.jsx("div",{className:"px-6 py-4",children:p.label},m))}),f.length>0?f.map((p,m)=>g.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,v)=>g.jsx("div",{className:"px-6 py-4 bg-gray-50",children:h.key==="f"?g.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-semibold ${p.color||""}`,children:p[h.key]||"-"}):p[h.key]||"-"},v))},m)):g.jsx("div",{className:"p-6 text-center text-gray-500",children:"No Data Available"}),g.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[g.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[g.jsx("span",{children:"Rows per page:"}),g.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>g.jsx("option",{value:p,children:p},m))}),g.jsxs("span",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),g.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[g.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Pde,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(WR,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(zR,{size:18})}),g.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Cde,{size:18})})]})]})]})}exports.AccessPointsUsage=Vde;exports.Accounting=Eue;exports.Amenities=Rde;exports.AmenitiesStatsCard=Zde;exports.AmenityWiseRevenue=ofe;exports.AssetValueBreakdown=Aue;exports.AssetsByType=sfe;exports.BlockWiseOccupancy=wue;exports.BookingTrendChart=rfe;exports.Bookings=tfe;exports.Budgets=Pue;exports.Card=Ae;exports.CardAccess=VR;exports.CashBankBalance=kue;exports.CommercialAccessOverview=zde;exports.CommercialGuardPatrols=cfe;exports.CommercialIncidentReports=ufe;exports.CommercialOccupancy=pde;exports.CommercialReportTable=dfe;exports.Community=aoe;exports.Complaints=Yue;exports.ComplaintsByLevel=Xue;exports.DuesAgeing=Cue;exports.EmployeeFootfall=Nde;exports.Engagement=soe;exports.EngagementStatsGrid=fde;exports.EventsUtilisation=ade;exports.ExpenseCategories=Due;exports.Facilities=loe;exports.FinanceSummary=coe;exports.FoodBeverages=jde;exports.GateAndSecurityStatsGrid=zue;exports.GateUpdates=qoe;exports.GuardPatrols=Iue;exports.Header=p3;exports.Helpdesk=Goe;exports.HelpdeskStatsGrid=ode;exports.HourlyTrafficFlow=Fue;exports.IncidentReports=Lue;exports.IncomeExpenditure=LR;exports.MainHeader=k3;exports.MaintenanceStatus=lfe;exports.MetricCard=Kde;exports.MobileAccess=VR;exports.MoveInOutTrends=Sue;exports.NoticeBoardStatus=sde;exports.OccupancyOverview=yue;exports.OrganisationWiseVisitors=Qde;exports.RequestBox=Zue;exports.ResidentOverview=xue;exports.RevenuebyCategory=Tue;exports.SingleStats=cde;exports.StaffAttendance=$ue;exports.StatsGrid=Rue;exports.TicketEscalation=Ide;exports.TicketStatus=Lde;exports.Tickets=FR;exports.TicketsperCategory=Ude;exports.UnitStatus=FR;exports.VisitorUpdates=$de;exports.WeeklyVisitorPattern=Gde;
|
|
362
|
+
*/const Tde=[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]],Mde=aa("waves-ladder",Tde);$n.register(Oo,Eo,El,Yr);const Nde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return g.jsxs(Ae,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:g.jsx(xde,{className:"!text-[24px] text-[#8B5CF6]"}),children:[g.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),g.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),g.jsx("div",{className:"h-[110px]",children:g.jsx(Pl,{data:t,options:n})})]})};function jde(){return g.jsx(Ae,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:g.jsx(C5,{className:"!text-[24px] text-[#FA7E28]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),g.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[g.jsx(VC,{}),8,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsxs("div",{className:"mt-[16px]",children:[g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[g.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),g.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Rde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return g.jsx(Ae,{className:"h-[324px]",title:"Amenities",period:"Today",icon:g.jsx(Mde,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&g.jsxs("div",{children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),g.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&g.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?g.jsx(VC,{}):g.jsx(w3,{}),u,"%",g.jsx("span",{children:"from last month"})]})]})]}),g.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>g.jsxs("div",{className:"mb-[16px]",children:[g.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),g.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[g.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&g.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),g.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:g.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):g.jsx("div",{className:"flex items-center justify-center h-[120px]",children:g.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}$n.register(Oo,Eo,El,Yr,Jr);function Ide({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[],l=[];for(let d=0;d<n.length;d++)r.push(n[d].level),i.push(Number(n[d].open)),o.push(Number(n[d].in_progress)),a.push(Number(n[d].on_hold)),s.push(Number(n[d].closed)),l.push(Number(n[d].cancelled));const c={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Closed",data:s,backgroundColor:"#10B981",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:l,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},u={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:d=>Math.round(d)}}}};return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:g.jsx(D3,{className:"!text-[24px] text-[#3C81F6]"}),children:g.jsx("div",{className:"h-full",children:g.jsx(Pl,{data:c,options:u})})})}const Fde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return g.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:g.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[g.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),g.jsx("div",{children:n.name}),g.jsx("div",{className:"ml-2",children:n.value})]})})};function Lde({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return g.jsx(Ae,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:g.jsx(Dv,{className:"!text-[24px] text-[#EF4444]"}),children:g.jsxs("div",{className:"flex h-full items-center gap-4",children:[g.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Fde,{}),wrapperStyle:{zIndex:1e3}})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[g.jsx("div",{children:r(n.completed)}),g.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),g.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>g.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),g.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const pk={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function hk({title:e,color:t,rows:n=[],children:r}){const i=g.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[g.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[g.jsx(Qp,{className:`text-[20px] ${t}`}),g.jsx("div",{children:e??""})]}),g.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>g.jsxs("div",{className:"flex justify-between text-[14px]",children:[g.jsx("div",{children:o??""}),g.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return g.jsx(Kj,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function $de({data:e}){const t=e&&Object.keys(e).length?e:pk,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):pk.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return g.jsx(Ae,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:g.jsx(Qp,{className:"!text-[24px] text-[#8B5CF6]"}),children:g.jsxs("div",{className:"flex flex-col mt-2",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),g.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),g.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),g.jsx(hk,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),g.jsxs("div",{className:"mt-2",children:[g.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),g.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[g.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),g.jsx(hk,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:g.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),g.jsx("div",{className:"w-full h-[179px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(bx,{data:i??[],children:[g.jsx(Hr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),g.jsx(xr,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),g.jsx(nr,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(on,{}),g.jsx(Wo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),g.jsx(Wo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const rr=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return g.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[t&&g.jsx("div",{className:c,children:t}),g.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&g.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[g.jsx(_de,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),g.jsx(WR,{size:16,className:"cursor-pointer",onClick:p}),g.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),g.jsx(zR,{size:16,className:"cursor-pointer",onClick:m})]})]}),g.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&g.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})},Bde=({color:e})=>g.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),Wde=({active:e,payload:t})=>!e||!t||!t.length?null:g.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>g.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[g.jsx(Bde,{color:n.color}),n.name,": ",g.jsx("div",{className:"font-semibold",children:n.value})]},r))});function zde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return g.jsx(rr,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[g.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),g.jsx("div",{className:"h-[184px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>g.jsx(Vt,{fill:a.color},s))}),g.jsx(on,{content:g.jsx(Wde,{}),wrapperStyle:{zIndex:9999}})]})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),g.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),g.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function VR({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return g.jsx(rr,{className:n,title:e,titleWeight:"semi-bold",children:g.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[g.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[g.jsx("div",{children:"Point"}),g.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>g.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),g.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function Vde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return g.jsx(rr,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"8 8",vertical:!1}),g.jsx(ux,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(nr,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"value",barSize:60,children:n.map((o,a)=>g.jsx(Vt,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}const Hde=({active:e,payload:t})=>e&&t&&t.length?g.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{children:t[0].payload.name}),g.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,Yde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return g.jsx("g",{transform:`translate(${e},${t})`,children:g.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>g.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function Ude({data:e=[]}){const t=e&&e.length>0,n=t?e.map(i=>({name:i.category_name,value:i.total_complaints})):[{name:"No Data Found",value:0}],r=Math.max(...n.map(i=>i.value),0);return g.jsx(rr,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:g.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n,layout:"vertical",children:[g.jsx(Hr,{strokeDasharray:"3 3",horizontal:!1}),g.jsx(xr,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:g.jsx(Yde,{})}),g.jsx(on,{content:g.jsx(Hde,{}),cursor:{fill:"transparent"}}),g.jsx(Nn,{dataKey:"value",barSize:36,children:n.map((i,o)=>g.jsx(Vt,{fill:t&&i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}function Kde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const s=i?.trim().startsWith("-")?"#DC2626":"#16A34A";return g.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[e&&g.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(e,{className:"h-[20px] w-[20px]"})}),g.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),g.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&g.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&g.jsx("div",{className:"text-[12px] leading-[16px] font-medium",style:{color:s},children:i}),o&&g.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const qde=[{day:"01 Feb",visitors:1250},{day:"02 Feb",visitors:1e3},{day:"03 Feb",visitors:1250},{day:"04 Feb",visitors:1050},{day:"05 Feb",visitors:900},{day:"06 Feb",visitors:1020},{day:"07 Feb",visitors:800}],Gde=()=>{const[e,t]=k.useState(new Date),[n,r]=k.useState(!1),o=(u=>{const d=new Date(u||new Date);return d?.setDate?.((d?.getDate?.()||0)-6),d})(e),a=u=>{try{return u?.toLocaleDateString?.("en-GB",{day:"2-digit",month:"short"})||""}catch{return""}},s=()=>{const u=new Date(e);if(u.setDate(u.getDate()-7),t(u),onDateChange){const d=new Date(u);d.setDate(d.getDate()-6),onDateChange(d.toISOString(),u.toISOString())}},l=()=>{const u=new Date(e);if(u.setDate(u.getDate()+7),t(u),onDateChange){const d=new Date(u);d.setDate(d.getDate()-6),onDateChange(d.toISOString(),u.toISOString())}},c=()=>{r(u=>!u)};return g.jsxs(rr,{title:"Weekly Visitor Pattern",period:`${a(o)} - ${a(e)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:s,onNextClick:l,onCalendarClick:c,children:[n&&g.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:g.jsx(BC,{selected:e||new Date,onChange:u=>{if(t(u),onDateChange){const d=u,f=new Date(u);f.setDate(f.getDate()-6),onDateChange(f.toISOString(),d.toISOString())}r(!1)},inline:!0})}),g.jsx("div",{className:"w-full h-[260px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(sne,{data:qde||[],margin:{top:10,right:10,left:0,bottom:0},children:[g.jsx("defs",{children:g.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),g.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,domain:[0,1800],ticks:[0,200,400,600,800,1e3,1200,1400,1600,1800]}),g.jsx(on,{}),g.jsx(kN,{type:"monotone",dataKey:"visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Xde=[{name:"Google",visitors:1e3},{name:"Uber",visitors:3500},{name:"ANAROCK",visitors:2e3},{name:"Flipkart",visitors:8e3},{name:"HP",visitors:1650}],Qde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Xde:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.visitors)||0;o>r&&(r=o)}return g.jsx(rr,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),g.jsx(xr,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),g.jsx(nr,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,tickFormatter:i=>i===0?"0":`${(i||0)/1e3}K`}),g.jsx(on,{cursor:!1}),g.jsx(Nn,{dataKey:"visitors",maxBarSize:55,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function Zde({data:e}){return g.jsx("div",{className:"h-full",children:e.map((t,n)=>{const i=parseFloat(t.delta)>0;return g.jsx(Ae,{iconClassName:"!gap-[8px]",title:g.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:g.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:g.jsxs("div",{children:[g.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),g.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[g.jsx("div",{style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:t.delta}),g.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Jde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],efe=({x:e,y:t,payload:n})=>g.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:g.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function tfe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Jde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return g.jsx(Ae,{title:"Bookings",icon:g.jsx(Ade,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[g.jsx(xr,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),g.jsx(nr,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:g.jsx(efe,{})}),g.jsx(Nn,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const nfe=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function rfe({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?nfe:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return g.jsx(rr,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),g.jsx(xr,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),g.jsx(nr,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`₹ ${i??0}`}),g.jsx(Nn,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>g.jsx(Vt,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const ife=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],zd=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function ofe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??ife,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return g.jsx(rr,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:g.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?g.jsx("div",{className:"col-span-12 flex items-center justify-center h-full",children:g.jsx("p",{className:"text-sm text-gray-500",children:"No Data Found"})}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-span-5 h-[240px]",children:g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>g.jsx(Vt,{fill:zd?.[l%zd?.length]},`cell-${l}`))}),g.jsx(on,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),g.jsx("div",{className:"col-span-7",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[g.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[g.jsx("div",{children:"Amenity"}),g.jsx("div",{className:"text-right",children:"Revenue"})]}),g.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>g.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:zd?.[l%zd?.length]}}),g.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),g.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Vd=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],afe=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],sfe=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})):afe.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[240px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:g.jsxs("div",{className:"flex items-center justify-between gap-8",children:[g.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsx(_o,{children:g.jsx(Mi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>g.jsx(Vt,{fill:i.color},o))})})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[g.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),g.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),g.jsx("div",{className:"flex-1 max-w-[280px]",children:g.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),g.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),g.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),g.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},lfe=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"flex items-center justify-center h-[260px] text-[#94A3B8]",children:"No Data Found"})}):g.jsx(rr,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:g.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?g.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(ra,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[g.jsx(Hr,{strokeDasharray:"3 3",vertical:!1}),g.jsx(xr,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(nr,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),g.jsx(on,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),g.jsx(fh,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>g.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px"},children:a}),wrapperStyle:{paddingTop:"18px"}}),g.jsx(Nn,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),g.jsx(Nn,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),g.jsx(Nn,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),g.jsx(Nn,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),g.jsx(Nn,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})},ec=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function cfe(){const t=ec.find(n=>n.name==="Completed")?.value||0;return g.jsx(rr,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{className:"flex flex-col items-center justify-center",children:[g.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[g.jsx(Lt,{width:"100%",height:"100%",children:g.jsxs(_o,{children:[g.jsx(Mi,{data:ec,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:ec.map((n,r)=>g.jsx(Vt,{fill:n.color},`cell-${r}`))}),g.jsx(on,{formatter:n=>n.toLocaleString()})]})}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[g.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),g.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),g.jsx("div",{className:"flex flex-col w-full text-[14px]",children:ec.map((n,r)=>g.jsxs("div",{className:`flex items-center justify-between py-[10px] ${r!==ec.length-1?"border-b border-[#F1F5F9]":""}`,children:[g.jsxs("div",{className:"flex items-center gap-[10px]",children:[g.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:n.color}}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),g.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}function ufe(){return g.jsx(rr,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[g.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),g.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[g.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),g.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),g.jsxs("div",{className:"mt-4 ",children:[g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000]",children:g.jsx("div",{children:"4 - Danger"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] ",children:g.jsx("div",{children:"3 - High"})})]}),g.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[g.jsx("div",{className:"flex items-center gap-[8px]",children:g.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})}),g.jsx("div",{className:"!text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] ",children:g.jsx("div",{children:"1 - Low"})})]})]})]})})}function dfe({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%",color:"bg-green-100 text-green-600"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"25%",color:"bg-blue-100 text-blue-600"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return g.jsxs("div",{className:"w-full bg-white rounded-xl shadow-md overflow-hidden",children:[g.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>g.jsx("div",{className:"px-6 py-4",children:p.label},m))}),f.length>0?f.map((p,m)=>g.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,v)=>g.jsx("div",{className:"px-6 py-4 bg-gray-50",children:h.key==="f"?g.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-semibold ${p.color||""}`,children:p[h.key]||"-"}):p[h.key]||"-"},v))},m)):g.jsx("div",{className:"p-6 text-center text-gray-500",children:"No Data Available"}),g.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[g.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[g.jsx("span",{children:"Rows per page:"}),g.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>g.jsx("option",{value:p,children:p},m))}),g.jsxs("span",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),g.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[g.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Pde,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(WR,{size:18})}),g.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(zR,{size:18})}),g.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:g.jsx(Cde,{size:18})})]})]})]})}exports.AccessPointsUsage=Vde;exports.Accounting=Eue;exports.Amenities=Rde;exports.AmenitiesStatsCard=Zde;exports.AmenityWiseRevenue=ofe;exports.AssetValueBreakdown=Aue;exports.AssetsByType=sfe;exports.BlockWiseOccupancy=wue;exports.BookingTrendChart=rfe;exports.Bookings=tfe;exports.Budgets=Pue;exports.Card=Ae;exports.CardAccess=VR;exports.CashBankBalance=kue;exports.CommercialAccessOverview=zde;exports.CommercialGuardPatrols=cfe;exports.CommercialIncidentReports=ufe;exports.CommercialOccupancy=pde;exports.CommercialReportTable=dfe;exports.Community=aoe;exports.Complaints=Yue;exports.ComplaintsByLevel=Xue;exports.DuesAgeing=Cue;exports.EmployeeFootfall=Nde;exports.Engagement=soe;exports.EngagementStatsGrid=fde;exports.EventsUtilisation=ade;exports.ExpenseCategories=Due;exports.Facilities=loe;exports.FinanceSummary=coe;exports.FoodBeverages=jde;exports.GateAndSecurityStatsGrid=zue;exports.GateUpdates=qoe;exports.GuardPatrols=Iue;exports.Header=p3;exports.Helpdesk=Goe;exports.HelpdeskStatsGrid=ode;exports.HourlyTrafficFlow=Fue;exports.IncidentReports=Lue;exports.IncomeExpenditure=LR;exports.MainHeader=k3;exports.MaintenanceStatus=lfe;exports.MetricCard=Kde;exports.MobileAccess=VR;exports.MoveInOutTrends=Sue;exports.NoticeBoardStatus=sde;exports.OccupancyOverview=yue;exports.OrganisationWiseVisitors=Qde;exports.RequestBox=Zue;exports.ResidentOverview=xue;exports.RevenuebyCategory=Tue;exports.SingleStats=cde;exports.StaffAttendance=$ue;exports.StatsGrid=Rue;exports.TicketEscalation=Ide;exports.TicketStatus=Lde;exports.Tickets=FR;exports.TicketsperCategory=Ude;exports.UnitStatus=FR;exports.VisitorUpdates=$de;exports.WeeklyVisitorPattern=Gde;
|
package/dist/index.es.js
CHANGED
|
@@ -53273,11 +53273,17 @@ const bde = [
|
|
|
53273
53273
|
return "";
|
|
53274
53274
|
}
|
|
53275
53275
|
}, s = () => {
|
|
53276
|
-
const u = new Date(e
|
|
53277
|
-
u
|
|
53276
|
+
const u = new Date(e);
|
|
53277
|
+
if (u.setDate(u.getDate() - 7), t(u), onDateChange) {
|
|
53278
|
+
const d = new Date(u);
|
|
53279
|
+
d.setDate(d.getDate() - 6), onDateChange(d.toISOString(), u.toISOString());
|
|
53280
|
+
}
|
|
53278
53281
|
}, l = () => {
|
|
53279
|
-
const u = new Date(e
|
|
53280
|
-
u
|
|
53282
|
+
const u = new Date(e);
|
|
53283
|
+
if (u.setDate(u.getDate() + 7), t(u), onDateChange) {
|
|
53284
|
+
const d = new Date(u);
|
|
53285
|
+
d.setDate(d.getDate() - 6), onDateChange(d.toISOString(), u.toISOString());
|
|
53286
|
+
}
|
|
53281
53287
|
}, c = () => {
|
|
53282
53288
|
r((u) => !u);
|
|
53283
53289
|
};
|
|
@@ -53299,7 +53305,14 @@ const bde = [
|
|
|
53299
53305
|
{
|
|
53300
53306
|
selected: e || /* @__PURE__ */ new Date(),
|
|
53301
53307
|
onChange: (u) => {
|
|
53302
|
-
t(u
|
|
53308
|
+
if (t(u), onDateChange) {
|
|
53309
|
+
const d = u, f = new Date(u);
|
|
53310
|
+
f.setDate(f.getDate() - 6), onDateChange(
|
|
53311
|
+
f.toISOString(),
|
|
53312
|
+
d.toISOString()
|
|
53313
|
+
);
|
|
53314
|
+
}
|
|
53315
|
+
r(!1);
|
|
53303
53316
|
},
|
|
53304
53317
|
inline: !0
|
|
53305
53318
|
}
|