@zimyo/manage 0.2.22 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +2 -2
- package/dist/main.js +171 -164
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -32,7 +32,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
32
32
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const r=new this(n);return t.forEach(o=>r.set(o)),r}static accessor(n){const r=(this[yV]=this[yV]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Px(a);r[s]||(Nye(o,a),r[s]=!0)}return lt.isArray(n)?n.forEach(i):i(n),this}};dl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);lt.reduceDescriptors(dl.prototype,({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(r){this[t]=r}}});lt.freezeMethods(dl);function vP(e,n){const t=this||qC,r=n||t,o=dl.from(r.headers);let i=r.data;return lt.forEach(e,function(s){i=s.call(t,i,o.normalize(),n?n.status:void 0)}),o.normalize(),i}function JK(e){return!!(e&&e.__CANCEL__)}function Pb(e,n,t){rr.call(this,e==null?"canceled":e,rr.ERR_CANCELED,n,t),this.name="CanceledError"}lt.inherits(Pb,rr,{__CANCEL__:!0});function KK(e,n,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?e(t):n(new rr("Request failed with status code "+t.status,[rr.ERR_BAD_REQUEST,rr.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Fye(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function Lye(e,n){e=e||10;const t=new Array(e),r=new Array(e);let o=0,i=0,a;return n=n!==void 0?n:1e3,function(l){const c=Date.now(),d=r[i];a||(a=c),t[o]=l,r[o]=c;let p=i,f=0;for(;p!==o;)f+=t[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<n)return;const g=d&&c-d;return g?Math.round(f*1e3/g):void 0}}function Bye(e,n){let t=0,r=1e3/n,o,i;const a=(c,d=Date.now())=>{t=d,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const d=Date.now(),p=d-t;p>=r?a(c,d):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-p)))},()=>o&&a(o)]}const T3=(e,n,t=3)=>{let r=0;const o=Lye(50,250);return Bye(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),d=a<=s;r=a;const p={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&d?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[n?"download":"upload"]:!0};e(p)},t)},bV=(e,n)=>{const t=e!=null;return[r=>n[0]({lengthComputable:t,total:e,loaded:r}),n[1]]},xV=e=>(...n)=>lt.asap(()=>e(...n)),Vye=ss.hasStandardBrowserEnv?((e,n)=>t=>(t=new URL(t,ss.origin),e.protocol===t.protocol&&e.host===t.host&&(n||e.port===t.port)))(new URL(ss.origin),ss.navigator&&/(msie|trident)/i.test(ss.navigator.userAgent)):()=>!0,$ye=ss.hasStandardBrowserEnv?{write(e,n,t,r,o,i){const a=[e+"="+encodeURIComponent(n)];lt.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),lt.isString(r)&&a.push("path="+r),lt.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zye(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wye(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function QK(e,n,t){let r=!zye(n);return e&&(r||t==!1)?Wye(e,n):n}const wV=e=>e instanceof dl?pt({},e):e;function Hg(e,n){n=n||{};const t={};function r(c,d,p,f){return lt.isPlainObject(c)&<.isPlainObject(d)?lt.merge.call({caseless:f},c,d):lt.isPlainObject(d)?lt.merge({},d):lt.isArray(d)?d.slice():d}function o(c,d,p,f){if(lt.isUndefined(d)){if(!lt.isUndefined(c))return r(void 0,c,p,f)}else return r(c,d,p,f)}function i(c,d){if(!lt.isUndefined(d))return r(void 0,d)}function a(c,d){if(lt.isUndefined(d)){if(!lt.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function s(c,d,p){if(p in n)return r(c,d);if(p in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,d,p)=>o(wV(c),wV(d),p,!0)};return lt.forEach(Object.keys(Object.assign({},e,n)),function(d){const p=l[d]||o,f=p(e[d],n[d],d);lt.isUndefined(f)&&p!==s||(t[d]=f)}),t}const eQ=e=>{const n=Hg({},e);let{data:t,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=n;n.headers=a=dl.from(a),n.url=XK(QK(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(lt.isFormData(t)){if(ss.hasStandardBrowserEnv||ss.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...d]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...d].join("; "))}}if(ss.hasStandardBrowserEnv&&(r&<.isFunction(r)&&(r=r(n)),r||r!==!1&&Vye(n.url))){const c=o&&i&&$ye.read(i);c&&a.set(o,c)}return n},Hye=typeof XMLHttpRequest!="undefined",Gye=Hye&&function(e){return new Promise(function(t,r){const o=eQ(e);let i=o.data;const a=dl.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,d,p,f,g,h;function m(){g&&g(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function b(){if(!v)return;const C=dl.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};KK(function(M){t(M),m()},function(M){r(M),m()},x),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(b)},v.onabort=function(){v&&(r(new rr("Request aborted",rr.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new rr("Network Error",rr.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const x=o.transitional||qK;o.timeoutErrorMessage&&(O=o.timeoutErrorMessage),r(new rr(O,x.clarifyTimeoutError?rr.ETIMEDOUT:rr.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&<.forEach(a.toJSON(),function(O,x){v.setRequestHeader(x,O)}),lt.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([f,h]=T3(c,!0),v.addEventListener("progress",f)),l&&v.upload&&([p,g]=T3(l),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(d=C=>{v&&(r(!C||C.type?new Pb(null,e,v):C),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const w=Fye(o.url);if(w&&ss.protocols.indexOf(w)===-1){r(new rr("Unsupported protocol "+w+":",rr.ERR_BAD_REQUEST,e));return}v.send(i||null)})},Yye=(e,n)=>{const{length:t}=e=e?e.filter(Boolean):[];if(n||t){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const d=c instanceof Error?c:this.reason;r.abort(d instanceof rr?d:new Pb(d instanceof Error?d.message:d))}};let a=n&&setTimeout(()=>{a=null,i(new rr(`timeout ${n} of ms exceeded`,rr.ETIMEDOUT))},n);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>lt.asap(s),l}},Uye=function*(e,n){let t=e.byteLength;if(t<n){yield e;return}let r=0,o;for(;r<t;)o=r+n,yield e.slice(r,o),r=o},Xye=function(e,n){return hP(this,null,function*(){try{for(var t=rV(qye(e)),r,o,i;r=!(o=yield new Vm(t.next())).done;r=!1){const a=o.value;yield*mP(Uye(a,n))}}catch(o){i=[o]}finally{try{r&&(o=t.return)&&(yield new Vm(o.call(t)))}finally{if(i)throw i[0]}}})},qye=function(e){return hP(this,null,function*(){if(e[Symbol.asyncIterator]){yield*mP(e);return}const n=e.getReader();try{for(;;){const{done:t,value:r}=yield new Vm(n.read());if(t)break;yield r}}finally{yield new Vm(n.cancel())}})},CV=(e,n,t,r)=>{const o=Xye(e,n);let i=0,a,s=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({pull(c){return Ec(this,null,function*(){try{const{done:d,value:p}=yield o.next();if(d){s(),c.close();return}let f=p.byteLength;if(t){let g=i+=f;t(g)}c.enqueue(new Uint8Array(p))}catch(d){throw s(d),d}})},cancel(c){return s(c),o.return()}},{highWaterMark:2})},_E=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",tQ=_E&&typeof ReadableStream=="function",Zye=_E&&(typeof TextEncoder=="function"?(e=>n=>e.encode(n))(new TextEncoder):e=>Ec(exports,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())})),nQ=(e,...n)=>{try{return!!e(...n)}catch(t){return!1}},Jye=tQ&&nQ(()=>{let e=!1;const n=new Request(ss.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!n}),SV=64*1024,ED=tQ&&nQ(()=>lt.isReadableStream(new Response("").body)),k3={stream:ED&&(e=>e.body)};_E&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(n=>{!k3[n]&&(k3[n]=lt.isFunction(e[n])?t=>t[n]():(t,r)=>{throw new rr(`Response type '${n}' is not supported`,rr.ERR_NOT_SUPPORT,r)})})})(new Response);const Kye=e=>Ec(exports,null,function*(){if(e==null)return 0;if(lt.isBlob(e))return e.size;if(lt.isSpecCompliantForm(e))return(yield new Request(ss.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(lt.isArrayBufferView(e)||lt.isArrayBuffer(e))return e.byteLength;if(lt.isURLSearchParams(e)&&(e=e+""),lt.isString(e))return(yield Zye(e)).byteLength}),Qye=(e,n)=>Ec(exports,null,function*(){const t=lt.toFiniteNumber(e.getContentLength());return t==null?Kye(n):t}),ebe=_E&&(e=>Ec(exports,null,function*(){let{url:n,method:t,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:d,withCredentials:p="same-origin",fetchOptions:f}=eQ(e);c=c?(c+"").toLowerCase():"text";let g=Yye([o,i&&i.toAbortSignal()],a),h;const m=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let v;try{if(l&&Jye&&t!=="get"&&t!=="head"&&(v=yield Qye(d,r))!==0){let x=new Request(n,{method:"POST",body:r,duplex:"half"}),E;if(lt.isFormData(r)&&(E=x.headers.get("content-type"))&&d.setContentType(E),x.body){const[M,R]=bV(v,T3(xV(l)));r=CV(x.body,SV,M,R)}}lt.isString(p)||(p=p?"include":"omit");const b="credentials"in Request.prototype;h=new Request(n,un(pt({},f),{signal:g,method:t.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:b?p:void 0}));let w=yield fetch(h);const C=ED&&(c==="stream"||c==="response");if(ED&&(s||C&&m)){const x={};["status","statusText","headers"].forEach(_=>{x[_]=w[_]});const E=lt.toFiniteNumber(w.headers.get("content-length")),[M,R]=s&&bV(E,T3(xV(s),!0))||[];w=new Response(CV(w.body,SV,M,()=>{R&&R(),m&&m()}),x)}c=c||"text";let O=yield k3[lt.findKey(k3,c)||"text"](w,e);return!C&&m&&m(),yield new Promise((x,E)=>{KK(x,E,{data:O,headers:dl.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:h})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new rr("Network Error",rr.ERR_NETWORK,e,h),{cause:b.cause||b}):rr.from(b,b&&b.code,e,h)}})),MD={http:mye,xhr:Gye,fetch:ebe};lt.forEach(MD,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch(t){}Object.defineProperty(e,"adapterName",{value:n})}});const OV=e=>`- ${e}`,tbe=e=>lt.isFunction(e)||e===null||e===!1,rQ={getAdapter:e=>{e=lt.isArray(e)?e:[e];const{length:n}=e;let t,r;const o={};for(let i=0;i<n;i++){t=e[i];let a;if(r=t,!tbe(t)&&(r=MD[(a=String(t)).toLowerCase()],r===void 0))throw new rr(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
33
33
|
`+i.map(OV).join(`
|
|
34
34
|
`):" "+OV(i[0]):"as no adapter specified";throw new rr("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:MD};function yP(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pb(null,e)}function TV(e){return yP(e),e.headers=dl.from(e.headers),e.data=vP.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rQ.getAdapter(e.adapter||qC.adapter)(e).then(function(r){return yP(e),r.data=vP.call(e,e.transformResponse,r),r.headers=dl.from(r.headers),r},function(r){return JK(r)||(yP(e),r&&r.response&&(r.response.data=vP.call(e,e.transformResponse,r.response),r.response.headers=dl.from(r.response.headers))),Promise.reject(r)})}const oQ="1.9.0",jE={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{jE[e]=function(r){return typeof r===e||"a"+(n<1?"n ":" ")+e}});const kV={};jE.transitional=function(n,t,r){function o(i,a){return"[Axios v"+oQ+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(n===!1)throw new rr(o(a," has been removed"+(t?" in "+t:"")),rr.ERR_DEPRECATED);return t&&!kV[a]&&(kV[a]=!0,console.warn(o(a," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(i,a,s):!0}};jE.spelling=function(n){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${n}`),!0)};function nbe(e,n,t){if(typeof e!="object")throw new rr("options must be an object",rr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=n[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new rr("option "+i+" must be "+l,rr.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new rr("Unknown option "+i,rr.ERR_BAD_OPTION)}}const FT={assertOptions:nbe,validators:jE},xd=FT.validators;let kg=class{constructor(n){this.defaults=n||{},this.interceptors={request:new vV,response:new vV}}request(n,t){return Ec(this,null,function*(){try{return yield this._request(n,t)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
35
|
-
`+i):r.stack=i}catch(a){}}throw r}})}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Hg(this.defaults,t);const{transitional:r,paramsSerializer:o,headers:i}=t;r!==void 0&&FT.assertOptions(r,{silentJSONParsing:xd.transitional(xd.boolean),forcedJSONParsing:xd.transitional(xd.boolean),clarifyTimeoutError:xd.transitional(xd.boolean)},!1),o!=null&&(lt.isFunction(o)?t.paramsSerializer={serialize:o}:FT.assertOptions(o,{encode:xd.function,serialize:xd.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),FT.assertOptions(t,{baseUrl:xd.spelling("baseURL"),withXsrfToken:xd.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&<.merge(i.common,i[t.method]);i&<.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),t.headers=dl.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let d,p=0,f;if(!l){const h=[TV.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),f=h.length,d=Promise.resolve(t);p<f;)d=d.then(h[p++],h[p++]);return d}f=s.length;let g=t;for(p=0;p<f;){const h=s[p++],m=s[p++];try{g=h(g)}catch(v){m.call(this,v);break}}try{d=TV.call(this,g)}catch(h){return Promise.reject(h)}for(p=0,f=c.length;p<f;)d=d.then(c[p++],c[p++]);return d}getUri(n){n=Hg(this.defaults,n);const t=QK(n.baseURL,n.url,n.allowAbsoluteUrls);return XK(t,n.params,n.paramsSerializer)}};lt.forEach(["delete","get","head","options"],function(n){kg.prototype[n]=function(t,r){return this.request(Hg(r||{},{method:n,url:t,data:(r||{}).data}))}});lt.forEach(["post","put","patch"],function(n){function t(r){return function(i,a,s){return this.request(Hg(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}kg.prototype[n]=t(),kg.prototype[n+"Form"]=t(!0)});let rbe=class iQ{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},n(function(i,a,s){r.reason||(r.reason=new Pb(i,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new iQ(function(o){n=o}),cancel:n}}};function obe(e){return function(t){return e.apply(null,t)}}function ibe(e){return lt.isObject(e)&&e.isAxiosError===!0}const ID={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ID).forEach(([e,n])=>{ID[n]=e});function aQ(e){const n=new kg(e),t=NK(kg.prototype.request,n);return lt.extend(t,kg.prototype,n,{allOwnKeys:!0}),lt.extend(t,n,null,{allOwnKeys:!0}),t.create=function(o){return aQ(Hg(e,o))},t}const mi=aQ(qC);mi.Axios=kg;mi.CanceledError=Pb;mi.CancelToken=rbe;mi.isCancel=JK;mi.VERSION=oQ;mi.toFormData=DE;mi.AxiosError=rr;mi.Cancel=mi.CanceledError;mi.all=function(n){return Promise.all(n)};mi.spread=obe;mi.isAxiosError=ibe;mi.mergeConfig=Hg;mi.AxiosHeaders=dl;mi.formToJSON=e=>ZK(lt.isHTMLForm(e)?new FormData(e):e);mi.getAdapter=rQ.getAdapter;mi.HttpStatusCode=ID;mi.default=mi;const{Axios:
|
|
35
|
+
`+i):r.stack=i}catch(a){}}throw r}})}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Hg(this.defaults,t);const{transitional:r,paramsSerializer:o,headers:i}=t;r!==void 0&&FT.assertOptions(r,{silentJSONParsing:xd.transitional(xd.boolean),forcedJSONParsing:xd.transitional(xd.boolean),clarifyTimeoutError:xd.transitional(xd.boolean)},!1),o!=null&&(lt.isFunction(o)?t.paramsSerializer={serialize:o}:FT.assertOptions(o,{encode:xd.function,serialize:xd.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),FT.assertOptions(t,{baseUrl:xd.spelling("baseURL"),withXsrfToken:xd.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&<.merge(i.common,i[t.method]);i&<.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),t.headers=dl.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let d,p=0,f;if(!l){const h=[TV.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),f=h.length,d=Promise.resolve(t);p<f;)d=d.then(h[p++],h[p++]);return d}f=s.length;let g=t;for(p=0;p<f;){const h=s[p++],m=s[p++];try{g=h(g)}catch(v){m.call(this,v);break}}try{d=TV.call(this,g)}catch(h){return Promise.reject(h)}for(p=0,f=c.length;p<f;)d=d.then(c[p++],c[p++]);return d}getUri(n){n=Hg(this.defaults,n);const t=QK(n.baseURL,n.url,n.allowAbsoluteUrls);return XK(t,n.params,n.paramsSerializer)}};lt.forEach(["delete","get","head","options"],function(n){kg.prototype[n]=function(t,r){return this.request(Hg(r||{},{method:n,url:t,data:(r||{}).data}))}});lt.forEach(["post","put","patch"],function(n){function t(r){return function(i,a,s){return this.request(Hg(s||{},{method:n,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}kg.prototype[n]=t(),kg.prototype[n+"Form"]=t(!0)});let rbe=class iQ{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},n(function(i,a,s){r.reason||(r.reason=new Pb(i,a,s),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const n=new AbortController,t=r=>{n.abort(r)};return this.subscribe(t),n.signal.unsubscribe=()=>this.unsubscribe(t),n.signal}static source(){let n;return{token:new iQ(function(o){n=o}),cancel:n}}};function obe(e){return function(t){return e.apply(null,t)}}function ibe(e){return lt.isObject(e)&&e.isAxiosError===!0}const ID={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ID).forEach(([e,n])=>{ID[n]=e});function aQ(e){const n=new kg(e),t=NK(kg.prototype.request,n);return lt.extend(t,kg.prototype,n,{allOwnKeys:!0}),lt.extend(t,n,null,{allOwnKeys:!0}),t.create=function(o){return aQ(Hg(e,o))},t}const mi=aQ(qC);mi.Axios=kg;mi.CanceledError=Pb;mi.CancelToken=rbe;mi.isCancel=JK;mi.VERSION=oQ;mi.toFormData=DE;mi.AxiosError=rr;mi.Cancel=mi.CanceledError;mi.all=function(n){return Promise.all(n)};mi.spread=obe;mi.isAxiosError=ibe;mi.mergeConfig=Hg;mi.AxiosHeaders=dl;mi.formToJSON=e=>ZK(lt.isHTMLForm(e)?new FormData(e):e);mi.getAdapter=rQ.getAdapter;mi.HttpStatusCode=ID;mi.default=mi;const{Axios:jht,AxiosError:Nht,CanceledError:Fht,isCancel:Lht,CancelToken:Bht,VERSION:Vht,all:$ht,Cancel:zht,isAxiosError:Wht,spread:Hht,toFormData:Ght,AxiosHeaders:Yht,HttpStatusCode:Uht,formToJSON:Xht,getAdapter:qht,mergeConfig:Zht}=mi,zh=r=>Ec(exports,[r],function*({url:e,token:n,params:t}){return yield mi.get(e,{headers:{token:n},params:t})}),o7=o=>Ec(exports,[o],function*({url:e,token:n,data:t,params:r}){return yield mi.post(e,t,{headers:{token:n},params:r})}),abe={},EV=e=>{let n;const t=new Set,r=(d,p)=>{const f=typeof d=="function"?d(n):d;if(!Object.is(f,n)){const g=n;n=(p!=null?p:typeof f!="object"||f===null)?f:Object.assign({},n,f),t.forEach(h=>h(n,g))}},o=()=>n,l={setState:r,getState:o,getInitialState:()=>c,subscribe:d=>(t.add(d),()=>t.delete(d)),destroy:()=>{(abe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},c=n=e(r,o,l);return l},sbe=e=>e?EV(e):EV;var PD={exports:{}},bP={},_O={exports:{}},xP={};/**
|
|
36
36
|
* @license React
|
|
37
37
|
* use-sync-external-store-shim.production.js
|
|
38
38
|
*
|
|
@@ -3140,4 +3140,4 @@ __p += '`),Mr&&(Mt+=`' +
|
|
|
3140
3140
|
function print() { __p += __j.call(arguments, '') }
|
|
3141
3141
|
`:`;
|
|
3142
3142
|
`)+Mt+`return __p
|
|
3143
|
-
}`;var fr=JB(function(){return Tr(Ce,mn+"return "+Mt).apply(t,Ae)});if(fr.source=Mt,rP(fr))throw fr;return fr}function l0e(S){return io(S).toLowerCase()}function c0e(S){return io(S).toUpperCase()}function u0e(S,I,$){if(S=io(S),S&&($||I===t))return C1(S);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=vs(I),Ce=nd(J,ce),Ae=hm(J,ce)+1;return md(J,Ce,Ae).join("")}function d0e(S,I,$){if(S=io(S),S&&($||I===t))return S.slice(0,Sf(S)+1);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=hm(J,vs(I))+1;return md(J,0,ce).join("")}function p0e(S,I,$){if(S=io(S),S&&($||I===t))return S.replace(Zn,"");if(!S||!(I=xs(I)))return S;var J=vs(S),ce=nd(J,vs(I));return md(J,ce).join("")}function f0e(S,I){var $=j,J=A;if(di(I)){var ce="separator"in I?I.separator:ce;$="length"in I?ar(I.length):$,J="omission"in I?xs(I.omission):J}S=io(S);var Ce=S.length;if(rd(S)){var Ae=vs(S);Ce=Ae.length}if($>=Ce)return S;var Le=$-Cf(J);if(Le<1)return J;var qe=Ae?md(Ae,0,Le).join(""):S.slice(0,Le);if(ce===t)return qe+J;if(Ae&&(Le+=qe.length-Le),oP(ce)){if(S.slice(Le).search(ce)){var wt,Ot=qe;for(ce.global||(ce=ve(ce.source,io(_t.exec(ce))+"g")),ce.lastIndex=0;wt=ce.exec(Ot);)var Mt=wt.index;qe=qe.slice(0,Mt===t?Le:Mt)}}else if(S.indexOf(xs(ce),Le)!=Le){var qt=qe.lastIndexOf(ce);qt>-1&&(qe=qe.slice(0,qt))}return qe+J}function h0e(S){return S=io(S),S&&Yt.test(S)?S.replace(dn,O1):S}var m0e=_f(function(S,I,$){return S+($?" ":"")+I.toUpperCase()}),sP=Pm("toUpperCase");function ZB(S,I,$){return S=io(S),I=$?t:I,I===t?v6(S)?gm(S):j0(S):S.match(I)||[]}var JB=nr(function(S,I){try{return Qe(S,t,I)}catch($){return rP($)?$:new Vn($)}}),g0e=Sc(function(S,I){return st(I,function($){$=Oc($),ts(S,$,tP(S[$],S))}),S});function v0e(S){var I=S==null?0:S.length,$=Cn();return S=I?To(S,function(J){if(typeof J[1]!="function")throw new ja(a);return[$(J[0]),J[1]]}):[],nr(function(J){for(var ce=-1;++ce<I;){var Ce=S[ce];if(Qe(Ce[0],this,J))return Qe(Ce[1],this,J)}})}function y0e(S){return Z0(bs(S,p))}function lP(S){return function(){return S}}function b0e(S,I){return S==null||S!==S?I:S}var x0e=Ws(),w0e=Ws(!0);function qs(S){return S}function cP(S){return Af(typeof S=="function"?S:bs(S,p))}function C0e(S){return rv(bs(S,p))}function S0e(S,I){return q1(S,bs(I,p))}var O0e=nr(function(S,I){return function($){return Vl($,S,I)}}),T0e=nr(function(S,I){return function($){return Vl(S,$,I)}});function uP(S,I,$){var J=Ca(I),ce=Tm(I,J);$==null&&!(di(I)&&(ce.length||!J.length))&&($=I,I=S,S=this,ce=Tm(I,Ca(I)));var Ce=!(di($)&&"chain"in $)||!!$.chain,Ae=bp(S);return st(ce,function(Le){var qe=I[Le];S[Le]=qe,Ae&&(S.prototype[Le]=function(){var wt=this.__chain__;if(Ce||wt){var Ot=S(this.__wrapped__),Mt=Ot.__actions__=la(this.__actions__);return Mt.push({func:qe,args:arguments,thisArg:S}),Ot.__chain__=wt,Ot}return qe.apply(S,td([this.value()],arguments))})}),S}function k0e(){return ia._===this&&(ia._=w6),this}function dP(){}function E0e(S){return S=ar(S),nr(function(I){return J1(I,S)})}var M0e=Nn(To),I0e=Nn(jn),P0e=Nn(x1);function KB(S){return mx(S)?w1(Oc(S)):wc(S)}function R0e(S){return function(I){return S==null?t:Ba(S,I)}}var A0e=ti(),D0e=ti(!0);function pP(){return[]}function fP(){return!1}function _0e(){return{}}function j0e(){return""}function N0e(){return!0}function F0e(S,I){if(S=ar(S),S<1||S>G)return[];var $=Z,J=aa(S,Z);I=Cn(I),S-=Z;for(var ce=wf(J,I);++$<S;)I($);return ce}function L0e(S){return Jn(S)?To(S,Oc):Hl(S)?[S]:la(wx(io(S)))}function B0e(S){var I=++Il;return io(S)+I}var V0e=Cc(function(S,I){return S+I},0),$0e=Rm("ceil"),z0e=Cc(function(S,I){return S/I},1),W0e=Rm("floor");function H0e(S){return S&&S.length?Om(S,qs,km):t}function G0e(S,I){return S&&S.length?Om(S,Cn(I,2),km):t}function Y0e(S){return h5(S,qs)}function U0e(S,I){return h5(S,Cn(I,2))}function X0e(S){return S&&S.length?Om(S,qs,nv):t}function q0e(S,I){return S&&S.length?Om(S,Cn(I,2),nv):t}var Z0e=Cc(function(S,I){return S*I},1),J0e=Rm("round"),K0e=Cc(function(S,I){return S-I},0);function Q0e(S){return S&&S.length?B0(S,qs):0}function eve(S,I){return S&&S.length?B0(S,Cn(I,2)):0}return ye.after=Cme,ye.ary=IB,ye.assign=cge,ye.assignIn=WB,ye.assignInWith=AO,ye.assignWith=uge,ye.at=dge,ye.before=PB,ye.bind=tP,ye.bindAll=g0e,ye.bindKey=RB,ye.castArray=_me,ye.chain=Lm,ye.chunk=rs,ye.compact=Cx,ye.concat=W6,ye.cond=v0e,ye.conforms=y0e,ye.constant=lP,ye.countBy=Qhe,ye.create=pge,ye.curry=AB,ye.curryRight=DB,ye.debounce=_B,ye.defaults=fge,ye.defaultsDeep=hge,ye.defer=Sme,ye.delay=Ome,ye.difference=H6,ye.differenceBy=Sx,ye.differenceWith=Ox,ye.drop=G6,ye.dropRight=Y6,ye.dropRightWhile=U6,ye.dropWhile=bO,ye.fill=X6,ye.filter=tme,ye.flatMap=ome,ye.flatMapDeep=ime,ye.flatMapDepth=ame,ye.flatten=vv,ye.flattenDeep=q6,ye.flattenDepth=Z6,ye.flip=Tme,ye.flow=x0e,ye.flowRight=w0e,ye.fromPairs=J6,ye.functions=wge,ye.functionsIn=Cge,ye.groupBy=sme,ye.initial=K6,ye.intersection=Q6,ye.intersectionBy=eP,ye.intersectionWith=T,ye.invert=Oge,ye.invertBy=Tge,ye.invokeMap=cme,ye.iteratee=cP,ye.keyBy=ume,ye.keys=Ca,ye.keysIn=Xs,ye.map=kO,ye.mapKeys=Ege,ye.mapValues=Mge,ye.matches=C0e,ye.matchesProperty=S0e,ye.memoize=MO,ye.merge=Ige,ye.mergeWith=HB,ye.method=O0e,ye.methodOf=T0e,ye.mixin=uP,ye.negate=IO,ye.nthArg=E0e,ye.omit=Pge,ye.omitBy=Rge,ye.once=kme,ye.orderBy=dme,ye.over=M0e,ye.overArgs=Eme,ye.overEvery=I0e,ye.overSome=P0e,ye.partial=nP,ye.partialRight=jB,ye.partition=pme,ye.pick=Age,ye.pickBy=GB,ye.property=KB,ye.propertyOf=R0e,ye.pull=Oe,ye.pullAll=je,ye.pullAllBy=Ve,ye.pullAllWith=tt,ye.pullAt=Ct,ye.range=A0e,ye.rangeRight=D0e,ye.rearg=Mme,ye.reject=mme,ye.remove=bt,ye.rest=Ime,ye.reverse=Pt,ye.sampleSize=vme,ye.set=_ge,ye.setWith=jge,ye.shuffle=yme,ye.slice=rn,ye.sortBy=wme,ye.sortedUniq=Xn,ye.sortedUniqBy=Dn,ye.split=o0e,ye.spread=Pme,ye.tail=Rr,ye.take=hn,ye.takeRight=Mn,ye.takeRightWhile=ji,ye.takeWhile=ui,ye.tap=Cv,ye.throttle=Rme,ye.thru=TO,ye.toArray=VB,ye.toPairs=YB,ye.toPairsIn=UB,ye.toPath=L0e,ye.toPlainObject=zB,ye.transform=Nge,ye.unary=Ame,ye.union=za,ye.unionBy=jo,ye.unionWith=wa,ye.uniq=Tc,ye.uniqBy=yd,ye.uniqWith=yv,ye.unset=Fge,ye.unzip=Nm,ye.unzipWith=Fm,ye.update=Lge,ye.updateWith=Bge,ye.values=Ov,ye.valuesIn=Vge,ye.without=yp,ye.words=ZB,ye.wrap=Dme,ye.xor=CO,ye.xorBy=SO,ye.xorWith=bv,ye.zip=kx,ye.zipObject=xv,ye.zipObjectDeep=wv,ye.zipWith=OO,ye.entries=YB,ye.entriesIn=UB,ye.extend=WB,ye.extendWith=AO,uP(ye,ye),ye.add=V0e,ye.attempt=JB,ye.camelCase=Hge,ye.capitalize=XB,ye.ceil=$0e,ye.clamp=$ge,ye.clone=jme,ye.cloneDeep=Fme,ye.cloneDeepWith=Lme,ye.cloneWith=Nme,ye.conformsTo=Bme,ye.deburr=qB,ye.defaultTo=b0e,ye.divide=z0e,ye.endsWith=Gge,ye.eq=Ou,ye.escape=Yge,ye.escapeRegExp=Uge,ye.every=eme,ye.find=nme,ye.findIndex=xO,ye.findKey=mge,ye.findLast=rme,ye.findLastIndex=gv,ye.findLastKey=gge,ye.floor=W0e,ye.forEach=EB,ye.forEachRight=MB,ye.forIn=vge,ye.forInRight=yge,ye.forOwn=bge,ye.forOwnRight=xge,ye.get=iP,ye.gt=Vme,ye.gte=$me,ye.has=Sge,ye.hasIn=aP,ye.head=wO,ye.identity=qs,ye.includes=lme,ye.indexOf=Tx,ye.inRange=zge,ye.invoke=kge,ye.isArguments=Bm,ye.isArray=Jn,ye.isArrayBuffer=zme,ye.isArrayLike=Us,ye.isArrayLikeObject=Ni,ye.isBoolean=Wme,ye.isBuffer=Lf,ye.isDate=Hme,ye.isElement=Gme,ye.isEmpty=Yme,ye.isEqual=Ume,ye.isEqualWith=Xme,ye.isError=rP,ye.isFinite=qme,ye.isFunction=bp,ye.isInteger=NB,ye.isLength=PO,ye.isMap=FB,ye.isMatch=Zme,ye.isMatchWith=Jme,ye.isNaN=Kme,ye.isNative=Qme,ye.isNil=tge,ye.isNull=ege,ye.isNumber=LB,ye.isObject=di,ye.isObjectLike=bi,ye.isPlainObject=Ex,ye.isRegExp=oP,ye.isSafeInteger=nge,ye.isSet=BB,ye.isString=RO,ye.isSymbol=Hl,ye.isTypedArray=Sv,ye.isUndefined=rge,ye.isWeakMap=oge,ye.isWeakSet=ige,ye.join=P,ye.kebabCase=Xge,ye.last=W,ye.lastIndexOf=ee,ye.lowerCase=qge,ye.lowerFirst=Zge,ye.lt=age,ye.lte=sge,ye.max=H0e,ye.maxBy=G0e,ye.mean=Y0e,ye.meanBy=U0e,ye.min=X0e,ye.minBy=q0e,ye.stubArray=pP,ye.stubFalse=fP,ye.stubObject=_0e,ye.stubString=j0e,ye.stubTrue=N0e,ye.multiply=Z0e,ye.nth=ue,ye.noConflict=k0e,ye.noop=dP,ye.now=EO,ye.pad=Jge,ye.padEnd=Kge,ye.padStart=Qge,ye.parseInt=e0e,ye.random=Wge,ye.reduce=fme,ye.reduceRight=hme,ye.repeat=t0e,ye.replace=n0e,ye.result=Dge,ye.round=J0e,ye.runInContext=Ye,ye.sample=gme,ye.size=bme,ye.snakeCase=r0e,ye.some=xme,ye.sortedIndex=cn,ye.sortedIndexBy=Sn,ye.sortedIndexOf=St,ye.sortedLastIndex=Lt,ye.sortedLastIndexBy=En,ye.sortedLastIndexOf=Gt,ye.startCase=i0e,ye.startsWith=a0e,ye.subtract=K0e,ye.sum=Q0e,ye.sumBy=eve,ye.template=s0e,ye.times=F0e,ye.toFinite=xp,ye.toInteger=ar,ye.toLength=$B,ye.toLower=l0e,ye.toNumber=kc,ye.toSafeInteger=lge,ye.toString=io,ye.toUpper=c0e,ye.trim=u0e,ye.trimEnd=d0e,ye.trimStart=p0e,ye.truncate=f0e,ye.unescape=h0e,ye.uniqueId=B0e,ye.upperCase=m0e,ye.upperFirst=sP,ye.each=EB,ye.eachRight=MB,ye.first=wO,uP(ye,function(){var S={};return Bl(ye,function(I,$){wr.call(ye.prototype,$)||(S[$]=I)}),S}(),{chain:!1}),ye.VERSION=r,st(["bind","bindKey","curry","curryRight","partial","partialRight"],function(S){ye[S].placeholder=ye}),st(["drop","take"],function(S,I){pr.prototype[S]=function($){$=$===t?1:_o(ar($),0);var J=this.__filtered__&&!I?new pr(this):this.clone();return J.__filtered__?J.__takeCount__=aa($,J.__takeCount__):J.__views__.push({size:aa($,Z),type:S+(J.__dir__<0?"Right":"")}),J},pr.prototype[S+"Right"]=function($){return this.reverse()[S]($).reverse()}}),st(["filter","map","takeWhile"],function(S,I){var $=I+1,J=$==L||$==V;pr.prototype[S]=function(ce){var Ce=this.clone();return Ce.__iteratees__.push({iteratee:Cn(ce,3),type:$}),Ce.__filtered__=Ce.__filtered__||J,Ce}}),st(["head","last"],function(S,I){var $="take"+(I?"Right":"");pr.prototype[S]=function(){return this[$](1).value()[0]}}),st(["initial","tail"],function(S,I){var $="drop"+(I?"":"Right");pr.prototype[S]=function(){return this.__filtered__?new pr(this):this[$](1)}}),pr.prototype.compact=function(){return this.filter(qs)},pr.prototype.find=function(S){return this.filter(S).head()},pr.prototype.findLast=function(S){return this.reverse().find(S)},pr.prototype.invokeMap=nr(function(S,I){return typeof S=="function"?new pr(this):this.map(function($){return Vl($,S,I)})}),pr.prototype.reject=function(S){return this.filter(IO(Cn(S)))},pr.prototype.slice=function(S,I){S=ar(S);var $=this;return $.__filtered__&&(S>0||I<0)?new pr($):(S<0?$=$.takeRight(-S):S&&($=$.drop(S)),I!==t&&(I=ar(I),$=I<0?$.dropRight(-I):$.take(I-S)),$)},pr.prototype.takeRightWhile=function(S){return this.reverse().takeWhile(S).reverse()},pr.prototype.toArray=function(){return this.take(Z)},Bl(pr.prototype,function(S,I){var $=/^(?:filter|find|map|reject)|While$/.test(I),J=/^(?:head|last)$/.test(I),ce=ye[J?"take"+(I=="last"?"Right":""):I],Ce=J||/^find/.test(I);ce&&(ye.prototype[I]=function(){var Ae=this.__wrapped__,Le=J?[1]:arguments,qe=Ae instanceof pr,wt=Le[0],Ot=qe||Jn(Ae),Mt=function(Cr){var Mr=ce.apply(ye,td([Cr],Le));return J&&qt?Mr[0]:Mr};Ot&&$&&typeof wt=="function"&&wt.length!=1&&(qe=Ot=!1);var qt=this.__chain__,mn=!!this.__actions__.length,Rn=Ce&&!qt,fr=qe&&!mn;if(!Ce&&Ot){Ae=fr?Ae:new pr(this);var An=S.apply(Ae,Le);return An.__actions__.push({func:TO,args:[Mt],thisArg:t}),new Qa(An,qt)}return Rn&&fr?S.apply(this,Le):(An=this.thru(Mt),Rn?J?An.value()[0]:An.value():An)})}),st(["pop","push","shift","sort","splice","unshift"],function(S){var I=Na[S],$=/^(?:push|sort|unshift)$/.test(S)?"tap":"thru",J=/^(?:pop|shift)$/.test(S);ye.prototype[S]=function(){var ce=arguments;if(J&&!this.__chain__){var Ce=this.value();return I.apply(Jn(Ce)?Ce:[],ce)}return this[$](function(Ae){return I.apply(Jn(Ae)?Ae:[],ce)})}}),Bl(pr.prototype,function(S,I){var $=ye[I];if($){var J=$.name+"";wr.call(ad,J)||(ad[J]=[]),ad[J].push({name:I,func:$})}}),ad[uv(t,b).name]=[{name:"wrapper",func:t}],pr.prototype.clone=ir,pr.prototype.reverse=T6,pr.prototype.value=k6,ye.prototype.at=Ghe,ye.prototype.chain=Yhe,ye.prototype.commit=Uhe,ye.prototype.next=Xhe,ye.prototype.plant=Zhe,ye.prototype.reverse=Jhe,ye.prototype.toJSON=ye.prototype.valueOf=ye.prototype.value=Khe,ye.prototype.first=ye.prototype.head,kf&&(ye.prototype[kf]=qhe),ye},Ml=W0();fu?((fu.exports=Ml)._=Ml,ed._=Ml):ia._=Ml}).call(ju)})(kE,kE.exports);var upt=kE.exports;const dpt=()=>{const{pushAlert:e}=NE();return t=>{e({type:uQ.SUCCESS,message:t!=null?t:"Success"})}},ppt=e=>{var n,t;return(t=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:t.message},fpt=e=>{var n;return((n=e==null?void 0:e.data)==null?void 0:n.message)||(e==null?void 0:e.message)},d0=({url:e,token:n,method:t="post",baseURL:r,successCallback:o=()=>{},errorCallback:i=()=>{},onSettledCallback:a=()=>{},debounceTime:s=500,errorMessageFormatter:l=ppt,successMessageFormatter:c=fpt})=>{const[d,p]=U.useState(!1),f=new AbortController,g=Rb(),h=dpt(),{session:{token:m,API_BASE_URL:v}}=Wh();n=n!=null?n:m,r=r!=null?r:v;const{mutate:b,isLoading:w}=Eve(E=>Ec(exports,null,function*(){return(yield mi({headers:{token:n||localStorage.getItem("token")},url:e,baseURL:r,method:t,data:E,signal:f.signal})).data}),{onSuccess:E=>{E.error?g(c(E)):(o&&o(E),h(c(E)))},onError:E=>{var M;g((M=l(E))!=null?M:"Error occurred while processing the request"),i&&i(E)},onSettled:()=>{p(!1),a()}}),C=upt.debounce((E,M,R,_)=>{b(E,{onError:M,onSuccess:R,onSettled:_})},s);return{handleSubmit:(E,M,R,_)=>{d||(f.abort(),p(!0),C(E,M,R,_))},isDisabled:w||d,isLoading:w}};var YL={},hpt=$r;Object.defineProperty(YL,"__esModule",{value:!0});var EE=YL.default=void 0,mpt=hpt(Qr()),gpt=k;EE=YL.default=(0,mpt.default)((0,gpt.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download");var UL={},vpt=$r;Object.defineProperty(UL,"__esModule",{value:!0});var ME=UL.default=void 0,ypt=vpt(Qr()),bpt=k;ME=UL.default=(0,ypt.default)((0,bpt.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");const T2={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},xpt=()=>{const[e,n]=U.useState(T2.LIST_VIEW),[t,r]=U.useState(""),[o,i]=U.useState({page:0,perPage:20}),{data:a,isFetching:s}=Gu(zh,{url:Obe,params:{page:o.page,limit:o.perPage}},"customer-subsription"),{handleSubmit:l,isDisabled:c,isLoading:d}=d0({url:fQ}),p=(h,m=!1)=>{const v={customer_id:h==null?void 0:h.customer_id,invoice_id:h==null?void 0:h.id,isDownload:1};c||l(v,null,b=>{m?(r(`data:application/pdf;base64,${b==null?void 0:b.data.buffer64}`),n(T2.INVOICE_VIEW)):Ur.downloadFileFromBuffer(b==null?void 0:b.data)},null)},f=(h,m)=>{i(v=>un(pt({},v),{[h]:m}))},g=U.useMemo(()=>[{header:"Invoice Number",accessorKey:"invoice_number",id:"invoice_number"},{header:"Invoice Date",accessorKey:"invoice_date",id:"invoice_date"},{header:"Due Date",accessorKey:"invoice_due_date",id:"invoice_due_date"},{header:"Amount",accessorKey:"grand_total_amount",id:"grand_total_amount"},{header:"MRR",accessorKey:"invoice_mrr",id:"invoice_mrr"},{header:"Status",accessorKey:"payment_status",id:"payment_status",cell:(h,m)=>{var v;return k.jsx(oM,{variant:"outlined",color:(v=yD==null?void 0:yD[m==null?void 0:m.invoice_status])!=null?v:"primary",label:h})}},{header:"Action",accessorKey:"id",id:"id",cell:(h,m)=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Zg,{title:"View Invoice",children:k.jsx(ME,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m,!0)}})}),k.jsx(Zg,{title:"Download Invoice",children:k.jsx(EE,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m)}})})]})}],[a]);return console.log({customerInvoices:a}),k.jsxs("div",{children:[k.jsx(mf,{visible:d}),e===T2.LIST_VIEW?k.jsx("div",{style:{height:"70vh",overflow:"scroll"},children:k.jsx(ML,{loading:s,data:Ur.validateDataType(a==null?void 0:a.data,Mi.ARRAY)?a.data:[],columns:g,wrapByTooltipDefault:!0,pagination:un(pt({show:!0,showFirstButton:!0,showLastButton:!0,perPageOptions:[20,30,50,100],totalDataCount:(a==null?void 0:a.totalCounts)||0},o),{handlePageChange:h=>f("page",h),handlePerPageChange:h=>f("perPage",h)})})}):k.jsx(k.Fragment,{}),e===T2.INVOICE_VIEW?k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:t,type:"application/pdf",children:" "})}),k.jsx(nc,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(ob,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(ea,{label:" Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>n(T2.LIST_VIEW)})})})]}):k.jsx(k.Fragment,{})]})},wpt="_card_container_dxhto_1",Cpt="_card_count_dxhto_14",TK={card_container:wpt,card_count:Cpt},Spt=({data:e})=>{var n,t,r;return k.jsx("div",{className:`${TK.card_container}`,style:{height:"100%"},children:k.jsxs("div",{className:"flex-between-center g-10",children:[(n=e==null?void 0:e.icon)!=null?n:k.jsx(k.Fragment,{}),k.jsxs("div",{className:"flex-start-column mr-10 g-10",children:[k.jsx("div",{children:k.jsx("span",{children:(t=e==null?void 0:e.label)!=null?t:"-"})}),k.jsx("div",{children:k.jsx("span",{className:`${TK.card_count}`,children:(r=e==null?void 0:e.count)!=null?r:"-"})})]})]})})};var XL={},Opt=$r;Object.defineProperty(XL,"__esModule",{value:!0});var Rhe=XL.default=void 0,Tpt=Opt(Qr()),kpt=k;Rhe=XL.default=(0,Tpt.default)((0,kpt.jsx)("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"AccountBalanceWallet");function kK({data:e="",limit:n=17,doNotShowTooltip:t=!1,arrow:r=!0,endAdornment:o="",startAdornment:i="",styleOverrides:a={}}){return k.jsx(k.Fragment,{children:e&&typeof e=="string"&&e.length>n&&!t?k.jsx(Zg,{title:e!=null?e:"",arrow:r,children:k.jsx("span",{style:a,children:i+e.substring(0,n)+".."+o})}):i+e+o})}const Ept="_card_container_95l02_1",Mpt="_card_subtitles_95l02_18",DT={card_container:Ept,card_subtitles:Mpt};var qL={},Ipt=$r;Object.defineProperty(qL,"__esModule",{value:!0});var Ahe=qL.default=void 0,Ppt=Ipt(Qr()),Rpt=k;Ahe=qL.default=(0,Ppt.default)((0,Rpt.jsx)("path",{d:"M12 7V3H2v18h20V7zm-2 12H4v-2h6zm0-4H4v-2h6zm0-4H4V9h6zm0-4H4V5h6zm10 12h-8V9h8zm-2-8h-4v2h4zm0 4h-4v2h4z"}),"CorporateFare");var ZL={},Apt=$r;Object.defineProperty(ZL,"__esModule",{value:!0});var Dhe=ZL.default=void 0,Dpt=Apt(Qr()),_pt=k;Dhe=ZL.default=(0,Dpt.default)((0,_pt.jsx)("path",{d:"M3 10h11v2H3zm0-2h11V6H3zm0 8h7v-2H3zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71zm-.71.71-5.3 5.3V21h2.12l5.3-5.3z"}),"EditNote");var JL={},jpt=$r;Object.defineProperty(JL,"__esModule",{value:!0});var l6=JL.default=void 0,Npt=jpt(Qr()),Fpt=k;l6=JL.default=(0,Npt.default)((0,Fpt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");const Lpt=({orgDetails:e})=>{var Z,oe,re,K,Q,pe,fe,ae;const n=UC(),[t,r]=U.useState(!1),[o,i]=U.useState({org_name:"",mobile_number:"",gstin:""}),[a,s]=U.useState({email_id:!1,mobile_number:!1}),[l,c]=U.useState([]),[d,p]=U.useState(""),[f,g]=U.useState(null),[h,m]=U.useState([]),[v,b]=U.useState([]),[w,C]=U.useState({}),{handleSubmit:O,isDisabled:x,isLoading:E}=d0({url:Mbe}),{data:M,isFetching:R}=Gu(zh,{url:bbe,params:{}},"country-list",{enabled:t}),{data:_,isFetching:j}=Gu(o7,{url:xbe,data:{country_id:w==null?void 0:w.country}},"state-list",{enabled:!!(w!=null&&w.country)});U.useEffect(()=>{if(Ur.validateDataType(e,Mi.OBJECT)){const{org_name:ie,email_id:se,mobile_number:le,gstin:te,country:de,state:ge,city:be,address_1:ke,address_2:Se,zip_code:Re}=pt({org_name:"",gstin:"",mobile_number:"",email_id:[],country:"",state:"",city:"",address_1:"",address_2:"",zip_code:""},e);i(xe=>un(pt({},xe),{org_name:ie,mobile_number:le,gstin:te})),Ur.validateDataType(se,Mi.ARRAY)&&c(se),C(xe=>un(pt({},xe),{city:be,state:ge,country:de,address_1:ke,address_2:Se,zip_code:Re}))}},[e]),U.useEffect(()=>{if(Ur.validateDataType(M,Mi.ARRAY)){const ie=M.map(se=>({value:se==null?void 0:se.country_id,label:se==null?void 0:se.country_name}));m([...ie])}},[M]),U.useEffect(()=>{if(Ur.validateDataType(_,Mi.ARRAY)){const ie=_.map(se=>({value:se==null?void 0:se.STATE_ID,label:se==null?void 0:se.STATE_NAME}));b([...ie])}},[_]);const A=ie=>{if(ie.key==="Enter"&&d.trim()!==""){const se=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;ie.preventDefault(),se.test(d)?(c([...l,d.trim()]),p("")):s(le=>un(pt({},le),{email_id:!0}))}},D=ie=>()=>{c(se=>se.filter(le=>le!==ie))},N=()=>{r(!0)},L=()=>{r(!1)},B=(ie,se)=>{ie==="email_id"&&p(se),s(le=>un(pt({},le),{[ie]:!1})),i(le=>un(pt({},le),{[ie]:se}))},V=(ie,se)=>{C(ie==="country"?le=>un(pt({},le),{state:"",[ie]:se}):le=>un(pt({},le),{[ie]:se})),s(le=>un(pt({},le),{[ie]:!1}))},H=()=>{const ie=/^\+?(\d[\d-.()\s]+)?\d$/,se=/^\d{6}$/;let le=!0;for(const[te,de]of Object.entries(o))te==="mobile_number"&&(ie.test(de)||(s(ge=>un(pt({},ge),{[te]:!0})),le=!1)),de.length||(s(ge=>un(pt({},ge),{[te]:!0})),le=!1);for(const[te,de]of Object.entries(w)){let ge=!1;(te=="zip_code"&&!se.test(de)||(te==="country"||te==="state")&&!de||(te=="city"||te==="address_1")&&!(de!=null&&de.length))&&(ge=!0),ge&&(s(be=>un(pt({},be),{[te]:!0})),le=!1)}l.length||(s(te=>un(pt({},te),{email_id:!0})),le=!1),le&&O(un(pt(pt({},o),w),{email:l,client_id:e==null?void 0:e.client_id,phone_no:o==null?void 0:o.mobile_number,country:w==null?void 0:w.country,state:w==null?void 0:w.state}),null,()=>{n.invalidateQueries("subsription-overview"),L()},null)},G=(ie,se,le)=>{var de;return le!=null&&le.length&&(w!=null&&w[ie])?(de=le.filter(ge=>(ge==null?void 0:ge.value)===se))==null?void 0:de[0]:null},Y=ie=>{g(ie.currentTarget)},X=()=>{g(null)};return k.jsxs(k.Fragment,{children:[k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsxs("div",{className:`${DT.card_container}`,children:[k.jsx(mf,{visible:E||R||j}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{className:`${DT.card_subtitles}`,children:"Company Information"}),k.jsx("div",{className:"flex-end-center g-10",children:k.jsx("span",{children:k.jsx(Ahe,{sx:{color:"#009017",cursor:"pointer"}})})})]}),k.jsx(wn,{container:!0,spacing:2,children:k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Name :"})}),k.jsx("span",{children:(Z=e==null?void 0:e.org_name)!=null?Z:"-"})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Email :"})}),k.jsxs("div",{className:"flex-end-center",style:{gap:"4px"},children:[k.jsx(kK,{data:`${(re=(oe=e==null?void 0:e.email_id)==null?void 0:oe[0])!=null?re:"-"}`,limit:34}),((K=e==null?void 0:e.email_id)==null?void 0:K.length)>1?k.jsxs("span",{style:{backgroundColor:"#2B46F21A",color:"#2B46F2",padding:"4px",borderRadius:"50%",fontSize:"8px"},className:"flex-between-center",children:[k.jsx("span",{children:(Q=e==null?void 0:e.email_id)==null?void 0:Q.length}),k.jsx(l6,{className:"cursor-pointer",onClick:Y,sx:{fontSize:"8px"}})]}):k.jsx(k.Fragment,{})]})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Phone No :"})}),k.jsx("div",{children:k.jsx(kK,{data:(pe=e==null?void 0:e.mobile_number)!=null?pe:"-",limit:34})})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"GSTIN NO. :"})}),k.jsx("span",{children:(fe=e==null?void 0:e.gstin)!=null?fe:"-"})]})]})})]})}),k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx("div",{className:`${DT.card_container}`,children:k.jsxs("div",{className:"flex-between-columns",children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("span",{className:`${DT.card_subtitles}`,children:"Billing Address"}),k.jsx(Dhe,{sx:{color:"blue",cursor:"pointer"},onClick:N})]}),k.jsx("div",{children:k.jsx("span",{children:e==null?void 0:e.org_address})})]})})}),t&&k.jsx(EL,{size:"md",title:"Edit Org Details",open:t,onModalclose:L,children:k.jsxs(wn,{container:!0,spacing:2,children:[k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Basic Details"})}),k.jsx(Ya,{})]}),[{name:"org_name",label:"Name"},{name:"mobile_number",label:"Phone No"},{name:"gstin",label:"GST No"},{name:"email_id",label:"Email"}].map(ie=>k.jsxs(wn,{item:!0,xs:6,children:[ie.name==="email_id"?k.jsxs(fo,{component:"div",sx:{display:"flex",flexWrap:"wrap",border:"1px solid #ccc",borderRadius:"4px",padding:"8px",height:"38px",overflow:"scroll"},children:[l.map((se,le)=>k.jsx(oM,{label:se,onDelete:D(se),sx:{margin:"4px"}},le)),k.jsx(X7,{required:!0,variant:"standard",name:ie.name,placeholder:`Enter ${ie.label}`,value:d,onChange:se=>{const{name:le,value:te}=se.target;B(le,te)},onKeyPress:A,InputProps:{disableUnderline:!0},sx:{flexGrow:1,minWidth:"100px"}})]}):k.jsx(Vp,{required:!0,className:"w-100",name:ie.name,label:ie.label,value:o==null?void 0:o[ie.name],onChange:se=>{const{value:le,name:te}=se.target;B(te,le)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]},ie.name)),k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Billing Adreess"})}),k.jsx(Ya,{})]}),[{name:"country",label:"Country",type:"select",required:!0,options:h},{name:"state",label:"State",type:"select",required:!0,options:v},{name:"city",label:"City",type:"input",required:!0},{name:"address_1",label:"Address 1",type:"input",multiline:!0,required:!0},{name:"address_2",label:"Address 2",type:"input",multiline:!0,required:!1},{name:"zip_code",label:"Zip Code",type:"input",required:!0}].map(ie=>{var se;return k.jsxs(wn,{item:!0,xs:6,children:[ie.type=="select"?k.jsx(Pfe,{options:ie.options,label:ie.label,name:ie.name,required:ie.required,value:G(ie.name,w==null?void 0:w[ie.name],ie.options),isSearchable:!0,onChange:le=>{V(ie.name,le==null?void 0:le.value)},error:a==null?void 0:a[ie.name]}):k.jsx(Vp,{className:"w-100",required:ie.required,multiline:ie==null?void 0:ie.multiline,value:(se=w==null?void 0:w[ie.name])!=null?se:"",label:ie.label,name:ie.name,onChange:le=>{const{name:te,value:de}=le.target;V(te,de)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Cancel",variant:"outlined",onClick:L}),k.jsx(ea,{label:"Submit",disabled:x,onClick:H})]})})]})}),Ur.validateDataType(e==null?void 0:e.email_id,Mi.ARRAY)&&k.jsx(z7,{open:!!f,anchorEl:f,onClose:X,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:k.jsx("div",{style:{padding:"10px"},children:(ae=e.email_id)==null?void 0:ae.map(ie=>k.jsx("div",{className:"mb-10",children:ie}))})})]})},Bpt="_card_container_c1yb9_1",Vpt="_card_count_c1yb9_13",$pt="_card_subtitles_c1yb9_18",zpt="_icons_background_c1yb9_23",Wpt="_sub_icons_background_c1yb9_32",Cs={card_container:Bpt,card_count:Vpt,card_subtitles:$pt,icons_background:zpt,sub_icons_background:Wpt};function Hpt(e){return GL({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"},child:[]}]})(e)}var KL={},Gpt=$r;Object.defineProperty(KL,"__esModule",{value:!0});var _he=KL.default=void 0,Ypt=Gpt(Qr()),Upt=k;_he=KL.default=(0,Ypt.default)((0,Upt.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");var QL={},Xpt=$r;Object.defineProperty(QL,"__esModule",{value:!0});var q_=QL.default=void 0,qpt=Xpt(Qr()),Zpt=k;q_=QL.default=(0,qpt.default)((0,Zpt.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");var eB={},Jpt=$r;Object.defineProperty(eB,"__esModule",{value:!0});var tB=eB.default=void 0,Kpt=Jpt(Qr()),Qpt=k;tB=eB.default=(0,Kpt.default)((0,Qpt.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-5h2zm4 0h-2v-3h2zm0-5h-2v-2h2zm4 5h-2V7h2z"}),"Analytics");var nB={},eft=$r;Object.defineProperty(nB,"__esModule",{value:!0});var rB=nB.default=void 0,tft=eft(Qr()),nft=k;rB=nB.default=(0,tft.default)((0,nft.jsx)("path",{d:"m18.85 10.39 1.06-1.06c.78-.78.78-2.05 0-2.83L18.5 5.09c-.78-.78-2.05-.78-2.83 0l-1.06 1.06zm-5.66-2.83L4 16.76V21h4.24l9.19-9.19zM19 17.5c0 2.19-2.54 3.5-5 3.5-.55 0-1-.45-1-1s.45-1 1-1c1.54 0 3-.73 3-1.5 0-.47-.48-.87-1.23-1.2l1.48-1.48c1.07.63 1.75 1.47 1.75 2.68M4.58 13.35C3.61 12.79 3 12.06 3 11c0-1.8 1.89-2.63 3.56-3.36C7.59 7.18 9 6.56 9 6c0-.41-.78-1-2-1-1.26 0-1.8.61-1.83.64-.35.41-.98.46-1.4.12-.41-.34-.49-.95-.15-1.38C3.73 4.24 4.76 3 7 3s4 1.32 4 3c0 1.87-1.93 2.72-3.64 3.47C6.42 9.88 5 10.5 5 11c0 .31.43.6 1.07.86z"}),"Draw");var oB={},rft=$r;Object.defineProperty(oB,"__esModule",{value:!0});var iB=oB.default=void 0,oft=rft(Qr()),ift=k;iB=oB.default=(0,oft.default)((0,ift.jsx)("path",{d:"M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3 1 9l11 6 9-4.91V17h2V9z"}),"School");var aB={},aft=$r;Object.defineProperty(aB,"__esModule",{value:!0});var sB=aB.default=void 0,sft=aft(Qr()),lft=k;sB=aB.default=(0,sft.default)((0,lft.jsx)("path",{d:"M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2m-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m13-6v11c0 1.1-.9 2-2 2H4v-2h17V7z"}),"Payments");var lB={},cft=$r;Object.defineProperty(lB,"__esModule",{value:!0});var cB=lB.default=void 0,uft=cft(Qr()),dft=k;cB=lB.default=(0,uft.default)((0,dft.jsx)("path",{d:"M12 4H5C3.34 4 2 5.34 2 7v8c0 1.66 1.34 3 3 3l-1 1v1h1l2-2.03L9 18v-5H4V5.98L13 6v2h2V7c0-1.66-1.34-3-3-3M5 14c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m15.57-4.34c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66L10 13.77l.01 5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V18h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14zm-8.16.34h7.19l1.03 3h-9.25zM12 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"Commute");var uB={},pft=$r;Object.defineProperty(uB,"__esModule",{value:!0});var dB=uB.default=void 0,fft=pft(Qr()),EK=k;dB=uB.default=(0,fft.default)([(0,EK.jsx)("path",{d:"M19 6h-1V1H6v5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2M8 3h8v3H8zm4 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"0"),(0,EK.jsx)("path",{d:"M12.5 11.5h-1v2.71l1.64 1.64.71-.71-1.35-1.35z"},"1")],"PunchClock");var pB={},hft=$r;Object.defineProperty(pB,"__esModule",{value:!0});var fB=pB.default=void 0,mft=hft(Qr()),gft=k;fB=pB.default=(0,mft.default)((0,gft.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"}),"GroupAdd");var hB={},vft=$r;Object.defineProperty(hB,"__esModule",{value:!0});var mB=hB.default=void 0,yft=vft(Qr()),bft=k;mB=hB.default=(0,yft.default)((0,bft.jsx)("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome");const _T={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},xft={1:"Paid",2:"Unpaid",3:"Decline",0:" "},wft={Analytics:k.jsx(tB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),"Digital Signature":k.jsx(rB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Learn:k.jsx(iB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Payout:k.jsx(sB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Trip:k.jsx(cB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Timesheet:k.jsx(dB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Recruit:k.jsx(fB,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},Cft=e=>{var E,M,R,_,j,A,D,N,L,B,V,H,G;const{onTabChange:n}=e,[t,r]=U.useState(_T.LIST_VIEW),o=[{id:1,name:"Monthly"},{id:2,name:"Quarterly"},{id:3,name:"Half Yearly"},{id:4,name:"Yearly"},{id:5,name:"2 Years"},{id:6,name:"3 Years"}],i=Y=>{const X=o.find(Z=>Z.id===Y);return X?X.name:" "},[a,s]=U.useState(""),{session:{API_BASE_URL:l,mode:c}}=Wh(),d=Rb(),{data:p,isFetching:f}=Gu(zh,{url:dQ,params:{}},"subsription-overview"),{handleSubmit:g,isDisabled:h,isLoading:m}=d0({url:pQ}),{handleSubmit:v,isDisabled:b,isLoading:w}=d0({url:fQ}),C=(Y=!1)=>{if(!(p!=null&&p.openInvoice))return;const X={customer_id:p.openInvoice.customer_id,invoice_id:p.openInvoice.id,isDownload:1};b||v(X,null,Z=>{Y?(s(`data:application/pdf;base64,${Z==null?void 0:Z.data.buffer64}`),r(_T.INVOICE_VIEW)):Ur.downloadFileFromBuffer(Z==null?void 0:Z.data)},null)},O=()=>{var X;const Y={plan_id:p==null?void 0:p.plan_id,add_on_id:p==null?void 0:p.add_on_id,invoice_id:(X=p==null?void 0:p.openInvoice)==null?void 0:X.id};g(Y,null,Z=>{var oe;Ur.cashfreePayment((oe=Z==null?void 0:Z.data)==null?void 0:oe.payment_session_id,l,()=>{},d,c)},null)},x=U.useMemo(()=>{var X,Z;const{wallet:Y={}}=p!=null?p:{wallet:{}};return[{label:"Wallet Balance",count:`Rs ${(X=Y==null?void 0:Y.balance)!=null?X:"-"}`,description:k.jsxs(k.Fragment,{children:[k.jsxs("span",{style:{color:"#009017"},children:["+ Rs ",(Z=Y==null?void 0:Y.openingBalance)!=null?Z:"- "]})," ","last gained"]}),icon:k.jsx("span",{style:{background:"#FAC8001A",margin:"inherit"},className:Cs.icons_background,children:k.jsx(Rhe,{sx:{color:"#FAC800",fontSize:"2rem"}})}),progress:(Y==null?void 0:Y.percentage)*100}]},[p]);return k.jsxs("div",{className:"w-100",children:[k.jsx(mf,{visible:f||m||w}),t===_T.LIST_VIEW?k.jsxs(wn,{container:!0,spacing:2,children:[x.map(Y=>k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx(Spt,{data:Y})})),k.jsx(Lpt,{orgDetails:p==null?void 0:p.orgInfo}),k.jsxs(wn,{item:!0,xs:12,sm:6,lg:8,children:[k.jsxs("div",{className:`${Cs.card_container}`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsxs("span",{className:`${Cs.card_count}`,children:["Last ",xft[(E=p==null?void 0:p.openInvoice)==null?void 0:E.payment_status]||""," Invoice"]})}),k.jsx(Ya,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Due By"}),k.jsx("span",{className:`${Cs.card_subtitles}`,children:(M=p==null?void 0:p.openInvoice)!=null&&M.invoice_due_date?new Date(p.openInvoice.invoice_due_date).toLocaleDateString("en-GB"):"-"})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Amount"}),k.jsxs("span",{className:`${Cs.card_subtitles}`,children:[((R=p==null?void 0:p.openInvoice)==null?void 0:R.currency_symbol)||"₹"," ",(j=(_=p==null?void 0:p.openInvoice)==null?void 0:_.grand_total_amount)!=null?j:"-"]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Invoice"}),k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{children:k.jsx(Hpt,{style:{fontSize:"24px",color:"red",cursor:"pointer"},onClick:()=>C(!0)})})})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{}),k.jsx("span",{children:((A=p==null?void 0:p.openInvoice)==null?void 0:A.payment_status)===2&&k.jsx(ea,{disabled:h,label:"Pay Here",style:{height:"36px"},onClick:O})})]})]})]}),k.jsxs("div",{className:`${Cs.card_container} g-10`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center",children:k.jsxs("span",{className:`${Cs.card_count}`,children:["Plan Details ",k.jsxs("span",{style:{fontSize:"18px",fontWeight:"800"},children:["(",(D=p==null?void 0:p.planDetails)==null?void 0:D.current_plan,")"]})]})}),k.jsx(Ya,{}),k.jsx("div",{className:"flex-between-center",children:[{label:"Billing Cycle",value:i((N=p==null?void 0:p.planDetails)==null?void 0:N.billing_cycle)||"-",icon:k.jsx(_he,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Plan Validity",value:`${(L=p==null?void 0:p.planDetails)!=null&&L.plan_expiring_date?new Date(p.planDetails.plan_expiring_date).toLocaleDateString("en-GB"):"-"}`,icon:k.jsx(q_,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Status",value:`${(V=(B=p==null?void 0:p.planDetails)==null?void 0:B.status)!=null?V:"-"}`,icon:k.jsx(q_,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Remaining Days ",value:(()=>{var Q;const Y=(Q=p==null?void 0:p.planDetails)==null?void 0:Q.plan_expiring_date;if(!Y)return"-";const X=new Date(Y),Z=new Date;X.setHours(0,0,0,0),Z.setHours(0,0,0,0);const oe=Math.ceil((X.getTime()-Z.getTime())/(1e3*60*60*24)),re=Math.abs(oe),K=re===1?"day":"days";return oe<0?`Overdue by ${re} ${K}`:`${re} ${K}`})(),icon:k.jsx(G3,{sx:{color:"#335AFF",fontSize:"1.5rem"}})}].map(Y=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx("span",{style:{background:"#335AFF1A"},className:`${Cs.sub_icons_background}`,children:Y.icon}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:Y.label}),k.jsx("span",{className:`${Cs.card_subtitles}`,children:Y.value})]})]}))})]}),k.jsxs("div",{className:`${Cs.card_container}`,children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsx("span",{className:`${Cs.card_count}`,children:"Add Ons"})}),k.jsx(Ya,{className:"mb-10"}),k.jsx("div",{className:"flex-start-center g-20",style:{overflowX:"auto",overflowY:"hidden"},children:Ur.validateDataType(p==null?void 0:p.addOnProduct,Mi.ARRAY)?p.addOnProduct.map((Y,X)=>k.jsxs("div",{className:"flex-start-column g-10",style:{borderLeft:X!==0?"1px solid #ccc":"none",paddingLeft:X!==0?"16px":"0px"},children:[k.jsx("span",{style:{fontSize:"14px",display:"flex",alignItems:"center",justifyContent:"center"},children:wft[Y.product_name]||k.jsx(mB,{sx:{color:"#335AFF",fontSize:"1.5rem"}})}),k.jsx("span",{className:`${Cs.card_subtitles}`,children:Y.product_name})]},X)):k.jsx(u0,{message:"No Add Ons Found"})})]})]}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${Cs.card_container} g-10`,style:{height:"100%"},children:Ur.validateDataType(p==null?void 0:p.usageCredit,Mi.ARRAY)?k.jsxs(k.Fragment,{children:[k.jsxs("span",{className:`${Cs.card_count}`,children:["User Counts"," ",k.jsx(Zg,{title:"Active Employees",children:k.jsxs("span",{children:["(",(G=(H=p==null?void 0:p.employee_details)==null?void 0:H.active_employee)!=null?G:"--",")"]})})]}),k.jsx(Pat,{type:Xdt.COLUMN,data:p.usageCredit,xField:"APP_MODULE",yField:"TOTAL_USER_COUNT",xAxisTitle:"",styles:{height:"310px",width:"100%"},defaultGroupBy:"",selectedGroupBy:""}),k.jsx(wn,{container:!0,spacing:1,children:p.usageCredit.map(Y=>{var X,Z;return k.jsx(wn,{item:!0,xs:6,children:k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsxs("span",{className:`${Cs.card_subtitles}`,children:[(X=Y==null?void 0:Y.APP_MODULE)!=null?X:"-"," :"]}),k.jsx("span",{children:(Z=Y==null?void 0:Y.TOTAL_USER_COUNT)!=null?Z:"-"})]})})})})]}):k.jsx(u0,{message:"No Records Found"})})})]}):k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:a,type:"application/pdf",children:" "})}),k.jsx(nc,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(ob,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(ea,{label:"Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>r(_T.LIST_VIEW)})})})]})]})},Sft="_card_container_1iza3_1",Oft="_plan_card_1iza3_13",Tft="_discount_card_1iza3_27",kft="_plan_total_count_1iza3_40",Eft="_card_count_1iza3_45",Mft="_card_subtitles_1iza3_50",Ks={card_container:Sft,plan_card:Oft,discount_card:Tft,plan_total_count:kft,card_count:Eft,card_subtitles:Mft};var gB={},Ift=$r;Object.defineProperty(gB,"__esModule",{value:!0});var jhe=gB.default=void 0,Pft=Ift(Qr()),Rft=k;jhe=gB.default=(0,Pft.default)((0,Rft.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle");var vB={},Aft=$r;Object.defineProperty(vB,"__esModule",{value:!0});var Nhe=vB.default=void 0,Dft=Aft(Qr()),_ft=k;Nhe=vB.default=(0,Dft.default)((0,_ft.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCard");var yB={},jft=$r;Object.defineProperty(yB,"__esModule",{value:!0});var Fhe=yB.default=void 0,Nft=jft(Qr()),Fft=k;Fhe=yB.default=(0,Nft.default)((0,Fft.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");const Lft=()=>{const[e,n]=U.useState(ki()),t=r=>{n(r)};return k.jsx("div",{children:k.jsxs(wn,{container:!0,spacing:4,children:[k.jsxs(wn,{item:!0,xs:12,sm:12,lg:7,children:[k.jsxs("div",{className:`${Ks.card_container} g-20 mb-10`,children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!0}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Credit/Debit Cards"}),k.jsx("span",{style:{color:"#615E69"},children:"Pay with your Credit/Debit Card"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-start-column g-10",style:{width:"90%",margin:"auto"},children:[k.jsx(Vp,{placeholder:"Name on the Card",suffix:k.jsx(jhe,{})}),k.jsx(Vp,{placeholder:"Card Number",suffix:k.jsx(Nhe,{})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(U_,{format:"MM/YY",views:["month","year"],sx:{width:"50%"},minDate:ki(),value:e,onChange:t}),k.jsx(Vp,{placeholder:"CVV",suffix:k.jsx(Fhe,{}),sx:{width:"50%"}})]})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Wallet"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through Wallet"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Paytm/Google Pay/Phone pe/BHIM UPI"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment through Gpay, Paypal, Paytm etc"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Net banking"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through bank account."})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]})]}),k.jsx(ea,{label:"Pay $164.23",className:"w-100"})]}),k.jsxs(wn,{item:!0,xs:12,sm:12,lg:5,children:[k.jsxs("div",{className:"flex-start-center g-20 mb-10",children:[k.jsxs("div",{className:`${Ks.plan_card} g-10`,style:{background:"#0055FF1A",border:"1px solid #335AFF"},children:[k.jsx("span",{className:`${Ks.card_count}`,children:"$10/mth"}),k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"})]}),k.jsxs("div",{className:`${Ks.plan_card} g-10`,children:[k.jsx("span",{className:`${Ks.card_count}`,children:"$8/mth"}),k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"}),k.jsx("div",{className:`${Ks.discount_card}`,children:k.jsx("span",{children:"-20%"})})]})]}),k.jsxs("div",{className:"mb-20",children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{className:`${Ks.card_subtitles}`,style:{color:"#615E69"},children:"Gift Card/ Discount Code"})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(Vp,{style:{width:"70%"}}),k.jsx(ea,{label:"Apply",variant:"outlined",sx:{width:"30%"}})]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Subtotal"}),k.jsx("span",{children:"$160"})]}),k.jsx(Ya,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Sales tax(6.5%)"}),k.jsx("span",{children:"$4,23"})]}),k.jsx(Ya,{}),k.jsxs("div",{className:`flex-between-center ${Ks.plan_total_count}`,children:[k.jsx("span",{children:"Total Due"}),k.jsx("span",{children:"$164.23"})]})]})]})]})})},Bft="_card_container_1tgxf_1",Vft="_plans_1tgxf_11",$ft="_add_ons_1tgxf_14",zft="_card_subtitles_1tgxf_28",Wft="_plan_headers_1tgxf_55",Hft="_card_content_1tgxf_63",kp={card_container:Bft,plans:Vft,add_ons:$ft,card_subtitles:zft,plan_headers:Wft,card_content:Hft},Gft={plans:{Basic:{"Core HR":["Employee","Time & Attendance","Document","Policy","Workflow","Roles & Permission","Transfer & Probation"],"Employee Self Service (ESS)":["Android & iOS","Team","Geotag","Geofence","Reports"],Payroll:["Salary","Compliance","Arrear","Full & Final"]},Standard:{"All Basic Features +":[],"Advance HR":["Onboarding","Offboarding","Helpdesk","Asset","Task","Custom Dashboard"],Engage:["Feed","Chat","Survey","Feedback","Recognition"],"Advance Time Tracking":["Time Zone","Roster","Selfie Attendance","Overtime & Incentive"]},Enterprise:{"All Standard Features +":[],"Finance & Admin":["Expense","Travel Desk","Vendor","Petty Cash","Budgeting","Manpower Planning"],Performance:["Review (KRA/KPI)","Objective (OKR)","9-Box Matrix","Bell Curve & Normalization","Compensation"],"Global Payroll":["Contract","Multi-Entry","Multi-Country","Multi-Currency"]}}},Yft=e=>{var f;const{onTabChange:n}=e,[t,r]=U.useState(!1);UC();const[o,i]=U.useState({plan:"",add_ons:[],new_add_ons:[]}),a={Analytics:k.jsx(tB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),"Digital Signature":k.jsx(rB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Learn:k.jsx(iB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Payout:k.jsx(sB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Trip:k.jsx(cB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Timesheet:k.jsx(dB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Recruit:k.jsx(fB,{sx:{color:"#335AFF",fontSize:"2.5rem"}})},s=Gft,l=!1,{isDisabled:c}=d0({url:kbe}),{data:d}=Gu(zh,{url:dQ,params:{}},"subsription-overview");U.useEffect(()=>{var g,h;d&&i({plan:(g=d.plan_id)!=null?g:"",add_ons:((h=d.add_on_id)!=null?h:[]).map(String),new_add_ons:[]})},[d]);const p=g=>{var h;return g===((h=d==null?void 0:d.planDetails)==null?void 0:h.current_plan)};return k.jsxs("div",{children:[k.jsx(mf,{visible:l}),k.jsxs(wn,{container:!0,spacing:3,children:[s!=null&&s.plans?Object.entries(s.plans).map(([g,h])=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,children:k.jsxs("div",{className:`${kp.card_container} ${kp.plans} ${p(g)?kp.selected_plan:""}`,style:{backgroundColor:p(g)?"#E3F2FD":"white",border:p(g)?"2px solid #2196F3":"1px solid #e0e0e0",borderRadius:"12px",padding:"12px",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[p(g)&&k.jsx("div",{style:{position:"absolute",top:"-1px",right:"20px",background:"#2196F3",color:"white",padding:"4px 12px",borderRadius:"0 0 8px 8px",fontSize:"12px",fontWeight:"bold"},children:"OPTED"}),k.jsxs("div",{className:"flex-start-column",style:{flex:1,gap:"8px"},children:[k.jsx("div",{className:kp.plan_headers,children:k.jsx("div",{style:{textAlign:"center",marginBottom:"8px"},children:k.jsx("h3",{style:{margin:0,color:"#1976D2",fontSize:"24px",fontWeight:"bold"},children:g})})}),k.jsx(Ya,{}),k.jsx("div",{className:kp.card_content,style:{flex:1},children:Object.entries(h).map(([m,v])=>k.jsxs("div",{style:{marginBottom:"8px"},children:[k.jsx("div",{style:{fontWeight:"bold",color:"#333",marginBottom:"4px",fontSize:"16px"},children:m}),Array.isArray(v)&&v.length>0&&k.jsxs("div",{style:{paddingLeft:"12px",color:"#666"},children:[v.slice(0,3).map((b,w)=>k.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"4px",fontSize:"14px"},children:[k.jsx(Phe,{style:{color:"#4CAF50",fontSize:"16px"}}),b]},w)),v.length>3&&k.jsxs("div",{style:{color:"#999",fontSize:"12px",marginTop:"4px"},children:["+",v.length-3," more features"]})]})]},m))})]})]})},g)):k.jsx(wn,{item:!0,xs:12,children:k.jsx(u0,{message:"No Plans Found"})}),k.jsx(wn,{item:!0,xs:12,style:{marginTop:"10px",marginBottom:"10px"},children:k.jsx("div",{className:"flex-between-center",children:k.jsx("span",{className:kp.card_subtitles,children:"Addons"})})}),(f=d==null?void 0:d.addOnProduct)!=null&&f.length?k.jsx(wn,{container:!0,spacing:2,sx:{pl:3},children:d.addOnProduct.map(g=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,lg:3,children:k.jsx("div",{className:`${kp.card_container} ${kp.add_ons} ${d.add_on_id.includes(String(g.product_id))?kp.selected_addon:""}`,style:{backgroundColor:d.add_on_id.includes(String(g.product_id))?"#E8F5E8":"white",border:d.add_on_id.includes(String(g.product_id))?"2px solid #4CAF50":"1px solid #e0e0e0",borderRadius:"12px",width:"100%",maxWidth:"260px",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[k.jsx("span",{style:{fontSize:"18px",display:"flex",alignItems:"center"},children:a[g.product_name]||k.jsx(mB,{sx:{color:"#335AFF",fontSize:"2.5rem"}})}),k.jsx("h4",{style:{margin:0,color:"#333",fontSize:"15px",fontWeight:600,lineHeight:1.4},children:g.product_name})]})})},g.product_id))}):k.jsx(wn,{item:!0,xs:12,children:k.jsx(u0,{message:"No Add Ons Found"})}),k.jsxs(Gw,{open:t,onClose:()=>r(!1),maxWidth:"xs",fullWidth:!0,children:[k.jsx(z3,{sx:{fontWeight:600,textAlign:"center",color:"#1976D2"},children:"Contact Your SPOC"}),k.jsx(Uw,{children:k.jsx("div",{style:{textAlign:"center",fontSize:"15px",padding:"10px 0"},children:"To upgrade your plan, please contact your SPOC."})}),k.jsx(Yw,{sx:{justifyContent:"center"},children:k.jsx(Ap,{variant:"contained",color:"primary",onClick:()=>r(!1),children:"Close"})})]}),k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",children:k.jsx(ea,{label:"Upgrade",onClick:()=>r(!0),disabled:c})})})]})]})},Uft="_card_container_vce56_1",Xft="_card_titles_vce56_13",qft="_card_subtitles_vce56_18",Zft="_card_subtotal_vce56_23",Jft="_card_headers_vce56_40",Kft="_card_content_vce56_48",Km={card_container:Uft,card_titles:Xft,card_subtitles:qft,card_subtotal:Zft,card_headers:Jft,card_content:Kft},Lhe=e=>{const{open:n,setIsOpen:t}=e,r=Rb(),{session:{API_BASE_URL:o,mode:i}}=Wh(),a=UC(),[s,l]=U.useState({amount:"",remarks:""}),{handleSubmit:c,isDisabled:d}=d0({url:Sbe}),p=()=>{t(!1)},f=()=>{if(!s.amount.length){r("Please Enter Amount");return}const h={amount:s.amount,remarks:s.remarks};c(h,null,m=>{var v;a.invalidateQueries("transaction-history"),Ur.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,o,p,r,i)},null)},g=(h,m)=>{l(v=>un(pt({},v),{[h]:m}))};return k.jsx(EL,{open:n,title:"Add Money",size:"xs",onModalclose:p,children:k.jsxs("div",{children:[k.jsx(Vp,{label:"Amount",name:"amount",required:!0,value:s.amount,onChange:h=>{const{name:m,value:v}=h.target;(v===""||/^[0-9\b]+$/.test(v))&&g(m,v)},className:"w-100 mb-10 mt-10"}),k.jsx(Vp,{label:"Remarks",name:"remarks",value:s.remarks,onChange:h=>{const{name:m,value:v}=h.target;g(m,v)},className:"w-100 mb-10"}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Cancel",variant:"outlined",onClick:p}),k.jsx(ea,{label:"Submit",disabled:d,onClick:f})]})]})})},Qft=e=>{const{onTabChange:n}=e,t=Rb(),{session:{API_BASE_URL:r,mode:o}}=Wh(),[i,a]=U.useState(!1),{data:s,isFetching:l}=Gu(zh,{url:wbe,params:{}},"customer-subsription"),{handleSubmit:c,isDisabled:d,isLoading:p}=d0({url:pQ}),f=()=>{a(!0)},g=()=>{const h={plan_id:s==null?void 0:s.plan_id,add_on_id:s==null?void 0:s.add_on_product_id};c(h,null,m=>{var v;Ur.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,r,()=>{},t,o)},null)};return k.jsxs("div",{children:[k.jsx(mf,{visible:l||p}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",children:k.jsx(ea,{label:"Top Up Wallet",startIcon:k.jsx(l6,{}),onClick:()=>{f()}})})}),Ur.validateDataType(s==null?void 0:s.header,Mi.ARRAY)?s==null?void 0:s.header.map(h=>k.jsx(wn,{item:!0,xs:12,sm:12,md:4,lg:4,children:k.jsxs("div",{className:Km.card_container,children:[k.jsx("div",{className:Km.card_headers,children:k.jsx("span",{className:Km.card_titles,style:{color:"#335AFF"},children:h})}),k.jsx(Ya,{className:"mb-10"}),Ur.validateDataType(s==null?void 0:s.resultRows,Mi.ARRAY)?s.resultRows.map((m,v,b)=>k.jsxs(k.Fragment,{children:[k.jsx("div",{className:Km.card_content,children:Ur.validateDataType(m==null?void 0:m[h],Mi.ARRAY)?m==null?void 0:m[h].map(w=>k.jsx(k.Fragment,{children:k.jsx("span",{className:`${h==="Plan"?Km.card_titles:""}`,children:h==="Price"?`Rs ${w}`:w})})):k.jsx(k.Fragment,{})}),v!==b.length-1?k.jsx(Ya,{className:"mb-10"}):k.jsx(k.Fragment,{})]})):k.jsx(k.Fragment,{})]})})):k.jsx(u0,{message:"No Plans Found"}),Ur.validateDataType(s==null?void 0:s.subtotal,Mi.ARRAY)?s.subtotal.map(h=>k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:`flex-between-center mb-10 ${h.name==="Total"?Km.card_subtitles:Km.card_subtotal}`,children:[k.jsx("span",{children:h.name}),k.jsxs("span",{children:["Rs ",h.amount]})]}),k.jsx(Ya,{})]})):k.jsx(k.Fragment,{}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Renew",variant:"outlined",disabled:d,onClick:g}),k.jsx(ea,{label:"Modify Subscription",onClick:()=>{n(2)}})]})})]}),i&&k.jsx(Lhe,{open:i,setIsOpen:a})]})},eht="_card_container_1ts8v_1",tht="_card_subtitles_1ts8v_18",nht="_icons_background_1ts8v_23",Pu={card_container:eht,card_subtitles:tht,icons_background:nht};function rht(e){return GL({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64l241.9 0c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5 608 384c0 35.3-28.7 64-64 64l-241.9 0c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5 32 128c0-35.3 28.7-64 64-64zm64 64l-64 0 0 64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64l64 0 0-64zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z"},child:[]}]})(e)}var bB={},oht=$r;Object.defineProperty(bB,"__esModule",{value:!0});var Z_=bB.default=void 0,iht=oht(Qr()),aht=k;Z_=bB.default=(0,iht.default)((0,aht.jsx)("path",{d:"M18 4H6C3.79 4 2 5.79 2 8v8c0 2.21 1.79 4 4 4h12c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4m-1.86 9.77c-.24.2-.57.28-.88.2L4.15 11.25C4.45 10.52 5.16 10 6 10h12c.67 0 1.26.34 1.63.84zM6 6h12c1.1 0 2 .9 2 2v.55c-.59-.34-1.27-.55-2-.55H6c-.73 0-1.41.21-2 .55V8c0-1.1.9-2 2-2"}),"Wallet");var xB={},sht=$r;Object.defineProperty(xB,"__esModule",{value:!0});var Bhe=xB.default=void 0,lht=sht(Qr()),cht=k;Bhe=xB.default=(0,lht.default)((0,cht.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const MK=[{label:"Credit Card",value:"cc"},{label:"Debit Card",value:"dc"},{label:"New Banking",value:"nb"}],uht=()=>{var g,h,m,v;const[e,n]=U.useState(!1),[t,r]=U.useState(!1),[o,i]=U.useState({}),{data:a,isFetching:s}=Gu(zh,{url:Cbe,params:{}},"transaction-history"),l=()=>{n(!0)},c=()=>{r(!0)},d=()=>{r(!1),i({})},p=(b,w)=>{i(C=>un(pt({},C),{[b]:w}))};console.log({automaticTopupDetails:o});const f=U.useMemo(()=>[{header:"Date",accessorKey:"CREATED_ON",id:"CREATED_ON",cell:b=>k.jsxs("span",{children:[" ",ki(b).format("h:mma, D MMMM YYYY")]})},{header:"Payment By",accessorKey:"PAYMENT_BY",id:"PAYMENT_BY"},{header:"Description",accessorKey:"DESCRIPTION",id:"DESCRIPTION"},{header:"Transaction Id",accessorKey:"LEDGER_ID",id:"LEDGER_ID"},{header:"Transaction Remarks",accessorKey:"TRANSACTION_REMARKS",id:"TRANSACTION_REMARKS"},{header:"Credit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="credit"?`${b}`:"--"})},{header:"Debit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="debit"?`${b}`:"--"})},{header:"Closing Balance",accessorKey:"CLOSING_BALANCE",id:"CLOSING_BALANCE",cell:b=>k.jsx("span",{className:`${Pu.card_subtitles}`,style:{color:"#8B8684 "},children:b})}],[a]);return k.jsxs("div",{children:[k.jsx(mf,{visible:s}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${Pu.card_container}`,children:[k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{style:{background:"#027A481A",margin:"inherit"},className:Pu.icons_background,children:k.jsx(rht,{style:{color:"#027A48",fontSize:"2rem"}})})}),k.jsx("div",{style:{margin:"auto"},children:k.jsx(ea,{label:"Add Money",variant:"outlined",startIcon:k.jsx(l6,{}),onClick:()=>{l()}})})]})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${Pu.card_container}`,children:k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#0237671A",margin:"inherit"},className:Pu.icons_background,children:k.jsx(Z_,{style:{color:"#023767",fontSize:"2rem"}})}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Wallet Balance"}),k.jsxs("span",{className:`${Pu.card_subtitles}`,children:["Rs ",(h=(g=a==null?void 0:a.overview)==null?void 0:g.balance)!=null?h:"--"]})]})]})})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${Pu.card_container}`,children:[k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#335AFF1A",margin:"inherit"},className:Pu.icons_background,children:k.jsx(Z_,{style:{color:"#335AFF",fontSize:"2rem"}})}),k.jsx("span",{className:`${Pu.card_subtitles}`,children:"Automatic Topup"})]}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Set Up",onClick:c}),k.jsx(Zg,{title:"Whenever your balance goes below, top up your wallet automatically",children:k.jsx(Bhe,{className:"cursor-pointer"})})]})]})}),k.jsx(wn,{item:!0,xs:12,sm:12,lg:12,children:k.jsxs("div",{className:`${Pu.card_container} g-10`,children:[k.jsx("span",{className:`${Pu.card_subtitles}`,children:"Transaction History"}),k.jsx(Ya,{}),k.jsx("div",{style:{height:"340px",overflow:"scroll"},children:k.jsx(ML,{data:Ur.validateDataType((m=a==null?void 0:a.transactionHistoryList)==null?void 0:m.result,Mi.ARRAY)?(v=a==null?void 0:a.transactionHistoryList)==null?void 0:v.result:[],columns:f,wrapByTooltipDefault:!0})})]})})]}),e&&k.jsx(Lhe,{open:e,setIsOpen:n}),t&&k.jsx(EL,{title:"Topup Setup",open:t,size:"xs",onModalclose:d,children:k.jsxs(wn,{container:!0,spacing:2,sx:{marginTop:"-10px"},children:[[{name:"min_amount",label:"Min Amount"},{name:"max_amount",label:"Max Amount"}].map(b=>{var w;return k.jsx(wn,{item:!0,xs:12,children:k.jsx(Vp,{label:b.label,name:b.name,className:"w-100",value:(w=o==null?void 0:o[b.name])!=null?w:"",onChange:C=>{const{name:O,value:x}=C.target;(x===""||/^[0-9\b]+$/.test(x))&&p(O,x)}})})}),k.jsx(wn,{item:!0,xs:12,children:k.jsx(Pfe,{options:MK,value:MK.filter(b=>b.value===(o==null?void 0:o.transaction_type)),label:"Transaction Type",onChange:b=>{p("transaction_type",b==null?void 0:b.value)}})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Cancel",variant:"outlined",onClick:d}),k.jsx(ea,{label:"Submit"})]})})]})})]})},dht=()=>{const{session:{user:e}}=Wh(),[n,t]=U.useState([]),[r,o]=U.useState(null),i=(e==null?void 0:e.org_id)||null,{data:a,isFetching:s}=Gu(o7,{url:Ibe,data:{org_id:i,pagination:{page:1,limit:10}}},["addon-clients",i],{enabled:!!i});U.useEffect(()=>{if(a){const{headers:c=[],result:{list:d=[]}={}}=a;t(c),d.length>0&&o(d[0])}},[a]);const l=c=>{if(!r)return;const d=String(c),p=r.productNameID.includes(d)?r.productNameID.filter(f=>f!==d):[...r.productNameID,d];o(un(pt({},r),{productNameID:p})),console.log("Toggled:",d,"Updated:",p)};return!i||s?k.jsx(mf,{visible:!0}):k.jsx(fo,{sx:{flexGrow:1},mt:2,children:k.jsxs(ob,{gap:2,children:[k.jsx(Ar,{variant:"h6",children:"Subscription Activation"}),k.jsx(nc,{variant:"outlined",sx:{width:"100%"},children:k.jsx(fM,{disablePadding:!0,children:n.map((c,d)=>{const p=(r==null?void 0:r.productNameID.includes(String(c.id)))||!1;return k.jsxs(U.Fragment,{children:[k.jsxs($7,{children:[k.jsx(qee,{primary:c.product_name,secondary:c.short_product_name}),k.jsx(hM,{children:k.jsx(ste,{edge:"end",checked:p,onChange:()=>l(c.id),disabled:!c.operation_allow})})]}),d<n.length-1&&k.jsx(Ya,{})]},c.id)})})})]})})};var wB={},pht=$r;Object.defineProperty(wB,"__esModule",{value:!0});var Vhe=wB.default=void 0,fht=pht(Qr()),hht=k;Vhe=wB.default=(0,fht.default)((0,hht.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var CB={},mht=$r;Object.defineProperty(CB,"__esModule",{value:!0});var J_=CB.default=void 0,ght=mht(Qr()),vht=k;J_=CB.default=(0,ght.default)((0,vht.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var SB={},yht=$r;Object.defineProperty(SB,"__esModule",{value:!0});var $he=SB.default=void 0,bht=yht(Qr()),xht=k;$he=SB.default=(0,bht.default)((0,xht.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile");var OB={},wht=$r;Object.defineProperty(OB,"__esModule",{value:!0});var zhe=OB.default=void 0,Cht=wht(Qr()),Sht=k;zhe=OB.default=(0,Cht.default)((0,Sht.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image");var TB={},Oht=$r;Object.defineProperty(TB,"__esModule",{value:!0});var Whe=TB.default=void 0,Tht=Oht(Qr()),kht=k;Whe=TB.default=(0,Tht.default)((0,kht.jsx)("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5.5h1v-3h-1z"}),"PictureAsPdf");var kB={},Eht=$r;Object.defineProperty(kB,"__esModule",{value:!0});var Hhe=kB.default=void 0,Mht=Eht(Qr()),Iht=k;Hhe=kB.default=(0,Mht.default)((0,Iht.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description");const Pht=()=>{const[e,n]=U.useState({page:0,perPage:20}),[t,r]=U.useState(null),[o,i]=U.useState(null),[a,s]=U.useState(!1),[l,c]=U.useState(null),[d,p]=U.useState(!1),f=Wh(A=>{var D;return(D=A.session.user)==null?void 0:D.org_id});console.log("org_id",f);const{data:g,isFetching:h}=Gu(o7,{url:Pbe,data:{org_id:f,page:e.page,limit:e.perPage}},"customer-mails"),m=(A,D)=>{r(A.currentTarget),i(D)},v=()=>{r(null)},b=()=>{s(!0),v()},w=()=>{s(!1),i(null)},C=(A,D)=>{n(N=>un(pt({},N),{[A]:D}))},O=A=>A.startsWith("image/")?k.jsx(zhe,{}):A==="application/pdf"?k.jsx(Whe,{}):k.jsx(Hhe,{}),x=A=>{if(A===0)return"0 Bytes";const D=1024,N=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(A)/Math.log(D));return parseFloat((A/Math.pow(D,L)).toFixed(2))+" "+N[L]},E=A=>{const D=document.createElement("a");D.href=`data:${A.type};base64,${A.data}`,D.download=A.name,document.body.appendChild(D),D.click(),document.body.removeChild(D)},M=A=>{c(A),p(!0)},R=()=>{p(!1),c(null)},_=()=>{if(!l)return null;const{type:A,data:D,name:N}=l,L=`data:${A};base64,${D}`;return A.startsWith("image/")?k.jsx(fo,{display:"flex",justifyContent:"center",p:2,children:k.jsx("img",{src:L,alt:N,style:{maxWidth:"100%",maxHeight:"500px",objectFit:"contain"}})}):A==="application/pdf"?k.jsx(fo,{display:"flex",justifyContent:"center",p:2,children:k.jsx("embed",{src:L,type:"application/pdf",width:"100%",height:"500px",style:{border:"1px solid #ccc"}})}):k.jsx(fo,{display:"flex",justifyContent:"center",alignItems:"center",p:4,children:k.jsx(Ar,{variant:"body1",color:"text.secondary",children:"Preview not available for this file type"})})},j=U.useMemo(()=>[{header:"Subject",accessorKey:"subject",id:"subject"},{header:"Created By",accessorKey:"created_by",id:"created_by"},{header:"Created On",accessorKey:"created_on",id:"created_on"},{header:"Action",accessorKey:"id",id:"id",cell:(A,D)=>k.jsx("div",{className:"flex-start-center g-10",children:k.jsx(Zg,{title:"More Options",children:k.jsx(Vhe,{color:"primary",className:"cursor-pointer",onClick:N=>m(N,D)})})})}],[g]);return k.jsxs("div",{children:[k.jsx(mf,{visible:h}),k.jsx("div",{style:{height:"70vh",overflow:"scroll"},children:k.jsx(ML,{loading:h,data:Ur.validateDataType(g==null?void 0:g.data,Mi.ARRAY)?g.data:[],columns:j,wrapByTooltipDefault:!0,pagination:un(pt({show:!0,showFirstButton:!0,showLastButton:!0,perPageOptions:[20,30,50,100],totalDataCount:(g==null?void 0:g.totalCounts)||0},e),{handlePageChange:A=>C("page",A),handlePerPageChange:A=>C("perPage",A)})})}),k.jsx(W7,{anchorEl:t,open:!!t,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:k.jsxs(Qee,{onClick:b,children:[k.jsx(ME,{fontSize:"small",sx:{mr:1}}),"View"]})}),k.jsxs(Gw,{open:a,onClose:w,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{minHeight:"500px",maxHeight:"85vh",borderRadius:3,boxShadow:"0 10px 40px rgba(0,0,0,0.15)"}},children:[k.jsx(z3,{sx:{background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"white",py:3},children:k.jsxs(fo,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[k.jsxs(fo,{children:[k.jsx(Ar,{variant:"h5",fontWeight:"600",children:"Mail Details"}),k.jsx(Ar,{variant:"body2",sx:{opacity:.9,mt:.5},children:o==null?void 0:o.subject})]}),k.jsx(Ih,{onClick:w,sx:{color:"white",backgroundColor:"rgba(255,255,255,0.1)","&:hover":{backgroundColor:"rgba(255,255,255,0.2)"}},children:k.jsx(J_,{})})]})}),k.jsx(Uw,{sx:{p:0},children:o&&k.jsxs(fo,{sx:{p:3},children:[k.jsx(nc,{elevation:0,sx:{p:3,mb:3,backgroundColor:"#f8fafc",borderRadius:2,border:"1px solid #e2e8f0"},children:k.jsxs(ob,{spacing:2.5,children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:2,children:[k.jsx(fo,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"#10b981"}}),k.jsx(Ar,{variant:"h6",fontWeight:"600",color:"text.primary",children:o.subject})]}),k.jsxs(fo,{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2,children:[k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"From"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.from_email||"N/A"})]}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"To"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.to_email||"N/A"})]}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"Created By"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.created_by})]}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"Created On"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.created_on})]})]})]})}),o.attachments&&o.attachments.length>0&&k.jsxs(fo,{sx:{mb:3},children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:1,mb:2,children:[k.jsx($he,{sx:{color:"#6366f1"}}),k.jsxs(Ar,{variant:"h6",fontWeight:"600",color:"text.primary",children:["Attachments (",o.attachments.length,")"]})]}),k.jsx(ob,{spacing:1.5,children:o.attachments.map((A,D)=>k.jsx(nc,{elevation:0,sx:{p:2.5,border:"1px solid #e2e8f0",borderRadius:2,transition:"all 0.2s ease","&:hover":{borderColor:"#6366f1",boxShadow:"0 4px 12px rgba(99, 102, 241, 0.1)"}},children:k.jsxs(fo,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:2,children:[k.jsx(fo,{sx:{p:1.5,borderRadius:2,backgroundColor:"#f1f5f9",color:"#6366f1"},children:O(A.type)}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"body1",fontWeight:"600",color:"text.primary",children:A.name}),k.jsx(Ar,{variant:"caption",color:"text.secondary",children:A.size&&x(A.size)})]})]}),k.jsxs(fo,{display:"flex",gap:1,children:[k.jsx(Ap,{variant:"outlined",size:"small",startIcon:k.jsx(ME,{}),onClick:()=>M(A),sx:{borderColor:"#6366f1",color:"#6366f1","&:hover":{borderColor:"#4f46e5",backgroundColor:"#f8fafc"}},children:"Preview"}),k.jsx(Ap,{variant:"contained",size:"small",startIcon:k.jsx(EE,{}),onClick:()=>E(A),sx:{backgroundColor:"#6366f1","&:hover":{backgroundColor:"#4f46e5"}},children:"Download"})]})]})},D))})]}),o.content&&k.jsxs(fo,{children:[k.jsx(Ar,{variant:"h6",fontWeight:"600",color:"text.primary",sx:{mb:2},children:"Content"}),k.jsx(nc,{elevation:0,sx:{p:3,maxHeight:"400px",overflow:"auto",backgroundColor:"#ffffff",border:"1px solid #e2e8f0",borderRadius:2,"& img":{maxWidth:"100%",height:"auto",borderRadius:1},"& a":{color:"#6366f1",textDecoration:"none","&:hover":{textDecoration:"underline"}}},children:k.jsx("div",{dangerouslySetInnerHTML:{__html:o.content},style:{wordBreak:"break-word",fontFamily:"inherit",lineHeight:1.6}})})]})]})}),k.jsx(Yw,{sx:{p:3,pt:0},children:k.jsx(ea,{label:"Close",size:"medium",variant:"outlined",onClick:w})})]}),k.jsxs(Gw,{open:d,onClose:R,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{minHeight:"500px",maxHeight:"90vh",borderRadius:3,boxShadow:"0 10px 40px rgba(0,0,0,0.15)"}},children:[k.jsx(z3,{sx:{background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"white",py:3},children:k.jsxs(fo,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:2,children:[k.jsx(fo,{sx:{p:1.5,borderRadius:2,backgroundColor:"rgba(255,255,255,0.1)",color:"white"},children:l&&O(l.type)}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"h6",fontWeight:"600",children:(l==null?void 0:l.name)||"Attachment Preview"}),k.jsx(Ar,{variant:"body2",sx:{opacity:.9},children:(l==null?void 0:l.size)&&x(l.size)})]})]}),k.jsx(Ih,{onClick:R,sx:{color:"white",backgroundColor:"rgba(255,255,255,0.1)","&:hover":{backgroundColor:"rgba(255,255,255,0.2)"}},children:k.jsx(J_,{})})]})}),k.jsx(Uw,{sx:{p:0,backgroundColor:"#f8fafc"},children:k.jsx(fo,{sx:{p:3},children:k.jsx(nc,{elevation:0,sx:{borderRadius:2,overflow:"hidden",border:"1px solid #e2e8f0",minHeight:"400px",display:"flex",alignItems:"center",justifyContent:"center"},children:_()})})}),k.jsxs(Yw,{sx:{p:3,pt:0,backgroundColor:"#f8fafc"},children:[l&&k.jsx(Ap,{startIcon:k.jsx(EE,{}),onClick:()=>E(l),variant:"contained",sx:{backgroundColor:"#6366f1","&:hover":{backgroundColor:"#4f46e5"},mr:1},children:"Download"}),k.jsx(ea,{label:"Close",size:"medium",variant:"outlined",onClick:R})]})]})]})};exports.BillingSubscription=dht;exports.CustomerInvoices=xpt;exports.Mail=Pht;exports.ManageProvider=rke;exports.PlansOverview=Yft;exports.SubscriptionConsumption=cpt;exports.SubscriptionOverview=Cft;exports.SubscriptionPaymentMethod=Lft;exports.SubscriptionPlans=Qft;exports.SubscriptionWallet=uht;
|
|
3143
|
+
}`;var fr=JB(function(){return Tr(Ce,mn+"return "+Mt).apply(t,Ae)});if(fr.source=Mt,rP(fr))throw fr;return fr}function l0e(S){return io(S).toLowerCase()}function c0e(S){return io(S).toUpperCase()}function u0e(S,I,$){if(S=io(S),S&&($||I===t))return C1(S);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=vs(I),Ce=nd(J,ce),Ae=hm(J,ce)+1;return md(J,Ce,Ae).join("")}function d0e(S,I,$){if(S=io(S),S&&($||I===t))return S.slice(0,Sf(S)+1);if(!S||!(I=xs(I)))return S;var J=vs(S),ce=hm(J,vs(I))+1;return md(J,0,ce).join("")}function p0e(S,I,$){if(S=io(S),S&&($||I===t))return S.replace(Zn,"");if(!S||!(I=xs(I)))return S;var J=vs(S),ce=nd(J,vs(I));return md(J,ce).join("")}function f0e(S,I){var $=j,J=A;if(di(I)){var ce="separator"in I?I.separator:ce;$="length"in I?ar(I.length):$,J="omission"in I?xs(I.omission):J}S=io(S);var Ce=S.length;if(rd(S)){var Ae=vs(S);Ce=Ae.length}if($>=Ce)return S;var Le=$-Cf(J);if(Le<1)return J;var qe=Ae?md(Ae,0,Le).join(""):S.slice(0,Le);if(ce===t)return qe+J;if(Ae&&(Le+=qe.length-Le),oP(ce)){if(S.slice(Le).search(ce)){var wt,Ot=qe;for(ce.global||(ce=ve(ce.source,io(_t.exec(ce))+"g")),ce.lastIndex=0;wt=ce.exec(Ot);)var Mt=wt.index;qe=qe.slice(0,Mt===t?Le:Mt)}}else if(S.indexOf(xs(ce),Le)!=Le){var qt=qe.lastIndexOf(ce);qt>-1&&(qe=qe.slice(0,qt))}return qe+J}function h0e(S){return S=io(S),S&&Yt.test(S)?S.replace(dn,O1):S}var m0e=_f(function(S,I,$){return S+($?" ":"")+I.toUpperCase()}),sP=Pm("toUpperCase");function ZB(S,I,$){return S=io(S),I=$?t:I,I===t?v6(S)?gm(S):j0(S):S.match(I)||[]}var JB=nr(function(S,I){try{return Qe(S,t,I)}catch($){return rP($)?$:new Vn($)}}),g0e=Sc(function(S,I){return st(I,function($){$=Oc($),ts(S,$,tP(S[$],S))}),S});function v0e(S){var I=S==null?0:S.length,$=Cn();return S=I?To(S,function(J){if(typeof J[1]!="function")throw new ja(a);return[$(J[0]),J[1]]}):[],nr(function(J){for(var ce=-1;++ce<I;){var Ce=S[ce];if(Qe(Ce[0],this,J))return Qe(Ce[1],this,J)}})}function y0e(S){return Z0(bs(S,p))}function lP(S){return function(){return S}}function b0e(S,I){return S==null||S!==S?I:S}var x0e=Ws(),w0e=Ws(!0);function qs(S){return S}function cP(S){return Af(typeof S=="function"?S:bs(S,p))}function C0e(S){return rv(bs(S,p))}function S0e(S,I){return q1(S,bs(I,p))}var O0e=nr(function(S,I){return function($){return Vl($,S,I)}}),T0e=nr(function(S,I){return function($){return Vl(S,$,I)}});function uP(S,I,$){var J=Ca(I),ce=Tm(I,J);$==null&&!(di(I)&&(ce.length||!J.length))&&($=I,I=S,S=this,ce=Tm(I,Ca(I)));var Ce=!(di($)&&"chain"in $)||!!$.chain,Ae=bp(S);return st(ce,function(Le){var qe=I[Le];S[Le]=qe,Ae&&(S.prototype[Le]=function(){var wt=this.__chain__;if(Ce||wt){var Ot=S(this.__wrapped__),Mt=Ot.__actions__=la(this.__actions__);return Mt.push({func:qe,args:arguments,thisArg:S}),Ot.__chain__=wt,Ot}return qe.apply(S,td([this.value()],arguments))})}),S}function k0e(){return ia._===this&&(ia._=w6),this}function dP(){}function E0e(S){return S=ar(S),nr(function(I){return J1(I,S)})}var M0e=Nn(To),I0e=Nn(jn),P0e=Nn(x1);function KB(S){return mx(S)?w1(Oc(S)):wc(S)}function R0e(S){return function(I){return S==null?t:Ba(S,I)}}var A0e=ti(),D0e=ti(!0);function pP(){return[]}function fP(){return!1}function _0e(){return{}}function j0e(){return""}function N0e(){return!0}function F0e(S,I){if(S=ar(S),S<1||S>G)return[];var $=Z,J=aa(S,Z);I=Cn(I),S-=Z;for(var ce=wf(J,I);++$<S;)I($);return ce}function L0e(S){return Jn(S)?To(S,Oc):Hl(S)?[S]:la(wx(io(S)))}function B0e(S){var I=++Il;return io(S)+I}var V0e=Cc(function(S,I){return S+I},0),$0e=Rm("ceil"),z0e=Cc(function(S,I){return S/I},1),W0e=Rm("floor");function H0e(S){return S&&S.length?Om(S,qs,km):t}function G0e(S,I){return S&&S.length?Om(S,Cn(I,2),km):t}function Y0e(S){return h5(S,qs)}function U0e(S,I){return h5(S,Cn(I,2))}function X0e(S){return S&&S.length?Om(S,qs,nv):t}function q0e(S,I){return S&&S.length?Om(S,Cn(I,2),nv):t}var Z0e=Cc(function(S,I){return S*I},1),J0e=Rm("round"),K0e=Cc(function(S,I){return S-I},0);function Q0e(S){return S&&S.length?B0(S,qs):0}function eve(S,I){return S&&S.length?B0(S,Cn(I,2)):0}return ye.after=Cme,ye.ary=IB,ye.assign=cge,ye.assignIn=WB,ye.assignInWith=AO,ye.assignWith=uge,ye.at=dge,ye.before=PB,ye.bind=tP,ye.bindAll=g0e,ye.bindKey=RB,ye.castArray=_me,ye.chain=Lm,ye.chunk=rs,ye.compact=Cx,ye.concat=W6,ye.cond=v0e,ye.conforms=y0e,ye.constant=lP,ye.countBy=Qhe,ye.create=pge,ye.curry=AB,ye.curryRight=DB,ye.debounce=_B,ye.defaults=fge,ye.defaultsDeep=hge,ye.defer=Sme,ye.delay=Ome,ye.difference=H6,ye.differenceBy=Sx,ye.differenceWith=Ox,ye.drop=G6,ye.dropRight=Y6,ye.dropRightWhile=U6,ye.dropWhile=bO,ye.fill=X6,ye.filter=tme,ye.flatMap=ome,ye.flatMapDeep=ime,ye.flatMapDepth=ame,ye.flatten=vv,ye.flattenDeep=q6,ye.flattenDepth=Z6,ye.flip=Tme,ye.flow=x0e,ye.flowRight=w0e,ye.fromPairs=J6,ye.functions=wge,ye.functionsIn=Cge,ye.groupBy=sme,ye.initial=K6,ye.intersection=Q6,ye.intersectionBy=eP,ye.intersectionWith=T,ye.invert=Oge,ye.invertBy=Tge,ye.invokeMap=cme,ye.iteratee=cP,ye.keyBy=ume,ye.keys=Ca,ye.keysIn=Xs,ye.map=kO,ye.mapKeys=Ege,ye.mapValues=Mge,ye.matches=C0e,ye.matchesProperty=S0e,ye.memoize=MO,ye.merge=Ige,ye.mergeWith=HB,ye.method=O0e,ye.methodOf=T0e,ye.mixin=uP,ye.negate=IO,ye.nthArg=E0e,ye.omit=Pge,ye.omitBy=Rge,ye.once=kme,ye.orderBy=dme,ye.over=M0e,ye.overArgs=Eme,ye.overEvery=I0e,ye.overSome=P0e,ye.partial=nP,ye.partialRight=jB,ye.partition=pme,ye.pick=Age,ye.pickBy=GB,ye.property=KB,ye.propertyOf=R0e,ye.pull=Oe,ye.pullAll=je,ye.pullAllBy=Ve,ye.pullAllWith=tt,ye.pullAt=Ct,ye.range=A0e,ye.rangeRight=D0e,ye.rearg=Mme,ye.reject=mme,ye.remove=bt,ye.rest=Ime,ye.reverse=Pt,ye.sampleSize=vme,ye.set=_ge,ye.setWith=jge,ye.shuffle=yme,ye.slice=rn,ye.sortBy=wme,ye.sortedUniq=Xn,ye.sortedUniqBy=Dn,ye.split=o0e,ye.spread=Pme,ye.tail=Rr,ye.take=hn,ye.takeRight=Mn,ye.takeRightWhile=ji,ye.takeWhile=ui,ye.tap=Cv,ye.throttle=Rme,ye.thru=TO,ye.toArray=VB,ye.toPairs=YB,ye.toPairsIn=UB,ye.toPath=L0e,ye.toPlainObject=zB,ye.transform=Nge,ye.unary=Ame,ye.union=za,ye.unionBy=jo,ye.unionWith=wa,ye.uniq=Tc,ye.uniqBy=yd,ye.uniqWith=yv,ye.unset=Fge,ye.unzip=Nm,ye.unzipWith=Fm,ye.update=Lge,ye.updateWith=Bge,ye.values=Ov,ye.valuesIn=Vge,ye.without=yp,ye.words=ZB,ye.wrap=Dme,ye.xor=CO,ye.xorBy=SO,ye.xorWith=bv,ye.zip=kx,ye.zipObject=xv,ye.zipObjectDeep=wv,ye.zipWith=OO,ye.entries=YB,ye.entriesIn=UB,ye.extend=WB,ye.extendWith=AO,uP(ye,ye),ye.add=V0e,ye.attempt=JB,ye.camelCase=Hge,ye.capitalize=XB,ye.ceil=$0e,ye.clamp=$ge,ye.clone=jme,ye.cloneDeep=Fme,ye.cloneDeepWith=Lme,ye.cloneWith=Nme,ye.conformsTo=Bme,ye.deburr=qB,ye.defaultTo=b0e,ye.divide=z0e,ye.endsWith=Gge,ye.eq=Ou,ye.escape=Yge,ye.escapeRegExp=Uge,ye.every=eme,ye.find=nme,ye.findIndex=xO,ye.findKey=mge,ye.findLast=rme,ye.findLastIndex=gv,ye.findLastKey=gge,ye.floor=W0e,ye.forEach=EB,ye.forEachRight=MB,ye.forIn=vge,ye.forInRight=yge,ye.forOwn=bge,ye.forOwnRight=xge,ye.get=iP,ye.gt=Vme,ye.gte=$me,ye.has=Sge,ye.hasIn=aP,ye.head=wO,ye.identity=qs,ye.includes=lme,ye.indexOf=Tx,ye.inRange=zge,ye.invoke=kge,ye.isArguments=Bm,ye.isArray=Jn,ye.isArrayBuffer=zme,ye.isArrayLike=Us,ye.isArrayLikeObject=Ni,ye.isBoolean=Wme,ye.isBuffer=Lf,ye.isDate=Hme,ye.isElement=Gme,ye.isEmpty=Yme,ye.isEqual=Ume,ye.isEqualWith=Xme,ye.isError=rP,ye.isFinite=qme,ye.isFunction=bp,ye.isInteger=NB,ye.isLength=PO,ye.isMap=FB,ye.isMatch=Zme,ye.isMatchWith=Jme,ye.isNaN=Kme,ye.isNative=Qme,ye.isNil=tge,ye.isNull=ege,ye.isNumber=LB,ye.isObject=di,ye.isObjectLike=bi,ye.isPlainObject=Ex,ye.isRegExp=oP,ye.isSafeInteger=nge,ye.isSet=BB,ye.isString=RO,ye.isSymbol=Hl,ye.isTypedArray=Sv,ye.isUndefined=rge,ye.isWeakMap=oge,ye.isWeakSet=ige,ye.join=P,ye.kebabCase=Xge,ye.last=W,ye.lastIndexOf=ee,ye.lowerCase=qge,ye.lowerFirst=Zge,ye.lt=age,ye.lte=sge,ye.max=H0e,ye.maxBy=G0e,ye.mean=Y0e,ye.meanBy=U0e,ye.min=X0e,ye.minBy=q0e,ye.stubArray=pP,ye.stubFalse=fP,ye.stubObject=_0e,ye.stubString=j0e,ye.stubTrue=N0e,ye.multiply=Z0e,ye.nth=ue,ye.noConflict=k0e,ye.noop=dP,ye.now=EO,ye.pad=Jge,ye.padEnd=Kge,ye.padStart=Qge,ye.parseInt=e0e,ye.random=Wge,ye.reduce=fme,ye.reduceRight=hme,ye.repeat=t0e,ye.replace=n0e,ye.result=Dge,ye.round=J0e,ye.runInContext=Ye,ye.sample=gme,ye.size=bme,ye.snakeCase=r0e,ye.some=xme,ye.sortedIndex=cn,ye.sortedIndexBy=Sn,ye.sortedIndexOf=St,ye.sortedLastIndex=Lt,ye.sortedLastIndexBy=En,ye.sortedLastIndexOf=Gt,ye.startCase=i0e,ye.startsWith=a0e,ye.subtract=K0e,ye.sum=Q0e,ye.sumBy=eve,ye.template=s0e,ye.times=F0e,ye.toFinite=xp,ye.toInteger=ar,ye.toLength=$B,ye.toLower=l0e,ye.toNumber=kc,ye.toSafeInteger=lge,ye.toString=io,ye.toUpper=c0e,ye.trim=u0e,ye.trimEnd=d0e,ye.trimStart=p0e,ye.truncate=f0e,ye.unescape=h0e,ye.uniqueId=B0e,ye.upperCase=m0e,ye.upperFirst=sP,ye.each=EB,ye.eachRight=MB,ye.first=wO,uP(ye,function(){var S={};return Bl(ye,function(I,$){wr.call(ye.prototype,$)||(S[$]=I)}),S}(),{chain:!1}),ye.VERSION=r,st(["bind","bindKey","curry","curryRight","partial","partialRight"],function(S){ye[S].placeholder=ye}),st(["drop","take"],function(S,I){pr.prototype[S]=function($){$=$===t?1:_o(ar($),0);var J=this.__filtered__&&!I?new pr(this):this.clone();return J.__filtered__?J.__takeCount__=aa($,J.__takeCount__):J.__views__.push({size:aa($,Z),type:S+(J.__dir__<0?"Right":"")}),J},pr.prototype[S+"Right"]=function($){return this.reverse()[S]($).reverse()}}),st(["filter","map","takeWhile"],function(S,I){var $=I+1,J=$==L||$==V;pr.prototype[S]=function(ce){var Ce=this.clone();return Ce.__iteratees__.push({iteratee:Cn(ce,3),type:$}),Ce.__filtered__=Ce.__filtered__||J,Ce}}),st(["head","last"],function(S,I){var $="take"+(I?"Right":"");pr.prototype[S]=function(){return this[$](1).value()[0]}}),st(["initial","tail"],function(S,I){var $="drop"+(I?"":"Right");pr.prototype[S]=function(){return this.__filtered__?new pr(this):this[$](1)}}),pr.prototype.compact=function(){return this.filter(qs)},pr.prototype.find=function(S){return this.filter(S).head()},pr.prototype.findLast=function(S){return this.reverse().find(S)},pr.prototype.invokeMap=nr(function(S,I){return typeof S=="function"?new pr(this):this.map(function($){return Vl($,S,I)})}),pr.prototype.reject=function(S){return this.filter(IO(Cn(S)))},pr.prototype.slice=function(S,I){S=ar(S);var $=this;return $.__filtered__&&(S>0||I<0)?new pr($):(S<0?$=$.takeRight(-S):S&&($=$.drop(S)),I!==t&&(I=ar(I),$=I<0?$.dropRight(-I):$.take(I-S)),$)},pr.prototype.takeRightWhile=function(S){return this.reverse().takeWhile(S).reverse()},pr.prototype.toArray=function(){return this.take(Z)},Bl(pr.prototype,function(S,I){var $=/^(?:filter|find|map|reject)|While$/.test(I),J=/^(?:head|last)$/.test(I),ce=ye[J?"take"+(I=="last"?"Right":""):I],Ce=J||/^find/.test(I);ce&&(ye.prototype[I]=function(){var Ae=this.__wrapped__,Le=J?[1]:arguments,qe=Ae instanceof pr,wt=Le[0],Ot=qe||Jn(Ae),Mt=function(Cr){var Mr=ce.apply(ye,td([Cr],Le));return J&&qt?Mr[0]:Mr};Ot&&$&&typeof wt=="function"&&wt.length!=1&&(qe=Ot=!1);var qt=this.__chain__,mn=!!this.__actions__.length,Rn=Ce&&!qt,fr=qe&&!mn;if(!Ce&&Ot){Ae=fr?Ae:new pr(this);var An=S.apply(Ae,Le);return An.__actions__.push({func:TO,args:[Mt],thisArg:t}),new Qa(An,qt)}return Rn&&fr?S.apply(this,Le):(An=this.thru(Mt),Rn?J?An.value()[0]:An.value():An)})}),st(["pop","push","shift","sort","splice","unshift"],function(S){var I=Na[S],$=/^(?:push|sort|unshift)$/.test(S)?"tap":"thru",J=/^(?:pop|shift)$/.test(S);ye.prototype[S]=function(){var ce=arguments;if(J&&!this.__chain__){var Ce=this.value();return I.apply(Jn(Ce)?Ce:[],ce)}return this[$](function(Ae){return I.apply(Jn(Ae)?Ae:[],ce)})}}),Bl(pr.prototype,function(S,I){var $=ye[I];if($){var J=$.name+"";wr.call(ad,J)||(ad[J]=[]),ad[J].push({name:I,func:$})}}),ad[uv(t,b).name]=[{name:"wrapper",func:t}],pr.prototype.clone=ir,pr.prototype.reverse=T6,pr.prototype.value=k6,ye.prototype.at=Ghe,ye.prototype.chain=Yhe,ye.prototype.commit=Uhe,ye.prototype.next=Xhe,ye.prototype.plant=Zhe,ye.prototype.reverse=Jhe,ye.prototype.toJSON=ye.prototype.valueOf=ye.prototype.value=Khe,ye.prototype.first=ye.prototype.head,kf&&(ye.prototype[kf]=qhe),ye},Ml=W0();fu?((fu.exports=Ml)._=Ml,ed._=Ml):ia._=Ml}).call(ju)})(kE,kE.exports);var upt=kE.exports;const dpt=()=>{const{pushAlert:e}=NE();return t=>{e({type:uQ.SUCCESS,message:t!=null?t:"Success"})}},ppt=e=>{var n,t;return(t=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:t.message},fpt=e=>{var n;return((n=e==null?void 0:e.data)==null?void 0:n.message)||(e==null?void 0:e.message)},d0=({url:e,token:n,method:t="post",baseURL:r,successCallback:o=()=>{},errorCallback:i=()=>{},onSettledCallback:a=()=>{},debounceTime:s=500,errorMessageFormatter:l=ppt,successMessageFormatter:c=fpt})=>{const[d,p]=U.useState(!1),f=new AbortController,g=Rb(),h=dpt(),{session:{token:m,API_BASE_URL:v}}=Wh();n=n!=null?n:m,r=r!=null?r:v;const{mutate:b,isLoading:w}=Eve(E=>Ec(exports,null,function*(){return(yield mi({headers:{token:n||localStorage.getItem("token")},url:e,baseURL:r,method:t,data:E,signal:f.signal})).data}),{onSuccess:E=>{E.error?g(c(E)):(o&&o(E),h(c(E)))},onError:E=>{var M;g((M=l(E))!=null?M:"Error occurred while processing the request"),i&&i(E)},onSettled:()=>{p(!1),a()}}),C=upt.debounce((E,M,R,_)=>{b(E,{onError:M,onSuccess:R,onSettled:_})},s);return{handleSubmit:(E,M,R,_)=>{d||(f.abort(),p(!0),C(E,M,R,_))},isDisabled:w||d,isLoading:w}};var YL={},hpt=$r;Object.defineProperty(YL,"__esModule",{value:!0});var EE=YL.default=void 0,mpt=hpt(Qr()),gpt=k;EE=YL.default=(0,mpt.default)((0,gpt.jsx)("path",{d:"M5 20h14v-2H5zM19 9h-4V3H9v6H5l7 7z"}),"Download");var UL={},vpt=$r;Object.defineProperty(UL,"__esModule",{value:!0});var ME=UL.default=void 0,ypt=vpt(Qr()),bpt=k;ME=UL.default=(0,ypt.default)((0,bpt.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility");const T2={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},xpt={invoice:"Tax Invoice",recurring_pi:"Proforma Invoice"},wpt=()=>{const[e,n]=U.useState(T2.LIST_VIEW),[t,r]=U.useState(""),[o,i]=U.useState({page:0,perPage:20}),{data:a,isFetching:s}=Gu(zh,{url:Obe,params:{page:o.page,limit:o.perPage}},"customer-subsription"),{handleSubmit:l,isDisabled:c,isLoading:d}=d0({url:fQ}),p=(h,m=!1)=>{const v={customer_id:h==null?void 0:h.customer_id,invoice_id:h==null?void 0:h.id,isDownload:1};c||l(v,null,b=>{m?(r(`data:application/pdf;base64,${b==null?void 0:b.data.buffer64}`),n(T2.INVOICE_VIEW)):Ur.downloadFileFromBuffer(b==null?void 0:b.data)},null)},f=(h,m)=>{i(v=>un(pt({},v),{[h]:m}))},g=U.useMemo(()=>[{header:"Invoice Type",accessorKey:"invoice_type",id:"invoice_type",cell:h=>{var m;return k.jsx("span",{className:"font-bold",children:(m=xpt[h])!=null?m:h})}},{header:"Invoice Number",accessorKey:"invoice_number",id:"invoice_number"},{header:"Invoice Date",accessorKey:"invoice_date",id:"invoice_date"},{header:"Due Date",accessorKey:"invoice_due_date",id:"invoice_due_date"},{header:"Amount",accessorKey:"grand_total_amount",id:"grand_total_amount"},{header:"Status",accessorKey:"payment_status",id:"payment_status",cell:(h,m)=>{var v;return k.jsx(oM,{variant:"outlined",color:(v=yD==null?void 0:yD[m==null?void 0:m.invoice_status])!=null?v:"primary",label:h})}},{header:"Action",accessorKey:"id",id:"id",cell:(h,m)=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(Zg,{title:"View Invoice",children:k.jsx(ME,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m,!0)}})}),k.jsx(Zg,{title:"Download Invoice",children:k.jsx(EE,{color:"primary",className:"cursor-pointer",onClick:()=>{p(m)}})})]})}],[a]);return console.log({customerInvoices:a}),k.jsxs("div",{children:[k.jsx(mf,{visible:d}),e===T2.LIST_VIEW?k.jsx("div",{style:{height:"70vh",overflow:"scroll"},children:k.jsx(ML,{loading:s,data:Ur.validateDataType(a==null?void 0:a.data,Mi.ARRAY)?a.data:[],columns:g,wrapByTooltipDefault:!0,pagination:un(pt({show:!0,showFirstButton:!0,showLastButton:!0,perPageOptions:[20,30,50,100],totalDataCount:(a==null?void 0:a.totalCounts)||0},o),{handlePageChange:h=>f("page",h),handlePerPageChange:h=>f("perPage",h)})})}):k.jsx(k.Fragment,{}),e===T2.INVOICE_VIEW?k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:t,type:"application/pdf",children:" "})}),k.jsx(nc,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(ob,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(ea,{label:" Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>n(T2.LIST_VIEW)})})})]}):k.jsx(k.Fragment,{})]})},Cpt="_card_container_dxhto_1",Spt="_card_count_dxhto_14",TK={card_container:Cpt,card_count:Spt},Opt=({data:e})=>{var n,t,r;return k.jsx("div",{className:`${TK.card_container}`,style:{height:"100%"},children:k.jsxs("div",{className:"flex-between-center g-10",children:[(n=e==null?void 0:e.icon)!=null?n:k.jsx(k.Fragment,{}),k.jsxs("div",{className:"flex-start-column mr-10 g-10",children:[k.jsx("div",{children:k.jsx("span",{children:(t=e==null?void 0:e.label)!=null?t:"-"})}),k.jsx("div",{children:k.jsx("span",{className:`${TK.card_count}`,children:(r=e==null?void 0:e.count)!=null?r:"-"})})]})]})})};var XL={},Tpt=$r;Object.defineProperty(XL,"__esModule",{value:!0});var Rhe=XL.default=void 0,kpt=Tpt(Qr()),Ept=k;Rhe=XL.default=(0,kpt.default)((0,Ept.jsx)("path",{d:"M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"}),"AccountBalanceWallet");function kK({data:e="",limit:n=17,doNotShowTooltip:t=!1,arrow:r=!0,endAdornment:o="",startAdornment:i="",styleOverrides:a={}}){return k.jsx(k.Fragment,{children:e&&typeof e=="string"&&e.length>n&&!t?k.jsx(Zg,{title:e!=null?e:"",arrow:r,children:k.jsx("span",{style:a,children:i+e.substring(0,n)+".."+o})}):i+e+o})}const Mpt="_card_container_95l02_1",Ipt="_card_subtitles_95l02_18",DT={card_container:Mpt,card_subtitles:Ipt};var qL={},Ppt=$r;Object.defineProperty(qL,"__esModule",{value:!0});var Ahe=qL.default=void 0,Rpt=Ppt(Qr()),Apt=k;Ahe=qL.default=(0,Rpt.default)((0,Apt.jsx)("path",{d:"M12 7V3H2v18h20V7zm-2 12H4v-2h6zm0-4H4v-2h6zm0-4H4V9h6zm0-4H4V5h6zm10 12h-8V9h8zm-2-8h-4v2h4zm0 4h-4v2h4z"}),"CorporateFare");var ZL={},Dpt=$r;Object.defineProperty(ZL,"__esModule",{value:!0});var Dhe=ZL.default=void 0,_pt=Dpt(Qr()),jpt=k;Dhe=ZL.default=(0,_pt.default)((0,jpt.jsx)("path",{d:"M3 10h11v2H3zm0-2h11V6H3zm0 8h7v-2H3zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71zm-.71.71-5.3 5.3V21h2.12l5.3-5.3z"}),"EditNote");var JL={},Npt=$r;Object.defineProperty(JL,"__esModule",{value:!0});var l6=JL.default=void 0,Fpt=Npt(Qr()),Lpt=k;l6=JL.default=(0,Fpt.default)((0,Lpt.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");const Bpt=({orgDetails:e})=>{var Z,oe,re,K,Q,pe,fe,ae;const n=UC(),[t,r]=U.useState(!1),[o,i]=U.useState({org_name:"",mobile_number:"",gstin:""}),[a,s]=U.useState({email_id:!1,mobile_number:!1}),[l,c]=U.useState([]),[d,p]=U.useState(""),[f,g]=U.useState(null),[h,m]=U.useState([]),[v,b]=U.useState([]),[w,C]=U.useState({}),{handleSubmit:O,isDisabled:x,isLoading:E}=d0({url:Mbe}),{data:M,isFetching:R}=Gu(zh,{url:bbe,params:{}},"country-list",{enabled:t}),{data:_,isFetching:j}=Gu(o7,{url:xbe,data:{country_id:w==null?void 0:w.country}},"state-list",{enabled:!!(w!=null&&w.country)});U.useEffect(()=>{if(Ur.validateDataType(e,Mi.OBJECT)){const{org_name:ie,email_id:se,mobile_number:le,gstin:te,country:de,state:ge,city:be,address_1:ke,address_2:Se,zip_code:Re}=pt({org_name:"",gstin:"",mobile_number:"",email_id:[],country:"",state:"",city:"",address_1:"",address_2:"",zip_code:""},e);i(xe=>un(pt({},xe),{org_name:ie,mobile_number:le,gstin:te})),Ur.validateDataType(se,Mi.ARRAY)&&c(se),C(xe=>un(pt({},xe),{city:be,state:ge,country:de,address_1:ke,address_2:Se,zip_code:Re}))}},[e]),U.useEffect(()=>{if(Ur.validateDataType(M,Mi.ARRAY)){const ie=M.map(se=>({value:se==null?void 0:se.country_id,label:se==null?void 0:se.country_name}));m([...ie])}},[M]),U.useEffect(()=>{if(Ur.validateDataType(_,Mi.ARRAY)){const ie=_.map(se=>({value:se==null?void 0:se.STATE_ID,label:se==null?void 0:se.STATE_NAME}));b([...ie])}},[_]);const A=ie=>{if(ie.key==="Enter"&&d.trim()!==""){const se=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;ie.preventDefault(),se.test(d)?(c([...l,d.trim()]),p("")):s(le=>un(pt({},le),{email_id:!0}))}},D=ie=>()=>{c(se=>se.filter(le=>le!==ie))},N=()=>{r(!0)},L=()=>{r(!1)},B=(ie,se)=>{ie==="email_id"&&p(se),s(le=>un(pt({},le),{[ie]:!1})),i(le=>un(pt({},le),{[ie]:se}))},V=(ie,se)=>{C(ie==="country"?le=>un(pt({},le),{state:"",[ie]:se}):le=>un(pt({},le),{[ie]:se})),s(le=>un(pt({},le),{[ie]:!1}))},H=()=>{const ie=/^\+?(\d[\d-.()\s]+)?\d$/,se=/^\d{6}$/;let le=!0;for(const[te,de]of Object.entries(o))te==="mobile_number"&&(ie.test(de)||(s(ge=>un(pt({},ge),{[te]:!0})),le=!1)),de.length||(s(ge=>un(pt({},ge),{[te]:!0})),le=!1);for(const[te,de]of Object.entries(w)){let ge=!1;(te=="zip_code"&&!se.test(de)||(te==="country"||te==="state")&&!de||(te=="city"||te==="address_1")&&!(de!=null&&de.length))&&(ge=!0),ge&&(s(be=>un(pt({},be),{[te]:!0})),le=!1)}l.length||(s(te=>un(pt({},te),{email_id:!0})),le=!1),le&&O(un(pt(pt({},o),w),{email:l,client_id:e==null?void 0:e.client_id,phone_no:o==null?void 0:o.mobile_number,country:w==null?void 0:w.country,state:w==null?void 0:w.state}),null,()=>{n.invalidateQueries("subsription-overview"),L()},null)},G=(ie,se,le)=>{var de;return le!=null&&le.length&&(w!=null&&w[ie])?(de=le.filter(ge=>(ge==null?void 0:ge.value)===se))==null?void 0:de[0]:null},Y=ie=>{g(ie.currentTarget)},X=()=>{g(null)};return k.jsxs(k.Fragment,{children:[k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsxs("div",{className:`${DT.card_container}`,children:[k.jsx(mf,{visible:E||R||j}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{className:`${DT.card_subtitles}`,children:"Company Information"}),k.jsx("div",{className:"flex-end-center g-10",children:k.jsx("span",{children:k.jsx(Ahe,{sx:{color:"#009017",cursor:"pointer"}})})})]}),k.jsx(wn,{container:!0,spacing:2,children:k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Name :"})}),k.jsx("span",{children:(Z=e==null?void 0:e.org_name)!=null?Z:"-"})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Email :"})}),k.jsxs("div",{className:"flex-end-center",style:{gap:"4px"},children:[k.jsx(kK,{data:`${(re=(oe=e==null?void 0:e.email_id)==null?void 0:oe[0])!=null?re:"-"}`,limit:34}),((K=e==null?void 0:e.email_id)==null?void 0:K.length)>1?k.jsxs("span",{style:{backgroundColor:"#2B46F21A",color:"#2B46F2",padding:"4px",borderRadius:"50%",fontSize:"8px"},className:"flex-between-center",children:[k.jsx("span",{children:(Q=e==null?void 0:e.email_id)==null?void 0:Q.length}),k.jsx(l6,{className:"cursor-pointer",onClick:Y,sx:{fontSize:"8px"}})]}):k.jsx(k.Fragment,{})]})]}),k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"Phone No :"})}),k.jsx("div",{children:k.jsx(kK,{data:(pe=e==null?void 0:e.mobile_number)!=null?pe:"-",limit:34})})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("div",{className:"mr-10",children:k.jsx("span",{children:"GSTIN NO. :"})}),k.jsx("span",{children:(fe=e==null?void 0:e.gstin)!=null?fe:"-"})]})]})})]})}),k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx("div",{className:`${DT.card_container}`,children:k.jsxs("div",{className:"flex-between-columns",children:[k.jsxs("div",{className:"flex-between-center mb-10",children:[k.jsx("span",{className:`${DT.card_subtitles}`,children:"Billing Address"}),k.jsx(Dhe,{sx:{color:"blue",cursor:"pointer"},onClick:N})]}),k.jsx("div",{children:k.jsx("span",{children:e==null?void 0:e.org_address})})]})})}),t&&k.jsx(EL,{size:"md",title:"Edit Org Details",open:t,onModalclose:L,children:k.jsxs(wn,{container:!0,spacing:2,children:[k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Basic Details"})}),k.jsx(Ya,{})]}),[{name:"org_name",label:"Name"},{name:"mobile_number",label:"Phone No"},{name:"gstin",label:"GST No"},{name:"email_id",label:"Email"}].map(ie=>k.jsxs(wn,{item:!0,xs:6,children:[ie.name==="email_id"?k.jsxs(fo,{component:"div",sx:{display:"flex",flexWrap:"wrap",border:"1px solid #ccc",borderRadius:"4px",padding:"8px",height:"38px",overflow:"scroll"},children:[l.map((se,le)=>k.jsx(oM,{label:se,onDelete:D(se),sx:{margin:"4px"}},le)),k.jsx(X7,{required:!0,variant:"standard",name:ie.name,placeholder:`Enter ${ie.label}`,value:d,onChange:se=>{const{name:le,value:te}=se.target;B(le,te)},onKeyPress:A,InputProps:{disableUnderline:!0},sx:{flexGrow:1,minWidth:"100px"}})]}):k.jsx(Vp,{required:!0,className:"w-100",name:ie.name,label:ie.label,value:o==null?void 0:o[ie.name],onChange:se=>{const{value:le,name:te}=se.target;B(te,le)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]},ie.name)),k.jsxs(wn,{item:!0,xs:12,children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{children:"Billing Adreess"})}),k.jsx(Ya,{})]}),[{name:"country",label:"Country",type:"select",required:!0,options:h},{name:"state",label:"State",type:"select",required:!0,options:v},{name:"city",label:"City",type:"input",required:!0},{name:"address_1",label:"Address 1",type:"input",multiline:!0,required:!0},{name:"address_2",label:"Address 2",type:"input",multiline:!0,required:!1},{name:"zip_code",label:"Zip Code",type:"input",required:!0}].map(ie=>{var se;return k.jsxs(wn,{item:!0,xs:6,children:[ie.type=="select"?k.jsx(Pfe,{options:ie.options,label:ie.label,name:ie.name,required:ie.required,value:G(ie.name,w==null?void 0:w[ie.name],ie.options),isSearchable:!0,onChange:le=>{V(ie.name,le==null?void 0:le.value)},error:a==null?void 0:a[ie.name]}):k.jsx(Vp,{className:"w-100",required:ie.required,multiline:ie==null?void 0:ie.multiline,value:(se=w==null?void 0:w[ie.name])!=null?se:"",label:ie.label,name:ie.name,onChange:le=>{const{name:te,value:de}=le.target;V(te,de)},error:a==null?void 0:a[ie.name]}),a!=null&&a[ie.name]?k.jsx("span",{style:{color:"red",fontSize:"12px"},children:"Error In This Field"}):k.jsx(k.Fragment,{})]})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Cancel",variant:"outlined",onClick:L}),k.jsx(ea,{label:"Submit",disabled:x,onClick:H})]})})]})}),Ur.validateDataType(e==null?void 0:e.email_id,Mi.ARRAY)&&k.jsx(z7,{open:!!f,anchorEl:f,onClose:X,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:k.jsx("div",{style:{padding:"10px"},children:(ae=e.email_id)==null?void 0:ae.map(ie=>k.jsx("div",{className:"mb-10",children:ie}))})})]})},Vpt="_card_container_c1yb9_1",$pt="_card_count_c1yb9_13",zpt="_card_subtitles_c1yb9_18",Wpt="_icons_background_c1yb9_23",Hpt="_sub_icons_background_c1yb9_32",Cs={card_container:Vpt,card_count:$pt,card_subtitles:zpt,icons_background:Wpt,sub_icons_background:Hpt};function Gpt(e){return GL({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z"},child:[]}]})(e)}var KL={},Ypt=$r;Object.defineProperty(KL,"__esModule",{value:!0});var _he=KL.default=void 0,Upt=Ypt(Qr()),Xpt=k;_he=KL.default=(0,Upt.default)((0,Xpt.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");var QL={},qpt=$r;Object.defineProperty(QL,"__esModule",{value:!0});var q_=QL.default=void 0,Zpt=qpt(Qr()),Jpt=k;q_=QL.default=(0,Zpt.default)((0,Jpt.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send");var eB={},Kpt=$r;Object.defineProperty(eB,"__esModule",{value:!0});var tB=eB.default=void 0,Qpt=Kpt(Qr()),eft=k;tB=eB.default=(0,Qpt.default)((0,eft.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-5h2zm4 0h-2v-3h2zm0-5h-2v-2h2zm4 5h-2V7h2z"}),"Analytics");var nB={},tft=$r;Object.defineProperty(nB,"__esModule",{value:!0});var rB=nB.default=void 0,nft=tft(Qr()),rft=k;rB=nB.default=(0,nft.default)((0,rft.jsx)("path",{d:"m18.85 10.39 1.06-1.06c.78-.78.78-2.05 0-2.83L18.5 5.09c-.78-.78-2.05-.78-2.83 0l-1.06 1.06zm-5.66-2.83L4 16.76V21h4.24l9.19-9.19zM19 17.5c0 2.19-2.54 3.5-5 3.5-.55 0-1-.45-1-1s.45-1 1-1c1.54 0 3-.73 3-1.5 0-.47-.48-.87-1.23-1.2l1.48-1.48c1.07.63 1.75 1.47 1.75 2.68M4.58 13.35C3.61 12.79 3 12.06 3 11c0-1.8 1.89-2.63 3.56-3.36C7.59 7.18 9 6.56 9 6c0-.41-.78-1-2-1-1.26 0-1.8.61-1.83.64-.35.41-.98.46-1.4.12-.41-.34-.49-.95-.15-1.38C3.73 4.24 4.76 3 7 3s4 1.32 4 3c0 1.87-1.93 2.72-3.64 3.47C6.42 9.88 5 10.5 5 11c0 .31.43.6 1.07.86z"}),"Draw");var oB={},oft=$r;Object.defineProperty(oB,"__esModule",{value:!0});var iB=oB.default=void 0,ift=oft(Qr()),aft=k;iB=oB.default=(0,ift.default)((0,aft.jsx)("path",{d:"M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3 1 9l11 6 9-4.91V17h2V9z"}),"School");var aB={},sft=$r;Object.defineProperty(aB,"__esModule",{value:!0});var sB=aB.default=void 0,lft=sft(Qr()),cft=k;sB=aB.default=(0,lft.default)((0,cft.jsx)("path",{d:"M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2m-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m13-6v11c0 1.1-.9 2-2 2H4v-2h17V7z"}),"Payments");var lB={},uft=$r;Object.defineProperty(lB,"__esModule",{value:!0});var cB=lB.default=void 0,dft=uft(Qr()),pft=k;cB=lB.default=(0,dft.default)((0,pft.jsx)("path",{d:"M12 4H5C3.34 4 2 5.34 2 7v8c0 1.66 1.34 3 3 3l-1 1v1h1l2-2.03L9 18v-5H4V5.98L13 6v2h2V7c0-1.66-1.34-3-3-3M5 14c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m15.57-4.34c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66L10 13.77l.01 5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V18h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14zm-8.16.34h7.19l1.03 3h-9.25zM12 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"}),"Commute");var uB={},fft=$r;Object.defineProperty(uB,"__esModule",{value:!0});var dB=uB.default=void 0,hft=fft(Qr()),EK=k;dB=uB.default=(0,hft.default)([(0,EK.jsx)("path",{d:"M19 6h-1V1H6v5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2M8 3h8v3H8zm4 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"0"),(0,EK.jsx)("path",{d:"M12.5 11.5h-1v2.71l1.64 1.64.71-.71-1.35-1.35z"},"1")],"PunchClock");var pB={},mft=$r;Object.defineProperty(pB,"__esModule",{value:!0});var fB=pB.default=void 0,gft=mft(Qr()),vft=k;fB=pB.default=(0,gft.default)((0,vft.jsx)("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"}),"GroupAdd");var hB={},yft=$r;Object.defineProperty(hB,"__esModule",{value:!0});var mB=hB.default=void 0,bft=yft(Qr()),xft=k;mB=hB.default=(0,bft.default)((0,xft.jsx)("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome");const _T={LIST_VIEW:"LIST_VIEW",INVOICE_VIEW:"INVOICE_VIEW"},wft={1:"Paid",2:"Unpaid",3:"Decline",0:" "},Cft={Analytics:k.jsx(tB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),"Digital Signature":k.jsx(rB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Learn:k.jsx(iB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Payout:k.jsx(sB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Trip:k.jsx(cB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Timesheet:k.jsx(dB,{sx:{color:"#335AFF",fontSize:"1.5rem"}}),Recruit:k.jsx(fB,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},Sft=e=>{var E,M,R,_,j,A,D,N,L,B,V,H,G;const{onTabChange:n}=e,[t,r]=U.useState(_T.LIST_VIEW),o=[{id:1,name:"Monthly"},{id:2,name:"Quarterly"},{id:3,name:"Half Yearly"},{id:4,name:"Yearly"},{id:5,name:"2 Years"},{id:6,name:"3 Years"}],i=Y=>{const X=o.find(Z=>Z.id===Y);return X?X.name:" "},[a,s]=U.useState(""),{session:{API_BASE_URL:l,mode:c}}=Wh(),d=Rb(),{data:p,isFetching:f}=Gu(zh,{url:dQ,params:{}},"subsription-overview"),{handleSubmit:g,isDisabled:h,isLoading:m}=d0({url:pQ}),{handleSubmit:v,isDisabled:b,isLoading:w}=d0({url:fQ}),C=(Y=!1)=>{if(!(p!=null&&p.openInvoice))return;const X={customer_id:p.openInvoice.customer_id,invoice_id:p.openInvoice.id,isDownload:1};b||v(X,null,Z=>{Y?(s(`data:application/pdf;base64,${Z==null?void 0:Z.data.buffer64}`),r(_T.INVOICE_VIEW)):Ur.downloadFileFromBuffer(Z==null?void 0:Z.data)},null)},O=()=>{var X;const Y={plan_id:p==null?void 0:p.plan_id,add_on_id:p==null?void 0:p.add_on_id,invoice_id:(X=p==null?void 0:p.openInvoice)==null?void 0:X.id};g(Y,null,Z=>{var oe;Ur.cashfreePayment((oe=Z==null?void 0:Z.data)==null?void 0:oe.payment_session_id,l,()=>{},d,c)},null)},x=U.useMemo(()=>{var X,Z;const{wallet:Y={}}=p!=null?p:{wallet:{}};return[{label:"Wallet Balance",count:`Rs ${(X=Y==null?void 0:Y.balance)!=null?X:"-"}`,description:k.jsxs(k.Fragment,{children:[k.jsxs("span",{style:{color:"#009017"},children:["+ Rs ",(Z=Y==null?void 0:Y.openingBalance)!=null?Z:"- "]})," ","last gained"]}),icon:k.jsx("span",{style:{background:"#FAC8001A",margin:"inherit"},className:Cs.icons_background,children:k.jsx(Rhe,{sx:{color:"#FAC800",fontSize:"2rem"}})}),progress:(Y==null?void 0:Y.percentage)*100}]},[p]);return k.jsxs("div",{className:"w-100",children:[k.jsx(mf,{visible:f||m||w}),t===_T.LIST_VIEW?k.jsxs(wn,{container:!0,spacing:2,children:[x.map(Y=>k.jsx(wn,{item:!0,xs:12,sm:6,lg:4,children:k.jsx(Opt,{data:Y})})),k.jsx(Bpt,{orgDetails:p==null?void 0:p.orgInfo}),k.jsxs(wn,{item:!0,xs:12,sm:6,lg:8,children:[k.jsxs("div",{className:`${Cs.card_container}`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsxs("span",{className:`${Cs.card_count}`,children:["Last ",wft[(E=p==null?void 0:p.openInvoice)==null?void 0:E.payment_status]||""," Invoice"]})}),k.jsx(Ya,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Due By"}),k.jsx("span",{className:`${Cs.card_subtitles}`,children:(M=p==null?void 0:p.openInvoice)!=null&&M.invoice_due_date?new Date(p.openInvoice.invoice_due_date).toLocaleDateString("en-GB"):"-"})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Amount"}),k.jsxs("span",{className:`${Cs.card_subtitles}`,children:[((R=p==null?void 0:p.openInvoice)==null?void 0:R.currency_symbol)||"₹"," ",(j=(_=p==null?void 0:p.openInvoice)==null?void 0:_.grand_total_amount)!=null?j:"-"]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Invoice"}),k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{children:k.jsx(Gpt,{style:{fontSize:"24px",color:"red",cursor:"pointer"},onClick:()=>C(!0)})})})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{}),k.jsx("span",{children:((A=p==null?void 0:p.openInvoice)==null?void 0:A.payment_status)===2&&k.jsx(ea,{disabled:h,label:"Pay Here",style:{height:"36px"},onClick:O})})]})]})]}),k.jsxs("div",{className:`${Cs.card_container} g-10`,style:{marginBlockEnd:"1rem"},children:[k.jsx("div",{className:"flex-between-center",children:k.jsxs("span",{className:`${Cs.card_count}`,children:["Plan Details ",k.jsxs("span",{style:{fontSize:"18px",fontWeight:"800"},children:["(",(D=p==null?void 0:p.planDetails)==null?void 0:D.current_plan,")"]})]})}),k.jsx(Ya,{}),k.jsx("div",{className:"flex-between-center",children:[{label:"Billing Cycle",value:i((N=p==null?void 0:p.planDetails)==null?void 0:N.billing_cycle)||"-",icon:k.jsx(_he,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Plan Validity",value:`${(L=p==null?void 0:p.planDetails)!=null&&L.plan_expiring_date?new Date(p.planDetails.plan_expiring_date).toLocaleDateString("en-GB"):"-"}`,icon:k.jsx(q_,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Status",value:`${(V=(B=p==null?void 0:p.planDetails)==null?void 0:B.status)!=null?V:"-"}`,icon:k.jsx(q_,{sx:{color:"#335AFF",fontSize:"1.5rem"}})},{label:"Remaining Days ",value:(()=>{var Q;const Y=(Q=p==null?void 0:p.planDetails)==null?void 0:Q.plan_expiring_date;if(!Y)return"-";const X=new Date(Y),Z=new Date;X.setHours(0,0,0,0),Z.setHours(0,0,0,0);const oe=Math.ceil((X.getTime()-Z.getTime())/(1e3*60*60*24)),re=Math.abs(oe),K=re===1?"day":"days";return oe<0?`Overdue by ${re} ${K}`:`${re} ${K}`})(),icon:k.jsx(G3,{sx:{color:"#335AFF",fontSize:"1.5rem"}})}].map(Y=>k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx("span",{style:{background:"#335AFF1A"},className:`${Cs.sub_icons_background}`,children:Y.icon}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:Y.label}),k.jsx("span",{className:`${Cs.card_subtitles}`,children:Y.value})]})]}))})]}),k.jsxs("div",{className:`${Cs.card_container}`,children:[k.jsx("div",{className:"flex-between-center mb-10",children:k.jsx("span",{className:`${Cs.card_count}`,children:"Add Ons"})}),k.jsx(Ya,{className:"mb-10"}),k.jsx("div",{className:"flex-start-center g-20",style:{overflowX:"auto",overflowY:"hidden"},children:Ur.validateDataType(p==null?void 0:p.addOnProduct,Mi.ARRAY)?p.addOnProduct.map((Y,X)=>k.jsxs("div",{className:"flex-start-column g-10",style:{borderLeft:X!==0?"1px solid #ccc":"none",paddingLeft:X!==0?"16px":"0px"},children:[k.jsx("span",{style:{fontSize:"14px",display:"flex",alignItems:"center",justifyContent:"center"},children:Cft[Y.product_name]||k.jsx(mB,{sx:{color:"#335AFF",fontSize:"1.5rem"}})}),k.jsx("span",{className:`${Cs.card_subtitles}`,children:Y.product_name})]},X)):k.jsx(u0,{message:"No Add Ons Found"})})]})]}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${Cs.card_container} g-10`,style:{height:"100%"},children:Ur.validateDataType(p==null?void 0:p.usageCredit,Mi.ARRAY)?k.jsxs(k.Fragment,{children:[k.jsxs("span",{className:`${Cs.card_count}`,children:["User Counts"," ",k.jsx(Zg,{title:"Active Employees",children:k.jsxs("span",{children:["(",(G=(H=p==null?void 0:p.employee_details)==null?void 0:H.active_employee)!=null?G:"--",")"]})})]}),k.jsx(Pat,{type:Xdt.COLUMN,data:p.usageCredit,xField:"APP_MODULE",yField:"TOTAL_USER_COUNT",xAxisTitle:"",styles:{height:"310px",width:"100%"},defaultGroupBy:"",selectedGroupBy:""}),k.jsx(wn,{container:!0,spacing:1,children:p.usageCredit.map(Y=>{var X,Z;return k.jsx(wn,{item:!0,xs:6,children:k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsxs("span",{className:`${Cs.card_subtitles}`,children:[(X=Y==null?void 0:Y.APP_MODULE)!=null?X:"-"," :"]}),k.jsx("span",{children:(Z=Y==null?void 0:Y.TOTAL_USER_COUNT)!=null?Z:"-"})]})})})})]}):k.jsx(u0,{message:"No Records Found"})})})]}):k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{minHeight:"calc(95vh - 120px)",maxWidth:"100%",border:"1px solid lightGrey",borderRadius:"4px",display:"block"},children:k.jsx("object",{width:"100%",style:{height:"calc(95vh - 120px)"},data:a,type:"application/pdf",children:" "})}),k.jsx(nc,{sx:{position:"absolute",bottom:0,left:0,right:0,padding:"0.625rem",background:"white",zIndex:100},elevation:3,children:k.jsx(ob,{direction:"row",gap:2,justifyContent:"flex-end",children:k.jsx(ea,{label:"Go Back To List",size:"small",variant:"contained",color:"primary",onClick:()=>r(_T.LIST_VIEW)})})})]})]})},Oft="_card_container_1iza3_1",Tft="_plan_card_1iza3_13",kft="_discount_card_1iza3_27",Eft="_plan_total_count_1iza3_40",Mft="_card_count_1iza3_45",Ift="_card_subtitles_1iza3_50",Ks={card_container:Oft,plan_card:Tft,discount_card:kft,plan_total_count:Eft,card_count:Mft,card_subtitles:Ift};var gB={},Pft=$r;Object.defineProperty(gB,"__esModule",{value:!0});var jhe=gB.default=void 0,Rft=Pft(Qr()),Aft=k;jhe=gB.default=(0,Rft.default)((0,Aft.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"}),"AccountCircle");var vB={},Dft=$r;Object.defineProperty(vB,"__esModule",{value:!0});var Nhe=vB.default=void 0,_ft=Dft(Qr()),jft=k;Nhe=vB.default=(0,_ft.default)((0,jft.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"}),"CreditCard");var yB={},Nft=$r;Object.defineProperty(yB,"__esModule",{value:!0});var Fhe=yB.default=void 0,Fft=Nft(Qr()),Lft=k;Fhe=yB.default=(0,Fft.default)((0,Lft.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");const Bft=()=>{const[e,n]=U.useState(ki()),t=r=>{n(r)};return k.jsx("div",{children:k.jsxs(wn,{container:!0,spacing:4,children:[k.jsxs(wn,{item:!0,xs:12,sm:12,lg:7,children:[k.jsxs("div",{className:`${Ks.card_container} g-20 mb-10`,children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!0}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Credit/Debit Cards"}),k.jsx("span",{style:{color:"#615E69"},children:"Pay with your Credit/Debit Card"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-start-column g-10",style:{width:"90%",margin:"auto"},children:[k.jsx(Vp,{placeholder:"Name on the Card",suffix:k.jsx(jhe,{})}),k.jsx(Vp,{placeholder:"Card Number",suffix:k.jsx(Nhe,{})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(U_,{format:"MM/YY",views:["month","year"],sx:{width:"50%"},minDate:ki(),value:e,onChange:t}),k.jsx(Vp,{placeholder:"CVV",suffix:k.jsx(Fhe,{}),sx:{width:"50%"}})]})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Wallet"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through Wallet"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Paytm/Google Pay/Phone pe/BHIM UPI"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment through Gpay, Paypal, Paytm etc"})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]}),k.jsxs("div",{className:"flex-between-center",children:[k.jsxs("div",{className:"flex-start-center g-10",children:[k.jsx(E2,{checked:!1}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Net banking"}),k.jsx("span",{style:{color:"#615E69"},children:"Make payment directly through bank account."})]})]}),k.jsx("div",{className:"flex-end-center g-10"})]})]}),k.jsx(ea,{label:"Pay $164.23",className:"w-100"})]}),k.jsxs(wn,{item:!0,xs:12,sm:12,lg:5,children:[k.jsxs("div",{className:"flex-start-center g-20 mb-10",children:[k.jsxs("div",{className:`${Ks.plan_card} g-10`,style:{background:"#0055FF1A",border:"1px solid #335AFF"},children:[k.jsx("span",{className:`${Ks.card_count}`,children:"$10/mth"}),k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"})]}),k.jsxs("div",{className:`${Ks.plan_card} g-10`,children:[k.jsx("span",{className:`${Ks.card_count}`,children:"$8/mth"}),k.jsx("span",{className:`${Ks.card_subtitles}`,children:"Basic Plan"}),k.jsx("span",{children:"Billed Quarterly"}),k.jsx("div",{className:`${Ks.discount_card}`,children:k.jsx("span",{children:"-20%"})})]})]}),k.jsxs("div",{className:"mb-20",children:[k.jsx("div",{className:"mb-10",children:k.jsx("span",{className:`${Ks.card_subtitles}`,style:{color:"#615E69"},children:"Gift Card/ Discount Code"})}),k.jsxs("div",{className:"flex-between-center g-10",children:[k.jsx(Vp,{style:{width:"70%"}}),k.jsx(ea,{label:"Apply",variant:"outlined",sx:{width:"30%"}})]})]}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Subtotal"}),k.jsx("span",{children:"$160"})]}),k.jsx(Ya,{}),k.jsxs("div",{className:"flex-between-center",children:[k.jsx("span",{children:"Sales tax(6.5%)"}),k.jsx("span",{children:"$4,23"})]}),k.jsx(Ya,{}),k.jsxs("div",{className:`flex-between-center ${Ks.plan_total_count}`,children:[k.jsx("span",{children:"Total Due"}),k.jsx("span",{children:"$164.23"})]})]})]})]})})},Vft="_card_container_1tgxf_1",$ft="_plans_1tgxf_11",zft="_add_ons_1tgxf_14",Wft="_card_subtitles_1tgxf_28",Hft="_plan_headers_1tgxf_55",Gft="_card_content_1tgxf_63",kp={card_container:Vft,plans:$ft,add_ons:zft,card_subtitles:Wft,plan_headers:Hft,card_content:Gft},Yft={plans:{Basic:{"Core HR":["Employee","Time & Attendance","Document","Policy","Workflow","Roles & Permission","Transfer & Probation"],"Employee Self Service (ESS)":["Android & iOS","Team","Geotag","Geofence","Reports"],Payroll:["Salary","Compliance","Arrear","Full & Final"]},Standard:{"All Basic Features +":[],"Advance HR":["Onboarding","Offboarding","Helpdesk","Asset","Task","Custom Dashboard"],Engage:["Feed","Chat","Survey","Feedback","Recognition"],"Advance Time Tracking":["Time Zone","Roster","Selfie Attendance","Overtime & Incentive"]},Enterprise:{"All Standard Features +":[],"Finance & Admin":["Expense","Travel Desk","Vendor","Petty Cash","Budgeting","Manpower Planning"],Performance:["Review (KRA/KPI)","Objective (OKR)","9-Box Matrix","Bell Curve & Normalization","Compensation"],"Global Payroll":["Contract","Multi-Entry","Multi-Country","Multi-Currency"]}}},Uft=e=>{var f;const{onTabChange:n}=e,[t,r]=U.useState(!1);UC();const[o,i]=U.useState({plan:"",add_ons:[],new_add_ons:[]}),a={Analytics:k.jsx(tB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),"Digital Signature":k.jsx(rB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Learn:k.jsx(iB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Payout:k.jsx(sB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Trip:k.jsx(cB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Timesheet:k.jsx(dB,{sx:{color:"#335AFF",fontSize:"2.5rem"}}),Recruit:k.jsx(fB,{sx:{color:"#335AFF",fontSize:"2.5rem"}})},s=Yft,l=!1,{isDisabled:c}=d0({url:kbe}),{data:d}=Gu(zh,{url:dQ,params:{}},"subsription-overview");U.useEffect(()=>{var g,h;d&&i({plan:(g=d.plan_id)!=null?g:"",add_ons:((h=d.add_on_id)!=null?h:[]).map(String),new_add_ons:[]})},[d]);const p=g=>{var h;return g===((h=d==null?void 0:d.planDetails)==null?void 0:h.current_plan)};return k.jsxs("div",{children:[k.jsx(mf,{visible:l}),k.jsxs(wn,{container:!0,spacing:3,children:[s!=null&&s.plans?Object.entries(s.plans).map(([g,h])=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,children:k.jsxs("div",{className:`${kp.card_container} ${kp.plans} ${p(g)?kp.selected_plan:""}`,style:{backgroundColor:p(g)?"#E3F2FD":"white",border:p(g)?"2px solid #2196F3":"1px solid #e0e0e0",borderRadius:"12px",padding:"12px",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[p(g)&&k.jsx("div",{style:{position:"absolute",top:"-1px",right:"20px",background:"#2196F3",color:"white",padding:"4px 12px",borderRadius:"0 0 8px 8px",fontSize:"12px",fontWeight:"bold"},children:"OPTED"}),k.jsxs("div",{className:"flex-start-column",style:{flex:1,gap:"8px"},children:[k.jsx("div",{className:kp.plan_headers,children:k.jsx("div",{style:{textAlign:"center",marginBottom:"8px"},children:k.jsx("h3",{style:{margin:0,color:"#1976D2",fontSize:"24px",fontWeight:"bold"},children:g})})}),k.jsx(Ya,{}),k.jsx("div",{className:kp.card_content,style:{flex:1},children:Object.entries(h).map(([m,v])=>k.jsxs("div",{style:{marginBottom:"8px"},children:[k.jsx("div",{style:{fontWeight:"bold",color:"#333",marginBottom:"4px",fontSize:"16px"},children:m}),Array.isArray(v)&&v.length>0&&k.jsxs("div",{style:{paddingLeft:"12px",color:"#666"},children:[v.slice(0,3).map((b,w)=>k.jsxs("div",{style:{display:"flex",alignItems:"center",marginBottom:"4px",fontSize:"14px"},children:[k.jsx(Phe,{style:{color:"#4CAF50",fontSize:"16px"}}),b]},w)),v.length>3&&k.jsxs("div",{style:{color:"#999",fontSize:"12px",marginTop:"4px"},children:["+",v.length-3," more features"]})]})]},m))})]})]})},g)):k.jsx(wn,{item:!0,xs:12,children:k.jsx(u0,{message:"No Plans Found"})}),k.jsx(wn,{item:!0,xs:12,style:{marginTop:"10px",marginBottom:"10px"},children:k.jsx("div",{className:"flex-between-center",children:k.jsx("span",{className:kp.card_subtitles,children:"Addons"})})}),(f=d==null?void 0:d.addOnProduct)!=null&&f.length?k.jsx(wn,{container:!0,spacing:2,sx:{pl:3},children:d.addOnProduct.map(g=>k.jsx(wn,{item:!0,xs:12,sm:6,md:4,lg:3,children:k.jsx("div",{className:`${kp.card_container} ${kp.add_ons} ${d.add_on_id.includes(String(g.product_id))?kp.selected_addon:""}`,style:{backgroundColor:d.add_on_id.includes(String(g.product_id))?"#E8F5E8":"white",border:d.add_on_id.includes(String(g.product_id))?"2px solid #4CAF50":"1px solid #e0e0e0",borderRadius:"12px",width:"100%",maxWidth:"260px",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:k.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[k.jsx("span",{style:{fontSize:"18px",display:"flex",alignItems:"center"},children:a[g.product_name]||k.jsx(mB,{sx:{color:"#335AFF",fontSize:"2.5rem"}})}),k.jsx("h4",{style:{margin:0,color:"#333",fontSize:"15px",fontWeight:600,lineHeight:1.4},children:g.product_name})]})})},g.product_id))}):k.jsx(wn,{item:!0,xs:12,children:k.jsx(u0,{message:"No Add Ons Found"})}),k.jsxs(Gw,{open:t,onClose:()=>r(!1),maxWidth:"xs",fullWidth:!0,children:[k.jsx(z3,{sx:{fontWeight:600,textAlign:"center",color:"#1976D2"},children:"Contact Your SPOC"}),k.jsx(Uw,{children:k.jsx("div",{style:{textAlign:"center",fontSize:"15px",padding:"10px 0"},children:"To upgrade your plan, please contact your SPOC."})}),k.jsx(Yw,{sx:{justifyContent:"center"},children:k.jsx(Ap,{variant:"contained",color:"primary",onClick:()=>r(!1),children:"Close"})})]}),k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",children:k.jsx(ea,{label:"Upgrade",onClick:()=>r(!0),disabled:c})})})]})]})},Xft="_card_container_vce56_1",qft="_card_titles_vce56_13",Zft="_card_subtitles_vce56_18",Jft="_card_subtotal_vce56_23",Kft="_card_headers_vce56_40",Qft="_card_content_vce56_48",Km={card_container:Xft,card_titles:qft,card_subtitles:Zft,card_subtotal:Jft,card_headers:Kft,card_content:Qft},Lhe=e=>{const{open:n,setIsOpen:t}=e,r=Rb(),{session:{API_BASE_URL:o,mode:i}}=Wh(),a=UC(),[s,l]=U.useState({amount:"",remarks:""}),{handleSubmit:c,isDisabled:d}=d0({url:Sbe}),p=()=>{t(!1)},f=()=>{if(!s.amount.length){r("Please Enter Amount");return}const h={amount:s.amount,remarks:s.remarks};c(h,null,m=>{var v;a.invalidateQueries("transaction-history"),Ur.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,o,p,r,i)},null)},g=(h,m)=>{l(v=>un(pt({},v),{[h]:m}))};return k.jsx(EL,{open:n,title:"Add Money",size:"xs",onModalclose:p,children:k.jsxs("div",{children:[k.jsx(Vp,{label:"Amount",name:"amount",required:!0,value:s.amount,onChange:h=>{const{name:m,value:v}=h.target;(v===""||/^[0-9\b]+$/.test(v))&&g(m,v)},className:"w-100 mb-10 mt-10"}),k.jsx(Vp,{label:"Remarks",name:"remarks",value:s.remarks,onChange:h=>{const{name:m,value:v}=h.target;g(m,v)},className:"w-100 mb-10"}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Cancel",variant:"outlined",onClick:p}),k.jsx(ea,{label:"Submit",disabled:d,onClick:f})]})]})})},eht=e=>{const{onTabChange:n}=e,t=Rb(),{session:{API_BASE_URL:r,mode:o}}=Wh(),[i,a]=U.useState(!1),{data:s,isFetching:l}=Gu(zh,{url:wbe,params:{}},"customer-subsription"),{handleSubmit:c,isDisabled:d,isLoading:p}=d0({url:pQ}),f=()=>{a(!0)},g=()=>{const h={plan_id:s==null?void 0:s.plan_id,add_on_id:s==null?void 0:s.add_on_product_id};c(h,null,m=>{var v;Ur.cashfreePayment((v=m==null?void 0:m.data)==null?void 0:v.payment_session_id,r,()=>{},t,o)},null)};return k.jsxs("div",{children:[k.jsx(mf,{visible:l||p}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:12,children:k.jsx("div",{className:"flex-end-center",children:k.jsx(ea,{label:"Top Up Wallet",startIcon:k.jsx(l6,{}),onClick:()=>{f()}})})}),Ur.validateDataType(s==null?void 0:s.header,Mi.ARRAY)?s==null?void 0:s.header.map(h=>k.jsx(wn,{item:!0,xs:12,sm:12,md:4,lg:4,children:k.jsxs("div",{className:Km.card_container,children:[k.jsx("div",{className:Km.card_headers,children:k.jsx("span",{className:Km.card_titles,style:{color:"#335AFF"},children:h})}),k.jsx(Ya,{className:"mb-10"}),Ur.validateDataType(s==null?void 0:s.resultRows,Mi.ARRAY)?s.resultRows.map((m,v,b)=>k.jsxs(k.Fragment,{children:[k.jsx("div",{className:Km.card_content,children:Ur.validateDataType(m==null?void 0:m[h],Mi.ARRAY)?m==null?void 0:m[h].map(w=>k.jsx(k.Fragment,{children:k.jsx("span",{className:`${h==="Plan"?Km.card_titles:""}`,children:h==="Price"?`Rs ${w}`:w})})):k.jsx(k.Fragment,{})}),v!==b.length-1?k.jsx(Ya,{className:"mb-10"}):k.jsx(k.Fragment,{})]})):k.jsx(k.Fragment,{})]})})):k.jsx(u0,{message:"No Plans Found"}),Ur.validateDataType(s==null?void 0:s.subtotal,Mi.ARRAY)?s.subtotal.map(h=>k.jsxs(wn,{item:!0,xs:12,children:[k.jsxs("div",{className:`flex-between-center mb-10 ${h.name==="Total"?Km.card_subtitles:Km.card_subtotal}`,children:[k.jsx("span",{children:h.name}),k.jsxs("span",{children:["Rs ",h.amount]})]}),k.jsx(Ya,{})]})):k.jsx(k.Fragment,{}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Renew",variant:"outlined",disabled:d,onClick:g}),k.jsx(ea,{label:"Modify Subscription",onClick:()=>{n(2)}})]})})]}),i&&k.jsx(Lhe,{open:i,setIsOpen:a})]})},tht="_card_container_1ts8v_1",nht="_card_subtitles_1ts8v_18",rht="_icons_background_1ts8v_23",Pu={card_container:tht,card_subtitles:nht,icons_background:rht};function oht(e){return GL({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64l241.9 0c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5 608 384c0 35.3-28.7 64-64 64l-241.9 0c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5 32 128c0-35.3 28.7-64 64-64zm64 64l-64 0 0 64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64l64 0 0-64zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z"},child:[]}]})(e)}var bB={},iht=$r;Object.defineProperty(bB,"__esModule",{value:!0});var Z_=bB.default=void 0,aht=iht(Qr()),sht=k;Z_=bB.default=(0,aht.default)((0,sht.jsx)("path",{d:"M18 4H6C3.79 4 2 5.79 2 8v8c0 2.21 1.79 4 4 4h12c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4m-1.86 9.77c-.24.2-.57.28-.88.2L4.15 11.25C4.45 10.52 5.16 10 6 10h12c.67 0 1.26.34 1.63.84zM6 6h12c1.1 0 2 .9 2 2v.55c-.59-.34-1.27-.55-2-.55H6c-.73 0-1.41.21-2 .55V8c0-1.1.9-2 2-2"}),"Wallet");var xB={},lht=$r;Object.defineProperty(xB,"__esModule",{value:!0});var Bhe=xB.default=void 0,cht=lht(Qr()),uht=k;Bhe=xB.default=(0,cht.default)((0,uht.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");const MK=[{label:"Credit Card",value:"cc"},{label:"Debit Card",value:"dc"},{label:"New Banking",value:"nb"}],dht=()=>{var g,h,m,v;const[e,n]=U.useState(!1),[t,r]=U.useState(!1),[o,i]=U.useState({}),{data:a,isFetching:s}=Gu(zh,{url:Cbe,params:{}},"transaction-history"),l=()=>{n(!0)},c=()=>{r(!0)},d=()=>{r(!1),i({})},p=(b,w)=>{i(C=>un(pt({},C),{[b]:w}))};console.log({automaticTopupDetails:o});const f=U.useMemo(()=>[{header:"Date",accessorKey:"CREATED_ON",id:"CREATED_ON",cell:b=>k.jsxs("span",{children:[" ",ki(b).format("h:mma, D MMMM YYYY")]})},{header:"Payment By",accessorKey:"PAYMENT_BY",id:"PAYMENT_BY"},{header:"Description",accessorKey:"DESCRIPTION",id:"DESCRIPTION"},{header:"Transaction Id",accessorKey:"LEDGER_ID",id:"LEDGER_ID"},{header:"Transaction Remarks",accessorKey:"TRANSACTION_REMARKS",id:"TRANSACTION_REMARKS"},{header:"Credit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="credit"?`${b}`:"--"})},{header:"Debit Amount",accessorKey:"AMOUNT",id:"AMOUNT",cell:(b,w)=>k.jsx("span",{children:(w==null?void 0:w.TRANSACTION_TYPE)==="debit"?`${b}`:"--"})},{header:"Closing Balance",accessorKey:"CLOSING_BALANCE",id:"CLOSING_BALANCE",cell:b=>k.jsx("span",{className:`${Pu.card_subtitles}`,style:{color:"#8B8684 "},children:b})}],[a]);return k.jsxs("div",{children:[k.jsx(mf,{visible:s}),k.jsxs(wn,{container:!0,spacing:2,children:[k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${Pu.card_container}`,children:[k.jsx("div",{style:{margin:"auto"},children:k.jsx("span",{style:{background:"#027A481A",margin:"inherit"},className:Pu.icons_background,children:k.jsx(oht,{style:{color:"#027A48",fontSize:"2rem"}})})}),k.jsx("div",{style:{margin:"auto"},children:k.jsx(ea,{label:"Add Money",variant:"outlined",startIcon:k.jsx(l6,{}),onClick:()=>{l()}})})]})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsx("div",{className:`${Pu.card_container}`,children:k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#0237671A",margin:"inherit"},className:Pu.icons_background,children:k.jsx(Z_,{style:{color:"#023767",fontSize:"2rem"}})}),k.jsxs("div",{className:"flex-start-column g-10",children:[k.jsx("span",{children:"Wallet Balance"}),k.jsxs("span",{className:`${Pu.card_subtitles}`,children:["Rs ",(h=(g=a==null?void 0:a.overview)==null?void 0:g.balance)!=null?h:"--"]})]})]})})}),k.jsx(wn,{item:!0,xs:6,sm:6,lg:4,children:k.jsxs("div",{className:`${Pu.card_container}`,children:[k.jsxs("div",{className:"flex-between-center g-20",style:{margin:"auto"},children:[k.jsx("span",{style:{background:"#335AFF1A",margin:"inherit"},className:Pu.icons_background,children:k.jsx(Z_,{style:{color:"#335AFF",fontSize:"2rem"}})}),k.jsx("span",{className:`${Pu.card_subtitles}`,children:"Automatic Topup"})]}),k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Set Up",onClick:c}),k.jsx(Zg,{title:"Whenever your balance goes below, top up your wallet automatically",children:k.jsx(Bhe,{className:"cursor-pointer"})})]})]})}),k.jsx(wn,{item:!0,xs:12,sm:12,lg:12,children:k.jsxs("div",{className:`${Pu.card_container} g-10`,children:[k.jsx("span",{className:`${Pu.card_subtitles}`,children:"Transaction History"}),k.jsx(Ya,{}),k.jsx("div",{style:{height:"340px",overflow:"scroll"},children:k.jsx(ML,{data:Ur.validateDataType((m=a==null?void 0:a.transactionHistoryList)==null?void 0:m.result,Mi.ARRAY)?(v=a==null?void 0:a.transactionHistoryList)==null?void 0:v.result:[],columns:f,wrapByTooltipDefault:!0})})]})})]}),e&&k.jsx(Lhe,{open:e,setIsOpen:n}),t&&k.jsx(EL,{title:"Topup Setup",open:t,size:"xs",onModalclose:d,children:k.jsxs(wn,{container:!0,spacing:2,sx:{marginTop:"-10px"},children:[[{name:"min_amount",label:"Min Amount"},{name:"max_amount",label:"Max Amount"}].map(b=>{var w;return k.jsx(wn,{item:!0,xs:12,children:k.jsx(Vp,{label:b.label,name:b.name,className:"w-100",value:(w=o==null?void 0:o[b.name])!=null?w:"",onChange:C=>{const{name:O,value:x}=C.target;(x===""||/^[0-9\b]+$/.test(x))&&p(O,x)}})})}),k.jsx(wn,{item:!0,xs:12,children:k.jsx(Pfe,{options:MK,value:MK.filter(b=>b.value===(o==null?void 0:o.transaction_type)),label:"Transaction Type",onChange:b=>{p("transaction_type",b==null?void 0:b.value)}})}),k.jsx(wn,{item:!0,xs:12,children:k.jsxs("div",{className:"flex-end-center g-10",children:[k.jsx(ea,{label:"Cancel",variant:"outlined",onClick:d}),k.jsx(ea,{label:"Submit"})]})})]})})]})},pht=()=>{const{session:{user:e}}=Wh(),[n,t]=U.useState([]),[r,o]=U.useState(null),i=(e==null?void 0:e.org_id)||null,{data:a,isFetching:s}=Gu(o7,{url:Ibe,data:{org_id:i,pagination:{page:1,limit:10}}},["addon-clients",i],{enabled:!!i});U.useEffect(()=>{if(a){const{headers:c=[],result:{list:d=[]}={}}=a;t(c),d.length>0&&o(d[0])}},[a]);const l=c=>{if(!r)return;const d=String(c),p=r.productNameID.includes(d)?r.productNameID.filter(f=>f!==d):[...r.productNameID,d];o(un(pt({},r),{productNameID:p})),console.log("Toggled:",d,"Updated:",p)};return!i||s?k.jsx(mf,{visible:!0}):k.jsx(fo,{sx:{flexGrow:1},mt:2,children:k.jsxs(ob,{gap:2,children:[k.jsx(Ar,{variant:"h6",children:"Subscription Activation"}),k.jsx(nc,{variant:"outlined",sx:{width:"100%"},children:k.jsx(fM,{disablePadding:!0,children:n.map((c,d)=>{const p=(r==null?void 0:r.productNameID.includes(String(c.id)))||!1;return k.jsxs(U.Fragment,{children:[k.jsxs($7,{children:[k.jsx(qee,{primary:c.product_name,secondary:c.short_product_name}),k.jsx(hM,{children:k.jsx(ste,{edge:"end",checked:p,onChange:()=>l(c.id),disabled:!c.operation_allow})})]}),d<n.length-1&&k.jsx(Ya,{})]},c.id)})})})]})})};var wB={},fht=$r;Object.defineProperty(wB,"__esModule",{value:!0});var Vhe=wB.default=void 0,hht=fht(Qr()),mht=k;Vhe=wB.default=(0,hht.default)((0,mht.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var CB={},ght=$r;Object.defineProperty(CB,"__esModule",{value:!0});var J_=CB.default=void 0,vht=ght(Qr()),yht=k;J_=CB.default=(0,vht.default)((0,yht.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");var SB={},bht=$r;Object.defineProperty(SB,"__esModule",{value:!0});var $he=SB.default=void 0,xht=bht(Qr()),wht=k;$he=SB.default=(0,xht.default)((0,wht.jsx)("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile");var OB={},Cht=$r;Object.defineProperty(OB,"__esModule",{value:!0});var zhe=OB.default=void 0,Sht=Cht(Qr()),Oht=k;zhe=OB.default=(0,Sht.default)((0,Oht.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image");var TB={},Tht=$r;Object.defineProperty(TB,"__esModule",{value:!0});var Whe=TB.default=void 0,kht=Tht(Qr()),Eht=k;Whe=TB.default=(0,kht.default)((0,Eht.jsx)("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5.5h1v-3h-1z"}),"PictureAsPdf");var kB={},Mht=$r;Object.defineProperty(kB,"__esModule",{value:!0});var Hhe=kB.default=void 0,Iht=Mht(Qr()),Pht=k;Hhe=kB.default=(0,Iht.default)((0,Pht.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description");const Rht=()=>{const[e,n]=U.useState({page:0,perPage:20}),[t,r]=U.useState(null),[o,i]=U.useState(null),[a,s]=U.useState(!1),[l,c]=U.useState(null),[d,p]=U.useState(!1),f=Wh(A=>{var D;return(D=A.session.user)==null?void 0:D.org_id});console.log("org_id",f);const{data:g,isFetching:h}=Gu(o7,{url:Pbe,data:{org_id:f,page:e.page,limit:e.perPage}},"customer-mails"),m=(A,D)=>{r(A.currentTarget),i(D)},v=()=>{r(null)},b=()=>{s(!0),v()},w=()=>{s(!1),i(null)},C=(A,D)=>{n(N=>un(pt({},N),{[A]:D}))},O=A=>A.startsWith("image/")?k.jsx(zhe,{}):A==="application/pdf"?k.jsx(Whe,{}):k.jsx(Hhe,{}),x=A=>{if(A===0)return"0 Bytes";const D=1024,N=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(A)/Math.log(D));return parseFloat((A/Math.pow(D,L)).toFixed(2))+" "+N[L]},E=A=>{const D=document.createElement("a");D.href=`data:${A.type};base64,${A.data}`,D.download=A.name,document.body.appendChild(D),D.click(),document.body.removeChild(D)},M=A=>{c(A),p(!0)},R=()=>{p(!1),c(null)},_=()=>{if(!l)return null;const{type:A,data:D,name:N}=l,L=`data:${A};base64,${D}`;return A.startsWith("image/")?k.jsx(fo,{display:"flex",justifyContent:"center",p:2,children:k.jsx("img",{src:L,alt:N,style:{maxWidth:"100%",maxHeight:"500px",objectFit:"contain"}})}):A==="application/pdf"?k.jsx(fo,{display:"flex",justifyContent:"center",p:2,children:k.jsx("embed",{src:L,type:"application/pdf",width:"100%",height:"500px",style:{border:"1px solid #ccc"}})}):k.jsx(fo,{display:"flex",justifyContent:"center",alignItems:"center",p:4,children:k.jsx(Ar,{variant:"body1",color:"text.secondary",children:"Preview not available for this file type"})})},j=U.useMemo(()=>[{header:"Subject",accessorKey:"subject",id:"subject"},{header:"Created By",accessorKey:"created_by",id:"created_by"},{header:"Created On",accessorKey:"created_on",id:"created_on"},{header:"Action",accessorKey:"id",id:"id",cell:(A,D)=>k.jsx("div",{className:"flex-start-center g-10",children:k.jsx(Zg,{title:"More Options",children:k.jsx(Vhe,{color:"primary",className:"cursor-pointer",onClick:N=>m(N,D)})})})}],[g]);return k.jsxs("div",{children:[k.jsx(mf,{visible:h}),k.jsx("div",{style:{height:"70vh",overflow:"scroll"},children:k.jsx(ML,{loading:h,data:Ur.validateDataType(g==null?void 0:g.data,Mi.ARRAY)?g.data:[],columns:j,wrapByTooltipDefault:!0,pagination:un(pt({show:!0,showFirstButton:!0,showLastButton:!0,perPageOptions:[20,30,50,100],totalDataCount:(g==null?void 0:g.totalCounts)||0},e),{handlePageChange:A=>C("page",A),handlePerPageChange:A=>C("perPage",A)})})}),k.jsx(W7,{anchorEl:t,open:!!t,onClose:v,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:k.jsxs(Qee,{onClick:b,children:[k.jsx(ME,{fontSize:"small",sx:{mr:1}}),"View"]})}),k.jsxs(Gw,{open:a,onClose:w,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{minHeight:"500px",maxHeight:"85vh",borderRadius:3,boxShadow:"0 10px 40px rgba(0,0,0,0.15)"}},children:[k.jsx(z3,{sx:{background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"white",py:3},children:k.jsxs(fo,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[k.jsxs(fo,{children:[k.jsx(Ar,{variant:"h5",fontWeight:"600",children:"Mail Details"}),k.jsx(Ar,{variant:"body2",sx:{opacity:.9,mt:.5},children:o==null?void 0:o.subject})]}),k.jsx(Ih,{onClick:w,sx:{color:"white",backgroundColor:"rgba(255,255,255,0.1)","&:hover":{backgroundColor:"rgba(255,255,255,0.2)"}},children:k.jsx(J_,{})})]})}),k.jsx(Uw,{sx:{p:0},children:o&&k.jsxs(fo,{sx:{p:3},children:[k.jsx(nc,{elevation:0,sx:{p:3,mb:3,backgroundColor:"#f8fafc",borderRadius:2,border:"1px solid #e2e8f0"},children:k.jsxs(ob,{spacing:2.5,children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:2,children:[k.jsx(fo,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"#10b981"}}),k.jsx(Ar,{variant:"h6",fontWeight:"600",color:"text.primary",children:o.subject})]}),k.jsxs(fo,{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2,children:[k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"From"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.from_email||"N/A"})]}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"To"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.to_email||"N/A"})]}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"Created By"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.created_by})]}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"caption",color:"text.secondary",fontWeight:"600",textTransform:"uppercase",children:"Created On"}),k.jsx(Ar,{variant:"body1",sx:{mt:.5},children:o.created_on})]})]})]})}),o.attachments&&o.attachments.length>0&&k.jsxs(fo,{sx:{mb:3},children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:1,mb:2,children:[k.jsx($he,{sx:{color:"#6366f1"}}),k.jsxs(Ar,{variant:"h6",fontWeight:"600",color:"text.primary",children:["Attachments (",o.attachments.length,")"]})]}),k.jsx(ob,{spacing:1.5,children:o.attachments.map((A,D)=>k.jsx(nc,{elevation:0,sx:{p:2.5,border:"1px solid #e2e8f0",borderRadius:2,transition:"all 0.2s ease","&:hover":{borderColor:"#6366f1",boxShadow:"0 4px 12px rgba(99, 102, 241, 0.1)"}},children:k.jsxs(fo,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:2,children:[k.jsx(fo,{sx:{p:1.5,borderRadius:2,backgroundColor:"#f1f5f9",color:"#6366f1"},children:O(A.type)}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"body1",fontWeight:"600",color:"text.primary",children:A.name}),k.jsx(Ar,{variant:"caption",color:"text.secondary",children:A.size&&x(A.size)})]})]}),k.jsxs(fo,{display:"flex",gap:1,children:[k.jsx(Ap,{variant:"outlined",size:"small",startIcon:k.jsx(ME,{}),onClick:()=>M(A),sx:{borderColor:"#6366f1",color:"#6366f1","&:hover":{borderColor:"#4f46e5",backgroundColor:"#f8fafc"}},children:"Preview"}),k.jsx(Ap,{variant:"contained",size:"small",startIcon:k.jsx(EE,{}),onClick:()=>E(A),sx:{backgroundColor:"#6366f1","&:hover":{backgroundColor:"#4f46e5"}},children:"Download"})]})]})},D))})]}),o.content&&k.jsxs(fo,{children:[k.jsx(Ar,{variant:"h6",fontWeight:"600",color:"text.primary",sx:{mb:2},children:"Content"}),k.jsx(nc,{elevation:0,sx:{p:3,maxHeight:"400px",overflow:"auto",backgroundColor:"#ffffff",border:"1px solid #e2e8f0",borderRadius:2,"& img":{maxWidth:"100%",height:"auto",borderRadius:1},"& a":{color:"#6366f1",textDecoration:"none","&:hover":{textDecoration:"underline"}}},children:k.jsx("div",{dangerouslySetInnerHTML:{__html:o.content},style:{wordBreak:"break-word",fontFamily:"inherit",lineHeight:1.6}})})]})]})}),k.jsx(Yw,{sx:{p:3,pt:0},children:k.jsx(ea,{label:"Close",size:"medium",variant:"outlined",onClick:w})})]}),k.jsxs(Gw,{open:d,onClose:R,maxWidth:"lg",fullWidth:!0,PaperProps:{sx:{minHeight:"500px",maxHeight:"90vh",borderRadius:3,boxShadow:"0 10px 40px rgba(0,0,0,0.15)"}},children:[k.jsx(z3,{sx:{background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"white",py:3},children:k.jsxs(fo,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[k.jsxs(fo,{display:"flex",alignItems:"center",gap:2,children:[k.jsx(fo,{sx:{p:1.5,borderRadius:2,backgroundColor:"rgba(255,255,255,0.1)",color:"white"},children:l&&O(l.type)}),k.jsxs(fo,{children:[k.jsx(Ar,{variant:"h6",fontWeight:"600",children:(l==null?void 0:l.name)||"Attachment Preview"}),k.jsx(Ar,{variant:"body2",sx:{opacity:.9},children:(l==null?void 0:l.size)&&x(l.size)})]})]}),k.jsx(Ih,{onClick:R,sx:{color:"white",backgroundColor:"rgba(255,255,255,0.1)","&:hover":{backgroundColor:"rgba(255,255,255,0.2)"}},children:k.jsx(J_,{})})]})}),k.jsx(Uw,{sx:{p:0,backgroundColor:"#f8fafc"},children:k.jsx(fo,{sx:{p:3},children:k.jsx(nc,{elevation:0,sx:{borderRadius:2,overflow:"hidden",border:"1px solid #e2e8f0",minHeight:"400px",display:"flex",alignItems:"center",justifyContent:"center"},children:_()})})}),k.jsxs(Yw,{sx:{p:3,pt:0,backgroundColor:"#f8fafc"},children:[l&&k.jsx(Ap,{startIcon:k.jsx(EE,{}),onClick:()=>E(l),variant:"contained",sx:{backgroundColor:"#6366f1","&:hover":{backgroundColor:"#4f46e5"},mr:1},children:"Download"}),k.jsx(ea,{label:"Close",size:"medium",variant:"outlined",onClick:R})]})]})]})};exports.BillingSubscription=pht;exports.CustomerInvoices=wpt;exports.Mail=Rht;exports.ManageProvider=rke;exports.PlansOverview=Uft;exports.SubscriptionConsumption=cpt;exports.SubscriptionOverview=Sft;exports.SubscriptionPaymentMethod=Bft;exports.SubscriptionPlans=eht;exports.SubscriptionWallet=dht;
|
package/dist/main.js
CHANGED
|
@@ -3013,22 +3013,22 @@ wi.getAdapter = xQ.getAdapter;
|
|
|
3013
3013
|
wi.HttpStatusCode = zD;
|
|
3014
3014
|
wi.default = wi;
|
|
3015
3015
|
const {
|
|
3016
|
-
Axios:
|
|
3017
|
-
AxiosError:
|
|
3018
|
-
CanceledError:
|
|
3019
|
-
isCancel:
|
|
3020
|
-
CancelToken:
|
|
3021
|
-
VERSION:
|
|
3022
|
-
all:
|
|
3023
|
-
Cancel:
|
|
3024
|
-
isAxiosError:
|
|
3025
|
-
spread:
|
|
3026
|
-
toFormData:
|
|
3027
|
-
AxiosHeaders:
|
|
3028
|
-
HttpStatusCode:
|
|
3029
|
-
formToJSON:
|
|
3030
|
-
getAdapter:
|
|
3031
|
-
mergeConfig:
|
|
3016
|
+
Axios: Yht,
|
|
3017
|
+
AxiosError: Uht,
|
|
3018
|
+
CanceledError: Xht,
|
|
3019
|
+
isCancel: qht,
|
|
3020
|
+
CancelToken: Zht,
|
|
3021
|
+
VERSION: Jht,
|
|
3022
|
+
all: Kht,
|
|
3023
|
+
Cancel: Qht,
|
|
3024
|
+
isAxiosError: emt,
|
|
3025
|
+
spread: tmt,
|
|
3026
|
+
toFormData: nmt,
|
|
3027
|
+
AxiosHeaders: rmt,
|
|
3028
|
+
HttpStatusCode: omt,
|
|
3029
|
+
formToJSON: imt,
|
|
3030
|
+
getAdapter: amt,
|
|
3031
|
+
mergeConfig: smt
|
|
3032
3032
|
} = wi, Qh = (r) => _c(void 0, [r], function* ({ url: e, token: n, params: t }) {
|
|
3033
3033
|
return yield wi.get(e, { headers: { token: n }, params: t });
|
|
3034
3034
|
}), y7 = (o) => _c(void 0, [o], function* ({ url: e, token: n, data: t, params: r }) {
|
|
@@ -23023,7 +23023,7 @@ const xMe = (e) => {
|
|
|
23023
23023
|
return () => clearTimeout(f);
|
|
23024
23024
|
}
|
|
23025
23025
|
}, [l]), M.jsxs(M.Fragment, { children: [l && M.jsx(xMe, { message: l, type: c }), e] });
|
|
23026
|
-
},
|
|
23026
|
+
}, lmt = ({ queryClient: e, token: n, LOGIN_BASE_URL: t, API_BASE_URL: r, ASSETS_BASE_URL: o, HRMS_BASE_URL: i, children: a, mode: s }) => M.jsx(zve, { client: e, contextSharing: !0, children: M.jsx(wMe, { token: n, LOGIN_BASE_URL: t, API_BASE_URL: r, ASSETS_BASE_URL: o, HRMS_BASE_URL: i, mode: s, children: a }) }), CMe = "_card_container_mtohj_1", SMe = "_card_subtitles_mtohj_18", OMe = "_icons_background_mtohj_23", TMe = "_listing_icons_mtohj_32", MMe = "_sub_icons_background_mtohj_43", na = {
|
|
23027
23027
|
card_container: CMe,
|
|
23028
23028
|
card_subtitles: SMe,
|
|
23029
23029
|
icons_background: OMe,
|
|
@@ -79585,7 +79585,7 @@ const Mpt = "data:image/svg+xml,%3csvg%20width='199'%20height='133'%20viewBox='0
|
|
|
79585
79585
|
skeleton: M.jsx(Ste, {})
|
|
79586
79586
|
}), [e]);
|
|
79587
79587
|
return e ? t[n] : M.jsx(M.Fragment, {});
|
|
79588
|
-
},
|
|
79588
|
+
}, cmt = () => {
|
|
79589
79589
|
var i, a, s;
|
|
79590
79590
|
const [e, n] = Jt(Ai()), { data: t, isFetching: r } = Ku(Qh, {
|
|
79591
79591
|
url: Hbe,
|
|
@@ -83343,7 +83343,10 @@ Vk = sB.default = (0, jpt.default)(/* @__PURE__ */ (0, Npt.jsx)("path", {
|
|
|
83343
83343
|
const F2 = {
|
|
83344
83344
|
LIST_VIEW: "LIST_VIEW",
|
|
83345
83345
|
INVOICE_VIEW: "INVOICE_VIEW"
|
|
83346
|
-
},
|
|
83346
|
+
}, Fpt = {
|
|
83347
|
+
invoice: "Tax Invoice",
|
|
83348
|
+
recurring_pi: "Proforma Invoice"
|
|
83349
|
+
}, umt = () => {
|
|
83347
83350
|
const [e, n] = Jt(F2.LIST_VIEW), [t, r] = Jt(""), [o, i] = Jt({
|
|
83348
83351
|
page: 0,
|
|
83349
83352
|
perPage: 20
|
|
@@ -83369,6 +83372,15 @@ const F2 = {
|
|
|
83369
83372
|
[h]: m
|
|
83370
83373
|
}));
|
|
83371
83374
|
}, g = wo(() => [
|
|
83375
|
+
{
|
|
83376
|
+
header: "Invoice Type",
|
|
83377
|
+
accessorKey: "invoice_type",
|
|
83378
|
+
id: "invoice_type",
|
|
83379
|
+
cell: (h) => {
|
|
83380
|
+
var m;
|
|
83381
|
+
return M.jsx("span", { className: "font-bold", children: (m = Fpt[h]) != null ? m : h });
|
|
83382
|
+
}
|
|
83383
|
+
},
|
|
83372
83384
|
{
|
|
83373
83385
|
header: "Invoice Number",
|
|
83374
83386
|
accessorKey: "invoice_number",
|
|
@@ -83389,11 +83401,6 @@ const F2 = {
|
|
|
83389
83401
|
accessorKey: "grand_total_amount",
|
|
83390
83402
|
id: "grand_total_amount"
|
|
83391
83403
|
},
|
|
83392
|
-
{
|
|
83393
|
-
header: "MRR",
|
|
83394
|
-
accessorKey: "invoice_mrr",
|
|
83395
|
-
id: "invoice_mrr"
|
|
83396
|
-
},
|
|
83397
83404
|
{
|
|
83398
83405
|
header: "Status",
|
|
83399
83406
|
accessorKey: "payment_status",
|
|
@@ -83450,53 +83457,53 @@ const F2 = {
|
|
|
83450
83457
|
background: "white",
|
|
83451
83458
|
zIndex: 100
|
|
83452
83459
|
}, elevation: 3, children: M.jsx(gb, { direction: "row", gap: 2, justifyContent: "flex-end", children: M.jsx(aa, { label: " Go Back To List", size: "small", variant: "contained", color: "primary", onClick: () => n(F2.LIST_VIEW) }) }) })] }) : M.jsx(M.Fragment, {})] });
|
|
83453
|
-
},
|
|
83454
|
-
card_container:
|
|
83455
|
-
card_count:
|
|
83456
|
-
},
|
|
83460
|
+
}, Lpt = "_card_container_dxhto_1", Bpt = "_card_count_dxhto_14", BK = {
|
|
83461
|
+
card_container: Lpt,
|
|
83462
|
+
card_count: Bpt
|
|
83463
|
+
}, Vpt = ({ data: e }) => {
|
|
83457
83464
|
var n, t, r;
|
|
83458
83465
|
return M.jsx("div", { className: `${BK.card_container}`, style: { height: "100%" }, children: M.jsxs("div", { className: "flex-between-center g-10", children: [(n = e == null ? void 0 : e.icon) != null ? n : M.jsx(M.Fragment, {}), M.jsxs("div", { className: "flex-start-column mr-10 g-10", children: [M.jsx("div", { children: M.jsx("span", { children: (t = e == null ? void 0 : e.label) != null ? t : "-" }) }), M.jsx("div", { children: M.jsx("span", { className: `${BK.card_count}`, children: (r = e == null ? void 0 : e.count) != null ? r : "-" }) })] })] }) });
|
|
83459
83466
|
};
|
|
83460
|
-
var lB = {},
|
|
83467
|
+
var lB = {}, $pt = Gr;
|
|
83461
83468
|
Object.defineProperty(lB, "__esModule", {
|
|
83462
83469
|
value: !0
|
|
83463
83470
|
});
|
|
83464
|
-
var Xhe = lB.default = void 0,
|
|
83465
|
-
Xhe = lB.default = (0,
|
|
83471
|
+
var Xhe = lB.default = void 0, zpt = $pt(ro()), Wpt = M;
|
|
83472
|
+
Xhe = lB.default = (0, zpt.default)(/* @__PURE__ */ (0, Wpt.jsx)("path", {
|
|
83466
83473
|
d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2zm-9-2h10V8H12zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5"
|
|
83467
83474
|
}), "AccountBalanceWallet");
|
|
83468
83475
|
function VK({ data: e = "", limit: n = 17, doNotShowTooltip: t = !1, arrow: r = !0, endAdornment: o = "", startAdornment: i = "", styleOverrides: a = {} }) {
|
|
83469
83476
|
return M.jsx(M.Fragment, { children: e && typeof e == "string" && e.length > n && !t ? M.jsx(s0, { title: e != null ? e : "", arrow: r, children: M.jsx("span", { style: a, children: i + e.substring(0, n) + ".." + o }) }) : i + e + o });
|
|
83470
83477
|
}
|
|
83471
|
-
const
|
|
83472
|
-
card_container:
|
|
83473
|
-
card_subtitles:
|
|
83478
|
+
const Hpt = "_card_container_95l02_1", Gpt = "_card_subtitles_95l02_18", GT = {
|
|
83479
|
+
card_container: Hpt,
|
|
83480
|
+
card_subtitles: Gpt
|
|
83474
83481
|
};
|
|
83475
|
-
var cB = {},
|
|
83482
|
+
var cB = {}, Ypt = Gr;
|
|
83476
83483
|
Object.defineProperty(cB, "__esModule", {
|
|
83477
83484
|
value: !0
|
|
83478
83485
|
});
|
|
83479
|
-
var qhe = cB.default = void 0,
|
|
83480
|
-
qhe = cB.default = (0,
|
|
83486
|
+
var qhe = cB.default = void 0, Upt = Ypt(ro()), Xpt = M;
|
|
83487
|
+
qhe = cB.default = (0, Upt.default)(/* @__PURE__ */ (0, Xpt.jsx)("path", {
|
|
83481
83488
|
d: "M12 7V3H2v18h20V7zm-2 12H4v-2h6zm0-4H4v-2h6zm0-4H4V9h6zm0-4H4V5h6zm10 12h-8V9h8zm-2-8h-4v2h4zm0 4h-4v2h4z"
|
|
83482
83489
|
}), "CorporateFare");
|
|
83483
|
-
var uB = {},
|
|
83490
|
+
var uB = {}, qpt = Gr;
|
|
83484
83491
|
Object.defineProperty(uB, "__esModule", {
|
|
83485
83492
|
value: !0
|
|
83486
83493
|
});
|
|
83487
|
-
var Zhe = uB.default = void 0,
|
|
83488
|
-
Zhe = uB.default = (0,
|
|
83494
|
+
var Zhe = uB.default = void 0, Zpt = qpt(ro()), Jpt = M;
|
|
83495
|
+
Zhe = uB.default = (0, Zpt.default)(/* @__PURE__ */ (0, Jpt.jsx)("path", {
|
|
83489
83496
|
d: "M3 10h11v2H3zm0-2h11V6H3zm0 8h7v-2H3zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71zm-.71.71-5.3 5.3V21h2.12l5.3-5.3z"
|
|
83490
83497
|
}), "EditNote");
|
|
83491
|
-
var dB = {},
|
|
83498
|
+
var dB = {}, Kpt = Gr;
|
|
83492
83499
|
Object.defineProperty(dB, "__esModule", {
|
|
83493
83500
|
value: !0
|
|
83494
83501
|
});
|
|
83495
|
-
var w6 = dB.default = void 0,
|
|
83496
|
-
w6 = dB.default = (0,
|
|
83502
|
+
var w6 = dB.default = void 0, Qpt = Kpt(ro()), eft = M;
|
|
83503
|
+
w6 = dB.default = (0, Qpt.default)(/* @__PURE__ */ (0, eft.jsx)("path", {
|
|
83497
83504
|
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
|
|
83498
83505
|
}), "Add");
|
|
83499
|
-
const
|
|
83506
|
+
const tft = ({ orgDetails: e }) => {
|
|
83500
83507
|
var q, re, ne, J, K, pe, fe, ie;
|
|
83501
83508
|
const n = iS(), [t, r] = Jt(!1), [o, i] = Jt({
|
|
83502
83509
|
org_name: "",
|
|
@@ -83745,107 +83752,107 @@ const eft = ({ orgDetails: e }) => {
|
|
|
83745
83752
|
vertical: "bottom",
|
|
83746
83753
|
horizontal: "left"
|
|
83747
83754
|
}, children: M.jsx("div", { style: { padding: "10px" }, children: (ie = e.email_id) == null ? void 0 : ie.map((oe) => M.jsx("div", { className: "mb-10", children: oe })) }) })] });
|
|
83748
|
-
},
|
|
83749
|
-
card_container:
|
|
83750
|
-
card_count:
|
|
83751
|
-
card_subtitles:
|
|
83752
|
-
icons_background:
|
|
83753
|
-
sub_icons_background:
|
|
83755
|
+
}, nft = "_card_container_c1yb9_1", rft = "_card_count_c1yb9_13", oft = "_card_subtitles_c1yb9_18", ift = "_icons_background_c1yb9_23", aft = "_sub_icons_background_c1yb9_32", ks = {
|
|
83756
|
+
card_container: nft,
|
|
83757
|
+
card_count: rft,
|
|
83758
|
+
card_subtitles: oft,
|
|
83759
|
+
icons_background: ift,
|
|
83760
|
+
sub_icons_background: aft
|
|
83754
83761
|
};
|
|
83755
|
-
function
|
|
83762
|
+
function sft(e) {
|
|
83756
83763
|
return iB({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M181.9 256.1c-5-16-4.9-46.9-2-46.9 8.4 0 7.6 36.9 2 46.9zm-1.7 47.2c-7.7 20.2-17.3 43.3-28.4 62.7 18.3-7 39-17.2 62.9-21.9-12.7-9.6-24.9-23.4-34.5-40.8zM86.1 428.1c0 .8 13.2-5.4 34.9-40.2-6.7 6.3-29.1 24.5-34.9 40.2zM248 160h136v328c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V24C0 10.7 10.7 0 24 0h200v136c0 13.2 10.8 24 24 24zm-8 171.8c-20-12.2-33.3-29-42.7-53.8 4.5-18.5 11.6-46.6 6.2-64.2-4.7-29.4-42.4-26.5-47.8-6.8-5 18.3-.4 44.1 8.1 77-11.6 27.6-28.7 64.6-40.8 85.8-.1 0-.1.1-.2.1-27.1 13.9-73.6 44.5-54.5 68 5.6 6.9 16 10 21.5 10 17.9 0 35.7-18 61.1-61.8 25.8-8.5 54.1-19.1 79-23.2 21.7 11.8 47.1 19.5 64 19.5 29.2 0 31.2-32 19.7-43.4-13.9-13.6-54.3-9.7-73.6-7.2zM377 105L279 7c-4.5-4.5-10.6-7-17-7h-6v128h128v-6.1c0-6.3-2.5-12.4-7-16.9zm-74.1 255.3c4.1-2.7-2.5-11.9-42.8-9 37.1 15.8 42.8 9 42.8 9z" }, child: [] }] })(e);
|
|
83757
83764
|
}
|
|
83758
|
-
var pB = {},
|
|
83765
|
+
var pB = {}, lft = Gr;
|
|
83759
83766
|
Object.defineProperty(pB, "__esModule", {
|
|
83760
83767
|
value: !0
|
|
83761
83768
|
});
|
|
83762
|
-
var Jhe = pB.default = void 0,
|
|
83763
|
-
Jhe = pB.default = (0,
|
|
83769
|
+
var Jhe = pB.default = void 0, cft = lft(ro()), uft = M;
|
|
83770
|
+
Jhe = pB.default = (0, cft.default)(/* @__PURE__ */ (0, uft.jsx)("path", {
|
|
83764
83771
|
d: "M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"
|
|
83765
83772
|
}), "CalendarToday");
|
|
83766
|
-
var fB = {},
|
|
83773
|
+
var fB = {}, dft = Gr;
|
|
83767
83774
|
Object.defineProperty(fB, "__esModule", {
|
|
83768
83775
|
value: !0
|
|
83769
83776
|
});
|
|
83770
|
-
var l7 = fB.default = void 0,
|
|
83771
|
-
l7 = fB.default = (0,
|
|
83777
|
+
var l7 = fB.default = void 0, pft = dft(ro()), fft = M;
|
|
83778
|
+
l7 = fB.default = (0, pft.default)(/* @__PURE__ */ (0, fft.jsx)("path", {
|
|
83772
83779
|
d: "M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"
|
|
83773
83780
|
}), "Send");
|
|
83774
|
-
var hB = {},
|
|
83781
|
+
var hB = {}, hft = Gr;
|
|
83775
83782
|
Object.defineProperty(hB, "__esModule", {
|
|
83776
83783
|
value: !0
|
|
83777
83784
|
});
|
|
83778
|
-
var mB = hB.default = void 0,
|
|
83779
|
-
mB = hB.default = (0,
|
|
83785
|
+
var mB = hB.default = void 0, mft = hft(ro()), gft = M;
|
|
83786
|
+
mB = hB.default = (0, mft.default)(/* @__PURE__ */ (0, gft.jsx)("path", {
|
|
83780
83787
|
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M9 17H7v-5h2zm4 0h-2v-3h2zm0-5h-2v-2h2zm4 5h-2V7h2z"
|
|
83781
83788
|
}), "Analytics");
|
|
83782
|
-
var gB = {},
|
|
83789
|
+
var gB = {}, vft = Gr;
|
|
83783
83790
|
Object.defineProperty(gB, "__esModule", {
|
|
83784
83791
|
value: !0
|
|
83785
83792
|
});
|
|
83786
|
-
var vB = gB.default = void 0,
|
|
83787
|
-
vB = gB.default = (0,
|
|
83793
|
+
var vB = gB.default = void 0, yft = vft(ro()), bft = M;
|
|
83794
|
+
vB = gB.default = (0, yft.default)(/* @__PURE__ */ (0, bft.jsx)("path", {
|
|
83788
83795
|
d: "m18.85 10.39 1.06-1.06c.78-.78.78-2.05 0-2.83L18.5 5.09c-.78-.78-2.05-.78-2.83 0l-1.06 1.06zm-5.66-2.83L4 16.76V21h4.24l9.19-9.19zM19 17.5c0 2.19-2.54 3.5-5 3.5-.55 0-1-.45-1-1s.45-1 1-1c1.54 0 3-.73 3-1.5 0-.47-.48-.87-1.23-1.2l1.48-1.48c1.07.63 1.75 1.47 1.75 2.68M4.58 13.35C3.61 12.79 3 12.06 3 11c0-1.8 1.89-2.63 3.56-3.36C7.59 7.18 9 6.56 9 6c0-.41-.78-1-2-1-1.26 0-1.8.61-1.83.64-.35.41-.98.46-1.4.12-.41-.34-.49-.95-.15-1.38C3.73 4.24 4.76 3 7 3s4 1.32 4 3c0 1.87-1.93 2.72-3.64 3.47C6.42 9.88 5 10.5 5 11c0 .31.43.6 1.07.86z"
|
|
83789
83796
|
}), "Draw");
|
|
83790
|
-
var yB = {},
|
|
83797
|
+
var yB = {}, xft = Gr;
|
|
83791
83798
|
Object.defineProperty(yB, "__esModule", {
|
|
83792
83799
|
value: !0
|
|
83793
83800
|
});
|
|
83794
|
-
var bB = yB.default = void 0,
|
|
83795
|
-
bB = yB.default = (0,
|
|
83801
|
+
var bB = yB.default = void 0, wft = xft(ro()), Cft = M;
|
|
83802
|
+
bB = yB.default = (0, wft.default)(/* @__PURE__ */ (0, Cft.jsx)("path", {
|
|
83796
83803
|
d: "M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3 1 9l11 6 9-4.91V17h2V9z"
|
|
83797
83804
|
}), "School");
|
|
83798
|
-
var xB = {},
|
|
83805
|
+
var xB = {}, Sft = Gr;
|
|
83799
83806
|
Object.defineProperty(xB, "__esModule", {
|
|
83800
83807
|
value: !0
|
|
83801
83808
|
});
|
|
83802
|
-
var wB = xB.default = void 0,
|
|
83803
|
-
wB = xB.default = (0,
|
|
83809
|
+
var wB = xB.default = void 0, Oft = Sft(ro()), Tft = M;
|
|
83810
|
+
wB = xB.default = (0, Oft.default)(/* @__PURE__ */ (0, Tft.jsx)("path", {
|
|
83804
83811
|
d: "M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2m-9-1c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m13-6v11c0 1.1-.9 2-2 2H4v-2h17V7z"
|
|
83805
83812
|
}), "Payments");
|
|
83806
|
-
var CB = {},
|
|
83813
|
+
var CB = {}, Mft = Gr;
|
|
83807
83814
|
Object.defineProperty(CB, "__esModule", {
|
|
83808
83815
|
value: !0
|
|
83809
83816
|
});
|
|
83810
|
-
var SB = CB.default = void 0,
|
|
83811
|
-
SB = CB.default = (0,
|
|
83817
|
+
var SB = CB.default = void 0, kft = Mft(ro()), Eft = M;
|
|
83818
|
+
SB = CB.default = (0, kft.default)(/* @__PURE__ */ (0, Eft.jsx)("path", {
|
|
83812
83819
|
d: "M12 4H5C3.34 4 2 5.34 2 7v8c0 1.66 1.34 3 3 3l-1 1v1h1l2-2.03L9 18v-5H4V5.98L13 6v2h2V7c0-1.66-1.34-3-3-3M5 14c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m15.57-4.34c-.14-.4-.52-.66-.97-.66h-7.19c-.46 0-.83.26-.98.66L10 13.77l.01 5.51c0 .38.31.72.69.72h.62c.38 0 .68-.38.68-.76V18h8v1.24c0 .38.31.76.69.76h.61c.38 0 .69-.34.69-.72l.01-1.37v-4.14zm-8.16.34h7.19l1.03 3h-9.25zM12 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m8 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1"
|
|
83813
83820
|
}), "Commute");
|
|
83814
|
-
var OB = {},
|
|
83821
|
+
var OB = {}, Ift = Gr;
|
|
83815
83822
|
Object.defineProperty(OB, "__esModule", {
|
|
83816
83823
|
value: !0
|
|
83817
83824
|
});
|
|
83818
|
-
var TB = OB.default = void 0,
|
|
83819
|
-
TB = OB.default = (0,
|
|
83825
|
+
var TB = OB.default = void 0, Pft = Ift(ro()), $K = M;
|
|
83826
|
+
TB = OB.default = (0, Pft.default)([/* @__PURE__ */ (0, $K.jsx)("path", {
|
|
83820
83827
|
d: "M19 6h-1V1H6v5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2M8 3h8v3H8zm4 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"
|
|
83821
83828
|
}, "0"), /* @__PURE__ */ (0, $K.jsx)("path", {
|
|
83822
83829
|
d: "M12.5 11.5h-1v2.71l1.64 1.64.71-.71-1.35-1.35z"
|
|
83823
83830
|
}, "1")], "PunchClock");
|
|
83824
|
-
var MB = {},
|
|
83831
|
+
var MB = {}, Rft = Gr;
|
|
83825
83832
|
Object.defineProperty(MB, "__esModule", {
|
|
83826
83833
|
value: !0
|
|
83827
83834
|
});
|
|
83828
|
-
var kB = MB.default = void 0,
|
|
83829
|
-
kB = MB.default = (0,
|
|
83835
|
+
var kB = MB.default = void 0, Aft = Rft(ro()), Dft = M;
|
|
83836
|
+
kB = MB.default = (0, Aft.default)(/* @__PURE__ */ (0, Dft.jsx)("path", {
|
|
83830
83837
|
d: "M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"
|
|
83831
83838
|
}), "GroupAdd");
|
|
83832
|
-
var EB = {},
|
|
83839
|
+
var EB = {}, _ft = Gr;
|
|
83833
83840
|
Object.defineProperty(EB, "__esModule", {
|
|
83834
83841
|
value: !0
|
|
83835
83842
|
});
|
|
83836
|
-
var IB = EB.default = void 0,
|
|
83837
|
-
IB = EB.default = (0,
|
|
83843
|
+
var IB = EB.default = void 0, jft = _ft(ro()), Nft = M;
|
|
83844
|
+
IB = EB.default = (0, jft.default)(/* @__PURE__ */ (0, Nft.jsx)("path", {
|
|
83838
83845
|
d: "m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"
|
|
83839
83846
|
}), "AutoAwesome");
|
|
83840
83847
|
const YT = {
|
|
83841
83848
|
LIST_VIEW: "LIST_VIEW",
|
|
83842
83849
|
INVOICE_VIEW: "INVOICE_VIEW"
|
|
83843
|
-
},
|
|
83850
|
+
}, Fft = {
|
|
83844
83851
|
1: "Paid",
|
|
83845
83852
|
2: "Unpaid",
|
|
83846
83853
|
3: "Decline",
|
|
83847
83854
|
0: " "
|
|
83848
|
-
},
|
|
83855
|
+
}, Lft = {
|
|
83849
83856
|
Analytics: M.jsx(mB, { sx: { color: "#335AFF", fontSize: "1.5rem" } }),
|
|
83850
83857
|
"Digital Signature": M.jsx(vB, { sx: { color: "#335AFF", fontSize: "1.5rem" } }),
|
|
83851
83858
|
Learn: M.jsx(bB, { sx: { color: "#335AFF", fontSize: "1.5rem" } }),
|
|
@@ -83853,7 +83860,7 @@ const YT = {
|
|
|
83853
83860
|
Trip: M.jsx(SB, { sx: { color: "#335AFF", fontSize: "1.5rem" } }),
|
|
83854
83861
|
Timesheet: M.jsx(TB, { sx: { color: "#335AFF", fontSize: "1.5rem" } }),
|
|
83855
83862
|
Recruit: M.jsx(kB, { sx: { color: "#335AFF", fontSize: "1.5rem" } })
|
|
83856
|
-
},
|
|
83863
|
+
}, dmt = (e) => {
|
|
83857
83864
|
var k, E, R, _, j, A, D, N, L, B, V, H, G;
|
|
83858
83865
|
const { onTabChange: n } = e, [t, r] = Jt(YT.LIST_VIEW), o = [
|
|
83859
83866
|
{ id: 1, name: "Monthly" },
|
|
@@ -83928,7 +83935,7 @@ const YT = {
|
|
|
83928
83935
|
}
|
|
83929
83936
|
];
|
|
83930
83937
|
}, [p]);
|
|
83931
|
-
return M.jsxs("div", { className: "w-100", children: [M.jsx(Of, { visible: f || m || w }), t === YT.LIST_VIEW ? M.jsxs(Cn, { container: !0, spacing: 2, children: [x.map((Y) => M.jsx(Cn, { item: !0, xs: 12, sm: 6, lg: 4, children: M.jsx(
|
|
83938
|
+
return M.jsxs("div", { className: "w-100", children: [M.jsx(Of, { visible: f || m || w }), t === YT.LIST_VIEW ? M.jsxs(Cn, { container: !0, spacing: 2, children: [x.map((Y) => M.jsx(Cn, { item: !0, xs: 12, sm: 6, lg: 4, children: M.jsx(Vpt, { data: Y }) })), M.jsx(tft, { orgDetails: p == null ? void 0 : p.orgInfo }), M.jsxs(Cn, { item: !0, xs: 12, sm: 6, lg: 8, children: [M.jsxs("div", { className: `${ks.card_container}`, style: { marginBlockEnd: "1rem" }, children: [M.jsx("div", { className: "flex-between-center mb-10", children: M.jsxs("span", { className: `${ks.card_count}`, children: ["Last ", Fft[(k = p == null ? void 0 : p.openInvoice) == null ? void 0 : k.payment_status] || "", " Invoice"] }) }), M.jsx(Ja, {}), M.jsxs("div", { className: "flex-between-center", children: [M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", { children: "Due By" }), M.jsx("span", { className: `${ks.card_subtitles}`, children: (E = p == null ? void 0 : p.openInvoice) != null && E.invoice_due_date ? new Date(p.openInvoice.invoice_due_date).toLocaleDateString("en-GB") : "-" })] }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", { children: "Amount" }), M.jsxs("span", { className: `${ks.card_subtitles}`, children: [((R = p == null ? void 0 : p.openInvoice) == null ? void 0 : R.currency_symbol) || "₹", " ", (j = (_ = p == null ? void 0 : p.openInvoice) == null ? void 0 : _.grand_total_amount) != null ? j : "-"] })] }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", { children: "Invoice" }), M.jsx("div", { style: { margin: "auto" }, children: M.jsx("span", { children: M.jsx(sft, { style: { fontSize: "24px", color: "red", cursor: "pointer" }, onClick: () => C(!0) }) }) })] }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", {}), M.jsx("span", { children: ((A = p == null ? void 0 : p.openInvoice) == null ? void 0 : A.payment_status) === 2 && M.jsx(aa, { disabled: h, label: "Pay Here", style: { height: "36px" }, onClick: O }) })] })] })] }), M.jsxs("div", { className: `${ks.card_container} g-10`, style: { marginBlockEnd: "1rem" }, children: [M.jsx("div", { className: "flex-between-center", children: M.jsxs("span", { className: `${ks.card_count}`, children: ["Plan Details ", M.jsxs("span", { style: { fontSize: "18px", fontWeight: "800" }, children: ["(", (D = p == null ? void 0 : p.planDetails) == null ? void 0 : D.current_plan, ")"] })] }) }), M.jsx(Ja, {}), M.jsx("div", { className: "flex-between-center", children: [
|
|
83932
83939
|
// {
|
|
83933
83940
|
// label: "Current Plan",
|
|
83934
83941
|
// value: overviewData?.planDetails?.current_plan,
|
|
@@ -83982,7 +83989,7 @@ const YT = {
|
|
|
83982
83989
|
display: "flex",
|
|
83983
83990
|
alignItems: "center",
|
|
83984
83991
|
justifyContent: "center"
|
|
83985
|
-
}, children:
|
|
83992
|
+
}, children: Lft[Y.product_name] || M.jsx(IB, { sx: { color: "#335AFF", fontSize: "1.5rem" } }) }), M.jsx("span", { className: `${ks.card_subtitles}`, children: Y.product_name })] }, U)) : M.jsx(w0, { message: "No Add Ons Found" }) })] })] }), M.jsx(Cn, { item: !0, xs: 6, sm: 6, lg: 4, children: M.jsx("div", { className: `${ks.card_container} g-10`, style: { height: "100%" }, children: Jr.validateDataType(p == null ? void 0 : p.usageCredit, _i.ARRAY) ? M.jsxs(M.Fragment, { children: [M.jsxs("span", { className: `${ks.card_count}`, children: ["User Counts", " ", M.jsx(s0, { title: "Active Employees", children: M.jsxs("span", { children: ["(", (G = (H = p == null ? void 0 : p.employee_details) == null ? void 0 : H.active_employee) != null ? G : "--", ")"] }) })] }), M.jsx(Xat, { type: ppt.COLUMN, data: p.usageCredit, xField: "APP_MODULE", yField: "TOTAL_USER_COUNT", xAxisTitle: "", styles: {
|
|
83986
83993
|
height: "310px",
|
|
83987
83994
|
width: "100%"
|
|
83988
83995
|
}, defaultGroupBy: "", selectedGroupBy: "" }), M.jsx(Cn, { container: !0, spacing: 1, children: p.usageCredit.map((Y) => {
|
|
@@ -84003,39 +84010,39 @@ const YT = {
|
|
|
84003
84010
|
background: "white",
|
|
84004
84011
|
zIndex: 100
|
|
84005
84012
|
}, elevation: 3, children: M.jsx(gb, { direction: "row", gap: 2, justifyContent: "flex-end", children: M.jsx(aa, { label: "Go Back To List", size: "small", variant: "contained", color: "primary", onClick: () => r(YT.LIST_VIEW) }) }) })] })] });
|
|
84006
|
-
},
|
|
84007
|
-
card_container:
|
|
84008
|
-
plan_card:
|
|
84009
|
-
discount_card:
|
|
84010
|
-
plan_total_count:
|
|
84011
|
-
card_count:
|
|
84012
|
-
card_subtitles:
|
|
84013
|
+
}, Bft = "_card_container_1iza3_1", Vft = "_plan_card_1iza3_13", $ft = "_discount_card_1iza3_27", zft = "_plan_total_count_1iza3_40", Wft = "_card_count_1iza3_45", Hft = "_card_subtitles_1iza3_50", ol = {
|
|
84014
|
+
card_container: Bft,
|
|
84015
|
+
plan_card: Vft,
|
|
84016
|
+
discount_card: $ft,
|
|
84017
|
+
plan_total_count: zft,
|
|
84018
|
+
card_count: Wft,
|
|
84019
|
+
card_subtitles: Hft
|
|
84013
84020
|
};
|
|
84014
|
-
var PB = {},
|
|
84021
|
+
var PB = {}, Gft = Gr;
|
|
84015
84022
|
Object.defineProperty(PB, "__esModule", {
|
|
84016
84023
|
value: !0
|
|
84017
84024
|
});
|
|
84018
|
-
var Khe = PB.default = void 0,
|
|
84019
|
-
Khe = PB.default = (0,
|
|
84025
|
+
var Khe = PB.default = void 0, Yft = Gft(ro()), Uft = M;
|
|
84026
|
+
Khe = PB.default = (0, Yft.default)(/* @__PURE__ */ (0, Uft.jsx)("path", {
|
|
84020
84027
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20"
|
|
84021
84028
|
}), "AccountCircle");
|
|
84022
|
-
var RB = {},
|
|
84029
|
+
var RB = {}, Xft = Gr;
|
|
84023
84030
|
Object.defineProperty(RB, "__esModule", {
|
|
84024
84031
|
value: !0
|
|
84025
84032
|
});
|
|
84026
|
-
var Qhe = RB.default = void 0,
|
|
84027
|
-
Qhe = RB.default = (0,
|
|
84033
|
+
var Qhe = RB.default = void 0, qft = Xft(ro()), Zft = M;
|
|
84034
|
+
Qhe = RB.default = (0, qft.default)(/* @__PURE__ */ (0, Zft.jsx)("path", {
|
|
84028
84035
|
d: "M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2m0 14H4v-6h16zm0-10H4V6h16z"
|
|
84029
84036
|
}), "CreditCard");
|
|
84030
|
-
var AB = {},
|
|
84037
|
+
var AB = {}, Jft = Gr;
|
|
84031
84038
|
Object.defineProperty(AB, "__esModule", {
|
|
84032
84039
|
value: !0
|
|
84033
84040
|
});
|
|
84034
|
-
var eme = AB.default = void 0,
|
|
84035
|
-
eme = AB.default = (0,
|
|
84041
|
+
var eme = AB.default = void 0, Kft = Jft(ro()), Qft = M;
|
|
84042
|
+
eme = AB.default = (0, Kft.default)(/* @__PURE__ */ (0, Qft.jsx)("path", {
|
|
84036
84043
|
d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"
|
|
84037
84044
|
}), "Lock");
|
|
84038
|
-
const
|
|
84045
|
+
const pmt = () => {
|
|
84039
84046
|
const [e, n] = Jt(Ai()), t = (r) => {
|
|
84040
84047
|
n(r);
|
|
84041
84048
|
};
|
|
@@ -84053,14 +84060,14 @@ const dmt = () => {
|
|
|
84053
84060
|
suffix: M.jsx(eme, {}),
|
|
84054
84061
|
sx: { width: "50%" }
|
|
84055
84062
|
})] })] }), M.jsxs("div", { className: "flex-between-center", children: [M.jsxs("div", { className: "flex-start-center g-10", children: [M.jsx(B2, { checked: !1 }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", { className: `${ol.card_subtitles}`, children: "Wallet" }), M.jsx("span", { style: { color: "#615E69" }, children: "Make payment directly through Wallet" })] })] }), M.jsx("div", { className: "flex-end-center g-10" })] }), M.jsxs("div", { className: "flex-between-center", children: [M.jsxs("div", { className: "flex-start-center g-10", children: [M.jsx(B2, { checked: !1 }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", { className: `${ol.card_subtitles}`, children: "Paytm/Google Pay/Phone pe/BHIM UPI" }), M.jsx("span", { style: { color: "#615E69" }, children: "Make payment through Gpay, Paypal, Paytm etc" })] })] }), M.jsx("div", { className: "flex-end-center g-10" })] }), M.jsxs("div", { className: "flex-between-center", children: [M.jsxs("div", { className: "flex-start-center g-10", children: [M.jsx(B2, { checked: !1 }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", { className: `${ol.card_subtitles}`, children: "Net banking" }), M.jsx("span", { style: { color: "#615E69" }, children: "Make payment directly through bank account." })] })] }), M.jsx("div", { className: "flex-end-center g-10" })] })] }), M.jsx(aa, { label: "Pay $164.23", className: "w-100" })] }), M.jsxs(Cn, { item: !0, xs: 12, sm: 12, lg: 5, children: [M.jsxs("div", { className: "flex-start-center g-20 mb-10", children: [M.jsxs("div", { className: `${ol.plan_card} g-10`, style: { background: "#0055FF1A", border: "1px solid #335AFF" }, children: [M.jsx("span", { className: `${ol.card_count}`, children: "$10/mth" }), M.jsx("span", { className: `${ol.card_subtitles}`, children: "Basic Plan" }), M.jsx("span", { children: "Billed Quarterly" })] }), M.jsxs("div", { className: `${ol.plan_card} g-10`, children: [M.jsx("span", { className: `${ol.card_count}`, children: "$8/mth" }), M.jsx("span", { className: `${ol.card_subtitles}`, children: "Basic Plan" }), M.jsx("span", { children: "Billed Quarterly" }), M.jsx("div", { className: `${ol.discount_card}`, children: M.jsx("span", { children: "-20%" }) })] })] }), M.jsxs("div", { className: "mb-20", children: [M.jsx("div", { className: "mb-10", children: M.jsx("span", { className: `${ol.card_subtitles}`, style: { color: "#615E69" }, children: "Gift Card/ Discount Code" }) }), M.jsxs("div", { className: "flex-between-center g-10", children: [M.jsx(qp, { style: { width: "70%" } }), M.jsx(aa, { label: "Apply", variant: "outlined", sx: { width: "30%" } })] })] }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsxs("div", { className: "flex-between-center", children: [M.jsx("span", { children: "Subtotal" }), M.jsx("span", { children: "$160" })] }), M.jsx(Ja, {}), M.jsxs("div", { className: "flex-between-center", children: [M.jsx("span", { children: "Sales tax(6.5%)" }), M.jsx("span", { children: "$4,23" })] }), M.jsx(Ja, {}), M.jsxs("div", { className: `flex-between-center ${ol.plan_total_count}`, children: [M.jsx("span", { children: "Total Due" }), M.jsx("span", { children: "$164.23" })] })] })] })] }) });
|
|
84056
|
-
},
|
|
84057
|
-
card_container:
|
|
84058
|
-
plans:
|
|
84059
|
-
add_ons:
|
|
84060
|
-
card_subtitles:
|
|
84061
|
-
plan_headers:
|
|
84062
|
-
card_content:
|
|
84063
|
-
},
|
|
84063
|
+
}, eht = "_card_container_1tgxf_1", tht = "_plans_1tgxf_11", nht = "_add_ons_1tgxf_14", rht = "_card_subtitles_1tgxf_28", oht = "_plan_headers_1tgxf_55", iht = "_card_content_1tgxf_63", jp = {
|
|
84064
|
+
card_container: eht,
|
|
84065
|
+
plans: tht,
|
|
84066
|
+
add_ons: nht,
|
|
84067
|
+
card_subtitles: rht,
|
|
84068
|
+
plan_headers: oht,
|
|
84069
|
+
card_content: iht
|
|
84070
|
+
}, aht = {
|
|
84064
84071
|
plans: {
|
|
84065
84072
|
Basic: {
|
|
84066
84073
|
"Core HR": ["Employee", "Time & Attendance", "Document", "Policy", "Workflow", "Roles & Permission", "Transfer & Probation"],
|
|
@@ -84080,7 +84087,7 @@ const dmt = () => {
|
|
|
84080
84087
|
"Global Payroll": ["Contract", "Multi-Entry", "Multi-Country", "Multi-Currency"]
|
|
84081
84088
|
}
|
|
84082
84089
|
}
|
|
84083
|
-
},
|
|
84090
|
+
}, fmt = (e) => {
|
|
84084
84091
|
var f;
|
|
84085
84092
|
const { onTabChange: n } = e, [t, r] = Jt(!1);
|
|
84086
84093
|
iS();
|
|
@@ -84096,7 +84103,7 @@ const dmt = () => {
|
|
|
84096
84103
|
Trip: M.jsx(SB, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
84097
84104
|
Timesheet: M.jsx(TB, { sx: { color: "#335AFF", fontSize: "2.5rem" } }),
|
|
84098
84105
|
Recruit: M.jsx(kB, { sx: { color: "#335AFF", fontSize: "2.5rem" } })
|
|
84099
|
-
}, s =
|
|
84106
|
+
}, s = aht, l = !1, { isDisabled: c } = C0({
|
|
84100
84107
|
url: Gbe
|
|
84101
84108
|
}), { data: d } = Ku(Qh, {
|
|
84102
84109
|
url: EQ,
|
|
@@ -84167,13 +84174,13 @@ const dmt = () => {
|
|
|
84167
84174
|
fontWeight: 600,
|
|
84168
84175
|
lineHeight: 1.4
|
|
84169
84176
|
}, children: g.product_name })] }) }) }, g.product_id)) }) : M.jsx(Cn, { item: !0, xs: 12, children: M.jsx(w0, { message: "No Add Ons Found" }) }), M.jsxs(rC, { open: t, onClose: () => r(!1), maxWidth: "xs", fullWidth: !0, children: [M.jsx(eM, { sx: { fontWeight: 600, textAlign: "center", color: "#1976D2" }, children: "Contact Your SPOC" }), M.jsx(iC, { children: M.jsx("div", { style: { textAlign: "center", fontSize: "15px", padding: "10px 0" }, children: "To upgrade your plan, please contact your SPOC." }) }), M.jsx(oC, { sx: { justifyContent: "center" }, children: M.jsx($p, { variant: "contained", color: "primary", onClick: () => r(!1), children: "Close" }) })] }), M.jsx(Cn, { item: !0, xs: 12, children: M.jsx("div", { className: "flex-end-center", children: M.jsx(aa, { label: "Upgrade", onClick: () => r(!0), disabled: c }) }) })] })] });
|
|
84170
|
-
},
|
|
84171
|
-
card_container:
|
|
84172
|
-
card_titles:
|
|
84173
|
-
card_subtitles:
|
|
84174
|
-
card_subtotal:
|
|
84175
|
-
card_headers:
|
|
84176
|
-
card_content:
|
|
84177
|
+
}, sht = "_card_container_vce56_1", lht = "_card_titles_vce56_13", cht = "_card_subtitles_vce56_18", uht = "_card_subtotal_vce56_23", dht = "_card_headers_vce56_40", pht = "_card_content_vce56_48", cg = {
|
|
84178
|
+
card_container: sht,
|
|
84179
|
+
card_titles: lht,
|
|
84180
|
+
card_subtitles: cht,
|
|
84181
|
+
card_subtotal: uht,
|
|
84182
|
+
card_headers: dht,
|
|
84183
|
+
card_content: pht
|
|
84177
84184
|
}, tme = (e) => {
|
|
84178
84185
|
const { open: n, setIsOpen: t } = e, r = Wb(), { session: { API_BASE_URL: o, mode: i } } = em(), a = iS(), [s, l] = Jt({
|
|
84179
84186
|
amount: "",
|
|
@@ -84207,7 +84214,7 @@ const dmt = () => {
|
|
|
84207
84214
|
const { name: m, value: v } = h.target;
|
|
84208
84215
|
g(m, v);
|
|
84209
84216
|
}, className: "w-100 mb-10" }), M.jsxs("div", { className: "flex-end-center g-10", children: [M.jsx(aa, { label: "Cancel", variant: "outlined", onClick: p }), M.jsx(aa, { label: "Submit", disabled: d, onClick: f })] })] }) });
|
|
84210
|
-
},
|
|
84217
|
+
}, hmt = (e) => {
|
|
84211
84218
|
const { onTabChange: n } = e, t = Wb(), { session: { API_BASE_URL: r, mode: o } } = em(), [i, a] = Jt(!1), { data: s, isFetching: l } = Ku(Qh, {
|
|
84212
84219
|
url: Vbe,
|
|
84213
84220
|
params: {}
|
|
@@ -84231,35 +84238,35 @@ const dmt = () => {
|
|
|
84231
84238
|
} }) }) }), Jr.validateDataType(s == null ? void 0 : s.header, _i.ARRAY) ? s == null ? void 0 : s.header.map((h) => M.jsx(Cn, { item: !0, xs: 12, sm: 12, md: 4, lg: 4, children: M.jsxs("div", { className: cg.card_container, children: [M.jsx("div", { className: cg.card_headers, children: M.jsx("span", { className: cg.card_titles, style: { color: "#335AFF" }, children: h }) }), M.jsx(Ja, { className: "mb-10" }), Jr.validateDataType(s == null ? void 0 : s.resultRows, _i.ARRAY) ? s.resultRows.map((m, v, b) => M.jsxs(M.Fragment, { children: [M.jsx("div", { className: cg.card_content, children: Jr.validateDataType(m == null ? void 0 : m[h], _i.ARRAY) ? m == null ? void 0 : m[h].map((w) => M.jsx(M.Fragment, { children: M.jsx("span", { className: `${h === "Plan" ? cg.card_titles : ""}`, children: h === "Price" ? `Rs ${w}` : w }) })) : M.jsx(M.Fragment, {}) }), v !== b.length - 1 ? M.jsx(Ja, { className: "mb-10" }) : M.jsx(M.Fragment, {})] })) : M.jsx(M.Fragment, {})] }) })) : M.jsx(w0, { message: "No Plans Found" }), Jr.validateDataType(s == null ? void 0 : s.subtotal, _i.ARRAY) ? s.subtotal.map((h) => M.jsxs(Cn, { item: !0, xs: 12, children: [M.jsxs("div", { className: `flex-between-center mb-10 ${h.name === "Total" ? cg.card_subtitles : cg.card_subtotal}`, children: [M.jsx("span", { children: h.name }), M.jsxs("span", { children: ["Rs ", h.amount] })] }), M.jsx(Ja, {})] })) : M.jsx(M.Fragment, {}), M.jsx(Cn, { item: !0, xs: 12, children: M.jsxs("div", { className: "flex-end-center g-10", children: [M.jsx(aa, { label: "Renew", variant: "outlined", disabled: d, onClick: g }), M.jsx(aa, { label: "Modify Subscription", onClick: () => {
|
|
84232
84239
|
n(2);
|
|
84233
84240
|
} })] }) })] }), i && M.jsx(tme, { open: i, setIsOpen: a })] });
|
|
84234
|
-
},
|
|
84235
|
-
card_container:
|
|
84236
|
-
card_subtitles:
|
|
84237
|
-
icons_background:
|
|
84241
|
+
}, fht = "_card_container_1ts8v_1", hht = "_card_subtitles_1ts8v_18", mht = "_icons_background_1ts8v_23", Fu = {
|
|
84242
|
+
card_container: fht,
|
|
84243
|
+
card_subtitles: hht,
|
|
84244
|
+
icons_background: mht
|
|
84238
84245
|
};
|
|
84239
|
-
function
|
|
84246
|
+
function ght(e) {
|
|
84240
84247
|
return iB({ attr: { viewBox: "0 0 640 512" }, child: [{ tag: "path", attr: { d: "M535 41c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l64 64c4.5 4.5 7 10.6 7 17s-2.5 12.5-7 17l-64 64c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l23-23L384 112c-13.3 0-24-10.7-24-24s10.7-24 24-24l174.1 0L535 41zM105 377l-23 23L256 400c13.3 0 24 10.7 24 24s-10.7 24-24 24L81.9 448l23 23c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L7 441c-4.5-4.5-7-10.6-7-17s2.5-12.5 7-17l64-64c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM96 64l241.9 0c-3.7 7.2-5.9 15.3-5.9 24c0 28.7 23.3 52 52 52l117.4 0c-4 17 .6 35.5 13.8 48.8c20.3 20.3 53.2 20.3 73.5 0L608 169.5 608 384c0 35.3-28.7 64-64 64l-241.9 0c3.7-7.2 5.9-15.3 5.9-24c0-28.7-23.3-52-52-52l-117.4 0c4-17-.6-35.5-13.8-48.8c-20.3-20.3-53.2-20.3-73.5 0L32 342.5 32 128c0-35.3 28.7-64 64-64zm64 64l-64 0 0 64c35.3 0 64-28.7 64-64zM544 320c-35.3 0-64 28.7-64 64l64 0 0-64zM320 352a96 96 0 1 0 0-192 96 96 0 1 0 0 192z" }, child: [] }] })(e);
|
|
84241
84248
|
}
|
|
84242
|
-
var DB = {},
|
|
84249
|
+
var DB = {}, vht = Gr;
|
|
84243
84250
|
Object.defineProperty(DB, "__esModule", {
|
|
84244
84251
|
value: !0
|
|
84245
84252
|
});
|
|
84246
|
-
var c7 = DB.default = void 0,
|
|
84247
|
-
c7 = DB.default = (0,
|
|
84253
|
+
var c7 = DB.default = void 0, yht = vht(ro()), bht = M;
|
|
84254
|
+
c7 = DB.default = (0, yht.default)(/* @__PURE__ */ (0, bht.jsx)("path", {
|
|
84248
84255
|
d: "M18 4H6C3.79 4 2 5.79 2 8v8c0 2.21 1.79 4 4 4h12c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4m-1.86 9.77c-.24.2-.57.28-.88.2L4.15 11.25C4.45 10.52 5.16 10 6 10h12c.67 0 1.26.34 1.63.84zM6 6h12c1.1 0 2 .9 2 2v.55c-.59-.34-1.27-.55-2-.55H6c-.73 0-1.41.21-2 .55V8c0-1.1.9-2 2-2"
|
|
84249
84256
|
}), "Wallet");
|
|
84250
|
-
var _B = {},
|
|
84257
|
+
var _B = {}, xht = Gr;
|
|
84251
84258
|
Object.defineProperty(_B, "__esModule", {
|
|
84252
84259
|
value: !0
|
|
84253
84260
|
});
|
|
84254
|
-
var nme = _B.default = void 0,
|
|
84255
|
-
nme = _B.default = (0,
|
|
84261
|
+
var nme = _B.default = void 0, wht = xht(ro()), Cht = M;
|
|
84262
|
+
nme = _B.default = (0, wht.default)(/* @__PURE__ */ (0, Cht.jsx)("path", {
|
|
84256
84263
|
d: "M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"
|
|
84257
84264
|
}), "InfoOutlined");
|
|
84258
84265
|
const zK = [
|
|
84259
84266
|
{ label: "Credit Card", value: "cc" },
|
|
84260
84267
|
{ label: "Debit Card", value: "dc" },
|
|
84261
84268
|
{ label: "New Banking", value: "nb" }
|
|
84262
|
-
],
|
|
84269
|
+
], mmt = () => {
|
|
84263
84270
|
var g, h, m, v;
|
|
84264
84271
|
const [e, n] = Jt(!1), [t, r] = Jt(!1), [o, i] = Jt({}), { data: a, isFetching: s } = Ku(Qh, {
|
|
84265
84272
|
url: $be,
|
|
@@ -84327,7 +84334,7 @@ const zK = [
|
|
|
84327
84334
|
cell: (b) => M.jsx("span", { className: `${Fu.card_subtitles}`, style: { color: "#8B8684 " }, children: b })
|
|
84328
84335
|
}
|
|
84329
84336
|
], [a]);
|
|
84330
|
-
return M.jsxs("div", { children: [M.jsx(Of, { visible: s }), M.jsxs(Cn, { container: !0, spacing: 2, children: [M.jsx(Cn, { item: !0, xs: 6, sm: 6, lg: 4, children: M.jsxs("div", { className: `${Fu.card_container}`, children: [M.jsx("div", { style: { margin: "auto" }, children: M.jsx("span", { style: { background: "#027A481A", margin: "inherit" }, className: Fu.icons_background, children: M.jsx(
|
|
84337
|
+
return M.jsxs("div", { children: [M.jsx(Of, { visible: s }), M.jsxs(Cn, { container: !0, spacing: 2, children: [M.jsx(Cn, { item: !0, xs: 6, sm: 6, lg: 4, children: M.jsxs("div", { className: `${Fu.card_container}`, children: [M.jsx("div", { style: { margin: "auto" }, children: M.jsx("span", { style: { background: "#027A481A", margin: "inherit" }, className: Fu.icons_background, children: M.jsx(ght, { style: { color: "#027A48", fontSize: "2rem" } }) }) }), M.jsx("div", { style: { margin: "auto" }, children: M.jsx(aa, { label: "Add Money", variant: "outlined", startIcon: M.jsx(w6, {}), onClick: () => {
|
|
84331
84338
|
l();
|
|
84332
84339
|
} }) })] }) }), M.jsx(Cn, { item: !0, xs: 6, sm: 6, lg: 4, children: M.jsx("div", { className: `${Fu.card_container}`, children: M.jsxs("div", { className: "flex-between-center g-20", style: { margin: "auto" }, children: [M.jsx("span", { style: { background: "#0237671A", margin: "inherit" }, className: Fu.icons_background, children: M.jsx(c7, { style: { color: "#023767", fontSize: "2rem" } }) }), M.jsxs("div", { className: "flex-start-column g-10", children: [M.jsx("span", { children: "Wallet Balance" }), M.jsxs("span", { className: `${Fu.card_subtitles}`, children: ["Rs ", (h = (g = a == null ? void 0 : a.overview) == null ? void 0 : g.balance) != null ? h : "--"] })] })] }) }) }), M.jsx(Cn, { item: !0, xs: 6, sm: 6, lg: 4, children: M.jsxs("div", { className: `${Fu.card_container}`, children: [M.jsxs("div", { className: "flex-between-center g-20", style: { margin: "auto" }, children: [M.jsx("span", { style: { background: "#335AFF1A", margin: "inherit" }, className: Fu.icons_background, children: M.jsx(c7, { style: { color: "#335AFF", fontSize: "2rem" } }) }), M.jsx("span", { className: `${Fu.card_subtitles}`, children: "Automatic Topup" })] }), M.jsxs("div", { className: "flex-end-center g-10", children: [M.jsx(aa, { label: "Set Up", onClick: c }), M.jsx(s0, { title: "Whenever your balance goes below, top up your wallet automatically", children: M.jsx(nme, { className: "cursor-pointer" }) })] })] }) }), M.jsx(Cn, { item: !0, xs: 12, sm: 12, lg: 12, children: M.jsxs("div", { className: `${Fu.card_container} g-10`, children: [M.jsx("span", { className: `${Fu.card_subtitles}`, children: "Transaction History" }), M.jsx(Ja, {}), M.jsx("div", { style: { height: "340px", overflow: "scroll" }, children: M.jsx(zL, {
|
|
84333
84340
|
data: Jr.validateDataType((m = a == null ? void 0 : a.transactionHistoryList) == null ? void 0 : m.result, _i.ARRAY) ? (v = a == null ? void 0 : a.transactionHistoryList) == null ? void 0 : v.result : [],
|
|
@@ -84358,7 +84365,7 @@ const zK = [
|
|
|
84358
84365
|
p("transaction_type", b == null ? void 0 : b.value);
|
|
84359
84366
|
}
|
|
84360
84367
|
}) }), M.jsx(Cn, { item: !0, xs: 12, children: M.jsxs("div", { className: "flex-end-center g-10", children: [M.jsx(aa, { label: "Cancel", variant: "outlined", onClick: d }), M.jsx(aa, { label: "Submit" })] }) })] }) })] });
|
|
84361
|
-
},
|
|
84368
|
+
}, gmt = () => {
|
|
84362
84369
|
const { session: { user: e } } = em(), [n, t] = Jt([]), [r, o] = Jt(null), i = (e == null ? void 0 : e.org_id) || null, { data: a, isFetching: s } = Ku(
|
|
84363
84370
|
y7,
|
|
84364
84371
|
{
|
|
@@ -84395,55 +84402,55 @@ const zK = [
|
|
|
84395
84402
|
return M.jsxs(de.Fragment, { children: [M.jsxs(tj, { children: [M.jsx(pte, { primary: c.product_name, secondary: c.short_product_name }), M.jsx(kE, { children: M.jsx(Ote, { edge: "end", checked: p, onChange: () => l(c.id), disabled: !c.operation_allow }) })] }), d < n.length - 1 && M.jsx(Ja, {})] }, c.id);
|
|
84396
84403
|
}) }) })] }) });
|
|
84397
84404
|
};
|
|
84398
|
-
var jB = {},
|
|
84405
|
+
var jB = {}, Sht = Gr;
|
|
84399
84406
|
Object.defineProperty(jB, "__esModule", {
|
|
84400
84407
|
value: !0
|
|
84401
84408
|
});
|
|
84402
|
-
var rme = jB.default = void 0,
|
|
84403
|
-
rme = jB.default = (0,
|
|
84409
|
+
var rme = jB.default = void 0, Oht = Sht(ro()), Tht = M;
|
|
84410
|
+
rme = jB.default = (0, Oht.default)(/* @__PURE__ */ (0, Tht.jsx)("path", {
|
|
84404
84411
|
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
|
|
84405
84412
|
}), "MoreVert");
|
|
84406
|
-
var NB = {},
|
|
84413
|
+
var NB = {}, Mht = Gr;
|
|
84407
84414
|
Object.defineProperty(NB, "__esModule", {
|
|
84408
84415
|
value: !0
|
|
84409
84416
|
});
|
|
84410
|
-
var u7 = NB.default = void 0,
|
|
84411
|
-
u7 = NB.default = (0,
|
|
84417
|
+
var u7 = NB.default = void 0, kht = Mht(ro()), Eht = M;
|
|
84418
|
+
u7 = NB.default = (0, kht.default)(/* @__PURE__ */ (0, Eht.jsx)("path", {
|
|
84412
84419
|
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
84413
84420
|
}), "Close");
|
|
84414
|
-
var FB = {},
|
|
84421
|
+
var FB = {}, Iht = Gr;
|
|
84415
84422
|
Object.defineProperty(FB, "__esModule", {
|
|
84416
84423
|
value: !0
|
|
84417
84424
|
});
|
|
84418
|
-
var ome = FB.default = void 0,
|
|
84419
|
-
ome = FB.default = (0,
|
|
84425
|
+
var ome = FB.default = void 0, Pht = Iht(ro()), Rht = M;
|
|
84426
|
+
ome = FB.default = (0, Pht.default)(/* @__PURE__ */ (0, Rht.jsx)("path", {
|
|
84420
84427
|
d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"
|
|
84421
84428
|
}), "AttachFile");
|
|
84422
|
-
var LB = {},
|
|
84429
|
+
var LB = {}, Aht = Gr;
|
|
84423
84430
|
Object.defineProperty(LB, "__esModule", {
|
|
84424
84431
|
value: !0
|
|
84425
84432
|
});
|
|
84426
|
-
var ime = LB.default = void 0,
|
|
84427
|
-
ime = LB.default = (0,
|
|
84433
|
+
var ime = LB.default = void 0, Dht = Aht(ro()), _ht = M;
|
|
84434
|
+
ime = LB.default = (0, Dht.default)(/* @__PURE__ */ (0, _ht.jsx)("path", {
|
|
84428
84435
|
d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"
|
|
84429
84436
|
}), "Image");
|
|
84430
|
-
var BB = {},
|
|
84437
|
+
var BB = {}, jht = Gr;
|
|
84431
84438
|
Object.defineProperty(BB, "__esModule", {
|
|
84432
84439
|
value: !0
|
|
84433
84440
|
});
|
|
84434
|
-
var ame = BB.default = void 0,
|
|
84435
|
-
ame = BB.default = (0,
|
|
84441
|
+
var ame = BB.default = void 0, Nht = jht(ro()), Fht = M;
|
|
84442
|
+
ame = BB.default = (0, Nht.default)(/* @__PURE__ */ (0, Fht.jsx)("path", {
|
|
84436
84443
|
d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5.5h1v-3h-1z"
|
|
84437
84444
|
}), "PictureAsPdf");
|
|
84438
|
-
var VB = {},
|
|
84445
|
+
var VB = {}, Lht = Gr;
|
|
84439
84446
|
Object.defineProperty(VB, "__esModule", {
|
|
84440
84447
|
value: !0
|
|
84441
84448
|
});
|
|
84442
|
-
var sme = VB.default = void 0,
|
|
84443
|
-
sme = VB.default = (0,
|
|
84449
|
+
var sme = VB.default = void 0, Bht = Lht(ro()), Vht = M;
|
|
84450
|
+
sme = VB.default = (0, Bht.default)(/* @__PURE__ */ (0, Vht.jsx)("path", {
|
|
84444
84451
|
d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"
|
|
84445
84452
|
}), "Description");
|
|
84446
|
-
const
|
|
84453
|
+
const vmt = () => {
|
|
84447
84454
|
const [e, n] = Jt({
|
|
84448
84455
|
page: 0,
|
|
84449
84456
|
perPage: 20
|
|
@@ -84626,14 +84633,14 @@ const gmt = () => {
|
|
|
84626
84633
|
}, children: "Download" }), M.jsx(aa, { label: "Close", size: "medium", variant: "outlined", onClick: R })] })] })] });
|
|
84627
84634
|
};
|
|
84628
84635
|
export {
|
|
84629
|
-
|
|
84630
|
-
|
|
84631
|
-
|
|
84632
|
-
|
|
84633
|
-
|
|
84634
|
-
|
|
84635
|
-
|
|
84636
|
-
|
|
84637
|
-
|
|
84638
|
-
|
|
84636
|
+
gmt as BillingSubscription,
|
|
84637
|
+
umt as CustomerInvoices,
|
|
84638
|
+
vmt as Mail,
|
|
84639
|
+
lmt as ManageProvider,
|
|
84640
|
+
fmt as PlansOverview,
|
|
84641
|
+
cmt as SubscriptionConsumption,
|
|
84642
|
+
dmt as SubscriptionOverview,
|
|
84643
|
+
pmt as SubscriptionPaymentMethod,
|
|
84644
|
+
hmt as SubscriptionPlans,
|
|
84645
|
+
mmt as SubscriptionWallet
|
|
84639
84646
|
};
|