1/*! For license information please see 4334.5f75cb5a.chunk.js.LICENSE.txt */ 2(self.webpackChunkwhatsapp_dashboard=self.webpackChunkwhatsapp_dashboard||[]).push([[4334,5925],{5770:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var s=a(47313),i=a(57009),n=a(20337),r=a(52376),o=a(44288),l=a(39352),d=a(56867),c=a(46417);const p={red:{background:"#FFF5F5",primary:"#B91C1C",hover:"#991B1B"},orange:{background:"#FFF7ED",primary:"#C2410C",hover:"#9A3412"},blue:{background:"#EFF6FF",primary:"#1D4ED8",hover:"#1E40AF"},teal:{background:"#F0FDFA",primary:"#0F766E",hover:"#115E59"},rose:{background:"#FFF1F2",primary:"#E11D48",hover:"#BE123C"}},h=(0,r.Z)((e=>({rootContainer:{boxSizing:"border-box",height:"96px",padding:"20px 24px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",boxShadow:"none",[e.breakpoints.down(1200)]:{padding:"20px",minHeight:"84px",height:"100%"},[e.breakpoints.down(770)]:{flexDirection:"column",alignItems:"flex-start",gap:"12px"}},outerContentDiv:{display:"flex",alignItems:"center",gap:"12px",[e.breakpoints.down(770)]:{alignItems:"flex-start"}},contentDiv:{display:"flex",flexDirection:"column",gap:"4px"},headlineText:{fontWeight:700,fontFamily:"Inter",fontSize:"16px",lineHeight:"120%"},descriptionText:{fontFamily:"Inter",fontWeight:400,fontSize:"14px",lineHeight:"120%",color:"#6B7280"},upgradeBtn:{color:"white",borderRadius:"8px",fontFamily:"Inter",fontSize:"14px",lineHeight:"120%",fontWeight:600,letterSpacing:0,height:"36px",padding:"0 16px",textTransform:"none",boxShadow:"none",whiteSpace:"nowrap",[e.breakpoints.down(770)]:{marginLeft:"36px"}}})))((e=>{let{classes:t,variant:a="red"}=e;const[r,h]=(0,s.useState)(!1),g=p[a]||p.red;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:t.rootContainer,style:{background:g.background,borderLeft:"4px solid ".concat(g.primary)},children:[(0,c.jsxs)("div",{className:t.outerContentDiv,children:[(0,c.jsx)(o.Z,{size:24,color:g.primary}),(0,c.jsxs)("div",{className:t.contentDiv,children:[(0,c.jsx)(i.Z,{className:t.headlineText,style:{color:g.primary},children:"Automation Lite Plan (Mobile Only)"}),(0,c.jsx)(i.Z,{className:t.descriptionText,children:"This project is on Automation Lite Plan (Mobile Only) - Unlock unlimited broadcasting & advanced features"})]})]}),(0,c.jsx)(n.Z,{className:t.upgradeBtn,style:{backgroundColor:g.primary},disableElevation:!0,onClick:()=>h(!0),onMouseOver:e=>e.currentTarget.style.backgroundColor=g.hover,onMouseOut:e=>e.currentTarget.style.backgroundColor=g.primary,startIcon:(0,c.jsx)(l.Z,{size:16}),children:"Upgrade Now"})]}),(0,c.jsx)(d.default,{purchaseNew:!0,dialogOpen:r,toggleUpgradeDialog:()=>h(!1)})]})}))},41365:(e,t,a)=>{"use strict";a.d(t,{Z:()=>g});var s=a(47313),i=a(47856),n=a(21144),r=a(73908),o=a(57009),l=a(52376),d=a(47735),c=a(46417);const p=[{id:"av",color:"#F2C14E"},{id:"bv",color:"#BDBF00"},{id:"cv",color:"#F78154"},{id:"dv",color:"#5FAD56"},{id:"ev",color:"#F70054"},{id:"gv",color:"#a48ed2"},{id:"wv",color:"#4babda"},{id:"av1",color:"#F2C14E"},{id:"bv1",color:"#BDBF00"},{id:"cv1",color:"#F78154"},{id:"dv1",color:"#5FAD56"},{id:"ev1",color:"#F70054"},{id:"gv1",color:"#a48ed2"},{id:"wv1",color:"#4babda"},{id:"av2",color:"#F2C14E"},{id:"bv2",color:"#BDBF00"},{id:"cv2",color:"#F78154"},{id:"dv2",color:"#5FAD56"},{id:"ev2",color:"#F70054"},{id:"gv2",color:"#a48ed2"},{id:"wv2",color:"#4babda"}];class h extends s.PureComponent{constructor(e){super(e),this.measure=()=>{const e=this.rootRef.current;if(!e)return;const t=e.clientWidth;t!==this.state.containerWidth&&this.setState({containerWidth:t})},this.rootRef=(0,s.createRef)(null),this.state={containerWidth:0}}componentDidMount(){this.measure(),"undefined"!==typeof ResizeObserver&&this.rootRef.current?(this.resizeObserver=new ResizeObserver(this.measure),this.resizeObserver.observe(this.rootRef.current)):window.addEventListener("resize",this.measure)}componentWillUnmount(){this.resizeObserver?this.resizeObserver.disconnect():window.removeEventListener("resize",this.measure)}render(){const{data:e,keys:t,title:a,isLoading:l,Subheading:h,Options:g,fixed_strokes:u,type:m,maxHeight:x=300,dense:y=!1}=this.props,v=this.props.classes,b=u||p,{containerWidth:j}
2=this.state,f=Math.max(320,j-40),C=Math.min(x,Math.max(180,f/3));let Z=[];if(1===e.length&&e[0].date){const t=e[0],a={};let s=new Date(t.date);s.setDate(s.getDate()-1),s=s.toDateString().split(" "),Object.keys(t).forEach((e=>{a[e]=0})),Z=[{...a,date:"".concat(s[2]," ").concat(s[1])},t]}return(0,c.jsxs)("div",{ref:this.rootRef,className:v.root,style:{backgroundColor:"white",...y?{margin:0,paddingTop:0}:{}},children:[(0,c.jsxs)(n.Z,{container:!0,children:[a&&(0,c.jsx)(n.Z,{item:!0,xs:12,md:6,children:(0,c.jsxs)(r.Z,{m:"1em 0em",className:v.header,children:[(0,c.jsx)(o.Z,{variant:"h3",component:"span",children:a}),(0,c.jsxs)(o.Z,{variant:"body2",component:"span",children:[" ","(per day)"]})]})}),g&&(0,c.jsx)(n.Z,{item:!0,xs:12,md:6,children:(0,c.jsx)(r.Z,{m:"1em 0em",className:v.header,textAlign:{xs:"left",md:"right"},children:(0,c.jsx)(g,{})})})]}),h&&(0,c.jsx)(h,{}),l||!j?(0,c.jsx)(r.Z,{display:"flex",justifyContent:"center",width:"100%",children:(0,c.jsx)(d.Z,{width:"90%",height:x})}):(0,c.jsx)(s.Fragment,{children:e.length>0?(0,c.jsx)(r.Z,{p:"1em 1%",className:v.chartScroll,children:(0,c.jsxs)(i.cI,{width:f,height:C,margin:y?{top:8,right:12,left:-16,bottom:0}:void 0,data:1===e.length?Z:e,children:[(0,c.jsx)("defs",{children:b.map((e=>(0,c.jsxs)("linearGradient",{id:e.id,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,c.jsx)("stop",{offset:"0%",stopColor:e.color,stopOpacity:.8}),(0,c.jsx)("stop",{offset:"95%",stopColor:e.color,stopOpacity:0})]},e.id)))}),(0,c.jsx)(i.q3,{strokeDasharray:"3 3"}),(0,c.jsx)(i.Kc,{dataKey:"date",axisLine:!1,scale:"point",tick:y?{fontSize:10}:void 0}),(0,c.jsx)(i.B2,{axisLine:!1,width:y?34:void 0,tick:y?{fontSize:10}:void 0,allowDecimals:!1,tickFormatter:e=>this.props.currency?e>1e9?"\u20b9"+(e/1e9).toFixed(0).toString()+"B":e>1e6?"\u20b9"+(e/1e6).toFixed(0).toString()+"M":e>1e3?"\u20b9"+(e/1e3).toFixed(0).toString()+"K":"\u20b9"+e.toString():e>1e9?(e/1e9).toFixed(0).toString()+"B":e>1e6?(e/1e6).toFixed(0).toString()+"M":e>1e3?(e/1e3).toFixed(0).toString()+"K":e.toString()}),(0,c.jsx)(i.u,{}),(0,c.jsx)(i.De,{wrapperStyle:y?{fontSize:11}:void 0}),t.map(((e,t)=>(0,c.jsx)(i.uN,{strokeWidth:2,type:"monotone",dataKey:e,stroke:b[t].color,isAnimationActive:!0,fillOpacity:1,fill:"url(#".concat(b[t].id,")")},e)))]})}):(0,c.jsx)(r.Z,{py:1,display:"flex",justifyContent:"center",width:"100%",height:300,alignItems:"center",children:"SCAN-QR"==m?(0,c.jsxs)(o.Z,{variant:"h6",color:"textSecondary",children:[" ","Start your QR Campaign and Analyse the analytics here."]}):(0,c.jsxs)(o.Z,{variant:"h6",color:"textSecondary",children:[" ","Nothing to show for now ;)"]})})})]})}}const g=(0,l.Z)((e=>({root:{display:"flex",margin:"3% 0em",paddingTop:"1em",width:"100%",justifyContent:"left",flexDirection:"column",alignItems:"start",backgroundColor:"white",borderRadius:"1em",boxSizing:"border-box",minWidth:0,maxWidth:"100%"},chartScroll:{width:"100%",maxWidth:"100%",boxSizing:"border-box",overflowX:"auto"},heading:{margin:"0.5em"},header:{[e.breakpoints.down("md")]:{padding:"0 20px"},[e.breakpoints.up("sm")]:{padding:"0 30px"}}})))(h)},58821:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});a(47313);var s=a(73908),i=a(63830),n=a(45788),r=a(95604),o=a(49904),l=a(47864),d=a(30656),c=a(46417);const p=(0,i.withRouter)((e=>{var t,a,i,p;let{history:h,match:g,title:u="Quick Guide",description:m,section:x,includeSection:y,guideLinks:v,prospectId:b,showTutorial:j=!0,shortcuts:f,heading:C,...Z}=e;const D=null===g||void 0===g||null===(t=g.params)||void 0===t?void 0:t.projectId,S=!((0,n.useSelector)((e=>{var t,a;return null===(t=e.login)||void 0===t||null===(a=t.user)||void 0===a?void 0:a.power}))>=1),w=[...x&&(null===(a=o.g[x])||void 0===a?void 0:a.docLinks)||[],...y&&(null===(i=o.g[y])||void 0===i?void 0:i.docLinks)||[]],{guideLinks:k,onWatchTutorial:A}=(0,l.bt)(w,b),I=null===(p=o.g[x])||void 0===p?void 0:p.sectionDisplayName,T={eyebrow:I?"".concat(I," quick guide"):"Quick guide",title:u,description:m,showGuideLinks:j,onWatchTutorial:A,guideLinks:v||k},F=C||{title:"What would you like to launch?"},P=!j,M={history:h,projectId:D},O=[(0,d.hN)(M),!P&&(0,d.me)(M),!P&&(0,d.nw)(M),(0,d.lM)({...M,disabled:S}
2)].filter(Boolean),B=P?[]:f||O;return(0,c.jsx)(s.Z,{mt:3,mb:3,width:"100%",...Z,children:(0,c.jsx)(r.Z,{guide:T,heading:F,shortcuts:B})})}))},30656:(e,t,a)=>{"use strict";a.d(t,{BE:()=>v,JD:()=>y,hN:()=>m,hT:()=>Z,lM:()=>S,me:()=>x,nw:()=>b,rM:()=>w,y:()=>D});a(47313);var s=a(73908),i=a(47903),n=a(73069),r=a(4761),o=a(12806),l=a(49647),d=a(40692),c=a(93372),p=a(6885),h=a(41790),g=a(46417);const u=(e,t)=>(0,g.jsx)(s.Z,{style:{width:"36px",height:"36px",borderRadius:"10px",backgroundColor:e,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:t}),m=e=>{let{history:t,projectId:a}=e;return{key:"broadcast",icon:u("rgba(37, 211, 102, 0.12)",(0,g.jsx)(i.Z,{size:20,color:"#109d59"})),title:"Launch Broadcast Campaign",description:"Reach your WhatsApp audience with offers, updates and alerts.",onClick:()=>t.push("/projects/".concat(a,"/campaigns/create"))}},x=e=>{let{history:t,projectId:a}=e;return{key:"status-ad",icon:h.Z.whatsapp_status,title:"Launch WhatsApp Status Ad",tag:"NEW",tagVariant:"new",description:"Publish scroll-stopping offers directly to WhatsApp Status.",onClick:()=>t.push("/projects/".concat(a,"/advertisement/create?selectedAdType=whatsapp_status"))}},y=e=>{let{history:t,projectId:a}=e;return{key:"ads-agent",icon:u("rgba(10, 71, 76, 0.12)",(0,g.jsx)(n.Z,{size:20,color:"#0a474c"})),title:"Generate Ads with AI",tag:"AI",tagVariant:"ai",description:"Describe your business and Ads Agent writes, designs and targets the ads for you.",onClick:()=>t.push("/projects/".concat(a,"/advertisement/ads-agent"))}},v=()=>({key:"book-demo-call",icon:u("rgba(59, 130, 246, 0.12)",(0,g.jsx)(r.Z,{size:20,color:"#2563EB"})),title:"Book a Demo Call",description:"Talk to an ads expert to set up, launch and troubleshoot your campaigns.",onClick:()=>window.open("https://calendly.com/ads-aisensy/ads-troubleshoot","_blank","noopener,noreferrer")}),b=e=>{let{history:t,projectId:a}=e;return{key:"lead-form",icon:u("rgba(245, 158, 11, 0.14)",(0,g.jsx)(o.Z,{size:20,color:"#B45309"})),title:"Launch Lead Form Ads",description:"Capture high-intent leads and follow up instantly on WhatsApp.",onClick:()=>t.push("/projects/".concat(a,"/advertisement/create?selectedAdType=lead_form"))}},j={USD:{starter:100,growth:200,symbol:"$",Icon:l.Z},INR:{starter:5e3,growth:1e4,symbol:"\u20b9",Icon:d.Z}},f=e=>"USD"===e?j.USD:j.INR,C=(e,t)=>"USD"===e?"$".concat(t):"\u20b9".concat(t.toLocaleString("en-IN")),Z=e=>{let{onSelect:t,currency:a}=e;const{starter:s,Icon:i}=f(a),n=C(a,s);return{key:"starter-pack",icon:u("rgba(37, 211, 102, 0.12)",(0,g.jsx)(i,{size:20,color:"#109d59"})),title:"".concat(n," Ads Starter Pack"),tag:"FREE SETUP",tagVariant:"new",description:"Get ".concat(n," ad balance plus free expert campaign setup."),onClick:()=>t(s)}},D=e=>{let{onSelect:t,currency:a}=e;const{growth:s,Icon:i}=f(a),n=C(a,s);return{key:"growth-pack",icon:u("rgba(37, 211, 102, 0.12)",(0,g.jsx)(i,{size:20,color:"#109d59"})),title:"".concat(n," Ads Growth Pack"),tag:"RECOMMENDED",tagVariant:"new",description:"Get ".concat(n," ad balance, expert setup and 30-day optimisation support."),onClick:()=>t(s),highlighted:!0}},S=e=>{let{history:t,projectId:a,disabled:s=!1}=e;return{key:"ai-agent",icon:u("rgba(124, 58, 237, 0.12)",(0,g.jsx)(c.Z,{size:20,color:"#7C3AED"})),title:"Create AI Agent",tag:"AI",tagVariant:"ai",description:"Qualify leads, answer questions and close sales automatically.",onClick:()=>t.push("/projects/".concat(a,"/agent-studio")),disabled:s}},w=e=>{let{history:t,projectId:a}=e;return{key:"ai-template",icon:u("rgba(37, 211, 102, 0.12)",(0,g.jsx)(p.Z,{size:20,color:"#109d59"})),title:"Create AI Templates",tag:"AI",tagVariant:"ai",description:"Generate powerful WhatsApp templates in seconds with AI.",onClick:()=>t.push("/projects/".concat(a,"/manage/template-message/create"),{category:"MARKETING"})}}},8871:(e,t,a)=>{"use strict";a.d(t,{i1:()=>r,on:()=>n});var s=a(74227),i=a.n(s);const n=1e3,r=e=>{var t,a;return!0===(null===e||void 0===e||null===(t=e.specialAccess)||void 0===t?void 0:t.showServiceCount)||(a=null===e||void 0===e?void 0:e.timezone,i()().tz((a||"").split(" ")[0]||"Asia/Calcutta").isSameOrAfter("2026-10-01","day"))}},3008:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var s=a(47313),i=a(83061),n=a(73908),r=a(57009),o=a(54070),l=a(52376),d=a(65681),c=a(60839),p=a(66396),h=a(9841),g=a(46417);class u extends s.Component{constructor(e){super(e),this.onSnackbarClose=()=>{this.setState({alertOpen:!1})},this.showSnackbar=e=>{this.setState(e)},this.closeOpenDialog=()=>{this.setState({openDialog:!1}),setTimeout((()=>{this.props.toggleBillingDetailsDialog()}),400)},this.state={openDialog:!1,alertOpen:!1,alertMsg:"",severity:""}}componentDidUpdate(e){!e.dialogOpen&&this.props.dialogOpen&&setTimeout((()=>{this.setState({openDialog:!0})}),0)}render(){const{classes:e,dialogOpen:t}=this.props,{openDialog:a}=this.state;return(0,g.jsxs)("div",{className:e.root,children:[t&&(0,g.jsx)(n.Z,{className:e.backdrop,children:(0,g.jsx)(n.Z,{className:(0,i.Z)(e.dialogContainer,{[e.dialogContainerSlider]:a}),children:(0,g.jsxs)(n.Z,{className:e.dialogWrapper,children:[(0,g.jsx)(n.Z,{className:e.dialogTitle,children:(0,g.jsxs)(n.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,g.jsx)(r.Z,{variant:"h3",children:"Update Billing Details"}),(0,g.jsx)(o.Z,{onClick:this.closeOpenDialog,children:(0,g.jsx)(d.Z,{})})]})}),(0,g.jsxs)(n.Z,{className:e.dialogContent,children:[(0,g.jsx)(c.Z,{showSnackbar:this.showSnackbar}),(0,g.jsx)(n.Z,{mt:2}),(0,g.jsx)(p.Z,{showSnackbar:this.showSnackbar})]})]})})}),(0,g.jsx)(h.A9,{open:this.state.alertOpen,anchorOrigin:{vertical:"top",horizontal:"center"},onClose:this.onSnackbarClose,severity:this.state.severity,message:this.state.alertMsg})]})}}const m=(0,l.Z)((e=>({root:{width:"100%"},snackbar:{zIndex:5e3},backdrop:{position:"fixed",width:"100%",top:0,left:0,height:"100vh",background:"#0000005e",dis
2play:"flex",flexDirection:"row-reverse",zIndex:1e3},dialogContainerSlider:{[e.breakpoints.down("md")]:{margin:"0 !important"},[e.breakpoints.up("md")]:{margin:"0 !important"}},dialogContainer:{padding:12,boxSizing:"border-box",transition:"margin 0.45s",maxWidth:600,[e.breakpoints.down("md")]:{width:"100%",margin:"0 -100% 0 0"},[e.breakpoints.up("md")]:{width:"50%",margin:"0 -50% 0 0"}},dialogWrapper:{height:"100%",borderRadius:"12px",background:"white",overflow:"hidden"},dialogTitle:{padding:"12px 12px 8px 32px",boxShadow:"0px 4px 8px #f3efef"},dialogContent:{padding:"24px 16px",background:"#f9f8f873",maxHeight:"calc(100vh - 140px)",overflowY:"auto"}})))(u)},18998:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var s=a(47313),i=a(83061),n=a(73908),r=a(57009),o=a(54070),l=a(52376),d=a(65681),c=a(24841),p=(a(56569),a(68914)),h=a(9841),g=a(46417);class u extends s.Component{constructor(e){super(e),this.onSnackbarClose=()=>{this.setState({alertOpen:!1})},this.showSnackbar=e=>{this.setState(e)},this.closeOpenDialog=()=>{this.setState({openDialog:!1}),setTimeout((()=>{this.props.toggleTemplateCreditDialog()}),400)},this.state={openDialog:!1,alertOpen:!1,alertMsg:"",severity:""}}componentDidUpdate(e){!e.dialogOpen&&this.props.dialogOpen&&setTimeout((()=>{this.setState({openDialog:!0})}),0)}render(){var e,t;const{classes:a,dialogOpen:s,assistantDetails:l}=this.props,{openDialog:u}=this.state;return(0,g.jsxs)("div",{className:a.root,children:[s&&(0,g.jsx)(n.Z,{className:a.backdrop,children:(0,g.jsx)(n.Z,{className:(0,i.Z)(a.dialogContainer,{[a.dialogContainerSlider]:u}),children:(0,g.jsxs)(n.Z,{className:a.dialogWrapper,children:[(0,g.jsx)(n.Z,{className:a.dialogTitle,children:(0,g.jsxs)(n.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,g.jsx)(r.Z,{variant:"h4",children:"Purchase WhatsApp Conversation Credits (WCC)"}),(0,g.jsx)(o.Z,{onClick:this.closeOpenDialog,children:(0,g.jsx)(d.Z,{})})]})}),(0,g.jsx)(n.Z,{className:a.dialogContent,children:(0,g.jsx)(c.Z,{showSnackbar:this.showSnackbar,closeDialog:this.closeOpenDialog})}),!(null!==l&&void 0!==l&&null!==(e=l.partner)&&void 0!==e&&e.isZohoEnabled)&&!(null!==l&&void 0!==l&&null!==(t=l.partner)&&void 0!==t&&t.partnerRazorpayEnabled)&&(0,g.jsx)(n.Z,{className:a.dialogContent,style:{paddingTop:0},children:(0,g.jsx)(p.Z,{showSnackbar:this.showSnackbar,closeDialog:this.closeOpenDialog})})]})})}),(0,g.jsx)(h.A9,{open:this.state.alertOpen,anchorOrigin:{vertical:"top",horizontal:"center"},onClose:this.onSnackbarClose,severity:this.state.severity,message:this.state.alertMsg})]})}}const m=(0,l.Z)((e=>({root:{width:"100%"},snackbar:{zIndex:5e3},backdrop:{position:"fixed",width:"100%",top:0,left:0,height:"100vh",background:"#0000005e",display:"flex",flexDirection:"row-reverse",zIndex:1e3},dialogContainerSlider:{[e.breakpoints.down("md")]:{margin:"0 !important"},[e.breakpoints.up("md")]:{margin:"0 !important"}},dialogContainer:{padding:12,boxSizing:"border-box",transition:"margin 0.45s",maxWidth:600,[e.breakpoints.down("md")]:{width:"100%",margin:"0 -100% 0 0"},[e.breakpoints.up("md")]:{width:"50%",margin:"0 -50% 0 0"}},dialogWrapper:{height:"100%",borderRadius:"12px",background:"white",overflow:"scroll"},dialogTitle:{padding:"12px 12px 8px 32px",boxShadow:"0px 4px 8px #f3efef"},dialogContent:{padding:"24px 16px",background:"#f9f8f873",maxHeight:"calc(100vh - 140px)",overflowY:"auto"}})))(u)},56867:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>f});a(47313);var s=a(45788),i=a(88894),n=a(31385),r=a(45282),o=a(61809),l=a(54070),d=a(78371),c=a(73908),p=a(57009),h=a(21144),g=a(97241),u=a(12599);const m=a.p+"static/media/rocket_launch.9b95e701e2b88078d57a.png";var x=a(48212),y=a(46417);const v=(0,g.Z)((e=>({dialogPaper:{width:"50%",maxWidth:"100%",borderRadius:"12px",padding:e=>{let{isMobile:t}=e;return t?"24px 16px":"40px 20px 32px 20px"},display:"flex",flexDirection:"column",gap:e=>{let{isMobile:t}=e;return t?"24px":"32px"},position:"relative",overflowY:e=>{let{isMobile:t}=e;return t?"auto":"hidden"},[e.breakpoints.down("sm")]:{width:"100%",height:"100%",margin:0,borderRadius:0}},closeButton:{position:"absolute",right:e=>{let{isMobile:t}=e;return t?"16px":"20px"},top:e=>{let{isMobile:t}=e;return t?"16px":"20px"},padding:0},closeIcon:{width:"22px",height:"22px"},dialogContent:{padding:0,display:"flex",flexDirection:"column",alignItems:"center",gap:e=>{let{isMobile:t}=e;return t?"24px":"32px"},overflowY:e=>{let{isMobile:t}=e;return t?"auto":"hidden"},maxHeight:e=>{let{isMobile:t}=e;return t?"100%":"none"}},rocketIconContainer:{width:e=>{let{isMobile:t}=e;
2return t?"80px":"100px"},height:e=>{let{isMobile:t}=e;return t?"80px":"100px"},borderRadius:"50%",backgroundColor:"#EBF1FF",display:"flex",alignItems:"center",justifyContent:"center"},rocketIcon:{width:e=>{let{isMobile:t}=e;return t?"60px":"80px"},height:e=>{let{isMobile:t}=e;return t?"60px":"80px"},objectFit:"contain"},titleContainer:{textAlign:"center",display:"flex",flexDirection:"column",gap:"8px",padding:e=>{let{isMobile:t}=e;return t?"0 16px":0}},title:{color:"#2F5EFF",fontFamily:"Inter",fontSize:e=>{let{isMobile:t}=e;return t?"18px":"20px"},fontWeight:600,lineHeight:"150%"},subtitle:{color:"#192839",fontFamily:"Inter",fontSize:"14px",fontWeight:400,lineHeight:"150%"},dividerContainer:{width:"100%",display:"flex",alignItems:"center",gap:"16px",padding:e=>{let{isMobile:t}=e;return t?"0 16px":0}},dividerLine:{flex:1,height:"1px",backgroundColor:"#E4E4E4"},dividerText:{color:"#8694A7",fontFamily:"Inter",fontSize:e=>{let{isMobile:t}=e;return t?"12px":"14px"},fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",whiteSpace:"nowrap"},featuresGrid:{width:"100%",padding:e=>{let{isMobile:t}=e;return t?"0 16px":0}},featureBox:{display:"flex",padding:e=>{let{isMobile:t}=e;return t?"8px":"12px"},alignItems:"center",gap:e=>{let{isMobile:t}=e;return t?"8px":"12px"},alignSelf:"stretch",borderRadius:"8px",border:"1px solid #F0F0F0"},iconContainer:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"#305EFF",display:"flex",alignItems:"center",justifyContent:"center",padding:"6px","& > svg":{color:"#FFFFFF",fontSize:"20px"}},featureTextContainer:{display:"flex",flexDirection:"column",gap:"4px"},featureTitle:{color:"#192839",fontFamily:"Inter",fontSize:e=>{let{isMobile:t}=e;return t?"14px":"16px"},fontWeight:500,lineHeight:"normal",fontFeatureSettings:'"liga" off, "clig" off'},featureDescription:{color:"#8694A7",fontFamily:"Inter",fontSize:e=>{let{isMobile:t}=e;return t?"11px":"12px"},fontWeight:400,lineHeight:"150%",letterSpacing:"0.066px"},upgradeContainer:{padding:e=>{let{isMobile:t}=e;return t?"12px":"16px"},display:"flex",justifyContent:"space-between",alignItems:"center",alignSelf:"stretch",borderRadius:"12px",backgroundColor:"#EBF1FF",margin:e=>{let{isMobile:t}=e;return t?"0 16px":0}},upgradeTextContent:{display:"flex",flexDirection:"column",gap:"4px"},upgradeTitle:{color:"#2F5EFF",fontFamily:"Inter",fontSize:e=>{let{isMobile:t}=e;return t?"16px":"18px"},fontWeight:600,lineHeight:"normal",fontFeatureSettings:'"liga" off, "clig" off',textAlign:"left"},emailContent:{color:"#192839",fontFamily:"Inter",fontSize:e=>{let{isMobile:t}=e;return t?"12px":"13px"},fontWeight:600,lineHeight:"normal",fontFeatureSettings:'"liga" off, "clig" off',textAlign:"left"},upgradeDescription:{color:"#192839",fontFamily:"Inter",fontSize:e=>{let{isMobile:t}=e;return t?"11px":"12px"},fontWeight:400,lineHeight:"150%",letterSpacing:"0.066px",textAlign:"left"},contactButton:{width:"116px",height:"36px",padding:"6px 16px",backgroundColor:"#2F5EFF",color:"#FFFFFF",borderRadius:"6px",fontFamily:"Inter",fontSize:"14px",fontWeight:600,lineHeight:"24px",textTransform:"none","&:hover":{backgroundColor:"#2F5EFF"}}}))),b=e=>{let{dialogOpen:t,toggleUpgradeDialog:a}=e;const s=v(),i=(0,n.Z)(),g=(0,r.Z)(i.breakpoints.down("sm")),b=((0,r.Z)(i.breakpoints.down("md")),[{icon:(0,x.p)(),title:"Campaign Automations",description:"Effortlessly schedule and retry failed sends"},{icon:(0,x.kB)(),title:"Chatbot Flows and Live Chat",description:"Automate support or connect instantly"},{icon:(0,x.Z0)(),title:"Click-to-WhatsApp Ads",description:"Convert ad clicks into conversations"},{icon:(0,x.yc)(),title:"and many more exciting features!",description:"Unlock additional powerful capabilities."}]);return(0,y.jsxs)(o.Z,{open:t,onClose:a,maxWidth:!1,classes:{paper:s.dialogPaper},children:[(0,y.jsx)(l.Z,{className:s.closeButton,onClick:a,children:(0,y.jsx)(u.Z,{className:s.closeIcon})}),(0,y.jsxs)(d.Z,{className:s.dialogContent,children:[(0,y.jsx)(c.Z,{className:s.rocketIconContainer,children:(0,y.jsx)("img",{src:m,alt:"Rocket Launch",className:s.rocketIcon,style:{width:g?"60px":"80px",height:g?"60px":"80px"}})}),(0,y.jsxs)(c.Z,{className:s.titleContainer,children:[(0,y.jsx)(p.Z,{variant:"h1",className:s.title,children:"Upgrade your plan to unlock this feature"}),(0,y.jsx)(p.Z,{variant:"subtitle1",className:s.subtitle,children:"Unlock premium features to take your marketing strategy to the next level."})]}),(0,y.jsxs)(c.Z,{className:s.dividerContainer,children:[(0,y.jsx)("div",{className:s.dividerLine}),(0,y.jsx)(p.Z,{variant:"body1",className:s.dividerText,children:"What's included in Advanced Plan?"}),(0,y.jsx)("div",{className:s.dividerLine})]}),(0,y.jsx)(h.Z,{container:!0,spacing:g?1:2,className:s.featuresGrid,children:b.map(((e,t)=>(0,y.jsx)(h.Z,{item:!0,xs:12,sm:6,children:(0,y.jsxs)(c.Z,{className:s.featureBox,children:[(0,y.jsx)(c.Z,{className:s.iconContainer,children:e.icon}),(0,y.jsxs)(c.Z,{className:s.featureTextContainer,children:[(0,y.jsx)(p.Z,{variant:"h6",className:s.featureTitle,children:e.title}),(0,y.jsx)(p.Z,{variant:"body2",className:s.featureDescription,children:e.description})]})]})},t)))}),(0,y.jsx)(c.Z,{className:s.upgradeContainer,children:(0,y.jsxs)(c.Z,{className:s.upgradeTextContent,children:[(0,y.jsx)(p.Z,{variant:"h5",className:s.upgradeTitle,children:"Upgrade your plan today! \u2728"}),(0,y.jsxs)(p.Z,{variant:"body2",className:s.upgradeDescription,children:["Write to us on"," ",(0,y.jsx)("span",{className:s.emailContent,children:"[email protected]"})," ","to upgrade your plan"]})]})})]})]})};var j=a(98677);const f=(0,s.connect)((e=>({assistantDetails:e.assistantDetails.data})))((e=>{const{assistantDetails:t}=e,{activePlan:a,partnerId:s}=t||{},{isAiSensy:n}=(0,j.K)();return s&&"FREE_FOREVER"===a?(0,y.jsx)(b,{dialogOpen:e.dialogOpen,toggleUpgradeDialog:e.toggleUpgradeDialog,purchaseNew:e.purchaseNew}):n?(0,y.jsx)(i.default,{purchaseNew:e.purchaseNew,dialogOpen:e.dialogOpen,toggleUpgradeDialog:e.toggleUpgradeDialog,toggleTrialActivation:e.toggleTrialActivation,confettiRun:e.confettiRun,fromUpgradePlan:e.fromUpgradePlan,minimumPlan:e.minimumPlan}):null}))},76775:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>Ze});var s=a(47313),i=a(21144),n=a(57009),r=a(73908),o=a(72728),l=a(20337),d=a(3873),c=a(34882),p=a(54070),h=a(52376),g=a(47735),u=a(26395),m=a(70089),x=a(83061),y=a(74227),v=a.n(y),b=a(8871),j=a(1805),f=a(61809),C=a(95939),Z=a(78371),D=a(35154),S=a(97393),w=a(2824),k=a(46417);class A extends s.Component{constructor(){super(...arguments),this.state={address:"",state:"Goa",country:"India",status:"",statusMessage:""},this.setAddress=()=>{const{address:e,state:t,country:a}=this.state;a&&e&&("India"!==a||t)?this.props.saveBillingAddress({addressDetail:e,state:t||"",country:a}):this.setState({status:"error",statusMessage:"Invalid Address"})},this.onChange=e=>{this.setState({[e.target.name]:e.target.value})},this.onCountryChange=(e,t)=>
2{this.setState({country:t})},this.onStateChange=(e,t)=>{this.setState({state:t})}}render(){const{openBillingAddress:e,toggleBillingAddressPopup:t}=this.props,{address:a,state:d,country:c,status:p,statusMessage:h}=this.state;return(0,k.jsxs)(f.Z,{open:e,onClose:t,"aria-labelledby":"form-dialog-title",maxWidth:!0,children:[(0,k.jsx)(C.Z,{children:(0,k.jsx)(n.Z,{variant:"h4",gutterBottom:!0,children:"Billing Address"})}),(0,k.jsxs)(Z.Z,{children:[(0,k.jsxs)(i.Z,{container:!0,direction:"row",children:[(0,k.jsxs)(i.Z,{item:!0,xs:12,children:[(0,k.jsx)(n.Z,{variant:"h5",paragraph:!0,children:"Full address"}),(0,k.jsx)(o.Z,{placeholder:"Enter full address",name:"Billing Address",fullWidth:!0,onChange:this.onChange,value:a.addressDetails})]}),(0,k.jsx)(r.Z,{my:1,width:"100%",children:(0,k.jsx)(u.ZP,{id:"country-select",options:w.Z,autoHighlight:!0,value:c,onChange:this.onCountryChange,freeSolo:!1,getOptionLabel:e=>e||"",renderOption:e=>(0,k.jsx)(s.Fragment,{children:e}),renderInput:e=>(0,k.jsx)(o.Z,{...e,label:"Country",variant:"outlined",inputProps:{...e.inputProps,autoComplete:"new-password"}})})}),"India"===c?(0,k.jsxs)(r.Z,{my:1,width:"100%",children:[(0,k.jsx)(u.ZP,{id:"country-select",options:S.Z,autoHighlight:!0,value:d,onChange:this.onStateChange,freeSolo:!1,getOptionLabel:e=>e||"",renderOption:e=>(0,k.jsx)(s.Fragment,{children:e}),renderInput:e=>(0,k.jsx)(o.Z,{...e,label:"State",variant:"outlined",inputProps:{...e.inputProps,autoComplete:"new-password"}})})," "]}):""]}),(0,k.jsx)(n.Z,{variant:"body2",color:"error"===p?"error":"primary",children:h})]}),(0,k.jsxs)(D.Z,{children:[(0,k.jsx)(l.Z,{onClick:t,color:"primary",children:"Cancel"}),(0,k.jsx)(l.Z,{onClick:this.setAddress,color:"primary",children:"Subscribe"})]})]})}}const I=A;var T=a(81463),F=a(47495);class P extends s.Component{constructor(){super(...arguments),this.state={upgrade:!1},this.toggleUprade=()=>{this.setState({upgrade:!this.state.upgrade})}}render(){const{classes:e,setPlan:t,address:a,toggleBillingAddressPopup:o,isCreditLow:c}=this.props,{placeOrder:h,selectedPlan:g,remainingCredit:u,paymentStatus:m}=this.props,{upgrade:x}=this.state;return g?(0,k.jsxs)(i.Z,{container:!0,xs:12,spacing:1,children:[(0,k.jsxs)(i.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(p.Z,{onClick:()=>t(null),children:(0,k.jsx)(T.Z,{})})}),(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(n.Z,{variant:"h5",children:"Plan selected"})})]}),(0,k.jsxs)(i.Z,{container:!0,spacing:1,children:[(0,k.jsxs)(i.Z,{item:!0,xs:10,md:3,className:e.selectedPlan,children:[(0,k.jsx)(n.Z,{variant:"h3",gutterBottom:!0,align:"center",style:{fontWeight:500,letterSpacing:1},children:g.name}),(0,k.jsxs)(n.Z,{variant:"body2",paragraph:!0,align:"center",children:[g.description,"Pro"==g.name?(0,k.jsxs)(n.Z,{variant:"body2",component:"span",children:[" ","(Recommended)"]}):""]}),(0,k.jsxs)(n.Z,{variant:"h2",paragraph:!0,align:"center",style:{fontWeight:600,letterSpacing:1},children:["Rs ",g.amount/100]}),(0,k.jsxs)(n.Z,{variant:"body1",gutterBottom:!0,align:"center",children:["Per session message -"," ",(0,k.jsxs)(n.Z,{variant:"body1",component:"span",style:{fontWeight:500},children:["Rs ",g.sessionPrice/100]})]}),(0,k.jsxs)(n.Z,{variant:"body1",gutterBottom:!0,align:"center",children:["Per template message -"," ",(0,k.jsxs)(n.Z,{variant:"body1",component:"span",style:{fontWeight:500},children:["Rs ",g.templatePrice/100]})]}),(0,k.jsxs)(n.Z,{variant:"body2",paragraph:!0,align:"center",children:["Upto ",g.maxAgent," live chat agents"]})]}),(0,k.jsx)(i.Z,{item:!0,xs:10,md:9,children:(0,k.jsxs)(r.Z,{px:4,children:[(0,k.jsx)(r.Z,{my:2,children:(0,k.jsxs)(i.Z,{item:!0,container:!0,justify:"space-between",xs:12,children:[(0,k.jsxs)(i.Z,{item:!0,children:[(0,k.jsx)(n.Z,{variant:"h4",gutterBottom:!0,style:{fontWeight:500},children:"Billing Address"}),(0,k.jsx)(n.Z,{variant:"body1",paragraph:!0,children:"".concat(a.addressDetail," ").concat(a.state," ").concat(a.country)})]}),(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(p.Z,{onClick:o,children:(0,k.jsx)(F.Z,{color:"primary"})})})]})}),"Ongoing"===m?(0,k.jsx)(d.Z,{}):"Success"===m?(0,k.jsxs)(r.Z,{width:"100%",children:[(0,k.jsx)(n.Z,{variant:"h4",align:"center",paragraph:!0,style:{color:"green"},children:"Payment Succesfull"}),(0,k.jsx)(n.Z,{variant:"body2",align:"center",children:"It may take 1-2 days for credit to reflect in your account."}),(0,k.jsx)(l.Z,{onClick:this.toggleUprade,children:"Continue"})]}):"Failure"===m?(0,k.jsx)(n.Z,{variant:"h4",align:"center",color:"error",children:"Payment Failed"}):(0,k.jsx)(i.Z,{container:!0,children:a.addressDetail?(0,k.jsxs)(s.Fragment,{children:[(0,k.jsxs)(i.Z,{item:!0,container:!0,justify:"space-between",xs:12,children:[(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(n.Z,{variant:"body1",gutterBottom:!0,children:"Sub Total"})}),(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsxs)(n.Z,{variant:"body1",gutterBottom:!0,children:["Rs ",g.amount/100-u]})})]}),"India"===a.country&&(0,k.jsxs)(i.Z,{item:!0,container:!0,justify:"space-between",xs:12,children:[(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(n.Z,{variant:"body1",paragraph:!0,children:"CGST(9%) + SGST(9%)"})}),(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsxs)(n.Z,{variant:"body1",paragraph:!0,children:["Rs"," ",(.18*(g.amount/100-u)).toFixed(2)]})})]}),(0,k.jsxs)(i.Z,{item:!0,container:!0,justify:"space-between",xs:12,children:[(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(n.Z,{variant:"body1",gutterBottom:!0,children:"Total"})}),(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsxs)(n.Z,{variant:"body1",gutterBottom:!0,children:["Rs"," ",(1.18*(g.amount/100-u)).toFixed(2)]})})]}),(0,k.jsx)(i.Z,{item:!0,container:!0,justify:"flex-end",xs:12,children:(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(r.Z,{my:3,children:(0,k.jsx)(l.Z,{variant:"contained",color:"primary",onClick:h,children:"Confirm & Pay"})})})})]}):(0,k.jsx)(i.Z,{item:!0,xs:!0,children:"Please set your Billing Address"})})]})})]})]}):!x&&c?(0,k.jsxs)(i.Z,{container:!0,xs:12,alignItems:"center",children:[(0,k.jsx)(i.Z,{item:!0,container:!0,xs:12,md:10,children:(0,k.jsx)(n.Z,{variant:"h5",children:"You are running low on credit. Your credit is expected to exhaust soon."})}),(0,k.jsx)(i.Z,{item:!0,container:!0,xs:12,md:2,justify:"flex-end",children:(0,k.jsx)(l.Z,{variant:"contained",color:"primary",href:"https://wa.link/p3xgyw",target:"_blank",className:e.margin,children:"Upgrade Now"})})]}):""}}const M=P;class O extends s.Component{render(){const{usageData:e,title:t,classes:a,assistantType:s,planSectionType:o,creditDetails:l}=this.props;return(0,k.jsx)(r.Z,{my:4,p:"1em",bgcolor:"white",borderRadius:"8px",children:(0,k.jsxs)(i.Z,{container:!0,justify:"center",children:[t&&(0,k.jsx)(i.Z,{item:!0,xs:12,style:{marginBottom:"1em"},children:(0,k.jsx)(n.Z,{variant:"h3",color:"primary",children:t})}),(0,k.jsx)(i.Z,{item:!0,xs:12,md:4,children:(0,k.jsxs)("div",{className:a.countContainer,children:[(0,k.jsx)(n.Z,{variant:"h5",children:"Sessions Messages :"}),(0,k.jsx)(n.Z,{variant:"h4",children:e.sessionMessagesCount})]})}),(0,k.jsx)(i.Z,{item:!0,xs:12,md:4,children:(0,k.jsxs)("div",{className:a.countContainer,children:[(0,k.jsx)(n.Z,{variant:"h5",children:"Template Messages :"}),(0,k.jsx)(n.Z,{variant:"h4",children:e.templateMessagesCount})]})}),"v1"===s?(0,k.jsx)(i.Z,{item:!0,xs:12,md:4,children:(0,k.jsxs)("div",{className:a.countContainer,children:[(0,k.jsx)(n.Z,{variant:"h5",children:"Total Messages :"}),(0,k.jsx)(n.Z,{variant:"h4",children:e.sessionMessagesCount+e.templateMessagesCount})]})}):"","v2"===s?(0,k.jsx)(i.Z,{item:!0,xs:12,md:4,children:(0,k.jsxs)("div",{className:a.countContainer,children:[(0,k.jsx)(n.Z,{variant:"h5",children:"Mexico Sessions"}),(0,k.jsx)(n.Z,{variant:"h4",children:e.waSessionCount})]})}):"","enterprise"===o?(0,k.jsx)(i.Z,{item:!0,xs:12,md:4,children:(0,k.jsxs)("div",{className:a.countContainer,children:[(0,k.jsx)(n.Z,{variant:"h5",children:"User Engagements:"}),(0,k.jsx)(n.Z,{variant:"h4",children:e.enterpriseSessionCount})]})}):"","v3"===o?(0,k.jsx)(i.Z,{item:!0,xs:12,md:4,children:(0,k.jsxs)("div",{className:a.countContainer,children:[(0,k.jsx)(n.Z,{variant:"h5",children:"Excess MAU Usage:"}),(0,k.jsx)(n.Z,{variant:"h4",children:l.macUsage-l.macQuota>0?l.macUsage-l.macQuota:0})]})}):"","v3"!==s&&(0,k.jsx)(i.Z,{item:!0,xs:12,children:(0,k.jsx)(n.Z,{variant:"body2",style:{margin:"0.2em 0.7em"},color:"textSecondary",children:"* Media attachements sent with messages are charged separately according to the plan"})})]})})}}const B=(0,h.Z)((e=>({countContainer:{margin:"0.5em",display:"flex",justifyContent:"space-around",backgroundColor:e.palette.primary.light,borderRadius:"8px",padding:"0.5em 0.2em",boxSizing:"border-box"}})))(O);var N=a(45788),U=a(81766),E=a(41365),R=(a(64343),a(87255),a(81533),a(20176)),L=a(59411),z=a(59688),W=a(60839),_=a(66396),Y=a(68146),H=a(9841),V=a(70816),G=a.n(V),q=a(58889),Q=a(3008),$=a(88894),K=a(61801),J=a(81369),X=a(63830),ee=a(91925);class te extends s.Component{constructor(e){super(e),this.toggleBillingDetailsDialog=()=>{this.setState({billingdialogOpen:!this.state.billingdialogOpen})},this.toggleUpgradeDialog=()=>{this.setState({upgradeDialogOpen:!this.state.upgradeDialogOpen})},this.removeScheduledCancel=async()=>{try{const e={type:"plan-cancel-removal"};this.props.updateAssistantStore({ongoingBillingProcess:e});const t=this.props.match.params.projectId;await m.Z.post(j.URL+"/payment/cancel-scheduled-cancel",{assistantId:t,ongoingBillingProcess:e})}catch(e){this.props.updateAssistantStore({ongoingBillingProcess:null}),this.props.showSnackbar({alertOpen:!0,alertMsg:"Failed to remove scheduled cancel",severity:"error"})}},this.state={billingdialogOpen:!1,upgradeDialogOpen:!1}}render(){var e,t,a,s;const{classes:o,assistantDetails:p,power:h,isReloading:u}=this.props,{planDisplayName:m,frequency:x,totalContact:y,macUsage:v,cardAdded:b,planActivatedOn:f,activePlan:C,subscriptionStatus:Z,ongoingBillingProcess:D,subscriptionScheduled:S,macQuota:w,planRenewalOn:A,partnerId:I,chargebeePlan:T,type:F,planDuration:P,ongoingPlanBillingProcess:M}=p,{billingdialogOpen:O,upgradeDialogOpen:B}=this.state,N=new Date(A),U=Math.floor((N.getTime()-Date.now())/864e5),E=w<v,R=E?v-w:w-v,L=E?w/v*100:v/w*100,z="v3"===F?K.V3_PLANS[C]:"FREE_FOREVER"!==C&&ee.V4_PLANS[C];return u?(0,k.jsx)(g.Z,{variant:"rect",height:z?200:100,style:{background:"#EBF5F3",borderRadius:8,margin:"32px 0",boxShadow:"0 0 11px rgb(220 220 220)"}}):(0,k.jsxs)("div",{className:o.root,children:[(0,k.jsx)(r.Z,{my:4,children:(0,k.jsxs)(i.Z,{container:!0,justify:"center",children:[(0,k.jsx)(i.Z,{item:!0,xs:12,md:2!==h||I&&!T||"v4"===F?12:6,children:(0,k.jsxs)(r.Z,{px:4,py:3,position:"relative",children:[(0,k.jsx)(n.Z,{variant:"body2",gutterBottom:!0,color:"textSecondary",children:"Current Plan"}),z&&A&&(0,k.jsx)(r.Z,{className:o.stats,style:{color:"#5a5a5a",fontSize:12},children:"two-weekly"===x?"".concat(U<0?0:U," Days left"):P<15?"trial ends on ".concat(G()(N).format("DD/MM/YY")):"cancelled"!==Z?"renews on ".concat(G()(N).format("DD/MM/YY")):"ends on ".concat(G()(N).format("DD/MM/YY"))}),(0,k.jsxs)(n.Z,{variant:"h4",style:{maxWidth:"calc(100% - 150px)"},children:[P<18&&"PRO_MONTHLY"===C?"TRIAL ":m,"FREE FOREVER"!==m&&(0,k.jsx)(k.Fragment,{}),"FREE FOREVER"!==m&&P>
217&&(0,k.jsxs)("span",{style:{fontSize:10,color:"darkslategrey"},children:[" ","(",x,")"]})]}),"cancelled"===Z&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(r.Z,{mt:1}),(0,k.jsx)(n.Z,{variant:"h3",color:"primary",children:Z.toUpperCase()})]}),z&&"v4"!==F&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(r.Z,{mt:3}),(0,k.jsx)(r.Z,{className:o.stats,style:{color:E?"#FF0000":"black",fontWeight:"bold"},children:R===1/0?"UNLIMITED":R}),(0,k.jsx)(n.Z,{variant:"body2",style:{maxWidth:"calc(100% - 70px)"},children:E?"Excess Usage":"Monthly Active Users (MAU) Left"}),(0,k.jsx)(r.Z,{mt:4}),(0,k.jsx)(n.Z,{variant:"body2",children:"MAU Usage"}),(0,k.jsx)(r.Z,{mt:1}),(0,k.jsx)(r.Z,{position:"relative",height:24,children:(0,k.jsx)(r.Z,{className:o.usageBubble,style:{left:E?"100%":"".concat(L,"%")},children:(0,k.jsxs)("div",{className:o.arrowBottom,children:[" ",v]})})}),(0,k.jsx)(H.ko,{variant:E?"buffer":"determinate",value:L,valueBuffer:E?100:void 0,status:E?"error":"default"}),(0,k.jsx)(r.Z,{position:"relative",children:(0,k.jsx)(n.Z,{variant:"body2",style:{position:"absolute",right:E?"".concat(100-L,"%"):0,bottom:E&&L<=10?"5px":"unset",transform:E?"translate(50%, 0%)":"unset"},children:w===1/0?"UNLIMITED":w})}),(0,k.jsx)(n.Z,{variant:"body2",children:0})]})]})}),(0,Y.Sz)({agent:{power:h},assistantDetails:p})&&(!I||I!==j.AISENSY_PARTNER_ID&&(null===(e=this.props.assistantDetails)||void 0===e||null===(t=e.partner)||void 0===t?void 0:t.isZohoEnabled)&&"NONE"!==(null===(a=this.props.assistantDetails)||void 0===a?void 0:a.activePlan)||T)&&!C.includes("DIWALI")&&(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,children:(0,k.jsxs)(r.Z,{px:4,py:3,children:[z?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(r.Z,{mt:3,textAlign:"center",children:[E?(0,k.jsx)(n.Z,{variant:"body2",children:"monthly"===x?"Upgrade Now to Avoid Surcharge":"Upgrade Now for uninterrupted service"}):(0,k.jsx)(n.Z,{variant:"body2",children:P<15?"Upgrade Now for uninterrupted service":"Upgrade Now for more savings!"}),(0,k.jsx)(c.ZP,{enterTouchDelay:0,title:"cancelled"===Z?"Plan upgrade unavailable":(0,q.Ig)(D),children:(0,k.jsx)("div",{children:(0,Y.Sz)({agent:{power:h},assistantDetails:p})&&(0,k.jsx)(l.Z,{onClick:this.toggleUpgradeDialog,variant:"contained",color:"primary",style:"cancelled"===Z||"plan-update"===(null===D||void 0===D?void 0:D.type)||"trial-activation"===(null===D||void 0===D?void 0:D.type)?{}:{background:E?"#FF0000":"#0a474c"},className:o.addCardButton,disabled:"cancelled"===Z||"plan-update"===(null===D||void 0===D?void 0:D.type)||"trial-activation"===(null===D||void 0===D?void 0:D.type),children:"Upgrade"})})})]}),2===h&&"active"===Z&&(P>15||b)?"":"active"===Z&&2===h?(0,k.jsx)(r.Z,{mt:5,textAlign:"center",children:(0,k.jsx)(n.Z,{variant:"h4",color:"textPrimary",children:"Trial ends ".concat(U<0?"today":"in ".concat(U," days")," ")})}):"",2===h&&"cancelled"===Z&&(0,k.jsxs)(r.Z,{mt:4,textAlign:"center",children:[(0,k.jsx)(n.Z,{variant:"body2",children:"To continue using services when ".concat(P<15?"trial":"term"," ends.")}),(0,k.jsx)(c.ZP,{enterTouchDelay:0,title:(0,q.Ig)(D),children:(0,k.jsx)(r.Z,{children:(0,k.jsx)(l.Z,{variant:"outlined",className:o.removeCancelPlanButton,onClick:this.removeScheduledCancel,color:"primary",disabled:!!D,endIcon:D?(0,k.jsx)(d.Z,{size:20}):"",children:"Remove Scheduled Cancel"})})})]})]}):(0,k.jsxs)(r.Z,{textAlign:"center",children:[(0,k.jsx)(n.Z,{variant:"body2",children:"You don\u2019t have any active plan"}),(0,Y.Sz)({agent:{power:h},assistantDetails:p})&&(0,k.jsx)(c.ZP,{enterTouchDelay:0,title:(0,q.Ig)(D),children:(0,k.jsx)("div",{children:(0,k.jsx)(l.Z,{onClick:this.toggleUpgradeDialog,variant:"contained",color:"primary",className:o.addCardButton,disabled:"plan-update"===(null===D||void 0===D?void 0:D.type),children:"Get a Plan"})})})]}),("plan-update"===(null===D||void 0===D?void 0:D.type)||"trial-activation"===(null===D||void 0===D?void 0:D.type))&&(!this.props.assistantDetails.partnerId||I&&(null===(s=this.props.assistantDetails.partner)||void 0===s?void 0:s.isZohoEnabled))&&M&&(0,k.jsxs)(r.Z,{display:"flex",alignItems:"center",mt:2,justifyContent:"center",children:[(0,k.jsx)(d.Z,{size:20}),(0,k.jsx)(n.Z,{variant:"body2",style:{marginLeft:8},children:"plan-update"===D.type?"Upgrade in progress.":"Trial activation in progress."})]})]})})]})}),(0,k.jsx)(Q.Z,{dialogOpen:O,toggleBillingDetailsDialog:this.toggleBillingDetailsDialog}),(0,k.jsx)($.default,{purchaseNew:!z,dialogOpen:B,toggleUpgradeDialog:this.toggleUpgradeDialog})]})}}const ae=(0,h.Z)((e=>({root:{width:"100%",background:"white",borderRadius:"8px",boxShadow:"0 0 11px rgb(230,230,230)"},stats:{position:"absolute",right:0,paddingRight:30},usageBubble:{transform:"translate(-50%, 0%)",position:"absolute"},addCardButton:{marginTop:8,width:"100%",maxWidth:250,margin:"16px auto 0",height:"40px"},arrowBottom:{marginBottom:"10px",padding:"2px 8px",boxSizing:"border-box",background:"#edeaea",color:"#0000009c",borderRadius:"4px",textAlign:"center",position:"relative",fontSize:"10px","&:after":{content:'""',position:"absolute",right:"calc(50% - 8px)",top:"15p
2x",borderBottom:"none",borderRight:"8px solid transparent",borderLeft:"8px solid transparent",borderTop:"8px solid #edeaea"}},removeCancelPlanButton:{width:"100%",maxWidth:250,margin:"16px auto 0",height:"40px"}})))((0,X.withRouter)(te));var se=a(26396);class ie extends s.Component{render(){const{classes:e,promotionalCredits:t,currency:a,isReloading:s}=this.props;return s?(0,k.jsx)(g.Z,{variant:"rect",className:e.cardLookSkeleton}):(0,k.jsx)("div",{className:e.root,children:(0,k.jsxs)(r.Z,{className:e.cardLook,border:"1px solid lightgrey",px:4,py:3,borderRadius:8,boxShadow:"0 0 11px rgb(230 230 230)",children:[(0,k.jsx)(n.Z,{variant:"h4",children:"Promotional Credits"}),(0,k.jsxs)(n.Z,{variant:"h3",style:{marginTop:8},children:[(0,k.jsx)("span",{style:{fontFamily:"Roboto"},children:"USD"===a?"$":"\u20b9"})," ".concat(Number(t/100).toFixed(2))]})]})})}}const ne=(0,h.Z)((e=>({root:{width:"100%",height:"100%"},cardLook:{background:"white",border:"none",boxSizing:"border-box",[e.breakpoints.down("md")]:{margin:"24px 0 0 0",height:"unset"},[e.breakpoints.up("md")]:{margin:"24px 0 0 12px",height:"calc( 100% - 24px)"}},cardLookSkeleton:{borderRadius:"8px",boxSizing:"border-box",height:100,[e.breakpoints.down("md")]:{margin:"24px 0 0 0"},[e.breakpoints.up("md")]:{margin:"24px 0 0 12px"}}})))(ie);var re=a(67367),oe=(a(59017),a(16031)),le=a(58821),de=a(5770),ce=a(87311),pe=a(91529);const he=v()(),ge={key:"rzp_test_MIJtOfg10iw9hI",amount:"5000",currency:"INR",name:"AiSensy",description:"Pro plan",image:"https://ai-jenny.s3.ap-south-1.amazonaws.com/iconaijenny.png",order_id:"order_FwR2pSeBf2Qzdz",handler:e=>{alert(e.razorpay_payment_id),alert(e.razorpay_order_id),alert(e.razorpay_signature)},prefill:{name:"Gaurav Kumar",email:"[email protected]",contact:"9999999999"},theme:{color:"#E8700D"}},ue={v1:[{name:"Current Plan",key:"currentPlan",value:"Free"},{name:"Remaining Credit",key:"remainingCredit",value:"--"},{name:"Activated On",key:"activatedOn",value:"--"}],v2:[{name:"Current Plan",key:"currentPlan",value:"Free"},{name:"Session Messages",key:"remainingSessionMessages",value:"--",bottomText:"( Remaining )"},{name:"Template Credit",key:"templateCredit",value:"--",bottomText:"( Remaining )"},{name:"Activated On",key:"activatedOn",value:"--"}],v3:[{name:"Current Plan",key:"currentPlan",value:"Free"},{name:"Remaining MAU",key:"macUsage",value:"--"},{name:"Template Credit",key:"templateCredit",value:"--",bottomText:"( Remaining )"},{name:"Activated On",key:"activatedOn",value:"--"}],enterprise:[{name:"Current Plan",key:"currentPlan",value:"Free"},{name:"User Engagements",key:"remainingEnterpriseSessions",value:"--",bottomText:"( Remaining )"},{name:"Conversation Credits",key:"templateCredit",value:"--",bottomText:"( Remaining )"},{name:"Activated On",key:"activatedOn",value:"--"}]},me=[{name:"Order Id",key:"orderId"},{name:"Plan",key:"plan"},{name:"Amount",key:"amount"},{name:"Date",key:"createdAt"},{name:"Status",key:"status"}],xe={Today:{fromDate:he.clone().startOf("day"),toDate:he},Yesterday:{fromDate:he.clone().subtract(1,"days").startOf("day"),toDate:he.clone().subtract(1,"days").endOf("day")},"Last 7 days":{fromDate:he.clone().subtract(7,"days").startOf("day"),toDate:he},"Last 30 days":{fromDate:he.clone().subtract(30,"days").endOf("day"),toDate:he}},ye=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ve=Object.keys(xe);class be extends s.Component{constructor(e){super(e),this.cancelTokenSource=null,this.cancelTokenBillingPeriods=null,this.onSnackbarClose=()=>{this.setState({alertOpen:!1})},this.onConfirmationDialogClose=()=>{this.setState({confirmTask:!1})},this.onAddonConfirmationDialogClose=()=>{this.setState({confirmAddonTask:!1})},this.onDowngradeConfirmationDialogClose=()=>{this.setState({confirmDowngradeTask:!1})},this.handleDowngradeToBasicFlow=async()=>{const{assistantDetails:e}=this.props,t=this.props.match.params.projectId,a=(0,ce.Z)(e);this.setState({confirmDowngradeTask:!1});try{await(0,q.GW)({assistantId:t,planName:e.activePlan,assistantDetails:e,showSnackbar:this.showSnackbar,updateAssistantStore:this.props.updateAssistantStore,closeOpenDialog:()=>{},fetchAssistantDetails:(e,t,a)=>this.props.fetchAssistantDetails(e,t,a),purchaseNew:!1,isFlowAddON:!0,flowCount:a.flowCount||5,addonTier:"basic_flow",isAddonOnly:!0})}catch(i){var s;const e=(null===i||void 0===i||null===(s=i.response)||void 0===s?void 0:s.data)||"Failed to schedule downgrade";this.showSnackbar({alertOpen:!0,alertMsg:"string"===typeof e?e:"Failed to schedule downgrade",severity:"error"})}},this.showSnackbar=e=>{this.setState(e)},this.handleAutoComplete=(e,t,a)=>{if("select-option"==a){let a=xe[t].fromDate||this.state.fromDate,s=xe[t].toDate||this.state.toDate;new Date(a).getTime()<new Date("02/15/2022").getTime()&&(a=v()(new Date("02/15/2022"))),new Date(s).getTime()<new Date("02/15/2022").getTime()&&(a=v()(new Date)),this.setState({[e]:t,["interval"===e?"fromDate":"templateInterval"===e?"templateFromDate":"engagementFromDate"]:a,["interval"===e?"toDate":"templateInterval"===e?"templateToDate":"engagementToDate"]:s},(()=>{"interval"===e&&this.loadData(),"templateInterval"===e&&this.loadTemplateData(),"engagementInterval"===e&&this.loadEngagagementData()}))}},this.placeOrder=e=>{const t=this.props.match.params.projectId;m.Z.post(j.URL+"/api/create-order",{selectedPlan:this.state.selectedPlan,assistantId:t}).then((t=>{ge.order_id=t.data.orderId,ge.handler=e=>{this.setState({paymentStatus:"Success"})};const a=new window.Razorpay(ge);a.on("payment.failed",(function(e){alert(e.error.code),alert(e.error.description),alert(e.error.source),alert(e.error.step),alert(e.error.reason),alert(e.error.metadata.order_id),alert(e.error.metadata.payment_id),this.setState({paymentStatus:"Failure"})})),a.open(),e.preventDefault(),this.setState({orderId:t.data.orderId,paymentStatus:"Ongoing"})})).catch((e=>{console.error(e)}))},this.setPlan=e=>{this.setState({selectedPlan:e||null})},this.toggleBillingAddressPopup=()=>{this.setState({openBillingAddress:!this.state.openBillingAddress})},this.togglePartnerBillingAddrs=()=>{this.setState({openPartnerBillingAddress:!this.state.openPartnerBillingAddress})},this.onChange=e=>{this.setState({[e.target.name]:e.target.value})},this.saveBillingAddress=e=>{let{addressDetail:t,state:a,country:s}=e;const i=this.props.match.params.projectId;m.Z.post(j.URL+"/api/set-billing-address",{assistantId:i,address:{addressDetail:t,state:a,country:s}}).then((e=>{this.setState({address:{addressDetail:t,state:a,country:s},openBillingAddress:!1})})).catch((e=>{console.error(e),this.setState({status:"error",statusMessage:"Billing address update request failed!"})}))},this.toggleSection=e=>{if(e!==this.state.analyticsSection){if("current"===e){const e=v()(new Date(this.props.assistantDetails.planActivatedOn)),{fromDate:t}=this.state;t.isBefore(e)&&this.setState({fromDate:e})}this.setState({analyticsSection:e},this.loadData)}},this.setFocus=e=>{const t=document.getElementsByClassName("DateInput");t[0]&&(t[0].style.border="startDate"===e?"1px solid grey":"1px solid lightgrey"),t[1]&&(t[1].style.border="endDate"===e?"1px solid grey":"1px solid lightgrey"),this.setState({focusedInput:e})},this.setDate=(e,t)=>
2{e&&t&&this.setState({fromDate:e.startOf("day"),toDate:t.endOf("day"),interval:"Custom Range",analyticsSection:"all"},(()=>this.loadData()))},this.setTemplateFocus=e=>{const t=document.getElementsByClassName("DateInput");("all"===this.state.analyticsSection?t[2]:t[0])&&(("all"===this.state.analyticsSection?t[2]:t[0]).style.border="startDate"===e?"1px solid grey":"1px solid lightgrey"),("all"===this.state.analyticsSection?t[3]:t[1])&&(("all"===this.state.analyticsSection?t[3]:t[1]).style.border="endDate"===e?"1px solid grey":"1px solid lightgrey"),this.setState({templateFocusedInput:e})},this.setTemplateDate=(e,t)=>{e&&t&&this.setState({templateFromDate:e.startOf("day"),templateToDate:t.endOf("day"),templateInterval:"Custom Range"},(()=>this.loadTemplateData()))},this.setEngagementFocus=e=>{const t=document.getElementsByClassName("DateInput");t[2]&&(t[2].style.border="startDate"===e?"1px solid grey":"1px solid lightgrey"),t[3]&&(t[3].style.border="endDate"===e?"1px solid grey":"1px solid lightgrey"),this.setState({engagementFocusedInput:e})},this.setEngagementDate=(e,t)=>{e&&t&&this.setState({engagementFromDate:e.startOf("day"),engagementToDate:t.endOf("day"),engagementInterval:"Custom Range"},(()=>this.loadEngagagementData()))},this.filterData=()=>{let{dailyMacAnalytics:e,analyticsSection:t}=this.state;const{assistantDetails:a}=this.props,{planActivatedOn:s,frequency:i}=a;let n=[];if("all"===t){const t={};(e||[]).forEach((e=>{t[e.dayDate]?t[e.dayDate].macUsageCount+=e.macUsageCount:t[e.dayDate]={...e}})),e=[...Object.values(t)]}n=[...(e||[]).map((e=>{const t=v()(e.dayDate).format("MM/DD/YYYY").split("/");return{date:t[1]+" "+ye[Number(t[0]-1)],"Total MAU usage":e.macUsageCount,"User created MAU":e.userCreatedMacCount,"Business created MAU":e.businessCreatedMacCount,dateObj:v()(new Date(e.dayDate))}}))],n=n.sort(((e,t)=>e.dateObj.diff(t.dateObj,"minutes"))),this.setState({macUsageData:n,isAnalyticsLoading:!1})},this.safeDivide=e=>{const t=parseFloat(e);return isNaN(t)?0:t/1e5},this.filterTemplateData=()=>{let{dailyTemplateAnalytics:e,wccAnalyticsCountry:t,dailyPaymentAnalytics:a}=this.state;const s=["ALL"];let i=[];i=[...e.map((e=>{var i,n,r,o,l,d,c,p,h,g,u,m,x,y;Object.entries(e.bicCreditUsageCountryWise||{}).forEach((e=>{e[1].count>0&&!s.includes(e[0])&&s.push(e[0])})),Object.entries(e.uicCreditUsageCountryWise||{}).forEach((e=>{e[1].count>0&&!s.includes(e[0])&&s.push(e[0])})),Object.entries(e.acCreditUsageCountryWise||{}).forEach((e=>{e[1].count>0&&!s.includes(e[0])&&s.push(e[0])})),Object.entries(e.ucCreditUsageCountryWise||{}).forEach((e=>{e[1].count>0&&!s.includes(e[0])&&s.push(e[0])})),Object.entries(e.mcCreditUsageCountryWise||{}).forEach((e=>{e[1].count>0&&!s.includes(e[0])&&s.push(e[0])})),Object.entries(e.scCreditUsageCountryWise||{}).forEach((e=>{e[1].count>0&&!s.includes(e[0])&&s.push(e[0])})),Object.entries(e.mlcCreditUsageCountryWise||{}).forEach((e=>{e[1].count>0&&!s.includes(e[0])&&s.push(e[0])}));const b=v()(e.dayDate).format("MM/DD/YYYY").split("/"),j=v()(e.dayDate).format("YYYY-MM-DD"),{waPayCreditUsage:f,waPayCount:C}=a[j]||{},Z="ALL"===t?this.safeDivide(e.bicCreditUsage):this.safeDivide(null===(i=(e.bicCreditUsageCountryWise||{})[t])||void 0===i?void 0:i.amount),D="ALL"===t?this.safeDivide(e.uicCreditUsage):this.safeDivide(null===(n=(e.uicCreditUsageCountryWise||{})[t])||void 0===n?void 0:n.amount),S="ALL"===t?this.safeDivide(e.scCreditUsage):this.safeDivide(null===(r=(e.scCreditUsageCountryWise||{})[t])||void 0===r?void 0:r.amount),w="ALL"===t?this.safeDivide(e.acCreditUsage):this.safeDivide(null===(o=(e.acCreditUsageCountryWise||{})[t])||void 0===o?void 0:o.amount),k="ALL"===t?this.safeDivide(e.mcCreditUsage):this.safeDivide(null===(l=(e.mcCreditUsageCountryWise||{})[t])||void 0===l?void 0:l.amount),A="ALL"===t?this.safeDivide(e.ucCreditUsage):this.safeDivide(null===(d=(e.ucCreditUsageCountryWise||{})[t])||void 0===d?void 0:d.amount),I="ALL"===t?this.safeDivide(e.mlcCreditUsage):this.safeDivide(null===(c=(e.mlcCreditUsageCountryWise||{})[t])||void 0===c?void 0:c.amount),T=Number((f||0)/1e5),F=S+w+k+A+Z+D+I+(T||0);return{date:b[1]+" "+ye[Number(b[0]-1)],"Total Credit Usage":F.toFixed(3),"BIC Count":"ALL"===t?e.bicCount||0:(null===(p=(e.bicCreditUsageCountryWise||{})[t])||void 0===p?void 0:p.count)||0,"BIC Credit Usage":Z.toFixed(3),"
2UIC Count":"ALL"===t?e.uicCount||0:(null===(h=(e.uicCreditUsageCountryWise||{})[t])||void 0===h?void 0:h.count)||0,"UIC Credit Usage":D.toFixed(3),"SC Count":"ALL"===t?e.scCount||0:(null===(g=(e.scCreditUsageCountryWise||{})[t])||void 0===g?void 0:g.count)||0,"SC Credit Usage":S.toFixed(3),"SC Free Count":"ALL"===t&&e.scFreeCount||0,"AC Count":"ALL"===t?e.acCount||0:(null===(u=(e.acCreditUsageCountryWise||{})[t])||void 0===u?void 0:u.count)||0,"AC Credit Usage":w.toFixed(3),"MC Count":"ALL"===t?e.mcCount||0:(null===(m=(e.mcCreditUsageCountryWise||{})[t])||void 0===m?void 0:m.count)||0,"MC Credit Usage":k.toFixed(3),"MLC Count":"ALL"===t?e.mlcCount||0:(null===(x=(e.mlcCreditUsageCountryWise||{})[t])||void 0===x?void 0:x.count)||0,"MLC Credit Usage":I.toFixed(3),"UC Count":"ALL"===t?e.ucCount||0:(null===(y=(e.ucCreditUsageCountryWise||{})[t])||void 0===y?void 0:y.count)||0,"UC Credit Usage":A.toFixed(3),"WA Pay Count":C?C.toFixed(3):0,"WA Pay Credit Usage":T?T.toFixed(3):0,dateObj:v()(new Date(e.dayDate))}}))],i=i.sort(((e,t)=>e.dateObj.diff(t.dateObj,"minutes")));const n={};i.forEach((e=>{const t=e.date;if(n[t]){const a=n[t];for(const t in e)if("date"!==t&&"dateObj"!==t&&!isNaN(parseFloat(e[t]))&&isFinite(e[t])){const s=parseFloat(a[t])||0,i=parseFloat(e[t])||0;a[t]=(s+i).toFixed(3)}}else n[t]={...e}})),i=Object.values(n),this.setState({templateCreditUsage:i,wccCountries:s,isTemplateAnalyticsLoading:!1})},this.filterEngagementData=()=>{let{dailyEngagementAnalytics:e}=this.state,t=[];t=[...e.map((e=>{const t=v()(e.dayDate).format("MM/DD/YYYY").split("/");return{date:t[1]+" "+ye[Number(t[0]-1)],"Enterprise Session":e.engagementCount,dateObj:v()(new Date(e.dayDate))}}))],t=t.sort(((e,t)=>e.dateObj.diff(t.dateObj,"minutes"))),this.setState({engagementUsage:t,isEnagagementAnalyticsLoading:!1})},this.loadData=()=>{this.setState({isAnalyticsLoading:!0});const{match:e,assistantDetails:t}=this.props,{timezone:a}=t,s=e.params.projectId,i=this.state.fromDate,n=this.state.toDate,r=this.state.selectedBillingPeriod,o=j.URL+("all"===this.state.analyticsSection?"/api/mac-analytics":"/api/mac-billing-analytics");m.Z.post(o,{fromDate:"all"===this.state.analyticsSection?this.getDayStartTimestamp(i,(null===a||void 0===a?void 0:a.split(" ")[0])||"Asia/Calcutta"):null===r||void 0===r?void 0:r.fromDate,toDate:this.getDayEndTimestamp(n,(null===a||void 0===a?void 0:a.split(" ")[0])||"Asia/Calcutta"),assistantId:s}).then((e=>{const{dailyMacAnalytics:t}=e.data;this.setState({dailyMacAnalytics:t},this.filterData)})).catch((e=>{console.error(e),this.setState({err:e,isAnalyticsLoading:!1})}))},this.getDayStartTimestamp=(e,t)=>v().tz(new Date(e),t).startOf("day"),this.getDayEndTimestamp=(e,t)=>v().tz(new Date(e),t).endOf("day"),this.loadTemplateData=()=>{this.setState({isTemplateAnalyticsLoading:!0,wccAnalyticsCountry:"ALL"}),this.cancelTokenSource=m.Z.CancelToken.source();const{match:e,assistantDetails:t}=this.props,{timezone:a}=t,s=e.params.projectId,i=this.state.templateFromDate,n=this.state.templateToDate;m.Z.post(j.URL+"/api/daily-chat-analytics",{fromDate:this.getDayStartTimestamp(i,(null===a||void 0===a?void 0:a.split(" ")[0])||"Asia/Calcutta"),toDate:this.getDayEndTimestamp(n,(null===a||void 0===a?void 0:a.split(" ")[0])||"Asia/Calcutta"),assistantId:s},{cancelToken:this.cancelTokenSource.token}).then((e=>{const{dailyChatAnalytics:t,dailyPaymentAnalytics:a}=e.data,s=(0,oe.keyBy)(a,"_id");this.setState({dailyTemplateAnalytics:t,dailyPaymentAnalytics:s},this.filterTemplateData)})).catch((e=>{console.error(e),this.setState({err:e,isTemplateAnalyticsLoading:!1})}))},this.loadEngagagementData=()=>{this.setState({isEnagagementAnalyticsLoading:!0});const{match:e,assistantDetails:t}=this.props,{timezone:a}=t,s=e.params.projectId,i=this.state.engagementFromDate,n=this.state.engagementToDate;m.Z.post(j.URL+"/api/daily-engagement-analytics",{fromDate:this.getDayStartTimestamp(i,(null===a||void 0===a?void 0:a.split(" ")[0])||"Asia/Calcutta"),toDate:this.getDayEndTimestamp(n,(null===a||void 0===a?void 0:a.split(" ")[0])||"Asia/Calcutta"),assistantId:s}).then((e=>{const{dailyEngagementAnalytics:t}=e.data;this.setState({dailyEngagementAnalytics:t},this.filterEngagementData)})).catch((e=>{console.error(e),this.setState({err:e,isEnagagementAnalyticsLoading:!1})}
2))},this.loadBillingPeriods=()=>{this.cancelTokenBillingPeriods=m.Z.CancelToken.source();const e=this.props.match.params.projectId;m.Z.post(j.URL+"/api/get-billing-periods",{assistantId:e},{cancelToken:this.cancelTokenBillingPeriods.token}).then((e=>{const{billingPeriods:t}=e.data,a=t.sort(((e,t)=>new Date(e._id).getTime()<new Date(t._id).getTime()?-1:1)).map(((e,t,a)=>{const s={fromDate:e._id};return a[t+1]&&(s.toDate=a[t+1]._id),s}));this.setState({billingPeriods:a,selectedBillingPeriod:a[a.length-1]},this.loadData)})).catch((e=>{var t,a;const s=e.response,i=(null===s||void 0===s||null===(t=s.data)||void 0===t?void 0:t.errorMessage)||(null===s||void 0===s||null===(a=s.data)||void 0===a?void 0:a.message)||"Something went wrong! Check your network connection.";i&&this.setState({status:"error",statusMessage:i})}))},this.canclePlan=async()=>{try{this.setState({confirmTask:!1});const e={type:"plan-cancel"};this.props.updateAssistantStore({ongoingBillingProcess:e});const t=this.props.match.params.projectId;await m.Z.post(j.URL+"/payment/cancel-plan",{assistantId:t,ongoingBillingProcess:e})}catch(e){this.props.updateAssistantStore({ongoingBillingProcess:null}),this.showSnackbar({alertOpen:!0,alertMsg:"Failed to cancel plan",severity:"error"})}},this.cancelAddon=async()=>{try{const e={type:"addon-cancel"};this.props.updateAssistantStore({ongoingBillingProcess:e});let t=await(0,q.iV)({assistantId:this.props.match.params.projectId,isScheduledAddon:this.state.isScheduledAddon});if(!t)throw"failed";t&&(this.showSnackbar({alertOpen:!0,alertMsg:"success",severity:"success"}),this.props.fetchAssistantDetails(this.props.match.params.projectId,!0),this.props.updateAssistantStore({ongoingBillingProcess:null,flowConfiguration:{isEnabled:!1,flowCount:0,activeFlowCount:0,isTrialClaimed:!0},...this.state.isScheduledAddon?{subscriptionScheduledItems:this.props.assistantDetails.subscriptionScheduledItems.filter((e=>"addon"!==e.item_type))||this.props.assistantDetails.subscriptionScheduledItems.filter((e=>e.addon_code.includes("Flows")))||this.props.assistantDetails.subscriptionScheduledItems.filter((e=>"box"!==e.unit))}:{subscription:this.props.assistantDetails.subscription.filter((e=>"addon"!==e.item_type))||this.props.assistantDetails.subscription.filter((e=>"box"!==e.unit))}}),this.setState({confirmAddonTask:!1}))}catch(e){console.log(e),this.props.updateAssistantStore({ongoingBillingProcess:null}),this.showSnackbar({alertOpen:!0,alertMsg:"Failed to cancel",severity:"error"})}},this.getOrderItemColumn=(e,t,a)=>{const s=t.key;switch(s){case"orderId":return(0,k.jsx)(i.Z,{item:!0,container:!0,xs:4,className:e.orderItem,children:(0,k.jsx)(n.Z,{variant:"h5",children:a[s]})});case"status":return(0,k.jsx)(i.Z,{item:!0,container:!0,xs:2,className:e.orderItem,children:(0,k.jsx)(n.Z,{variant:"h5",style:{color:"green"},children:a[s].toUpperCase()})});case"amount":return(0,k.jsx)(i.Z,{item:!0,container:!0,xs:2,className:e.orderItem,children:(0,k.jsx)(n.Z,{variant:"h5",children:a[s]/100})});case"createdAt":return(0,k.jsx)(i.Z,{item:!0,container:!0,xs:2,className:e.orderItem,children:(0,k.jsx)(n.Z,{variant:"h5",children:new Date(a[s]).toLocaleDateString(["en-GB"],{hour:"numeric",minute:"numeric",hour12:!0})})});default:return(0,k.jsx)(i.Z,{item:!0,container:!0,xs:2,className:e.orderItem,children:(0,k.jsx)(n.Z,{variant:"h5",children:a[s]})})}},this.state={orderId:"",selectedPlan:null,openBillingAddress:!1,openPartnerBillingAddress:!1,address:{addressDetail:"",state:"",country:""},currentDetails:{},status:"",statusMessage:"",isLoading:!0,paymentStatus:"",alertOpen:!1,alertMsg:"",severity:"",analyticsSection:"current",isAnalyticsLoading:!1,fromDate:xe["Last 7 days"].fromDate,toDate:xe["Last 7 days"].toDate,startDate:null,endDate:null,focusedInput:null,macUsageData:[],isTemplateAnalyticsLoading:!1,templateFromDate:xe["Last 7 days"].fromDate,templateToDate:xe["Last 7 days"].toDate,engagementFromDate:xe["Last 7 days"].fromDate,engagementToDate:xe["Last 7 days"].toDate,templateCreditUsage:[],templateStartDate:null,templateEndDate:null,templateFocusedInput:null,engagementStartDate:null,engagementEndDate:null,engagementFocusedInput:null,confirmTask:!1,confirmAddonTask:!1,confirmDowngradeTask:!1,wccA
2nalyticsCountry:"ALL",wccCountries:["ALL"],interval:"Last 7 days",templateInterval:"Last 7 days",engagementInterval:"Last 7 days",billingPeriods:[],dailyPaymentAnalytics:[],selectedBillingPeriod:"",isScheduledAddon:!1}}componentDidMount(){const{match:e,assistantDetails:t}=this.props,{providerType:a,type:s,cbpType:i}=t,n=e.params.projectId;i&&(this.loadTemplateData(),this.loadBillingPeriods(),this.props.fetchAssistantDetails(n,!0)),"ENTERPRISE"===i&&this.loadEngagagementData(),i&&"MAC"!==i&&this.props.fetchAssistantDetails(n,!0)}componentWillUnmount(){this.cancelTokenSource&&this.cancelTokenSource.cancel("Operation canceled due to component unmounting."),this.cancelTokenBillingPeriods&&this.cancelTokenBillingPeriods.cancel("Operation canceled due to component unmounting.")}getPlanSectionType(){const{currentDetails:e}=this.state;return"v1"===e.assistantType?"v1":"v3"===e.assistantType?"v3":"v4"===e.assistantType?"v4":"normal"===e.planType?"v2":"enterprise"}render(){var e,t,a,p,h,m,y,f,C;const{classes:Z,assistantDetails:D,power:S,isReloading:w,match:A}=this.props,T=A.params.projectId,{providerType:F,type:P,frequency:O,planDisplayName:N,subscriptionStatus:U,planActivatedOn:R,ongoingBillingProcess:L,promotionalCredits:z,currency:Y,activePlan:V,planRenewalOn:G,cardAdded:Q,cbpType:$,allowPurchase:K,partnerId:X,chargebeePlan:te,planDuration:ie,partner:oe}=D,{currentDetails:he,isLoading:ge,selectedPlan:xe,currentMonthUsage:ye,analyticsSection:be,isAnalyticsLoading:fe,isTemplateAnalyticsLoading:Ce,isEnagagementAnalyticsLoading:Ze,wccAnalyticsCountry:De,wccCountries:Se}=this.state,we=(0,b.i1)(D),ke=new Date(G),Ae=he.orders||[],{assistantType:Ie,templateCredit:Te,remainingSessionMessages:Fe,remainingCredit:Pe,macUsage:Me,macQuota:Oe,remainingEnterpriseSessions:Be}=he,Ne="v1"===Ie&&Pe<500||"v2"===Ie&&(Te<500||Fe<500)||"enterprise"===Ie&&(Te<500||Be<500)||"v3"===Ie&&(Te<500||Oe-Me<500)||"v4"===Ie&&Te<500,Ue=("v2"===F||"v3"===F)&&("v3"===P||"v4"===P),Ee=new Date(R||0),Re=Date.now()-Ee.getTime()<864e5;return(0,k.jsxs)("div",{className:"".concat(Z.root," ginger-page-root"),children:[(0,k.jsx)(i.Z,{container:!0,justify:"center",alignItems:"center",className:"".concat(Z.pageTitleContainer," ").concat(Z.fullWidth," ginger-page-header"),children:(0,k.jsx)(i.Z,{item:!0,xs:!0,children:(0,k.jsxs)(r.Z,{px:{xs:2,md:3},display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,k.jsx)(n.Z,{variant:"h3",children:"Billing & Usage"}),(0,k.jsx)(pe.default,{})]})})}),(0,k.jsx)(r.Z,{my:3}),(0,k.jsxs)(i.Z,{container:!0,justify:"center",children:[(null===D||void 0===D||null===(e=D.activePlan)||void 0===e?void 0:e.includes("AUTOMATION_LITE"))&&(0,k.jsx)(i.Z,{item:!0,xs:12,md:10,lg:10,children:(0,k.jsx)(r.Z,{px:{xs:1,md:0},mb:2,children:(0,k.jsx)(de.Z,{variant:"orange"})})}),(0,k.jsx)(i.Z,{item:!0,xs:12,md:10,lg:10,children:(0,k.jsxs)(r.Z,{px:{xs:1,md:0},children:[(0,k.jsx)(le.Z,{title:"Quick Guide",description:"You can refer your billing cycle and plan details here.",section:"billingAndUsage",prospectId:null===D||void 0===D?void 0:D.prospectId,showTutorial:!X}),!Ue&&(0,k.jsx)(r.Z,{my:4,children:ge?(0,k.jsx)(g.Z,{variant:"rect",height:120,style:{background:"#EBF5F3",borderRadius:8}}):(0,k.jsx)(i.Z,{container:!0,className:(0,x.Z)(Z.container,Z.primaryBackground,{[Z.elevation]:"enterprise"===this.getPlanSectionType()}),children:ue[this.getPlanSectionType()].map(((e,t)=>(0,k.jsxs)(i.Z,{item:!0,container:!0,xs:11,md:!0,className:Z.currentPlanItem,justify:"center",alignItems:"center",children:[(0,k.jsxs)(i.Z,{item:!0,xs:9,children:[(0,k.jsx)(n.Z,{variant:"h5",style:{color:"black",fontSize:13},children:e.name}),(0,k.jsx)(n.Z,{variant:"body2",color:"textSecondary",children:e.bottomText})]}),(0,k.jsx)(i.Z,{item:!0,xs:9,children:(0,k.jsx)(n.Z,{variant:"h5",className:(0,x.Z)(Z.currentPlanItemMainText,{[Z.bigText]:0==t}),children:he[e.key]||0===he[e.key]?"activatedOn"===e.key?new Date(he[e.key]).toLocaleString([],{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"numeric"}):"macUsage"===e.key?String(Oe-Me<0?0:Oe-Me):String(he[e.key]):"--"})})]})))})}),!$&&(ge?(0,k.jsx)(g.Z,{variant:"rect",height:150,style:{borderRadius:8}}):(0,k.jsx)(B,{title:"Current Month Usage",usageData:ye,assistantType:he.assistantType,creditDetails:he,planSectionType:this.getPlanSectionType()})),(!!xe||Ne)&&!$&&(0,k.jsx)(r.Z,{my:4,px:3,py:3,className:Z.container,children:(0,k.jsx)(M,{classes:Z,setPlan:this.setPlan,selectedPlan:xe,address:this.state.address,toggleBillingAddressPopup:this.toggleBillingAddressPopup,placeOrder:this.placeOrder,remainingCredit:he.remainingCredit,paymentStatus:this.state.paymentStatus,isCreditLow:Ne})}),!$&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(r.Z,{mt:4,mb:2,children:(0,k.jsx)(n.Z,{variant:"h4",children:"Last transactions"})}),(0,k.jsx)(r.Z,{className:Z.scrollableContainer,children:(0,k.jsxs)(i.Z,{container:!0,className:Z.container,children:[(0,k.jsx)(i.Z,{item:!0,container:!0,xs:12,style:{flexWrap:"nowrap"},children:me.map(((e,t)=>(0,k.jsx)(i.Z,{item:!0,container:!0,xs:0==t?4:2,className:Z.orderItem,children:e.name})))}),Ae.length?(0,k.jsx)(s.Fragment,{children:Ae.map((e=>(0,k.jsx)(i.Z,{item:!0,container:!0,xs:12,style:{flexWrap:"nowrap"},children:me.map((t=>this.getOrderItemColumn(Z,t,e)))})))}):(0,k.jsx)(i.Z,{item:!0,xs:12,container:!0,spacing:2,children:(0,k.jsx)(i.Z,{item:!0,style:{height:100},alignItems:"center",justify:"center",container:!0,xs:!0,children:(0,k.jsx)(i.Z,{item:!0,children:(0,k.jsx)(n.Z,{variant:"h5",color:"textSecondary",children:"No previous transactions"})})})})]})})]}),Ue&&(!X||X&&(null===(t=this.props.assistantDetails)||void 0===t||null===(a=t.partner)||void 0===a?void 0:a.isZohoEnabled)&&"NONE"!==(null===(p=this.props.assistantDetails)||void 0===p?void 0:p.activePlan))&&(0,k.jsx)(ae,{assistantDetails:D,showSnackbar:this.showSnackbar,updateAssistantStore:this.props.updateAssistantStore,power:S,isReloading:w}),(Ue||"ENTERPRISE"===$&&K)&&(0,k.jsxs)(i.Z,{container:!0,justify:"left",children:[(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,lg:6,children:(0,k.jsx)(se.Z,{assistantDetails:D,power:S,assistantId:T,inBilling:!0,isReloading:w})}),(!X||te||X&&((null===oe||void 0===oe?void 0:oe.partnerRazorpayEnabled)||(null===(h=this.props.assistantDetails)||void 0===h||null===(m=h.partner)||void 0===m?void 0:m.isZohoEnabled)))&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,lg:6,children:(0,k.jsx)(_.Z,{showSnackbar:this.showSnackbar,inBilling:!0,isReloading:w,partnerRazorpayEnabled:null===oe||void 0===oe?void 0:oe.partnerRazorpayEnabled})}),(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,lg:6,children:(0,k.jsx)(W.Z,{showSnackbar:this.showSnackbar,inBilling:!0,isReloading:w,partnerRazorpayEnabled:null===oe||void 0===oe?void 0:oe.partnerRazorpayEnabled,togglePartnerBillingAddrs:this.togglePartnerBillingAddrs,openPartnerBillingAddress:this.state.openPartnerBillingAddress})})]}),!!(z&&z>0)&&(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,lg:6,children:(0,k.jsx)(ne,{promotionalCredits:z,currency:Y,isReloading:w})})]}),$&&(0,k.jsxs)(r.Z,{className:Z.planCancelBox,mt:4,children:[(0,k.jsx)(n.Z,{variant:"h4",color:"primary",style:{fontSize:18},children:"Conversation Credit Usage"}),(0,k.jsx)(r.Z,{mt:3}),(0,k.jsxs)(i.Z,{container:!0,alignItems:"center",justify:"space-between",spacing:1,children:[(0,k.jsxs)(i.Z,{item:!0,xs:12,md:9,container:!0,spacing:1,style:{maxWidth:534,minWidth:534},children:[(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,style:{maxWidth:210},children:(0,k.jsx)(r.Z,{children:(0,k.jsx)(u.ZP,{disableClearable:!0,value:this.state.templateInterval,options:ve.map((e=>e)),onChange:(e,t,a)=>this.handleAutoComplete("templateInterval",t,a),renderInput:e=>(0,k.jsx)(o.Z,{...e,className:Z.textField1,InputProps:{...e.InputProps},placeholder:"Select duration",name:"Duration"})})})}),(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,children:(0,k.jsx)(r.Z,{children:(0,k.jsx)(je,{startDate:this.state.templateFromDate,endD
2ate:this.state.templateToDate,focusedInput:this.state.templateFocusedInput,setDate:this.setTemplateDate,setFocus:this.setTemplateFocus,classes:Z,minDate:v()(new Date("02/15/2022"))})})})]}),(0,k.jsx)(i.Z,{item:!0,xs:12,md:3,style:{maxWidth:224},children:(0,k.jsx)(r.Z,{children:(0,k.jsx)(u.ZP,{disableClearable:!0,selectOnFocus:!1,options:Se.map((e=>"ALL"===e||"OTHERS"===e?e:(re.J0[e]||"").toUpperCase())),onChange:(e,t,a)=>this.setState({wccAnalyticsCountry:"ALL"===t||"OTHERS"===t?t:Object.entries(re.J0).find((e=>e[1].toLowerCase()===t.toLowerCase()))[0]},this.filterTemplateData),value:"ALL"===De||"OTHERS"===De?De:(re.J0[De]||"").toUpperCase(),renderInput:e=>(0,k.jsx)(o.Z,{...e,className:Z.countryDropdown,InputProps:{...e.InputProps},placeholder:"Select Country"})})})}),(0,k.jsx)(i.Z,{item:!0,xs:12,container:!0,spacing:1,className:Z.totalContainer,children:["BIC Count","BIC Credit Usage","UIC Count","UIC Credit Usage","SC Count","SC Credit Usage",...we?["SC Free Count"]:[],"AC Count","AC Credit Usage","MC Count","MC Credit Usage","MLC Count","MLC Credit Usage","UC Count","UC Credit Usage","WA Pay Count","WA Pay Credit Usage","Total Credit Usage"].map((e=>(0,k.jsxs)(i.Z,{item:!0,xs:6,md:2,children:[(0,k.jsx)(n.Z,{variant:"body2",gutterBottom:!0,children:e}),(0,k.jsxs)(n.Z,{variant:"body2",children:[e.includes("Credit")?"USD"===Y?"$":"\u20b9":"",this.state.templateCreditUsage.reduce(((t,a)=>Number(a[e])+t),0).toFixed(3)]})]})))})]}),(0,k.jsx)(E.Z,{data:[...this.state.templateCreditUsage],keys:["Total Credit Usage","SC Count","SC Credit Usage",...we?["SC Free Count"]:[],"AC Count","AC Credit Usage","MC Count","MC Credit Usage","MLC Count","MLC Credit Usage","UC Count","UC Credit Usage","WA Pay Count","WA Pay Credit Usage"],isLoading:Ce,color:"hsl(64deg 86% 47% / 57%)"})]}),"ENTERPRISE"===$&&(0,k.jsxs)(r.Z,{className:Z.planCancelBox,mt:4,children:[(0,k.jsx)(n.Z,{variant:"h4",color:"primary",style:{fontSize:18},children:"Enterprise Session Usage"}),(0,k.jsx)(r.Z,{mt:3}),(0,k.jsxs)(i.Z,{container:!0,alignItems:"center",justify:"space-between",spacing:1,children:[(0,k.jsxs)(i.Z,{item:!0,xs:12,md:9,container:!0,spacing:1,style:{maxWidth:534,minWidth:534},children:[(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,style:{maxWidth:210},children:(0,k.jsx)(r.Z,{children:(0,k.jsx)(u.ZP,{disableClearable:!0,value:this.state.engagementInterval,options:ve.map((e=>e)),onChange:(e,t,a)=>this.handleAutoComplete("engagementInterval",t,a),renderInput:e=>(0,k.jsx)(o.Z,{...e,className:Z.textField1,InputProps:{...e.InputProps},placeholder:"Select duration",name:"Duration"})})})}),(0,k.jsx)(i.Z,{item:!0,xs:12,md:6,children:(0,k.jsx)(r.Z,{children:(0,k.jsx)(je,{startDate:this.state.engagementFromDate,endDate:this.state.engagementToDate,focusedInput:this.state.engagementFocusedInput,setDate:this.setEngagementDate,setFocus:this.setEngagementFocus,classes:Z,minDate:v()(new Date("02/15/2022"))})})})]}),(0,k.jsx)(i.Z,{item:!0,xs:12,container:!0,spacing:1,className:Z.totalContainer,children:(0,k.jsxs)(i.Z,{item:!0,xs:12,children:[(0,k.jsx)(n.Z,{variant:"body2",gutterBottom:!0,children:"Total Enterprise Session Usage"}),(0,k.jsx)(n.Z,{variant:"body2",children:(this.state.engagementUsage||[]).reduce(((e,t)=>e+t["Enterprise Session"]),0)})]})})]}),(0,k.jsx)(E.Z,{data:[...this.state.engagementUsage||[]],keys:["Enterprise Session"],isLoading:Ze,color:"hsl(64deg 86% 47% / 57%)"})]}),ie>17&&"FREE_FOREVER"!==V&&Ue&&2===S&&(!X||X!==j.AISENSY_PARTNER_ID&&(null===(y=this.props.assistantDetails)||void 0===y||null===(f=y.partner)||void 0===f?void 0:f.isZohoEnabled)||te)&&"active"===U&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(n.Z,{style:{color:"red",margin:"32px 0 16px",fontSize:18,fontFamily:"Inter"},children:"Danger Zone"}),(0,k.jsxs)(r.Z,{className:Z.planCancelBox,children:[(0,k.jsx)(n.Z,{variant:"h4",color:"primary",style:{fontSize:18},children:"Cancel Plan"}),(0,k.jsxs)(r.Z,{mt:2,textAlign:"center",children:[(()=>{const e=(0,ce.Z)(D),{currentTier:t}=e;if(t===ee.ADDON_TIERS.NONE)return null;const a=t===ee.ADDON_TIERS.AI_MESSAGES,s=(null===D||void 0===D?void 0:D.planDuration)<15;return(0,k.jsxs)(k.Fragment,{children:[a&&(0,k.jsxs)("div",{style:{display:"flex",marginBottom:"20px",alignItems:"center",gap:"10px"},children:[(0,k.jsx)(n.Z,{variant:"h6",color:"primary",children:"Downgrade to Basic Flows"}),(0,k.jsx)(n.Z,{variant:"body2",color:"textSecondary",style:{flex:1},children:"Keep your flows, remove AI messages"}),(0,k.jsx)(l.Z,{variant:"outlined",size:"small",onClick:()=>this.setState({confirmDowngradeTask:!0}
2),style:{color:"#f57c00",borderColor:"#f57c00"},disabled:!!L,endIcon:L?(0,k.jsx)(d.Z,{size:20,style:{color:"#f57c00"}}):"",children:"Downgrade"})]}),(0,k.jsxs)("div",{style:{display:"flex",marginBottom:"40px",alignItems:"center",gap:"10px"},children:[(0,k.jsxs)(n.Z,{variant:"h6",color:"primary",children:["Cancel ",a?"AI Messages Addon":"Flow Addon"," ",s?"Trial":""]}),(0,k.jsx)(n.Z,{variant:"body2",color:"textSecondary",style:{flex:1},children:a?"Remove flows and AI messages":"Remove all flows"}),(0,k.jsxs)(l.Z,{variant:"outlined",size:"small",onClick:()=>this.setState({confirmAddonTask:!0}),style:{color:"red",borderColor:"red"},disabled:!!L,endIcon:L?(0,k.jsx)(d.Z,{size:20,style:{color:"red"}}):"",children:["Cancel Addon ",s?"Trial":""]})]})]})})(),(null!==(C=null===D||void 0===D?void 0:D.subscriptionScheduledItems)&&void 0!==C?C:[]).length>0&&!X&&(0,k.jsxs)("div",{style:{display:"flex",marginTop:"20px 0px",marginBottom:"40px",alignItems:"center",gap:"10px"},children:[(0,k.jsx)(n.Z,{variant:"h6",color:"primary",children:"Cancel Scheduled Addon"}),(0,k.jsx)(l.Z,{variant:"outlined",size:"small",onClick:()=>{this.setState({isScheduledAddon:!0,confirmAddonTask:!0})},style:{color:"red",borderColor:"red",margin:"0px"},disabled:!!L,endIcon:L?(0,k.jsx)(d.Z,{size:20,style:{color:"red"}}):"",children:"Cancel Scheduled Trial"})]}),(0,k.jsx)(n.Z,{variant:"body2",children:"To stop using services when ".concat(ie<15?"trial":"term"," ends.")}),(0,k.jsx)(c.ZP,{enterTouchDelay:0,title:O&&ie>15&&Re?"You can cancel plan only after 24 hours of activation.":(0,q.Ig)(L),children:(0,k.jsx)(r.Z,{children:(0,k.jsx)(l.Z,{variant:"outlined",onClick:()=>{this.setState({confirmTask:!0})},className:Z.cancelPlanButton,disabled:!!L||O&&ie>15&&Re,endIcon:L?(0,k.jsx)(d.Z,{size:20,style:{color:"red"}}):"",children:"Cancel Plan"})})})]})]})]})]})})]}),(0,k.jsx)(I,{openBillingAddress:this.state.openBillingAddress,toggleBillingAddressPopup:this.toggleBillingAddressPopup,saveBillingAddress:this.saveBillingAddress}),(0,k.jsx)(r.Z,{my:8}),(0,k.jsx)(H.A9,{open:this.state.alertOpen,anchorOrigin:{vertical:"top",horizontal:"center"},onClose:this.onSnackbarClose,severity:this.state.severity,message:this.state.alertMsg}),(0,k.jsx)(J.Z,{open:!!this.state.confirmTask,taskMessage:"Cancel ".concat(ie<15?"trial":O," plan"),onClose:this.onConfirmationDialogClose,onConfirm:this.canclePlan,body:(0,k.jsx)(r.Z,{children:"monthly"===O||"v4"===P?(0,k.jsxs)(n.Z,{variant:"body1",children:["\u2022 Plan will continue to work until term end ( ".concat(v()(ke).format("DD/MM/YY")," )."),(0,k.jsx)("br",{}),"\u2022 Plan renewal will stop & all services will stop there after.","v4"!==P&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("br",{}),"\u2022 All additional charges will be invoiced at term end."]}),(0,k.jsx)("br",{}),"\u2022 This cancel is revertable before changes are applied\n when ".concat(ie<15?"trial":"term"," ends.")]}):(0,k.jsxs)(n.Z,{variant:"body1",children:["\u2022 Plan will continue to work until term end ( ".concat(v()(ke).format("DD/MM/YY")," ) or when MAU finishes."),(0,k.jsx)("br",{}),"\u2022 All services will stop immediately there after.",(0,k.jsx)("br",{}),"\u2022 This cancel is revertable before changes are applied\n when ".concat(ie<15?"trial":"term"," ends.")]})})}),(0,k.jsx)(J.Z,{open:!!this.state.confirmAddonTask,taskMessage:"Cancel scheduled addon",onClose:this.onAddonConfirmationDialogClose,onConfirm:this.cancelAddon,body:(0,k.jsx)(r.Z,{children:(0,k.jsxs)(n.Z,{variant:"body1",children:["\u2022 Addon ".concat(this.state.isScheduledAddon?"trial":""," will terminate immediately"),(0,k.jsx)("br",{}),"\u2022 You can later purchase addon along with you plan",(0,k.jsx)("br",{}),"\u2022 This cancel is not revertable for this trial"]})})}),(0,k.jsx)(J.Z,{open:!!this.state.confirmDowngradeTask,taskMessage:"Downgrade to Basic Flows",onClose:this.onDowngradeConfirmationDialogClose,onConfirm:this.handleDowngradeToBasicFlow,body:(0,k.jsx)(r.Z,{children:(0,k.jsxs)(n.Z,{variant:"body1",children:["\u2022 AI Messages will be removed at next renewal",(0,k.jsx)("br",{}),"\u2022 Your flows will be kept as Basic Flows",(0,k.jsx)("br",{}),"\u2022 No refund will be issued for the current billing cycle"]})})})]})}}function je(e){const{startDate:t,endDate:a,focusedInput:s,classes:i,minDate:n}=e,{setFocus:r,setDate:o}=e;return(0,k.jsx)(R.DateRangePicker,{startDatePlaceholderText:"From",endDatePlaceholderText:"To",startDateId:"startDate",endDateId:"endDate",startDate:t,endDate:a,onDatesChange:e=>{let{startDate:t,endDate:a}=e;return o(t,a)},focusedInput:s,onFocusChange:e=>r(e),navPosition:"navPositionTop",numberOfMonths:1,minimumNights:0,navPrev:(0,k.jsx)(fe,{classes:i,children:(0,k.jsx)(L.Z,{})}),navNext:(0,k.jsx)(fe,{classes:i,children:(0,k.jsx)(z.Z,{})}),hideKeyboardShortcutsPanel:!0,customArrowIcon:null,screenReaderInputMessage:" ",small:!0,readOnly:!0,displayFormat:"DD/MM/YYYY",isOutsideRange:e=>n?e.isAfter(v()())||e.isBefore(n):e.isAfter(v()()),minDate:n,maxDate:v()(new Date)})}function fe(e){const{classes:t}=e;return(0,k.jsx)("div",{className:t.navigationWrapper,children:(0,k.jsx)(p.Z,{size:"small",children:e.children})})}const Ce=(0,N.connect)((e=>({assistantDetails:e.assistantDetails.data,power:e.login.user.power,isReloading:e.assistantDetails.isReloading})),{updateAssistantStore:U.sJ,fetchAssistantDetails:U.W9})(be),Ze=(0,h.Z)((e=>({root:{width:"100%",height:"100%",background:"rgb(249,249,249)",boxSizing:"border-box",overflowX:"hidden",position:"relative"},container:{background:"white",borderRadius:"8px"},pageTitleContainer:{position:"sticky",zIndex:100,top:0,height:60,boxSizing:"border-box",boxShadow:"0 0 11px rgb(230 230 230)",[e.breakpoints.down("md")]:{},[e.breakpoints.down("sm")]:{}},fullWidth:{width:"100%",background:"white"},currentPlanItem:{height:130}
2,primaryBackground:{background:e.palette.primary.light},currentPlanItemMainText:{fontSize:18,color:"#251F21"},bigText:{fontWeight:500,fontSize:32,color:e.palette.primary.main},orderItem:{padding:e.spacing(2),paddingLeft:e.spacing(3),minWidth:160},selectedPlan:{borderRadius:8,background:e.palette.primary.main,color:"white",paddingTop:e.spacing(2),paddingBottom:e.spacing(2),padding:"16px !important"},margin:{[e.breakpoints.down("sm")]:{marginTop:e.spacing(2)}},scrollableContainer:{width:"100%",overflow:"auto",borderRadius:8,background:"white",minHeight:200},planCancelBox:{width:"100%",borderRadius:8,background:"white",padding:24,boxSizing:"border-box",boxShadow:"0 0 11px rgb(230 230 230)"},toggelBox:{overflow:"hidden",border:"1px solid lightgrey",borderRadius:"8px",marginTop:"12px",display:"flex",[e.breakpoints.down("md")]:{width:"100%",margin:"12px 0"},[e.breakpoints.up("md")]:{width:400,margin:"24px 12px"}},toggelOptions:{width:"50%",cursor:"pointer",display:"flex",padding:"8px 8px 10px",justifyContent:"center",alignItems:"center",textAlign:"center",fontWeight:"500",color:e.palette.primary.main,borderRadius:"8px",[e.breakpoints.down("md")]:{fontSize:"12px"},[e.breakpoints.up("md")]:{fontSize:"14px"}},toggelSelected:{zIndex:1,color:"white !important"},progress:{position:"fixed",top:"8em",right:"44.5vw"},navigationWrapper:{marginLeft:e.spacing(1),marginRight:e.spacing(1),paddingTop:18,paddingBottom:37,display:"inline-block"},cancelPlanButton:{color:"red",borderColor:"red",width:"100%",maxWidth:250,margin:"16px auto 0",height:"40px"},elevation:{boxShadow:"0 0 6px rgb(206 221 218)"},countryDropdown:{width:200,float:"right",marginRight:16,padding:"2px 16px"},textField1:{width:200,padding:"2px 16px"},textField:{width:200,padding:"2px 16px",marginBottom:"8px",[e.breakpoints.down("md")]:{marginLeft:"0"},[e.breakpoints.up("md")]:{marginLeft:"12px"}},totalContainer:{[e.breakpoints.down("md")]:{margin:"18px 0 0"},[e.breakpoints.up("md")]:{margin:"18px 0 0 18px"}},guideContainer:{background:"white",borderRadius:"8px"}})))(Ce)},26396:(e,t,a)=>{"use strict";a.d(t,{Z:()=>D});var s=a(47313),i=a(68146),n=a(21144),r=a(57009),o=a(73908),l=a(34882),d=a(96083),c=a(20337),p=a(52376),h=a(9841),g=a(18998),u=a(47735),m=(a(59017),a(1805)),x=a(60240),y=a(45788),v=a(70089),b=a(8871),j=(a(29618),a(31685)),f=a(46417);class C extends s.Component{constructor(e){super(e),this.toggleTemplateCreditDialog=()=>{this.setState({templatedialogOpen:!this.state.templatedialogOpen})},this.loadFreeServiceUsage=()=>{const{assistantId:e,assistantDetails:t}=this.props;e&&(0,b.i1)(t)&&v.Z.post(m.URL+"/api/free-service-usage",{assistantId:e}).then((e=>{let{data:t}=e;t&&this.setState({freeService:t})})).catch((t=>{var a;console.error("free-service-usage failed",{assistantId:e,status:null===t||void 0===t||null===(a=t.response)||void 0===a?void 0:a.status,error:t})}))},this.state={templatedialogOpen:!1,freeService:null}}componentDidMount(){const{assistantDetails:e}=this.props,{templateCredit:t}=e;this.loadFreeServiceUsage(),t<500&&j.Z.trackCustomEvent("wcc_credits_low_triggered",{credit_balance:t})}render(){var e,t,a;const{classes:s,assistantDetails:p,assistantId:y,showSnackbar:v,power:C,inBilling:Z,isReloading:D}=this.props,{templateCredit:S,freeTierCoversationCount:w,currency:k,ongoingBillingProcess:A,cbpType:I,allowPurchase:T,pendingInvoices:F,providerType:P,autoWccRecharge:M,partner:O}=p,{partnerId:B}=this.props.assistantDetails,{freeService:N}=this.state,U=!!N,E=(null===N||void 0===N?void 0:N.used)||0,R=(null===N||void 0===N?void 0:N.limit)||b.on,L=Math.min(E/R*100,100),z=Math.min(Math.max(L,1),99);return D?(0,f.jsx)(u.Z,{variant:"rect",className:Z?s.cardLookSkeleton:s.rootSkeleton}):(0,f.jsxs)("div",{className:Z?s.cardLook:s.root,children:["v3"===P&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(n.Z,{container:!0,alignItems:"center",style:{justifyContent:"space-between"},children:[(0,f.jsx)(n.Z,{item:!0,children:(0,f.jsx)(r.Z,{variant:"h5",children:"Free Service Messages"})}),(0,f.jsx)(n.Z,{item:!0,children:(0,f.jsx)(o.Z,{display:"flex",justifyContent:"space-between",alignItems:"center"})})]}),(0,f.jsx)(o.Z,{position:"relative",height:U?26:15,...U?{mt:2}:{},children:(0,f.jsx)(o.Z,{className:s.usageBubble,style:{left:"".concat(U?z:99,"%")},children:(0,f.jsx)("div",{className:U?s.arrowBottomCounted:s.arrowBottom,children:U?E.toLocaleStr
2ing():" \u221e"})})}),U?(0,f.jsx)(h.ko,{variant:"determinate",value:L,status:E>=R?"usageCapReached":"usageCapOk"}):(0,f.jsx)(h.ko,{variant:"buffer",value:99,valueBuffer:100}),(0,f.jsx)(o.Z,{position:"relative",children:(0,f.jsx)(r.Z,{variant:"body2",style:{position:"absolute",right:0,bottom:"-17px",transform:"unset"},children:U?R.toLocaleString():"Unlimited"})}),(0,f.jsx)(r.Z,{variant:"body2",style:{marginBottom:16},children:0})," "]}),(0,f.jsxs)(r.Z,{variant:"h5",children:["WhatsApp Conversation Credits (WCC)"," ",S<0&&I&&(0,f.jsx)(l.ZP,{title:"Clear excess usage to resume services",placement:"top",enterTouchDelay:0,children:(0,f.jsx)(d.Z,{color:"secondary",label:"!",className:s.dueChip})})]}),(0,f.jsxs)(o.Z,{display:"flex",justifyContent:"space-between",mt:1,alignItems:"center",children:[(0,f.jsxs)(r.Z,{variant:"h3",children:[(0,f.jsx)("span",{style:{fontFamily:"Roboto"},children:"USD"===k?"$":"\u20b9"})," ".concat(Number(S).toFixed(2))]}),(0,i.Sz)({agent:{power:C},assistantDetails:this.props.assistantDetails})&&(!B||B!==m.AISENSY_PARTNER_ID&&(null===(e=this.props.assistantDetails)||void 0===e||null===(t=e.partner)||void 0===t?void 0:t.isZohoEnabled)&&"NONE"!==(null===(a=this.props.assistantDetails)||void 0===a?void 0:a.activePlan))&&("ENTERPRISE"!==I||T)&&(0,f.jsx)(c.Z,{onClick:()=>{this.toggleTemplateCreditDialog(),j.Z.trackCustomEvent("wcc_credits_purchased_clicked",{login_method:"dashboard",login_timestamp:(new Date).toISOString()})},variant:"contained",color:"primary",size:"small",children:S>0?"Buy More":"Buy Now"}),(null===O||void 0===O?void 0:O.partnerRazorpayEnabled)&&(0,f.jsx)("span",{children:(0,f.jsx)(c.Z,{onClick:()=>{this.toggleTemplateCreditDialog()},variant:"contained",color:"primary",size:"small",children:S>0?"Buy More":"Buy Now"})})]}),M&&M.enableAutoRecharge&&!B&&(0,f.jsxs)("span",{style:{display:"flex",alignItems:"center",marginTop:"24px",justifyContent:"center",cursor:"pointer"},onClick:()=>{2===C&&this.toggleTemplateCreditDialog()},children:[(0,f.jsx)(r.Z,{variant:"body2",color:"textSecondary",style:{marginRight:2},children:"WCC auto-recharge is enabled"}),(0,f.jsx)(x.Z,{fontSize:"small",style:{fontSize:"16px",color:"#828282"}})]}),(0,f.jsx)(g.Z,{dialogOpen:this.state.templatedialogOpen,toggleTemplateCreditDialog:this.toggleTemplateCreditDialog,assistantDetails:this.props.assistantDetails})]})}}const Z=(0,y.connect)((e=>({assistantDetails:e.assistantDetails.data})))(C),D=(0,p.Z)((e=>({root:{background:"white",borderRadius:"8px",padding:"10px 20px"},cardLook:{background:"white",borderRadius:"8px",boxSizing:"border-box",padding:"24px 32px",boxShadow:"0 0 11px rgb(230,230,230)",height:"100%",[e.breakpoints.down("md")]:{margin:"0"},[e.breakpoints.up("md")]:{margin:"0px 12px 0 0"}},rootSkeleton:{borderRadius:"8px",height:100},cardLookSkeleton:{borderRadius:"8px",boxSizing:"border-box",height:100,[e.breakpoints.down("md")]:{margin:"0"},[e.breakpoints.up("md")]:{margin:"0px 12px 0 0"}},usageBubble:{transform:"translate(-50%, 0%)",position:"absolute"},arrowBottom:{marginBottom:"10px",padding:"2px 8px",boxSizing:"border-box",background:"#edeaea",color:"#0000009c",borderRadius:"4px",textAlign:"center",position:"relative",fontSize:"10px","&:after":{content:'""',position:"absolute",right:"calc(50% - 8px)",top:"15px",borderBottom:"none",borderRight:"8px solid transparent",borderLeft:"8px solid transparent",borderTop:"8px solid #edeaea"}},arrowBottomCounted:{marginBottom:"10px",padding:"2px 8px",boxSizing:"border-box",background:"#edeaea",color:"#0000009c",borderRadius:"4px",textAlign:"center",position:"relative",fontSize:"10px",lineHeight:"14px","&:after":{content:'""',position:"absolute",right:"calc(50% - 8px)",top:"100%",borderBottom:"none",borderRight:"8px solid transparent",borderLeft:"8px solid transparent",borderTop:"8px solid #edeaea"}},dueChip:{margin:"0 0 2px 8px",background:"red",color:"white",fontSize:12,height:16,padding:"0 3px 0 0",width:16}})))(Z)},60240:(e,t,a)=>{"use strict";var s=a(64836),i=a(75263);t.Z=void 0;var n=i(a(47313)),r=(0,s(a(52293)).default)(n.createElement("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Loop");t.Z=r},47495:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var s=a(47313);const i=(0,a(14214).Z)(s.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit")},56342:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var s=a(47313);const i=(0,a(14214).Z)(s.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info")},59411:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var s=a(47313);const i=(0,a(14214).Z)(s.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore")},59688:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var s=a(47313);const i=(0,a(14214).Z)(s.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext")},88012:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var s=a(47313);const i=(0,a(14214).Z)(s.createElement("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"}),"Replay")},81725:(e,t,a)=>{var s=a(70781)(a(7289),"DataView");e.exports=s},18579:(e,t,a)=>{var s=a(70781)(a(7289),"Map");e.exports=s},59946:(e,t,a)=>{var s=a(70781)(a(7289),"Promise");e.exports=s},4199:(e,t,a)=>{var s=a(70781)(a(7289),"Set");e.exports=s},13289:(e,t,a)=>{var s=a(70781)(a(7289),"WeakMap");e.exports=s},51276:(e,t,a)=>{var s=a(18665),i=a(89752);e.exports=function(e){return i(e)&&"[object Arguments]"==s(e)}},33186:(e,t,a)=>{var s=a(50375),i=a(65401),n=a(91845),r=a(92043),o=/^\[object .+?Constructor\]$/,l=Function.prototype,d=Object.prototype,c=l.toString,p=d.hasOwnProperty,h=RegExp("^"+c.
vendor: 4,322 bytes, line 2
2call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!n(e)||i(e))&&(s(e)?h:o).test(r(e))}},77499:(e,t,a)=>{var s=a(18665),i=a(44276),n=a(89752),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,e.exports=function(e){return n(e)&&i(e.length)&&!!r[s(e)]}},23409:(e,t,a)=>{var s=a(46132),i=a(8723),n=Object.prototype.hasOwnProperty;e.exports=function(e){if(!s(e))return i(e);var t=[];for(var a in Object(e))n.call(e,a)&&"constructor"!=a&&t.push(a);return t}},36902:e=>{e.exports=function(e){return function(t){return e(t)}}},47683:(e,t,a)=>{var s=a(7289)["__core-js_shared__"];e.exports=s},70781:(e,t,a)=>{var s=a(33186),i=a(80760);e.exports=function(e,t){var a=i(e,t);return s(a)?a:void 0}},68466:(e,t,a)=>{var s=a(81725),i=a(18579),n=a(59946),r=a(4199),o=a(13289),l=a(18665),d=a(92043),c="[object Map]",p="[object Promise]",h="[object Set]",g="[object WeakMap]",u="[object DataView]",m=d(s),x=d(i),y=d(n),v=d(r),b=d(o),j=l;(s&&j(new s(new ArrayBuffer(1)))!=u||i&&j(new i)!=c||n&&j(n.resolve())!=p||r&&j(new r)!=h||o&&j(new o)!=g)&&(j=function(e){var t=l(e),a="[object Object]"==t?e.constructor:void 0,s=a?d(a):"";if(s)switch(s){case m:return u;case x:return c;case y:return p;case v:return h;case b:return g}return t}),e.exports=j},80760:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},65401:(e,t,a)=>{var s=a(47683),i=function(){var e=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},46132:e=>{var t=Object.prototype;e.exports=function(e){var a=e&&e.constructor;return e===("function"==typeof a&&a.prototype||t)}},8723:(e,t,a)=>{var s=a(9698)(Object.keys,Object);e.exports=s},47785:(e,t,a)=>{e=a.nmd(e);var s=a(32692),i=t&&!t.nodeType&&t,n=i&&e&&!e.nodeType&&e,r=n&&n.exports===i&&s.process,o=function(){try{var e=n&&n.require&&n.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(t){}}();e.exports=o},9698:e=>{e.exports=function(e,t){return function(a){return e(t(a))}}},92043:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(a){}try{return e+""}catch(a){}}return""}},52794:(e,t,a)=>{var s=a(51276),i=a(89752),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,l=s(function(){return arguments}())?s:function(e){return i(e)&&r.call(e,"callee")&&!o.call(e,"callee")};e.exports=l},95585:e=>{var t=Array.isArray;e.exports=t},2114:(e,t,a)=>{var s=a(50375),i=a(44276);e.exports=function(e){return null!=e&&i(e.length)&&!s(e)}},70667:(e,t,a)=>{e=a.nmd(e);var s=a(7289),i=a(95535),n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,o=r&&r.exports===n?s.Buffer:void 0,l=(o?o.isBuffer:void 0)||i;e.exports=l},50375:(e,t,a)=>{var s=a(18665),i=a(91845);e.exports=function(e){if(!i(e))return!1;var t=s(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},44276:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},53153:(e,t,a)=>{var s=a(77499),i=a(36902),n=a(47785),r=n&&n.isTypedArray,o=r?i(r):s;e.exports=o},95535:e=>{e.exports=function(){return!1}},93372:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},4761:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}
2],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]])},49647:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},30888:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},40692:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("IndianRupee",[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]])},45260:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},47903:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},12806:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},39352:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});const s=(0,a(58849).Z)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},81533:()=>{},72884:(e,t)=>{var a;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=r(e,n(a)))}return e}function n(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var a in e)s.call(e,a)&&e[a]&&(t=r(t,a));return t}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(a=function(){return i}.apply(t,[]))||(e.exports=a)}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.