anarock-widgets 1.0.350 → 1.0.351

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 CHANGED
@@ -262,7 +262,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
262
262
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
263
263
 
264
264
  `,`1) content: element.innerHTML
265
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&kae(c,r);return u&&l.push(u),l},[]);return au(e)?s[0]:s}Xu.defaultProps=xr;Xu.setDefaultProps=Sae;Xu.currentInput=yi;Object.assign({},Gx,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});Xu.setDefaultProps({render:kR});function DR(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var AR=typeof window<"u"&&typeof document<"u";function nb(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function yC(){return AR&&document.createElement("div")}function Dae(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function TR(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!TR(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Aae(e){var t=[];return e.forEach(function(n){t.find(function(r){return TR(n,r)})||t.push(n)}),t}function Tae(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Aae([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var vv=AR?P.useLayoutEffect:P.useEffect;function Mae(e){var t=P.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function bC(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Nae={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}bC(n,"add",t.props.className)}function o(){r()&&bC(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function jae(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=DR(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,g=a!==void 0,v=P.useState(!1),x=v[0],_=v[1],w=P.useState({}),y=w[0],E=w[1],S=P.useState(),k=S[0],D=S[1],T=Mae(function(){return{container:yC(),renders:1}}),R=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){R[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),R.trigger="manual",R.hideOnClick=!1),g&&(u=!0);var A=R,C=R.plugins||[];s&&(A=Object.assign({},R,{plugins:g&&a.data!=null?[].concat(C,[{fn:function(){return{onTrigger:function($,B){var z=a.data.children.find(function(V){var W=V.instance;return W.reference===B.currentTarget});$.state.$$activeSingletonInstance=z.instance,D(z.content)}}}}]):C,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return vv(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var j=e(M||T.ref||yC(),Object.assign({},A,{plugins:[Nae].concat(R.plugins||[])}));return T.instance=j,u&&j.disable(),o&&j.show(),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D}),_(!0),function(){j.destroy(),a?.cleanup(j)}},N),vv(function(){var M;if(T.renders===1){T.renders++;return}var j=T.instance;j.setProps(Tae(j.props,A)),(M=j.popperInstance)==null||M.forceUpdate(),u?j.disable():j.enable(),m&&(o?j.show():j.hide()),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D})}),vv(function(){var M;if(s){var j=T.instance;j.setProps({popperOptions:Object.assign({},j.props.popperOptions,{modifiers:[].concat((((M=j.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function($){var B=$.name;return B!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(B){var z,V=B.state,W=(z=V.modifiersData)==null?void 0:z.hide;(y.placement!==V.placement||y.referenceHidden!==W?.isReferenceHidden||y.escaped!==W?.hasPopperEscaped)&&E({placement:V.placement,referenceHidden:W?.isReferenceHidden,escaped:W?.hasPopperEscaped}),V.attributes.popper={}}}])})})}},[y.placement,y.referenceHidden,y.escaped].concat(N)),P.createElement(P.Fragment,null,r?P.cloneElement(r,{ref:function(j){T.ref=j,nb(r.ref,j)}}):null,x&&_i.createPortal(s?s(Dae(y),k,T.instance):i,T.container))}return t}var Rae=(function(e,t){return P.forwardRef(function(r,i){var o=r.children,a=DR(r,["children"]);return P.createElement(e,Object.assign({},t,a),o?P.cloneElement(o,{ref:function(l){nb(i,l),nb(o.ref,l)}}):null)})}),Iae=Rae(jae(Xu));const dr=({children:e,active:t,payload:n,coordinate:r,data:i,offsetY:o=40})=>!t||!n?.length?null:h.jsx("div",{style:{position:"absolute",transform:`translate(${r.x}px, ${r.y}px)`,pointerEvents:"none",zIndex:99999},children:h.jsx(Iae,{content:e,visible:!0,placement:"right",offset:[0,5],arrow:!0,theme:"custom-black",children:h.jsx("div",{style:{width:0,height:0,background:"black"}})})});function Lae({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||t?.total_forum_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||t?.total_poll_detail||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||t?.total_survey_detail||0),color:r[3]}],o=t?.widget==="commercial";return h.jsx(ms,{title:"Engagement",period:"This Month",icon:h.jsx(MD,{className:"!text-[20px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} `,childrenClassName:`${o?"mt-[52px]":"mt-0"}`,actionButtons:!o&&h.jsx(Ll,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsx("div",{className:`w-full ${o?"h-[220px]":"h-[260px]"}`,children:h.jsx(Ot,{width:"100%",height:"100%",children:h.jsxs(No,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[h.jsx(ur,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),h.jsx(Ln,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),h.jsx(Un,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),h.jsx(Dt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0},allowEscapeViewBox:{x:!0,y:!0},content:a=>a.active?h.jsx(dr,{...a,data:i,children:h.jsx(oi,{...a})}):null}),h.jsx(Kt,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>h.jsx(In,{fill:r[s]},a.name))})]})})})})}function $ae({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=P.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return h.jsxs(ms,{title:"Facilities",period:"Today",icon:h.jsx(Vb,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:h.jsx(Ll,{widgetId:t?.widget_id,options:t?.communities}),children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),h.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),h.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),h.jsx("div",{className:"w-full h-[170px]",children:h.jsx(Ot,{width:"100%",height:"100%",children:h.jsxs(Yx,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[h.jsx(ur,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),h.jsx(Un,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),h.jsx(Ln,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Ln,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Dt,{content:h.jsx(hs,{})}),h.jsx(Qo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),h.jsx(Qo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function Fae({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return h.jsx(ms,{title:"Income",period:"This Month",icon:h.jsx(Qv,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:h.jsx(Ll,{widgetId:e?.widget_id,options:e?.communities}),children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Income"}),h.jsx("div",{children:"Collection"}),h.jsx("div",{children:"Closing"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-[8px]",children:[h.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),h.jsx("div",{children:a(t.income,t?.currency_type)}),h.jsx("div",{children:a(t.collection,t?.currency_type)}),h.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),h.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsx(Qv,{className:"!text-[24px] text-red-600"}),h.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Expenditure"}),h.jsx("div",{children:"Payment"}),h.jsx("div",{children:"Outstanding"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[h.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),h.jsx("div",{children:a(n.expenditure,n?.currency_type)}),h.jsx("div",{children:a(n.payment,n?.currency_type)}),h.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var Bae="tippy-content",Wae="tippy-backdrop",Vae="tippy-arrow",zae="tippy-svg-arrow",Ma={passive:!0,capture:!0},MR=function(){return document.body};function Hae(e,t){return{}.hasOwnProperty.call(e,t)}function yv(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function p1(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function NR(e,t){return typeof e=="function"?e.apply(void 0,t):e}function xC(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Yae(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function Uae(e){return e.split(/\s+/).filter(Boolean)}function $s(e){return[].concat(e)}function wC(e,t){e.indexOf(t)===-1&&e.push(t)}function Kae(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function qae(e){return e.split("-")[0]}function Tp(e){return[].slice.call(e)}function _C(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Gae(){return document.createElement("div")}function rb(e){return["Element","Fragment"].some(function(t){return p1(e,t)})}function Xae(e){return p1(e,"NodeList")}function Qae(e){return p1(e,"MouseEvent")}function Zae(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Jae(e){return rb(e)?[e]:Xae(e)?Tp(e):Array.isArray(e)?e:Tp(document.querySelectorAll(e))}function bv(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function EC(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function ese(e){var t,n=$s(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function tse(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=qae(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function xv(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function SC(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var bi={isTouch:!1},OC=0;function nse(){bi.isTouch||(bi.isTouch=!0,window.performance&&document.addEventListener("mousemove",jR))}function jR(){var e=performance.now();e-OC<20&&(bi.isTouch=!1,document.removeEventListener("mousemove",jR)),OC=e}function rse(){var e=document.activeElement;if(Zae(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function ise(){document.addEventListener("touchstart",nse,Ma),window.addEventListener("blur",rse)}var ose=typeof window<"u"&&typeof document<"u",ase=ose?!!window.msCrypto:!1;function Ts(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function CC(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function sse(e){return CC(`
265
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&kae(c,r);return u&&l.push(u),l},[]);return au(e)?s[0]:s}Xu.defaultProps=xr;Xu.setDefaultProps=Sae;Xu.currentInput=yi;Object.assign({},Gx,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});Xu.setDefaultProps({render:kR});function DR(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var AR=typeof window<"u"&&typeof document<"u";function nb(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function yC(){return AR&&document.createElement("div")}function Dae(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function TR(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!TR(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Aae(e){var t=[];return e.forEach(function(n){t.find(function(r){return TR(n,r)})||t.push(n)}),t}function Tae(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Aae([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var vv=AR?P.useLayoutEffect:P.useEffect;function Mae(e){var t=P.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function bC(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Nae={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}bC(n,"add",t.props.className)}function o(){r()&&bC(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function jae(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=DR(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,g=a!==void 0,v=P.useState(!1),x=v[0],_=v[1],w=P.useState({}),y=w[0],E=w[1],S=P.useState(),k=S[0],D=S[1],T=Mae(function(){return{container:yC(),renders:1}}),R=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){R[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),R.trigger="manual",R.hideOnClick=!1),g&&(u=!0);var A=R,C=R.plugins||[];s&&(A=Object.assign({},R,{plugins:g&&a.data!=null?[].concat(C,[{fn:function(){return{onTrigger:function($,B){var z=a.data.children.find(function(V){var W=V.instance;return W.reference===B.currentTarget});$.state.$$activeSingletonInstance=z.instance,D(z.content)}}}}]):C,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return vv(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var j=e(M||T.ref||yC(),Object.assign({},A,{plugins:[Nae].concat(R.plugins||[])}));return T.instance=j,u&&j.disable(),o&&j.show(),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D}),_(!0),function(){j.destroy(),a?.cleanup(j)}},N),vv(function(){var M;if(T.renders===1){T.renders++;return}var j=T.instance;j.setProps(Tae(j.props,A)),(M=j.popperInstance)==null||M.forceUpdate(),u?j.disable():j.enable(),m&&(o?j.show():j.hide()),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D})}),vv(function(){var M;if(s){var j=T.instance;j.setProps({popperOptions:Object.assign({},j.props.popperOptions,{modifiers:[].concat((((M=j.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function($){var B=$.name;return B!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(B){var z,V=B.state,W=(z=V.modifiersData)==null?void 0:z.hide;(y.placement!==V.placement||y.referenceHidden!==W?.isReferenceHidden||y.escaped!==W?.hasPopperEscaped)&&E({placement:V.placement,referenceHidden:W?.isReferenceHidden,escaped:W?.hasPopperEscaped}),V.attributes.popper={}}}])})})}},[y.placement,y.referenceHidden,y.escaped].concat(N)),P.createElement(P.Fragment,null,r?P.cloneElement(r,{ref:function(j){T.ref=j,nb(r.ref,j)}}):null,x&&_i.createPortal(s?s(Dae(y),k,T.instance):i,T.container))}return t}var Rae=(function(e,t){return P.forwardRef(function(r,i){var o=r.children,a=DR(r,["children"]);return P.createElement(e,Object.assign({},t,a),o?P.cloneElement(o,{ref:function(l){nb(i,l),nb(o.ref,l)}}):null)})}),Iae=Rae(jae(Xu));const dr=({children:e,active:t,payload:n,coordinate:r,data:i,offsetY:o=40})=>!t||!n?.length?null:h.jsx("div",{style:{position:"absolute",transform:`translate(${r.x}px, ${r.y}px)`,pointerEvents:"none",zIndex:99999},children:h.jsx(Iae,{content:e,visible:!0,placement:"right",offset:[0,5],arrow:!0,theme:"custom-black",children:h.jsx("div",{style:{width:0,height:0,background:"black"}})})});function Lae({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),fill:r[0]},{name:"Post",value:Number(t?.total_topics||t?.total_forum_topics||0),fill:r[1]},{name:"Poll",value:Number(t?.total_polls||t?.total_poll_detail||0),fill:r[2]},{name:"Survey",value:Number(t?.total_surveys||t?.total_survey_detail||0),fill:r[3]}],o=t?.widget==="commercial";return h.jsx(ms,{title:"Engagement",period:"This Month",icon:h.jsx(MD,{className:"!text-[20px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} `,childrenClassName:`${o?"mt-[52px]":"mt-0"}`,actionButtons:!o&&h.jsx(Ll,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsx("div",{className:`w-full ${o?"h-[220px]":"h-[260px]"}`,children:h.jsx(Ot,{width:"100%",height:"100%",children:h.jsxs(No,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[h.jsx(ur,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),h.jsx(Ln,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),h.jsx(Un,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),h.jsx(Dt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0},allowEscapeViewBox:{x:!0,y:!0},content:a=>a.active?h.jsx(dr,{...a,data:i,children:h.jsx(oi,{...a})}):null}),h.jsx(Kt,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>h.jsx(In,{fill:r[s],dataKey:"value"},a.name))})]})})})})}function $ae({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=P.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return h.jsxs(ms,{title:"Facilities",period:"Today",icon:h.jsx(Vb,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:h.jsx(Ll,{widgetId:t?.widget_id,options:t?.communities}),children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),h.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),h.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),h.jsx("div",{className:"w-full h-[170px]",children:h.jsx(Ot,{width:"100%",height:"100%",children:h.jsxs(Yx,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[h.jsx(ur,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),h.jsx(Un,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),h.jsx(Ln,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Ln,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Dt,{content:h.jsx(hs,{})}),h.jsx(Qo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),h.jsx(Qo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function Fae({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return h.jsx(ms,{title:"Income",period:"This Month",icon:h.jsx(Qv,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:h.jsx(Ll,{widgetId:e?.widget_id,options:e?.communities}),children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Income"}),h.jsx("div",{children:"Collection"}),h.jsx("div",{children:"Closing"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-[8px]",children:[h.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),h.jsx("div",{children:a(t.income,t?.currency_type)}),h.jsx("div",{children:a(t.collection,t?.currency_type)}),h.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),h.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsx(Qv,{className:"!text-[24px] text-red-600"}),h.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Expenditure"}),h.jsx("div",{children:"Payment"}),h.jsx("div",{children:"Outstanding"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[h.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),h.jsx("div",{children:a(n.expenditure,n?.currency_type)}),h.jsx("div",{children:a(n.payment,n?.currency_type)}),h.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var Bae="tippy-content",Wae="tippy-backdrop",Vae="tippy-arrow",zae="tippy-svg-arrow",Ma={passive:!0,capture:!0},MR=function(){return document.body};function Hae(e,t){return{}.hasOwnProperty.call(e,t)}function yv(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function p1(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function NR(e,t){return typeof e=="function"?e.apply(void 0,t):e}function xC(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Yae(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function Uae(e){return e.split(/\s+/).filter(Boolean)}function $s(e){return[].concat(e)}function wC(e,t){e.indexOf(t)===-1&&e.push(t)}function Kae(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function qae(e){return e.split("-")[0]}function Tp(e){return[].slice.call(e)}function _C(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Gae(){return document.createElement("div")}function rb(e){return["Element","Fragment"].some(function(t){return p1(e,t)})}function Xae(e){return p1(e,"NodeList")}function Qae(e){return p1(e,"MouseEvent")}function Zae(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Jae(e){return rb(e)?[e]:Xae(e)?Tp(e):Array.isArray(e)?e:Tp(document.querySelectorAll(e))}function bv(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function EC(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function ese(e){var t,n=$s(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function tse(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=qae(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function xv(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function SC(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var bi={isTouch:!1},OC=0;function nse(){bi.isTouch||(bi.isTouch=!0,window.performance&&document.addEventListener("mousemove",jR))}function jR(){var e=performance.now();e-OC<20&&(bi.isTouch=!1,document.removeEventListener("mousemove",jR)),OC=e}function rse(){var e=document.activeElement;if(Zae(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function ise(){document.addEventListener("touchstart",nse,Ma),window.addEventListener("blur",rse)}var ose=typeof window<"u"&&typeof document<"u",ase=ose?!!window.msCrypto:!1;function Ts(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function CC(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function sse(e){return CC(`
266
266
  %ctippy.js
267
267
 
268
268
  %c`+CC(e)+`
package/dist/index.es.js CHANGED
@@ -41690,22 +41690,22 @@ function ohe({ isStatic: e, data: t, communities: n }) {
41690
41690
  {
41691
41691
  name: "Notice",
41692
41692
  value: Number(t?.total_notices || 0),
41693
- color: r[0]
41693
+ fill: r[0]
41694
41694
  },
41695
41695
  {
41696
41696
  name: "Post",
41697
41697
  value: Number(t?.total_topics || t?.total_forum_topics || 0),
41698
- color: r[1]
41698
+ fill: r[1]
41699
41699
  },
41700
41700
  {
41701
41701
  name: "Poll",
41702
41702
  value: Number(t?.total_polls || t?.total_poll_detail || 0),
41703
- color: r[2]
41703
+ fill: r[2]
41704
41704
  },
41705
41705
  {
41706
41706
  name: "Survey",
41707
41707
  value: Number(t?.total_surveys || t?.total_survey_detail || 0),
41708
- color: r[3]
41708
+ fill: r[3]
41709
41709
  }
41710
41710
  ], o = t?.widget === "commercial";
41711
41711
  return /* @__PURE__ */ h.jsx(
@@ -41779,7 +41779,14 @@ function ohe({ isStatic: e, data: t, communities: n }) {
41779
41779
  content: (a) => a.active ? /* @__PURE__ */ h.jsx(yr, { ...a, data: i, children: /* @__PURE__ */ h.jsx(gi, { ...a }) }) : null
41780
41780
  }
41781
41781
  ),
41782
- /* @__PURE__ */ h.jsx(Zt, { dataKey: "value", barSize: 40, isAnimationActive: !1, children: i.map((a, s) => /* @__PURE__ */ h.jsx(Vn, { fill: r[s] }, a.name)) })
41782
+ /* @__PURE__ */ h.jsx(Zt, { dataKey: "value", barSize: 40, isAnimationActive: !1, children: i.map((a, s) => /* @__PURE__ */ h.jsx(
41783
+ Vn,
41784
+ {
41785
+ fill: r[s],
41786
+ dataKey: "value"
41787
+ },
41788
+ a.name
41789
+ )) })
41783
41790
  ]
41784
41791
  }
41785
41792
  ) }) })
package/dist/index.umd.js CHANGED
@@ -262,7 +262,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
262
262
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
263
263
 
264
264
  `,`1) content: element.innerHTML
265
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&hae(c,r);return u&&l.push(u),l},[]);return ku(e)?s[0]:s}Au.defaultProps=Cr,Au.setDefaultProps=uae,Au.currentInput=Bi,Object.assign({},sx,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),Au.setDefaultProps({render:VN});function zN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var HN=typeof window<"u"&&typeof document<"u";function $x(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function YN(){return HN&&document.createElement("div")}function mae(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function UN(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!UN(e[n],t[n]))return!1}else return!1;return!0}else return!1}function gae(e){var t=[];return e.forEach(function(n){t.find(function(r){return UN(n,r)})||t.push(n)}),t}function vae(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:gae([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var Fx=HN?P.useLayoutEffect:P.useEffect;function yae(e){var t=P.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function KN(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var bae={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}KN(n,"add",t.props.className)}function o(){r()&&KN(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function xae(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=zN(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,g=a!==void 0,v=P.useState(!1),x=v[0],_=v[1],w=P.useState({}),y=w[0],E=w[1],S=P.useState(),k=S[0],D=S[1],T=yae(function(){return{container:YN(),renders:1}}),I=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){I[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),I.trigger="manual",I.hideOnClick=!1),g&&(u=!0);var A=I,C=I.plugins||[];s&&(A=Object.assign({},I,{plugins:g&&a.data!=null?[].concat(C,[{fn:function(){return{onTrigger:function($,B){var z=a.data.children.find(function(V){var W=V.instance;return W.reference===B.currentTarget});$.state.$$activeSingletonInstance=z.instance,D(z.content)}}}}]):C,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return Fx(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var j=e(M||T.ref||YN(),Object.assign({},A,{plugins:[bae].concat(I.plugins||[])}));return T.instance=j,u&&j.disable(),o&&j.show(),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D}),_(!0),function(){j.destroy(),a?.cleanup(j)}},N),Fx(function(){var M;if(T.renders===1){T.renders++;return}var j=T.instance;j.setProps(vae(j.props,A)),(M=j.popperInstance)==null||M.forceUpdate(),u?j.disable():j.enable(),m&&(o?j.show():j.hide()),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D})}),Fx(function(){var M;if(s){var j=T.instance;j.setProps({popperOptions:Object.assign({},j.props.popperOptions,{modifiers:[].concat((((M=j.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function($){var B=$.name;return B!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(B){var z,V=B.state,W=(z=V.modifiersData)==null?void 0:z.hide;(y.placement!==V.placement||y.referenceHidden!==W?.isReferenceHidden||y.escaped!==W?.hasPopperEscaped)&&E({placement:V.placement,referenceHidden:W?.isReferenceHidden,escaped:W?.hasPopperEscaped}),V.attributes.popper={}}}])})})}},[y.placement,y.referenceHidden,y.escaped].concat(N)),P.createElement(P.Fragment,null,r?P.cloneElement(r,{ref:function(j){T.ref=j,$x(r.ref,j)}}):null,x&&ui.createPortal(s?s(mae(y),k,T.instance):i,T.container))}return t}var wae=(function(e,t){return P.forwardRef(function(r,i){var o=r.children,a=zN(r,["children"]);return P.createElement(e,Object.assign({},t,a),o?P.cloneElement(o,{ref:function(l){$x(i,l),$x(o.ref,l)}}):null)})}),_ae=wae(xae(Au));const sr=({children:e,active:t,payload:n,coordinate:r,data:i,offsetY:o=40})=>!t||!n?.length?null:h.jsx("div",{style:{position:"absolute",transform:`translate(${r.x}px, ${r.y}px)`,pointerEvents:"none",zIndex:99999},children:h.jsx(_ae,{content:e,visible:!0,placement:"right",offset:[0,5],arrow:!0,theme:"custom-black",children:h.jsx("div",{style:{width:0,height:0,background:"black"}})})});function Eae({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||t?.total_forum_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||t?.total_poll_detail||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||t?.total_survey_detail||0),color:r[3]}],o=t?.widget==="commercial";return h.jsx(Ma,{title:"Engagement",period:"This Month",icon:h.jsx(JE,{className:"!text-[20px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} `,childrenClassName:`${o?"mt-[52px]":"mt-0"}`,actionButtons:!o&&h.jsx(Cl,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsx("div",{className:`w-full ${o?"h-[220px]":"h-[260px]"}`,children:h.jsx(Et,{width:"100%",height:"100%",children:h.jsxs(Oo,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[h.jsx(rr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),h.jsx(Rn,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),h.jsx(Un,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),h.jsx(Dt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0},allowEscapeViewBox:{x:!0,y:!0},content:a=>a.active?h.jsx(sr,{...a,data:i,children:h.jsx(ei,{...a})}):null}),h.jsx(Ut,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>h.jsx(Nn,{fill:r[s]},a.name))})]})})})})}function Sae({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=P.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return h.jsxs(Ma,{title:"Facilities",period:"Today",icon:h.jsx(Sg,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:h.jsx(Cl,{widgetId:t?.widget_id,options:t?.communities}),children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),h.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),h.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),h.jsx("div",{className:"w-full h-[170px]",children:h.jsx(Et,{width:"100%",height:"100%",children:h.jsxs(J0,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[h.jsx(rr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),h.jsx(Un,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),h.jsx(Rn,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Rn,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Dt,{content:h.jsx(Ta,{})}),h.jsx(sa,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),h.jsx(sa,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function Oae({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return h.jsx(Ma,{title:"Income",period:"This Month",icon:h.jsx(Og,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:h.jsx(Cl,{widgetId:e?.widget_id,options:e?.communities}),children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Income"}),h.jsx("div",{children:"Collection"}),h.jsx("div",{children:"Closing"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-[8px]",children:[h.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),h.jsx("div",{children:a(t.income,t?.currency_type)}),h.jsx("div",{children:a(t.collection,t?.currency_type)}),h.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),h.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsx(Og,{className:"!text-[24px] text-red-600"}),h.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Expenditure"}),h.jsx("div",{children:"Payment"}),h.jsx("div",{children:"Outstanding"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[h.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),h.jsx("div",{children:a(n.expenditure,n?.currency_type)}),h.jsx("div",{children:a(n.payment,n?.currency_type)}),h.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var Cae="tippy-content",Pae="tippy-backdrop",kae="tippy-arrow",Dae="tippy-svg-arrow",ls={passive:!0,capture:!0},qN=function(){return document.body};function Aae(e,t){return{}.hasOwnProperty.call(e,t)}function Bx(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Wx(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function GN(e,t){return typeof e=="function"?e.apply(void 0,t):e}function XN(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Tae(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function Mae(e){return e.split(/\s+/).filter(Boolean)}function Dl(e){return[].concat(e)}function QN(e,t){e.indexOf(t)===-1&&e.push(t)}function Nae(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function jae(e){return e.split("-")[0]}function Th(e){return[].slice.call(e)}function ZN(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Iae(){return document.createElement("div")}function Vx(e){return["Element","Fragment"].some(function(t){return Wx(e,t)})}function Rae(e){return Wx(e,"NodeList")}function Lae(e){return Wx(e,"MouseEvent")}function $ae(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Fae(e){return Vx(e)?[e]:Rae(e)?Th(e):Array.isArray(e)?e:Th(document.querySelectorAll(e))}function zx(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function JN(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Bae(e){var t,n=Dl(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Wae(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=jae(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function Hx(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function ej(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Wi={isTouch:!1},tj=0;function Vae(){Wi.isTouch||(Wi.isTouch=!0,window.performance&&document.addEventListener("mousemove",nj))}function nj(){var e=performance.now();e-tj<20&&(Wi.isTouch=!1,document.removeEventListener("mousemove",nj)),tj=e}function zae(){var e=document.activeElement;if($ae(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Hae(){document.addEventListener("touchstart",Vae,ls),window.addEventListener("blur",zae)}var Yae=typeof window<"u"&&typeof document<"u",Uae=Yae?!!window.msCrypto:!1;function Al(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function rj(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Kae(e){return rj(`
265
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&hae(c,r);return u&&l.push(u),l},[]);return ku(e)?s[0]:s}Au.defaultProps=Cr,Au.setDefaultProps=uae,Au.currentInput=Bi,Object.assign({},sx,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),Au.setDefaultProps({render:VN});function zN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var HN=typeof window<"u"&&typeof document<"u";function $x(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function YN(){return HN&&document.createElement("div")}function mae(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function UN(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!UN(e[n],t[n]))return!1}else return!1;return!0}else return!1}function gae(e){var t=[];return e.forEach(function(n){t.find(function(r){return UN(n,r)})||t.push(n)}),t}function vae(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:gae([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var Fx=HN?P.useLayoutEffect:P.useEffect;function yae(e){var t=P.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function KN(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var bae={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}KN(n,"add",t.props.className)}function o(){r()&&KN(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function xae(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=zN(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,g=a!==void 0,v=P.useState(!1),x=v[0],_=v[1],w=P.useState({}),y=w[0],E=w[1],S=P.useState(),k=S[0],D=S[1],T=yae(function(){return{container:YN(),renders:1}}),I=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){I[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),I.trigger="manual",I.hideOnClick=!1),g&&(u=!0);var A=I,C=I.plugins||[];s&&(A=Object.assign({},I,{plugins:g&&a.data!=null?[].concat(C,[{fn:function(){return{onTrigger:function($,B){var z=a.data.children.find(function(V){var W=V.instance;return W.reference===B.currentTarget});$.state.$$activeSingletonInstance=z.instance,D(z.content)}}}}]):C,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return Fx(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var j=e(M||T.ref||YN(),Object.assign({},A,{plugins:[bae].concat(I.plugins||[])}));return T.instance=j,u&&j.disable(),o&&j.show(),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D}),_(!0),function(){j.destroy(),a?.cleanup(j)}},N),Fx(function(){var M;if(T.renders===1){T.renders++;return}var j=T.instance;j.setProps(vae(j.props,A)),(M=j.popperInstance)==null||M.forceUpdate(),u?j.disable():j.enable(),m&&(o?j.show():j.hide()),g&&a.hook({instance:j,content:i,props:A,setSingletonContent:D})}),Fx(function(){var M;if(s){var j=T.instance;j.setProps({popperOptions:Object.assign({},j.props.popperOptions,{modifiers:[].concat((((M=j.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function($){var B=$.name;return B!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(B){var z,V=B.state,W=(z=V.modifiersData)==null?void 0:z.hide;(y.placement!==V.placement||y.referenceHidden!==W?.isReferenceHidden||y.escaped!==W?.hasPopperEscaped)&&E({placement:V.placement,referenceHidden:W?.isReferenceHidden,escaped:W?.hasPopperEscaped}),V.attributes.popper={}}}])})})}},[y.placement,y.referenceHidden,y.escaped].concat(N)),P.createElement(P.Fragment,null,r?P.cloneElement(r,{ref:function(j){T.ref=j,$x(r.ref,j)}}):null,x&&ui.createPortal(s?s(mae(y),k,T.instance):i,T.container))}return t}var wae=(function(e,t){return P.forwardRef(function(r,i){var o=r.children,a=zN(r,["children"]);return P.createElement(e,Object.assign({},t,a),o?P.cloneElement(o,{ref:function(l){$x(i,l),$x(o.ref,l)}}):null)})}),_ae=wae(xae(Au));const sr=({children:e,active:t,payload:n,coordinate:r,data:i,offsetY:o=40})=>!t||!n?.length?null:h.jsx("div",{style:{position:"absolute",transform:`translate(${r.x}px, ${r.y}px)`,pointerEvents:"none",zIndex:99999},children:h.jsx(_ae,{content:e,visible:!0,placement:"right",offset:[0,5],arrow:!0,theme:"custom-black",children:h.jsx("div",{style:{width:0,height:0,background:"black"}})})});function Eae({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),fill:r[0]},{name:"Post",value:Number(t?.total_topics||t?.total_forum_topics||0),fill:r[1]},{name:"Poll",value:Number(t?.total_polls||t?.total_poll_detail||0),fill:r[2]},{name:"Survey",value:Number(t?.total_surveys||t?.total_survey_detail||0),fill:r[3]}],o=t?.widget==="commercial";return h.jsx(Ma,{title:"Engagement",period:"This Month",icon:h.jsx(JE,{className:"!text-[20px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} `,childrenClassName:`${o?"mt-[52px]":"mt-0"}`,actionButtons:!o&&h.jsx(Cl,{widgetId:t?.widget_id,options:t?.communities}),children:h.jsx("div",{className:`w-full ${o?"h-[220px]":"h-[260px]"}`,children:h.jsx(Et,{width:"100%",height:"100%",children:h.jsxs(Oo,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[h.jsx(rr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),h.jsx(Rn,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),h.jsx(Un,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),h.jsx(Dt,{cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0},allowEscapeViewBox:{x:!0,y:!0},content:a=>a.active?h.jsx(sr,{...a,data:i,children:h.jsx(ei,{...a})}):null}),h.jsx(Ut,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>h.jsx(Nn,{fill:r[s],dataKey:"value"},a.name))})]})})})})}function Sae({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=P.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return h.jsxs(Ma,{title:"Facilities",period:"Today",icon:h.jsx(Sg,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:h.jsx(Cl,{widgetId:t?.widget_id,options:t?.communities}),children:[h.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),h.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),h.jsxs("div",{children:[h.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),h.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),h.jsx("div",{className:"w-full h-[170px]",children:h.jsx(Et,{width:"100%",height:"100%",children:h.jsxs(J0,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[h.jsx(rr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),h.jsx(Un,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),h.jsx(Rn,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Rn,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),h.jsx(Dt,{content:h.jsx(Ta,{})}),h.jsx(sa,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),h.jsx(sa,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function Oae({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return h.jsx(Ma,{title:"Income",period:"This Month",icon:h.jsx(Og,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:h.jsx(Cl,{widgetId:e?.widget_id,options:e?.communities}),children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Income"}),h.jsx("div",{children:"Collection"}),h.jsx("div",{children:"Closing"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-[8px]",children:[h.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),h.jsx("div",{children:a(t.income,t?.currency_type)}),h.jsx("div",{children:a(t.collection,t?.currency_type)}),h.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),h.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),h.jsx("div",{className:"flex items-center justify-between",children:h.jsxs("div",{className:"flex items-center gap-[12px]",children:[h.jsx(Og,{className:"!text-[24px] text-red-600"}),h.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-[8px]",children:[h.jsx("div",{children:"Opening"}),h.jsx("div",{children:"Expenditure"}),h.jsx("div",{children:"Payment"}),h.jsx("div",{children:"Outstanding"})]}),h.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[h.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),h.jsx("div",{children:a(n.expenditure,n?.currency_type)}),h.jsx("div",{children:a(n.payment,n?.currency_type)}),h.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var Cae="tippy-content",Pae="tippy-backdrop",kae="tippy-arrow",Dae="tippy-svg-arrow",ls={passive:!0,capture:!0},qN=function(){return document.body};function Aae(e,t){return{}.hasOwnProperty.call(e,t)}function Bx(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Wx(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function GN(e,t){return typeof e=="function"?e.apply(void 0,t):e}function XN(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Tae(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function Mae(e){return e.split(/\s+/).filter(Boolean)}function Dl(e){return[].concat(e)}function QN(e,t){e.indexOf(t)===-1&&e.push(t)}function Nae(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function jae(e){return e.split("-")[0]}function Th(e){return[].slice.call(e)}function ZN(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Iae(){return document.createElement("div")}function Vx(e){return["Element","Fragment"].some(function(t){return Wx(e,t)})}function Rae(e){return Wx(e,"NodeList")}function Lae(e){return Wx(e,"MouseEvent")}function $ae(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Fae(e){return Vx(e)?[e]:Rae(e)?Th(e):Array.isArray(e)?e:Th(document.querySelectorAll(e))}function zx(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function JN(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Bae(e){var t,n=Dl(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Wae(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=jae(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,g=o.top-r+d>l,v=r-o.bottom-f>l,x=o.left-n+p>l,_=n-o.right-m>l;return g||v||x||_})}function Hx(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function ej(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Wi={isTouch:!1},tj=0;function Vae(){Wi.isTouch||(Wi.isTouch=!0,window.performance&&document.addEventListener("mousemove",nj))}function nj(){var e=performance.now();e-tj<20&&(Wi.isTouch=!1,document.removeEventListener("mousemove",nj)),tj=e}function zae(){var e=document.activeElement;if($ae(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Hae(){document.addEventListener("touchstart",Vae,ls),window.addEventListener("blur",zae)}var Yae=typeof window<"u"&&typeof document<"u",Uae=Yae?!!window.msCrypto:!1;function Al(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function rj(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Kae(e){return rj(`
266
266
  %ctippy.js
267
267
 
268
268
  %c`+rj(e)+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anarock-widgets",
3
- "version": "1.0.350",
3
+ "version": "1.0.351",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",