cecomponent 1.0.165 → 1.0.167

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.
@@ -338,7 +338,7 @@ i.goToAndStop(b-i.firstFrame-1,!0)}E.type==="loop"&&(m===null||m!==E.frames||i.i
338
338
  `),p.push(` </office:body>
339
339
  `),f.bookType=="fods"?p.push("</office:document>"):p.push("</office:document-content>"),p.join("")}}();function write_ods(e,t){if(t.bookType=="fods")return write_content_ods(e,t);var n=zip_new(),i="",o=[],l=[];return i="mimetype",zip_add_file(n,i,"application/vnd.oasis.opendocument.spreadsheet"),i="content.xml",zip_add_file(n,i,write_content_ods(e,t)),o.push([i,"text/xml"]),l.push([i,"ContentFile"]),i="styles.xml",zip_add_file(n,i,write_styles_ods(e,t)),o.push([i,"text/xml"]),l.push([i,"StylesFile"]),i="meta.xml",zip_add_file(n,i,XML_HEADER+write_meta_ods()),o.push([i,"text/xml"]),l.push([i,"MetadataFile"]),i="manifest.rdf",zip_add_file(n,i,write_rdf(l)),o.push([i,"application/rdf+xml"]),i="META-INF/manifest.xml",zip_add_file(n,i,write_manifest(o)),n}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function u8_to_dataview(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function stru8(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):s2a(utf8write(e))}function u8contains(e,t){e:for(var n=0;n<=e.length-t.length;++n){for(var i=0;i<t.length;++i)if(e[n+i]!=t[i])continue e;return!0}return!1}function u8concat(e){var t=e.reduce(function(o,l){return o+l.length},0),n=new Uint8Array(t),i=0;return e.forEach(function(o){n.set(o,i),i+=o.length}),n}function writeDecimal128LE(e,t,n){var i=Math.floor(n==0?0:Math.LOG10E*Math.log(Math.abs(n)))+6176-20,o=n/Math.pow(10,i-6176);e[t+15]|=i>>7,e[t+14]|=(i&127)<<1;for(var l=0;o>=1;++l,o/=256)e[t+l]=o&255;e[t+15]|=n>=0?0:128}function parse_varint49(e,t){var n=t?t[0]:0,i=e[n]&127;e:if(e[n++]>=128&&(i|=(e[n]&127)<<7,e[n++]<128||(i|=(e[n]&127)<<14,e[n++]<128)||(i|=(e[n]&127)<<21,e[n++]<128)||(i+=(e[n]&127)*Math.pow(2,28),++n,e[n++]<128)||(i+=(e[n]&127)*Math.pow(2,35),++n,e[n++]<128)||(i+=(e[n]&127)*Math.pow(2,42),++n,e[n++]<128)))break e;return t&&(t[0]=n),i}function write_varint49(e){var t=new Uint8Array(7);t[0]=e&127;var n=1;e:if(e>127){if(t[n-1]|=128,t[n]=e>>7&127,++n,e<=16383||(t[n-1]|=128,t[n]=e>>14&127,++n,e<=2097151)||(t[n-1]|=128,t[n]=e>>21&127,++n,e<=268435455)||(t[n-1]|=128,t[n]=e/256>>>21&127,++n,e<=34359738367)||(t[n-1]|=128,t[n]=e/65536>>>21&127,++n,e<=4398046511103))break e;t[n-1]|=128,t[n]=e/16777216>>>21&127,++n}return t.slice(0,n)}function varint_to_i32(e){var t=0,n=e[t]&127;e:if(e[t++]>=128){if(n|=(e[t]&127)<<7,e[t++]<128||(n|=(e[t]&127)<<14,e[t++]<128)||(n|=(e[t]&127)<<21,e[t++]<128))break e;n|=(e[t]&127)<<28}return n}function parse_shallow(e){for(var t=[],n=[0];n[0]<e.length;){var i=n[0],o=parse_varint49(e,n),l=o&7;o=Math.floor(o/8);var u=0,f;if(o==0)break;switch(l){case 0:{for(var p=n[0];e[n[0]++]>=128;);f=e.slice(p,n[0])}break;case 5:u=4,f=e.slice(n[0],n[0]+u),n[0]+=u;break;case 1:u=8,f=e.slice(n[0],n[0]+u),n[0]+=u;break;case 2:u=parse_varint49(e,n),f=e.slice(n[0],n[0]+u),n[0]+=u;break;case 3:case 4:default:throw new Error("PB Type ".concat(l," for Field ").concat(o," at offset ").concat(i))}var d={data:f,type:l};t[o]==null?t[o]=[d]:t[o].push(d)}return t}function write_shallow(e){var t=[];return e.forEach(function(n,i){n.forEach(function(o){o.data&&(t.push(write_varint49(i*8+o.type)),o.type==2&&t.push(write_varint49(o.data.length)),t.push(o.data))})}),u8concat(t)}function parse_iwa_file(e){for(var t,n=[],i=[0];i[0]<e.length;){var o=parse_varint49(e,i),l=parse_shallow(e.slice(i[0],i[0]+o));i[0]+=o;var u={id:varint_to_i32(l[1][0].data),messages:[]};l[2].forEach(function(f){var p=parse_shallow(f.data),d=varint_to_i32(p[3][0].data);u.messages.push({meta:p,data:e.slice(i[0],i[0]+d)}),i[0]+=d}),(t=l[3])!=null&&t[0]&&(u.merge=varint_to_i32(l[3][0].data)>>>0>0),n.push(u)}return n}function write_iwa_file(e){var t=[];return e.forEach(function(n){var i=[];i[1]=[{data:write_varint49(n.id),type:0}],i[2]=[],n.merge!=null&&(i[3]=[{data:write_varint49(+!!n.merge),type:0}]);var o=[];n.messages.forEach(function(u){o.push(u.data),u.meta[3]=[{type:0,data:write_varint49(u.data.length)}],i[2].push({data:write_shallow(u.meta),type:2})});var l=write_shallow(i);t.push(write_varint49(l.length)),t.push(l),o.forEach(function(u){return t.push(u)})}),u8concat(t)}function parse_snappy_chunk(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var n=[0],i=parse_varint49(t,n),o=[];n[0]<t.length;){var l=t[n[0]]&3;if(l==0){var u=t[n[0]++]>>2;if(u<60)++u;else{var f=u-59;u=t[n[0]],f>1&&(u|=t[n[0]+1]<<8),f>2&&(u|=t[n[0]+2]<<16),f>3&&(u|=t[n[0]+3]<<24),u>>>=0,u++,n[0]+=f}o.push(t.slice(n[0],n[0]+u)),n[0]+=u;continue}else{var p=0,d=0;if(l==1?(d=(t[n[0]]>>2&7)+4,p=(t[n[0]++]&224)<<3,p|=t[n[0]++]):(d=(t[n[0]++]>>2)+1,l==2?(p=t[n[0]]|t[n[0]+1]<<8,n[0]+=2):(p=(t[n[0]]|t[n[0]+1]<<8|t[n[0]+2]<<16|t[n[0]+3]<<24)>>>0,n[0]+=4)),o=[u8concat(o)],p==0)throw new Error("Invalid offset 0");if(p>o[0].length)throw new Error("Invalid offset beyond length");if(d>=p)for(o.push(o[0].slice(-p)),d-=p;d>=o[o.length-1].length;)o.push(o[o.length-1]),d-=o[o.length-1].length;o.push(o[0].slice(-p,-p+d))}}var m=u8concat(o);if(m.length!=i)throw new Error("Unexpected length: ".concat(m.length," != ").concat(i));return m}function decompress_iwa_file(e){for(var t=[],n=0;n<e.length;){var i=e[n++],o=e[n]|e[n+1]<<8|e[n+2]<<16;n+=3,t.push(parse_snappy_chunk(i,e.slice(n,n+o))),n+=o}if(n!==e.length)throw new Error("data is not a valid framed stream!");return u8concat(t)}function compress_iwa_file(e){for(var t=[],n=0;n<e.length;){var i=Math.min(e.length-n,268435455),o=new Uint8Array(4);t.push(o);var l=write_varint49(i),u=l.length;t.push(l),i<=60?(u++,t.push(new Uint8Array([i-1<<2]))):i<=256?(u+=2,t.push(new Uint8Array([240,i-1&255]))):i<=65536?(u+=3,t.push(new Uint8Array([244,i-1&255,i-1>>8&255]))):i<=16777216?(u+=4,t.push(new Uint8Array([248,i-1&255,i-1>>8&255,i-1>>16&255]))):i<=4294967296&&(u+=5,t.push(new Uint8Array([252,i-1&255,i-1>>8&255,i-1>>16&255,i-1>>>24&255]))),t.push(e.slice(n,n+i)),u+=i,o[0]=0,o[1]=u&255,o[2]=u>>8&255,o[3]=u>>16&255,n+=i}return u8concat(t)}function write_new_storage(e,t){var n=new Uint8Array(32),i=u8_to_dataview(n),o=12,l=0;switch(n[0]=5,e.t){case"n":n[1]=2,writeDecimal128LE(n,o,e.v),l|=1,o+=16;break;case"b":n[1]=6,i.setFloat64(o,e.v?1:0,!0),l|=2,o+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));n[1]=3,i.setUint32(o,t.indexOf(e.v),!0),l|=8,o+=4;break;default:throw"unsupported cell type "+e.t}return i.setUint32(8,l,!0),n.slice(0,o)}function write_old_storage(e,t){var n=new Uint8Array(32),i=u8_to_dataview(n),o=12,l=0;switch(n[0]=3,e.t){case"n":n[2]=2,i.setFloat64(o,e.v,!0),l|=32,o+=8;break;case"b":n[2]=6,i.setFloat64(o,e.v?1:0,!0),l|=32,o+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));n[2]=3,i.setUint32(o,t.indexOf(e.v),!0),l|=16,o+=4;break;default:throw"unsupported cell type "+e.t}return i.setUint32(4,l,!0),n.slice(0,o)}function parse_TSP_Reference(e){var t=parse_shallow(e);return parse_varint49(t[1][0].data)}function write_tile_row(e,t,n){var i,o,l,u;if(!((i=e[6])!=null&&i[0])||!((o=e[7])!=null&&o[0]))throw"Mutation only works on post-BNC storages!";var f=((u=(l=e[8])==null?void 0:l[0])==null?void 0:u.data)&&varint_to_i32(e[8][0].data)>0||!1;if(f)throw"Math only works with normal offsets";for(var p=0,d=u8_to_dataview(e[7][0].data),m=0,g=[],_=u8_to_dataview(e[4][0].data),S=0,E=[],b=0;b<t.length;++b){if(t[b]==null){d.setUint16(b*2,65535,!0),_.setUint16(b*2,65535);continue}d.setUint16(b*2,m,!0),_.setUint16(b*2,S,!0);var T,C;switch(typeof t[b]){case"string":T=write_new_storage({t:"s",v:t[b]},n),C=write_old_storage({t:"s",v:t[b]},n);break;case"number":T=write_new_storage({t:"n",v:t[b]},n),C=write_old_storage({t:"n",v:t[b]},n);break;case"boolean":T=write_new_storage({t:"b",v:t[b]},n),C=write_old_storage({t:"b",v:t[b]},n);break;default:throw new Error("Unsupported value "+t[b])}g.push(T),m+=T.length,E.push(C),S+=C.length,++p}for(e[2][0].data=write_varint49(p);b<e[7][0].data.length/2;++b)d.setUint16(b*2,65535,!0),_.setUint16(b*2,65535,!0);return e[6][0].data=u8concat(g),e[3][0].data=u8concat(E),p}function write_numbers_iwa(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var n=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var i=decode_range(n["!ref"]);i.s.r=i.s.c=0;var o=!1;i.e.c>9&&(o=!0,i.e.c=9),i.e.r>49&&(o=!0,i.e.r=49),o&&console.error("The Numbers writer is currently limited to ".concat(encode_range(i)));var l=sheet_to_json(n,{range:i,header:1}),u=["~Sh33tJ5~"];l.forEach(function(J){return J.forEach(function(X){typeof X=="string"&&u.push(X)})});var f={},p=[],d=CFB.read(t.numbers,{type:"base64"});d.FileIndex.map(function(J,X){return[J,d.FullPaths[X]]}).forEach(function(J){var X=J[0],Q=J[1];if(X.type==2&&X.name.match(/\.iwa/)){var le=X.content,ye=decompress_iwa_file(le),de=parse_iwa_file(ye);de.forEach(function(fe){p.push(fe.id),f[fe.id]={deps:[],location:Q,type:varint_to_i32(fe.messages[0].meta[1][0].data)}})}}),p.sort(function(J,X){return J-X});var m=p.filter(function(J){return J>1}).map(function(J){return[J,write_varint49(J)]});d.FileIndex.map(function(J,X){return[J,d.FullPaths[X]]}).forEach(function(J){var X=J[0];if(J[1],!!X.name.match(/\.iwa/)){var Q=parse_iwa_file(decompress_iwa_file(X.content));Q.forEach(function(le){le.messages.forEach(function(ye){m.forEach(function(de){le.messages.some(function(fe){return varint_to_i32(fe.meta[1][0].data)!=11006&&u8contains(fe.data,de[1])})&&f[de[0]].deps.push(le.id)})})})}});for(var g=CFB.find(d,f[1].location),_=parse_iwa_file(decompress_iwa_file(g.content)),S,E=0;E<_.length;++E){var b=_[E];b.id==1&&(S=b)}var T=parse_TSP_Reference(parse_shallow(S.messages[0].data)[1][0].data);for(g=CFB.find(d,f[T].location),_=parse_iwa_file(decompress_iwa_file(g.content)),E=0;E<_.length;++E)b=_[E],b.id==T&&(S=b);for(T=parse_TSP_Reference(parse_shallow(S.messages[0].data)[2][0].data),g=CFB.find(d,f[T].location),_=parse_iwa_file(decompress_iwa_file(g.content)),E=0;E<_.length;++E)b=_[E],b.id==T&&(S=b);for(T=parse_TSP_Reference(parse_shallow(S.messages[0].data)[2][0].data),g=CFB.find(d,f[T].location),_=parse_iwa_file(decompress_iwa_file(g.content)),E=0;E<_.length;++E)b=_[E],b.id==T&&(S=b);var C=parse_shallow(S.messages[0].data);{C[6][0].data=write_varint49(i.e.r+1),C[7][0].data=write_varint49(i.e.c+1);var A=parse_TSP_Reference(C[46][0].data),R=CFB.find(d,f[A].location),O=parse_iwa_file(decompress_iwa_file(R.content));{for(var I=0;I<O.length&&O[I].id!=A;++I);if(O[I].id!=A)throw"Bad ColumnRowUIDMapArchive";var j=parse_shallow(O[I].messages[0].data);j[1]=[],j[2]=[],j[3]=[];for(var M=0;M<=i.e.c;++M){var N=[];N[1]=N[2]=[{type:0,data:write_varint49(M+420690)}],j[1].push({type:2,data:write_shallow(N)}),j[2].push({type:0,data:write_varint49(M)}),j[3].push({type:0,data:write_varint49(M)})}j[4]=[],j[5]=[],j[6]=[];for(var D=0;D<=i.e.r;++D)N=[],N[1]=N[2]=[{type:0,data:write_varint49(D+726270)}],j[4].push({type:2,data:write_shallow(N)}),j[5].push({type:0,data:write_varint49(D)}),j[6].push({type:0,data:write_varint49(D)});O[I].messages[0].data=write_shallow(j)}R.content=compress_iwa_file(write_iwa_file(O)),R.size=R.content.length,delete C[46];var F=parse_shallow(C[4][0].data);{F[7][0].data=write_varint49(i.e.r+1);var q=parse_shallow(F[1][0].data),z=parse_TSP_Reference(q[2][0].data);R=CFB.find(d,f[z].location),O=parse_iwa_file(decompress_iwa_file(R.content));{if(O[0].id!=z)throw"Bad HeaderStorageBucket";var G=parse_shallow(O[0].messages[0].data);for(D=0;D<l.length;++D){var ee=parse_shallow(G[2][0].data);ee[1][0].data=write_varint49(D),ee[4][0].data=write_varint49(l[D].length),G[2][D]={type:G[2][0].type,data:write_shallow(ee)}}O[0].messages[0].data=write_shallow(G)}R.content=compress_iwa_file(write_iwa_file(O)),R.size=R.content.length;var Y=parse_TSP_Reference(F[2][0].data);R=CFB.find(d,f[Y].location),O=parse_iwa_file(decompress_iwa_file(R.content));{if(O[0].id!=Y)throw"Bad HeaderStorageBucket";for(G=parse_shallow(O[0].messages[0].data),M=0;M<=i.e.c;++M)ee=parse_shallow(G[2][0].data),ee[1][0].data=write_varint49(M),ee[4][0].data=write_varint49(i.e.r+1),G[2][M]={type:G[2][0].type,data:write_shallow(ee)};O[0].messages[0].data=write_shallow(G)}R.content=compress_iwa_file(write_iwa_file(O)),R.size=R.content.length;var V=parse_TSP_Reference(F[4][0].data);(function(){for(var J=CFB.find(d,f[V].location),X=parse_iwa_file(decompress_iwa_file(J.content)),Q,le=0;le<X.length;++le){var ye=X[le];ye.id==V&&(Q=ye)}var de=parse_shallow(Q.messages[0].data);{de[3]=[];var fe=[];u.forEach(function(te,Te){fe[1]=[{type:0,data:write_varint49(Te)}],fe[2]=[{type:0,data:write_varint49(1)}],fe[3]=[{type:2,data:stru8(te)}],de[3].push({type:2,data:write_shallow(fe)})})}Q.messages[0].data=write_shallow(de);var pe=write_iwa_file(X),Ee=compress_iwa_file(pe);J.content=Ee,J.size=J.content.length})();var W=parse_shallow(F[3][0].data);{var L=W[1][0];delete W[2];var B=parse_shallow(L.data);{var U=parse_TSP_Reference(B[2][0].data);(function(){for(var J=CFB.find(d,f[U].location),X=parse_iwa_file(decompress_iwa_file(J.content)),Q,le=0;le<X.length;++le){var ye=X[le];ye.id==U&&(Q=ye)}var de=parse_shallow(Q.messages[0].data);{delete de[6],delete W[7];var fe=new Uint8Array(de[5][0].data);de[5]=[];for(var pe=0,Ee=0;Ee<=i.e.r;++Ee){var te=parse_shallow(fe);pe+=write_tile_row(te,l[Ee],u),te[1][0].data=write_varint49(Ee),de[5].push({data:write_shallow(te),type:2})}de[1]=[{type:0,data:write_varint49(i.e.c+1)}],de[2]=[{type:0,data:write_varint49(i.e.r+1)}],de[3]=[{type:0,data:write_varint49(pe)}],de[4]=[{type:0,data:write_varint49(i.e.r+1)}]}Q.messages[0].data=write_shallow(de);var Te=write_iwa_file(X),ue=compress_iwa_file(Te);J.content=ue,J.size=J.content.length})()}L.data=write_shallow(B)}F[3][0].data=write_shallow(W)}C[4][0].data=write_shallow(F)}S.messages[0].data=write_shallow(C);var K=write_iwa_file(_),H=compress_iwa_file(K);return g.content=H,g.size=g.content.length,d}function fix_opts_func(e){return function(n){for(var i=0;i!=e.length;++i){var o=e[i];n[o[0]]===void 0&&(n[o[0]]=o[1]),o[2]==="n"&&(n[o[0]]=Number(n[o[0]]))}}}function fix_write_opts(e){fix_opts_func([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function write_zip(e,t){return t.bookType=="ods"?write_ods(e,t):t.bookType=="numbers"?write_numbers_iwa(e,t):t.bookType=="xlsb"?write_zip_xlsxb(e,t):write_zip_xlsx(e,t)}function write_zip_xlsxb(e,t){_shapeid=1024,e&&!e.SSF&&(e.SSF=dup(table_fmt)),e&&e.SSF&&(make_ssf(),SSF_load_table(e.SSF),t.revssf=evert_num(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,browser_has_Map?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n=t.bookType=="xlsb"?"bin":"xml",i=VBAFMTS.indexOf(t.bookType)>-1,o=new_ct();fix_write_opts(t=t||{});var l=zip_new(),u="",f=0;if(t.cellXfs=[],get_cell_style(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),u="docProps/core.xml",zip_add_file(l,u,write_core_props(e.Props,t)),o.coreprops.push(u),add_rels(t.rels,2,u,RELS.CORE_PROPS),u="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var p=[],d=0;d<e.SheetNames.length;++d)(e.Workbook.Sheets[d]||{}).Hidden!=2&&p.push(e.SheetNames[d]);e.Props.SheetNames=p}for(e.Props.Worksheets=e.Props.SheetNames.length,zip_add_file(l,u,write_ext_props(e.Props)),o.extprops.push(u),add_rels(t.rels,3,u,RELS.EXT_PROPS),e.Custprops!==e.Props&&keys$1(e.Custprops||{}).length>0&&(u="docProps/custom.xml",zip_add_file(l,u,write_cust_props(e.Custprops)),o.custprops.push(u),add_rels(t.rels,4,u,RELS.CUST_PROPS)),f=1;f<=e.SheetNames.length;++f){var m={"!id":{}},g=e.Sheets[e.SheetNames[f-1]],_=(g||{})["!type"]||"sheet";switch(_){case"chart":default:u="xl/worksheets/sheet"+f+"."+n,zip_add_file(l,u,write_ws(f-1,u,t,e,m)),o.sheets.push(u),add_rels(t.wbrels,-1,"worksheets/sheet"+f+"."+n,RELS.WS[0])}if(g){var S=g["!comments"],E=!1,b="";S&&S.length>0&&(b="xl/comments"+f+"."+n,zip_add_file(l,b,write_cmnt(S,b)),o.comments.push(b),add_rels(m,-1,"../comments"+f+"."+n,RELS.CMNT),E=!0),g["!legacy"]&&E&&zip_add_file(l,"xl/drawings/vmlDrawing"+f+".vml",write_comments_vml(f,g["!comments"])),delete g["!comments"],delete g["!legacy"]}m["!id"].rId1&&zip_add_file(l,get_rels_path(u),write_rels(m))}return t.Strings!=null&&t.Strings.length>0&&(u="xl/sharedStrings."+n,zip_add_file(l,u,write_sst(t.Strings,u,t)),o.strs.push(u),add_rels(t.wbrels,-1,"sharedStrings."+n,RELS.SST)),u="xl/workbook."+n,zip_add_file(l,u,write_wb(e,u)),o.workbooks.push(u),add_rels(t.rels,1,u,RELS.WB),u="xl/theme/theme1.xml",zip_add_file(l,u,write_theme(e.Themes,t)),o.themes.push(u),add_rels(t.wbrels,-1,"theme/theme1.xml",RELS.THEME),u="xl/styles."+n,zip_add_file(l,u,write_sty(e,u,t)),o.styles.push(u),add_rels(t.wbrels,-1,"styles."+n,RELS.STY),e.vbaraw&&i&&(u="xl/vbaProject.bin",zip_add_file(l,u,e.vbaraw),o.vba.push(u),add_rels(t.wbrels,-1,"vbaProject.bin",RELS.VBA)),u="xl/metadata."+n,zip_add_file(l,u,write_xlmeta(u)),o.metadata.push(u),add_rels(t.wbrels,-1,"metadata."+n,RELS.XLMETA),zip_add_file(l,"[Content_Types].xml",write_ct(o,t)),zip_add_file(l,"_rels/.rels",write_rels(t.rels)),zip_add_file(l,"xl/_rels/workbook."+n+".rels",write_rels(t.wbrels)),delete t.revssf,delete t.ssf,l}function write_zip_xlsx(e,t){_shapeid=1024,e&&!e.SSF&&(e.SSF=dup(table_fmt)),e&&e.SSF&&(make_ssf(),SSF_load_table(e.SSF),t.revssf=evert_num(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,browser_has_Map?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n="xml",i=VBAFMTS.indexOf(t.bookType)>-1,o=new_ct();fix_write_opts(t=t||{});var l=zip_new(),u="",f=0;if(t.cellXfs=[],get_cell_style(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),u="docProps/core.xml",zip_add_file(l,u,write_core_props(e.Props,t)),o.coreprops.push(u),add_rels(t.rels,2,u,RELS.CORE_PROPS),u="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var p=[],d=0;d<e.SheetNames.length;++d)(e.Workbook.Sheets[d]||{}).Hidden!=2&&p.push(e.SheetNames[d]);e.Props.SheetNames=p}e.Props.Worksheets=e.Props.SheetNames.length,zip_add_file(l,u,write_ext_props(e.Props)),o.extprops.push(u),add_rels(t.rels,3,u,RELS.EXT_PROPS),e.Custprops!==e.Props&&keys$1(e.Custprops||{}).length>0&&(u="docProps/custom.xml",zip_add_file(l,u,write_cust_props(e.Custprops)),o.custprops.push(u),add_rels(t.rels,4,u,RELS.CUST_PROPS));var m=["SheetJ5"];for(t.tcid=0,f=1;f<=e.SheetNames.length;++f){var g={"!id":{}},_=e.Sheets[e.SheetNames[f-1]],S=(_||{})["!type"]||"sheet";switch(S){case"chart":default:u="xl/worksheets/sheet"+f+"."+n,zip_add_file(l,u,write_ws_xml(f-1,t,e,g)),o.sheets.push(u),add_rels(t.wbrels,-1,"worksheets/sheet"+f+"."+n,RELS.WS[0])}if(_){var E=_["!comments"],b=!1,T="";if(E&&E.length>0){var C=!1;E.forEach(function(A){A[1].forEach(function(R){R.T==!0&&(C=!0)})}),C&&(T="xl/threadedComments/threadedComment"+f+"."+n,zip_add_file(l,T,write_tcmnt_xml(E,m,t)),o.threadedcomments.push(T),add_rels(g,-1,"../threadedComments/threadedComment"+f+"."+n,RELS.TCMNT)),T="xl/comments"+f+"."+n,zip_add_file(l,T,write_comments_xml(E)),o.comments.push(T),add_rels(g,-1,"../comments"+f+"."+n,RELS.CMNT),b=!0}_["!legacy"]&&b&&zip_add_file(l,"xl/drawings/vmlDrawing"+f+".vml",write_comments_vml(f,_["!comments"])),delete _["!comments"],delete _["!legacy"]}g["!id"].rId1&&zip_add_file(l,get_rels_path(u),write_rels(g))}return t.Strings!=null&&t.Strings.length>0&&(u="xl/sharedStrings."+n,zip_add_file(l,u,write_sst_xml(t.Strings,t)),o.strs.push(u),add_rels(t.wbrels,-1,"sharedStrings."+n,RELS.SST)),u="xl/workbook."+n,zip_add_file(l,u,write_wb_xml(e)),o.workbooks.push(u),add_rels(t.rels,1,u,RELS.WB),u="xl/theme/theme1.xml",zip_add_file(l,u,write_theme(e.Themes,t)),o.themes.push(u),add_rels(t.wbrels,-1,"theme/theme1.xml",RELS.THEME),u="xl/styles."+n,zip_add_file(l,u,write_sty_xml(e,t)),o.styles.push(u),add_rels(t.wbrels,-1,"styles."+n,RELS.STY),e.vbaraw&&i&&(u="xl/vbaProject.bin",zip_add_file(l,u,e.vbaraw),o.vba.push(u),add_rels(t.wbrels,-1,"vbaProject.bin",RELS.VBA)),u="xl/metadata."+n,zip_add_file(l,u,write_xlmeta_xml()),o.metadata.push(u),add_rels(t.wbrels,-1,"metadata."+n,RELS.XLMETA),m.length>1&&(u="xl/persons/person.xml",zip_add_file(l,u,write_people_xml(m)),o.people.push(u),add_rels(t.wbrels,-1,"persons/person.xml",RELS.PEOPLE)),zip_add_file(l,"[Content_Types].xml",write_ct(o,t)),zip_add_file(l,"_rels/.rels",write_rels(t.rels)),zip_add_file(l,"xl/_rels/workbook."+n+".rels",write_rels(t.wbrels)),delete t.revssf,delete t.ssf,l}function firstbyte(e,t){var n="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":n=Base64_decode(e.slice(0,12));break;case"binary":n=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function write_cfb_ctr(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return write_dl(t.file,CFB.write(e,{type:has_buf?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return CFB.write(e,t)}function write_zip_type(e,t){var n=dup(t||{}),i=write_zip(e,n);return write_zip_denouement(i,n)}function write_zip_denouement(e,t){var n={},i=has_buf?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(n.compression="DEFLATE"),t.password)n.type=i;else switch(t.type){case"base64":n.type="base64";break;case"binary":n.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":n.type=i;break;default:throw new Error("Unrecognized type "+t.type)}var o=e.FullPaths?CFB.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[n.type]||n.type,compression:!!t.compression}):e.generate(n);if(typeof Deno<"u"&&typeof o=="string"){if(t.type=="binary"||t.type=="base64")return o;o=new Uint8Array(s2ab(o))}return t.password&&typeof encrypt_agile<"u"?write_cfb_ctr(encrypt_agile(o,t.password),t):t.type==="file"?write_dl(t.file,o):t.type=="string"?utf8read(o):o}function write_cfb_type(e,t){var n=t||{},i=write_xlscfb(e,n);return write_cfb_ctr(i,n)}function write_string_type(e,t,n){n||(n="");var i=n+e;switch(t.type){case"base64":return Base64_encode(utf8write(i));case"binary":return utf8write(i);case"string":return e;case"file":return write_dl(t.file,i,"utf8");case"buffer":return has_buf?Buffer_from(i,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(i):write_string_type(i,{type:"binary"}).split("").map(function(o){return o.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function write_stxt_type(e,t){switch(t.type){case"base64":return Base64_encode(e);case"binary":return e;case"string":return e;case"file":return write_dl(t.file,e,"binary");case"buffer":return has_buf?Buffer_from(e,"binary"):e.split("").map(function(n){return n.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function write_binary_type(e,t){switch(t.type){case"string":case"base64":case"binary":for(var n="",i=0;i<e.length;++i)n+=String.fromCharCode(e[i]);return t.type=="base64"?Base64_encode(n):t.type=="string"?utf8read(n):n;case"file":return write_dl(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function writeSync(e,t){reset_cp(),check_wb(e);var n=dup(t||{});if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),n.type=="array"){n.type="binary";var i=writeSync(e,n);return n.type="array",s2ab(i)}var o=0;if(n.sheet&&(typeof n.sheet=="number"?o=n.sheet:o=e.SheetNames.indexOf(n.sheet),!e.SheetNames[o]))throw new Error("Sheet not found: "+n.sheet+" : "+typeof n.sheet);switch(n.bookType||"xlsb"){case"xml":case"xlml":return write_string_type(write_xlml(e,n),n);case"slk":case"sylk":return write_string_type(SYLK.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"htm":case"html":return write_string_type(sheet_to_html(e.Sheets[e.SheetNames[o]],n),n);case"txt":return write_stxt_type(sheet_to_txt(e.Sheets[e.SheetNames[o]],n),n);case"csv":return write_string_type(sheet_to_csv(e.Sheets[e.SheetNames[o]],n),n,"\uFEFF");case"dif":return write_string_type(DIF.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"dbf":return write_binary_type(DBF.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"prn":return write_string_type(PRN.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"rtf":return write_string_type(RTF.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"eth":return write_string_type(ETH.from_sheet(e.Sheets[e.SheetNames[o]],n),n);case"fods":return write_string_type(write_ods(e,n),n);case"wk1":return write_binary_type(WK_.sheet_to_wk1(e.Sheets[e.SheetNames[o]],n),n);case"wk3":return write_binary_type(WK_.book_to_wk3(e,n),n);case"biff2":n.biff||(n.biff=2);case"biff3":n.biff||(n.biff=3);case"biff4":return n.biff||(n.biff=4),write_binary_type(write_biff_buf(e,n),n);case"biff5":n.biff||(n.biff=5);case"biff8":case"xla":case"xls":return n.biff||(n.biff=8),write_cfb_type(e,n);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return write_zip_type(e,n);default:throw new Error("Unrecognized bookType |"+n.bookType+"|")}}function resolve_book_type(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},n=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();n.match(/^\.[a-z]+$/)&&(e.bookType=n.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function writeFileSync(e,t,n){var i={};return i.type="file",i.file=t,resolve_book_type(i),writeSync(e,i)}function make_json_row(e,t,n,i,o,l,u,f){var p=encode_row(n),d=f.defval,m=f.raw||!Object.prototype.hasOwnProperty.call(f,"raw"),g=!0,_=o===1?[]:{};if(o!==1)if(Object.defineProperty)try{Object.defineProperty(_,"__rowNum__",{value:n,enumerable:!1})}catch{_.__rowNum__=n}else _.__rowNum__=n;if(!u||e[n])for(var S=t.s.c;S<=t.e.c;++S){var E=u?e[n][S]:e[i[S]+p];if(E===void 0||E.t===void 0){if(d===void 0)continue;l[S]!=null&&(_[l[S]]=d);continue}var b=E.v;switch(E.t){case"z":if(b==null)break;continue;case"e":b=b==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+E.t)}if(l[S]!=null){if(b==null)if(E.t=="e"&&b===null)_[l[S]]=null;else if(d!==void 0)_[l[S]]=d;else if(m&&b===null)_[l[S]]=null;else continue;else _[l[S]]=m&&(E.t!=="n"||E.t==="n"&&f.rawNumbers!==!1)?b:format_cell(E,b,f);b!=null&&(g=!1)}}return{row:_,isempty:g}}function sheet_to_json(e,t){if(e==null||e["!ref"]==null)return[];var n={t:"n",v:0},i=0,o=1,l=[],u=0,f="",p={s:{r:0,c:0},e:{r:0,c:0}},d=t||{},m=d.range!=null?d.range:e["!ref"];switch(d.header===1?i=1:d.header==="A"?i=2:Array.isArray(d.header)?i=3:d.header==null&&(i=0),typeof m){case"string":p=safe_decode_range(m);break;case"number":p=safe_decode_range(e["!ref"]),p.s.r=m;break;default:p=m}i>0&&(o=0);var g=encode_row(p.s.r),_=[],S=[],E=0,b=0,T=Array.isArray(e),C=p.s.r,A=0,R={};T&&!e[C]&&(e[C]=[]);var O=d.skipHidden&&e["!cols"]||[],I=d.skipHidden&&e["!rows"]||[];for(A=p.s.c;A<=p.e.c;++A)if(!(O[A]||{}).hidden)switch(_[A]=encode_col(A),n=T?e[C][A]:e[_[A]+g],i){case 1:l[A]=A-p.s.c;break;case 2:l[A]=_[A];break;case 3:l[A]=d.header[A-p.s.c];break;default:if(n==null&&(n={w:"__EMPTY",t:"s"}),f=u=format_cell(n,null,d),b=R[u]||0,!b)R[u]=1;else{do f=u+"_"+b++;while(R[f]);R[u]=b,R[f]=1}l[A]=f}for(C=p.s.r+o;C<=p.e.r;++C)if(!(I[C]||{}).hidden){var j=make_json_row(e,p,C,_,i,l,T,d);(j.isempty===!1||(i===1?d.blankrows!==!1:d.blankrows))&&(S[E++]=j.row)}return S.length=E,S}var qreg=/"/g;function make_csv_row(e,t,n,i,o,l,u,f){for(var p=!0,d=[],m="",g=encode_row(n),_=t.s.c;_<=t.e.c;++_)if(i[_]){var S=f.dense?(e[n]||[])[_]:e[i[_]+g];if(S==null)m="";else if(S.v!=null){p=!1,m=""+(f.rawNumbers&&S.t=="n"?S.v:format_cell(S,null,f));for(var E=0,b=0;E!==m.length;++E)if((b=m.charCodeAt(E))===o||b===l||b===34||f.forceQuotes){m='"'+m.replace(qreg,'""')+'"';break}m=="ID"&&(m='"ID"')}else S.f!=null&&!S.F?(p=!1,m="="+S.f,m.indexOf(",")>=0&&(m='"'+m.replace(qreg,'""')+'"')):m="";d.push(m)}return f.blankrows===!1&&p?null:d.join(u)}function sheet_to_csv(e,t){var n=[],i=t??{};if(e==null||e["!ref"]==null)return"";var o=safe_decode_range(e["!ref"]),l=i.FS!==void 0?i.FS:",",u=l.charCodeAt(0),f=i.RS!==void 0?i.RS:`
340
340
  `,p=f.charCodeAt(0),d=new RegExp((l=="|"?"\\|":l)+"+$"),m="",g=[];i.dense=Array.isArray(e);for(var _=i.skipHidden&&e["!cols"]||[],S=i.skipHidden&&e["!rows"]||[],E=o.s.c;E<=o.e.c;++E)(_[E]||{}).hidden||(g[E]=encode_col(E));for(var b=0,T=o.s.r;T<=o.e.r;++T)(S[T]||{}).hidden||(m=make_csv_row(e,o,T,g,u,p,l,i),m!=null&&(i.strip&&(m=m.replace(d,"")),(m||i.blankrows!==!1)&&n.push((b++?f:"")+m)));return delete i.dense,n.join("")}function sheet_to_txt(e,t){t||(t={}),t.FS=" ",t.RS=`
341
- `;var n=sheet_to_csv(e,t);return n}function sheet_to_formulae(e){var t="",n,i="";if(e==null||e["!ref"]==null)return[];var o=safe_decode_range(e["!ref"]),l="",u=[],f,p=[],d=Array.isArray(e);for(f=o.s.c;f<=o.e.c;++f)u[f]=encode_col(f);for(var m=o.s.r;m<=o.e.r;++m)for(l=encode_row(m),f=o.s.c;f<=o.e.c;++f)if(t=u[f]+l,n=d?(e[m]||[])[f]:e[t],i="",n!==void 0){if(n.F!=null){if(t=n.F,!n.f)continue;i=n.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(n.f!=null)i=n.f;else{if(n.t=="z")continue;if(n.t=="n"&&n.v!=null)i=""+n.v;else if(n.t=="b")i=n.v?"TRUE":"FALSE";else if(n.w!==void 0)i="'"+n.w;else{if(n.v===void 0)continue;n.t=="s"?i="'"+n.v:i=""+n.v}}p[p.length]=t+"="+i}return p}function sheet_add_json(e,t,n){var i=n||{},o=+!i.skipHeader,l=e||{},u=0,f=0;if(l&&i.origin!=null)if(typeof i.origin=="number")u=i.origin;else{var p=typeof i.origin=="string"?decode_cell(i.origin):i.origin;u=p.r,f=p.c}var d,m={s:{c:0,r:0},e:{c:f,r:u+t.length-1+o}};if(l["!ref"]){var g=safe_decode_range(l["!ref"]);m.e.c=Math.max(m.e.c,g.e.c),m.e.r=Math.max(m.e.r,g.e.r),u==-1&&(u=g.e.r+1,m.e.r=u+t.length-1+o)}else u==-1&&(u=0,m.e.r=t.length-1+o);var _=i.header||[],S=0;t.forEach(function(b,T){keys$1(b).forEach(function(C){(S=_.indexOf(C))==-1&&(_[S=_.length]=C);var A=b[C],R="z",O="",I=encode_cell({c:f+S,r:u+T+o});d=ws_get_cell_stub(l,I),A&&typeof A=="object"&&!(A instanceof Date)?l[I]=A:(typeof A=="number"?R="n":typeof A=="boolean"?R="b":typeof A=="string"?R="s":A instanceof Date?(R="d",i.cellDates||(R="n",A=datenum(A)),O=i.dateNF||table_fmt[14]):A===null&&i.nullError&&(R="e",A=0),d?(d.t=R,d.v=A,delete d.w,delete d.R,O&&(d.z=O)):l[I]=d={t:R,v:A},O&&(d.z=O))})}),m.e.c=Math.max(m.e.c,f+_.length-1);var E=encode_row(u);if(o)for(S=0;S<_.length;++S)l[encode_col(S+f)+E]={t:"s",v:_[S]};return l["!ref"]=encode_range(m),l}function json_to_sheet(e,t){return sheet_add_json(null,e,t)}function ws_get_cell_stub(e,t,n){if(typeof t=="string"){if(Array.isArray(e)){var i=decode_cell(t);return e[i.r]||(e[i.r]=[]),e[i.r][i.c]||(e[i.r][i.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?ws_get_cell_stub(e,encode_cell(t)):ws_get_cell_stub(e,encode_cell({r:t,c:n||0}))}function wb_sheet_idx(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var n=e.SheetNames.indexOf(t);if(n>-1)return n;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function book_new(){return{SheetNames:[],Sheets:{}}}function book_append_sheet(e,t,n,i){var o=1;if(!n)for(;o<=65535&&e.SheetNames.indexOf(n="Sheet"+o)!=-1;++o,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(i&&e.SheetNames.indexOf(n)>=0){var l=n.match(/(^.*?)(\d+)$/);o=l&&+l[2]||0;var u=l&&l[1]||n;for(++o;o<=65535&&e.SheetNames.indexOf(n=u+o)!=-1;++o);}if(check_ws_name(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n}function book_set_sheet_visibility(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var i=wb_sheet_idx(e,t);switch(e.Workbook.Sheets[i]||(e.Workbook.Sheets[i]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[i].Hidden=n}function cell_set_number_format(e,t){return e.z=t,e}function cell_set_hyperlink(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}function cell_set_internal_link(e,t,n){return cell_set_hyperlink(e,"#"+t,n)}function cell_add_comment(e,t,n){e.c||(e.c=[]),e.c.push({t,a:n||"SheetJS"})}function sheet_set_array_formula(e,t,n,i){for(var o=typeof t!="string"?t:safe_decode_range(t),l=typeof t=="string"?t:encode_range(t),u=o.s.r;u<=o.e.r;++u)for(var f=o.s.c;f<=o.e.c;++f){var p=ws_get_cell_stub(e,u,f);p.t="n",p.F=l,delete p.v,u==o.s.r&&f==o.s.c&&(p.f=n,i&&(p.D=!0))}return e}var utils={encode_col,encode_row,encode_cell,encode_range,decode_col,decode_row,split_cell,decode_cell,decode_range,format_cell,sheet_add_aoa,sheet_add_json,sheet_add_dom,aoa_to_sheet,json_to_sheet,table_to_sheet:parse_dom_table,table_to_book,sheet_to_csv,sheet_to_txt,sheet_to_json,sheet_to_html,sheet_to_formulae,sheet_to_row_object_array:sheet_to_json,sheet_get_cell:ws_get_cell_stub,book_new,book_append_sheet,book_set_sheet_visibility,cell_set_number_format,cell_set_hyperlink,cell_set_internal_link,cell_add_comment,sheet_set_array_formula,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const CESkeletonTable=({columns:e,rows:t})=>jsxRuntimeExports.jsx("div",{className:"skeleton-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((n,i)=>jsxRuntimeExports.jsx("th",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-header"})},i))})}),jsxRuntimeExports.jsx("tbody",{children:Array.from({length:t}).map((n,i)=>jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((o,l)=>jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-cell"})},l))},i))})]})}),CERadioButton=({label:e,value:t,checked:n,onChange:i,id:o,name:l})=>jsxRuntimeExports.jsxs("label",{className:"radio-button",style:{margin:"0.5rem 0"},children:[jsxRuntimeExports.jsx("input",{type:"radio",id:o,name:l,value:t,checked:n,onChange:()=>i(t),style:{marginRight:e?"0.5rem":0}}),e&&jsxRuntimeExports.jsx("span",{children:e})]}),CETruncatedTextWithTooltip=({text:e})=>{const[t,n]=React.useState(!1),[i,o]=React.useState({top:0,left:0}),l=React.useRef(null),[u,f]=React.useState(!1);React.useEffect(()=>{l.current&&f(l.current.scrollWidth>l.current.clientWidth)},[e]);const p=()=>{if(!l.current)return;const m=l.current.getBoundingClientRect(),g=300,_=100;let S=m.bottom+window.scrollY+8,E=m.left+window.scrollX;const b=window.innerWidth,T=window.innerHeight;E+g>b&&(E=b-g-8),m.bottom+_>T&&(S=m.top+window.scrollY-_-8),o({top:S,left:E}),n(!0)},d=()=>n(!1);return jsxRuntimeExports.jsxs("span",{className:"truncated-text-with-tooltip",ref:l,onMouseEnter:p,onMouseLeave:d,children:[e,u&&t&&ReactDOM.createPortal(jsxRuntimeExports.jsx("div",{className:"truncated-text-tooltip global-tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:e}),document.body)]})},DatePickerCell=({row:e,colId:t})=>{var i;const n=o=>{var u;const l=o.target.value;(u=e[t])==null||u.onchange(l)};return jsxRuntimeExports.jsx("div",{style:{minWidth:"120px"},children:jsxRuntimeExports.jsx("input",{type:"date",value:(i=e[t])==null?void 0:i.value,onChange:o=>n(o)})})},AddNewRowCell=({row:e,column:t,colId:n})=>{var p,d,m,g,_,S,E,b,T,C,A,R,O,I;const i=(((p=e[n])==null?void 0:p.required)??t.required)||!1,o=!!e[n].error,[l,u]=React.useState(!1),f=t.elementType;return React.useEffect(()=>{u(!(o||i))},[o,i,t.required]),jsxRuntimeExports.jsx("div",{children:o&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-content",onClick:()=>u(!0),role:"button",tabIndex:0,title:((d=e[n])==null?void 0:d.tooltip)||"","aria-label":((m=e[n])==null?void 0:m.tooltip)||"",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:(g=e[n])==null?void 0:g.value}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#d32f2f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-circle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})]},e.id):i&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-warning",onClick:()=>u(!0),role:"button",tabIndex:0,title:((_=e[n])==null?void 0:_.tooltip)||"This field is required. Click to enter a value.","aria-label":((S=e[n])==null?void 0:S.tooltip)||"This field is required. Click to enter a value.",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:((E=e[n])==null?void 0:E.value)||"Required"}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#ff9800",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-triangle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),jsxRuntimeExports.jsx("path",{d:"M12 9v4"}),jsxRuntimeExports.jsx("path",{d:"M12 17h.01"})]})]},e.id):l&&(f==="auto-suggest"?jsxRuntimeExports.jsx(CEAdvancedAutoSuggest,{label:"",fetchSuggestions:(b=e[n])==null?void 0:b.fetchOptions,onChange:()=>{},onSelect:j=>{var M,N;return(N=(M=e[n])==null?void 0:M.onselect)==null?void 0:N.call(M,j)},value:((T=e[n])==null?void 0:T.selectedOption)||null}):f==="date-picker"?jsxRuntimeExports.jsx(DatePickerCell,{row:e,colId:n}):f==="text-input"?jsxRuntimeExports.jsx(CEInputBox,{onChange:j=>{var M;return(M=e[n])==null?void 0:M.onchange(j)},value:((C=e[n])==null?void 0:C.value)||"",showError:!1}):f==="number-input"?jsxRuntimeExports.jsx(CEInputBox,{type:"number",onChange:j=>{var M;return(M=e[n])==null?void 0:M.onchange(j)},value:((A=e[n])==null?void 0:A.value)||"",showError:!1}):f==="drop-down-input"?jsxRuntimeExports.jsx(CEDynamicSelectField,{label:"",value:((R=e[n])==null?void 0:R.value)||"",onChange:j=>{var M;(M=e[n])==null||M.onchange(j.target.value)},options:((O=e[n])==null?void 0:O.options)||[],showPlaceholder:!0,placeholderText:""}):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(((I=e[n])==null?void 0:I.value)??"")}))})},CEDateRangePicker=({label:e="Submitted Date",onChange:t,size:n="medium",style:i,inputGroupStyle:o,id:l,name:u,mode:f="range",defaultValue:p,disabled:d=!1,minDate:m=""})=>{const[g,_]=React.useState(""),[S,E]=React.useState(""),[b,T]=React.useState(!1),[C,A]=React.useState(""),R=m?new Date(m).toISOString().split("T")[0]:void 0,O=N=>{!N.currentTarget.value&&!g&&!S&&T(!1)},I=(N,D)=>{if(t==null||t({startDate:N||"",endDate:D||""}),N&&!D||!N&&D){A("Both start and end dates must be selected");return}if(N&&D&&new Date(D)<new Date(N)){A("End date must be after or equal to start date");return}A("")};React.useEffect(()=>{p&&(p.startDate&&_(p.startDate),p.endDate&&E(p.endDate))},[p]);const j=N=>{const D=N.target.value;_(D),I(D,S)},M=N=>{const D=N.target.value;E(D),I(g,D)};return jsxRuntimeExports.jsxs("div",{className:"date-range-picker",style:i,id:l,"data-testid":l?`${l}-wrapper`:void 0,children:[jsxRuntimeExports.jsx("div",{className:"date-range-field-group",style:o,children:f==="single"?jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:g,name:u,"data-testid":l?`${l}-input`:void 0,min:R,onChange:N=>{const D=N.target.value;_(D),t==null||t({startDate:D,endDate:""})},onFocus:()=>T(!0),onBlur:N=>O(N),disabled:d}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:e||"Select Date"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:g,name:u?`${u}-from`:void 0,"data-testid":l?`${l}-from`:void 0,onChange:j,onFocus:()=>T(!0),onBlur:N=>O(N),disabled:d}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"From"})]}),jsxRuntimeExports.jsx("span",{className:"range-separator centered",children:"to"}),jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:S,name:u?`${u}-to`:void 0,"data-testid":l?`${l}-to`:void 0,onChange:M,onFocus:()=>T(!0),onBlur:N=>O(N),disabled:d}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"To"})]})]})}),C&&f!=="single"&&jsxRuntimeExports.jsx("div",{className:"error-text",children:C})]})},useEscapeKey=e=>{React.useEffect(()=>{const t=n=>{n.key==="Escape"&&e()};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])},getColumnValue=e=>{if(e==null)return"";if(React.isValidElement(e)){const t=e;return t.props["data-value"]||t.props["data-sort"]||""}return typeof e=="string"||typeof e=="number"?e:String(e)},stripReactElements=e=>{if(Array.isArray(e))return e.map(stripReactElements);if(e&&typeof e=="object"&&!React.isValidElement(e)){const t={};for(const n in e)React.isValidElement(e[n])||(t[n]=stripReactElements(e[n]));return t}return e},Edit="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.06%203.58988L20.41%204.93988C21.2%205.71988%2021.2%206.98988%2020.41%207.76988L7.18%2020.9999H3V16.8199L13.4%206.40988L16.23%203.58988C17.01%202.80988%2018.28%202.80988%2019.06%203.58988ZM5%2018.9999L6.41%2019.0599L16.23%209.22988L14.82%207.81988L5%2017.6399V18.9999Z'%20fill='%2379747E'/%3e%3c/svg%3e",Approve="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.00003%2016.1701L4.83003%2012.0001L3.41003%2013.4101L9.00003%2019.0001L21%207.00009L19.59%205.59009L9.00003%2016.1701Z'%20fill='%2379747E'/%3e%3c/svg%3e",Reassign="data:image/svg+xml,%3csvg%20width='17'%20height='20'%20viewBox='0%200%2017%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.83828%200.221421C8.68188%200.075693%208.47503%20-0.00364251%208.2613%200.000128532C8.04757%200.00389957%207.84365%200.0904828%207.69249%200.241637C7.54134%200.392791%207.45476%200.596715%207.45098%200.810446C7.44721%201.02418%207.52655%201.23103%207.67228%201.38742L9.01428%202.72942H8.53028C6.89858%202.72942%205.30353%203.21327%203.94682%204.1198C2.59012%205.02632%201.53269%206.31479%200.908271%207.82228C0.283848%209.32977%200.120471%2010.9886%200.438799%2012.5889C0.757127%2014.1893%201.54286%2015.6593%202.69665%2016.8131C3.85043%2017.9668%205.32044%2018.7526%206.92078%2019.0709C8.52112%2019.3892%2010.1799%2019.2258%2011.6874%2018.6014C13.1949%2017.977%2014.4834%2016.9196%2015.3899%2015.5629C16.2964%2014.2062%2016.7803%2012.6111%2016.7803%2010.9794C16.7803%2010.7606%2016.6934%2010.5508%2016.5386%2010.3961C16.3839%2010.2413%2016.1741%2010.1544%2015.9553%2010.1544C15.7365%2010.1544%2015.5266%2010.2413%2015.3719%2010.3961C15.2172%2010.5508%2015.1303%2010.7606%2015.1303%2010.9794C15.1302%2012.2819%2014.7448%2013.5553%2014.0225%2014.6391C13.3002%2015.723%2012.2733%2016.5689%2011.0712%2017.0703C9.86915%2017.5718%208.54557%2017.7064%207.26716%2017.4571C5.98875%2017.2078%204.81268%2016.5859%203.88704%2015.6695C2.96139%2014.7532%202.32757%2013.5835%202.06538%2012.3077C1.80319%2011.0318%201.92436%209.70696%202.41362%208.49986C2.90289%207.29276%203.73837%206.25741%204.81488%205.52419C5.89138%204.79097%207.16076%204.39266%208.46318%204.37942L7.67118%205.17142C7.52097%205.32709%207.43791%205.53552%207.43989%205.75184C7.44187%205.96815%207.52873%206.17503%207.68177%206.32792C7.8348%206.48081%208.04177%206.56748%208.25808%206.56925C8.47439%206.57103%208.68275%206.48778%208.83828%206.33742L11.3133%203.86242C11.4678%203.70773%2011.5546%203.49805%2011.5546%203.27942C11.5546%203.0608%2011.4678%202.85111%2011.3133%202.69642L8.83828%200.221421ZM12.9523%207.08542C13.1097%207.23717%2013.2005%207.44523%2013.2046%207.66387C13.2087%207.8825%2013.1259%208.09384%2012.9743%208.25142L8.73928%2012.6514C8.66232%2012.7313%208.57005%2012.7948%208.46799%2012.8382C8.36593%2012.8815%208.25617%2012.9039%208.14528%2012.9039C8.03438%2012.9039%207.92462%2012.8815%207.82256%2012.8382C7.7205%2012.7948%207.62824%2012.7313%207.55128%2012.6514L5.73628%2010.766C5.65735%2010.6888%205.59473%2010.5965%205.55212%2010.4947C5.50952%2010.3928%205.48779%2010.2834%205.48822%2010.173C5.48866%2010.0626%205.51125%209.95343%205.55467%209.85191C5.59808%209.75039%205.66143%209.65862%205.74096%209.58204C5.82049%209.50545%205.91459%209.44561%206.01767%209.40606C6.12075%209.3665%206.23073%209.34804%206.34107%209.35177C6.45142%209.3555%206.5599%209.38134%206.66008%209.42776C6.76026%209.47418%206.8501%209.54024%206.92428%209.62202L8.14528%2010.8892L11.7863%207.10742C11.938%206.94997%2012.1461%206.85921%2012.3647%206.85509C12.5834%206.85096%2012.7947%206.93381%2012.9523%207.08542Z'%20fill='%2365B230'/%3e%3c/svg%3e",Add="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%2013H13V20H11V13H4V11H11V4H13V11H20V13Z'%20fill='%2379747E'/%3e%3c/svg%3e",Delete="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15%203V4H20V6H19V19C19%2020.1%2018.1%2021%2017%2021H7C5.9%2021%205%2020.1%205%2019V6H4V4H9V3H15ZM7%2019H17V6H7V19ZM9%208H11V17H9V8ZM15%208H13V17H15V8Z'%20fill='%2379747E'/%3e%3c/svg%3e",Cancel="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202C6.47%202%202%206.47%202%2012C2%2017.53%206.47%2022%2012%2022C17.53%2022%2022%2017.53%2022%2012C22%206.47%2017.53%202%2012%202ZM12%2020C7.59%2020%204%2016.41%204%2012C4%207.59%207.59%204%2012%204C16.41%204%2020%207.59%2020%2012C20%2016.41%2016.41%2020%2012%2020ZM12%2010.59L15.59%207L17%208.41L13.41%2012L17%2015.59L15.59%2017L12%2013.41L8.41%2017L7%2015.59L10.59%2012L7%208.41L8.41%207L12%2010.59Z'%20fill='%23C53225'/%3e%3c/svg%3e",ShowOrHideColumn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%3e%3cpath%20d='M0%200%20C1.39042818%20-0.00202787%202.78085531%20-0.00494519%204.17127991%20-0.00869751%20C7.06831102%20-0.0130889%209.9650623%20-0.00679496%2012.86206055%200.00732422%20C16.54104169%200.02439842%2020.21936509%200.01456623%2023.89832211%20-0.00339317%20C26.76486496%20-0.0143319%2029.63125676%20-0.01073875%2032.49780464%20-0.0030098%20C34.50268617%20-0.00008719%2036.50757401%20-0.00906178%2038.51243591%20-0.0184021%20C51.84643905%200.08288397%2062.36831214%202.18438052%2072.34765625%2011.3984375%20C82.72862089%2022.29501297%2083.81157502%2035.39563727%2083.72860718%2049.8704834%20C83.73328715%2051.15071931%2083.73796712%2052.43095523%2083.74278891%2053.74998617%20C83.75517662%2057.26010193%2083.74918524%2060.76996931%2083.73983026%2064.28008533%20C83.73298924%2068.08247635%2083.7435458%2071.88482726%2083.75177002%2075.68721008%20C83.76505611%2083.11894567%2083.76225259%2090.55058996%2083.7535321%2097.98232901%20C83.74673568%20104.02640949%2083.74584727%20110.07046452%2083.74910355%20116.11454773%20C83.74956325%20116.97729682%2083.75002294%20117.84004591%2083.75049657%20118.72893891%20C83.75145582%20120.4820182%2083.75242847%20122.23509749%2083.75341435%20123.98817676%20C83.76195323%20140.39713998%2083.75215774%20156.80605278%2083.73601325%20173.21500772%20C83.72261144%20187.27113064%2083.72493995%20201.32717921%2083.73876953%20215.38330078%20C83.75485194%20231.73663572%2083.7611294%20248.08992656%2083.75193274%20264.4432683%20C83.75097717%20266.18962128%2083.75003406%20267.93597427%2083.74910355%20269.68232727%20C83.74864072%20270.54139399%2083.74817789%20271.4004607%2083.74770104%20272.28555974%20C83.74511913%20278.31698617%2083.74946486%20284.34838445%2083.75654221%20290.37980652%20C83.76498704%20297.73782249%2083.76261469%20305.09574254%2083.74669997%20312.45374763%20C83.73885718%20316.20237621%2083.73565678%20319.95084531%2083.74564743%20323.69947243%20C83.75634508%20327.77524883%2083.74350635%20331.85062835%2083.72860718%20335.9263916%20C83.73529934%20337.09392896%2083.74199151%20338.26146632%2083.74888647%20339.4643836%20C83.6547451%20352.81613252%2081.80817857%20364.46802168%2072.34765625%20374.3984375%20C61.26850374%20384.62796175%2049.36756952%20385.86653363%2034.74609375%20385.76171875%20C33.37472535%20385.7611982%2032.0033562%20385.76172342%2030.63198853%20385.76322937%20C27.77960848%20385.76314043%2024.92751564%20385.75287014%2022.07519531%20385.73461914%20C18.44659665%20385.71189135%2014.81841439%20385.71140425%2011.18976402%20385.71813679%20C8.36535029%20385.72150093%205.54102895%20385.71480174%202.71663284%20385.70500755%20C0.73715224%20385.69937125%20-1.24234414%20385.70058074%20-3.22183228%20385.70198059%20C-16.18209116%20385.60087128%20-25.59788448%20384.09755013%20-35.65234375%20375.3984375%20C-45.54661727%20364.26539458%20-47.11519405%20351.39165616%20-47.03329468%20336.96398926%20C-47.03797465%20335.6757351%20-47.04265462%20334.38748094%20-47.04747641%20333.06018877%20C-47.05988124%20329.52308071%20-47.0538647%20325.98621866%20-47.04451776%20322.44911027%20C-47.03768394%20318.61945404%20-47.04822979%20314.78983788%20-47.05645752%20310.96018982%20C-47.06975116%20303.47317331%20-47.06693669%20295.98624736%20-47.0582196%20288.4992274%20C-47.05142618%20282.41077808%20-47.05053348%20276.32235401%20-47.05379105%20270.23390198%20C-47.05425075%20269.36517795%20-47.05471044%20268.49645393%20-47.05518407%20267.60140494%20C-47.05614331%20265.83624438%20-47.05711595%20264.07108383%20-47.05810185%20262.30592328%20C-47.06664294%20245.77967925%20-47.05684175%20229.25348526%20-47.04070075%20212.72724944%20C-47.02729873%20198.56732745%20-47.02962719%20184.40747926%20-47.04345703%20170.24755859%20C-47.05953551%20153.7777782%20-47.06581909%20137.3080416%20-47.05662024%20120.83825445%20C-47.05566466%20119.07982732%20-47.05472155%20117.32140017%20-47.05379105%20115.56297302%20C-47.05332822%20114.69794239%20-47.05286539%20113.83291175%20-47.05238854%20112.94166806%20C-47.04980545%20106.8651998%20-47.05415492%20100.78875947%20-47.06122971%2094.71229553%20C-47.06967015%2087.30042821%20-47.06731132%2079.88865612%20-47.05138747%2072.47679961%20C-47.04353884%2068.69994852%20-47.04035446%2064.92325585%20-47.05033493%2061.14640617%20C-47.06101703%2057.0417633%20-47.04820598%2052.93751546%20-47.03329468%2048.83288574%20C-47.03998684%2047.65397152%20-47.04667901%2046.47505731%20-47.05357397%2045.26041842%20C-46.9542233%2031.0988315%20-44.31098753%2020.04518898%20-34.13671875%209.88671875%20C-23.81712366%200.73176368%20-13.42909464%20-0.06246693%200%200%20Z%20'%20fill='%23212121'%20transform='translate(88.65234375,63.6015625)'/%3e%3cpath%20d='M0%200%20C1.37183255%20-0.00389885%202.74366391%20-0.00823591%204.11549377%20-0.01298523%20C6.97555474%20-0.02039888%209.83549214%20-0.02019147%2012.69555664%20-0.01489258%20C16.33091665%20-0.00909958%2019.96576688%20-0.02604816%2023.60104275%20-0.04923725%20C26.42978286%20-0.06408398%2029.25840319%20-0.06483166%2032.08717537%20-0.06172752%20C34.0694059%20-0.06247893%2036.05161807%20-0.07625581%2038.03379822%20-0.09040833%20C50.34165442%20-0.02798927%2060.24736289%202.00602656%2069.62890625%2010.30078125%20C80.23052058%2021.7808721%2081.93785653%2033.21068447%2081.88960266%2048.37446594%20C81.89342821%2049.66015683%2081.89725376%2050.94584772%2081.90119523%2052.27049893%20C81.9114249%2055.81433436%2081.90930634%2059.35806804%2081.90501463%2062.90191162%20C81.9025382%2066.73366042%2081.91157295%2070.56538531%2081.91905212%2074.39712524%20C81.93177597%2081.89455933%2081.93359569%2089.39195757%2081.93125186%2096.88940064%20C81.92946586%20102.98649949%2081.93122438%20109.08358749%2081.9354763%20115.18068504%20C81.93607149%20116.04981554%2081.93666668%20116.91894603%2081.93727991%20117.81441381%20C81.93849171%20119.58029897%2081.93970585%20121.34618412%2081.94092228%20123.11206927%20C81.95178902%20139.65831656%2081.9496395%20156.20454344%2081.94353744%20172.75079187%20C81.93836971%20187.86983815%2081.94962147%20202.98881998%2081.96863566%20218.10785351%20C81.98803326%20233.65155953%2081.99626664%20249.19523509%2081.9925124%20264.73895329%20C81.99060319%20273.45773292%2081.99306052%20282.17645771%2082.00722694%20290.89522743%20C82.01916628%20298.31814058%2082.02051713%20305.74096513%2082.00843678%20313.16387955%20C82.00256581%20316.94678992%2082.00139893%20320.72953843%2082.01343918%20324.51243782%20C82.02637213%20328.62380077%2082.01579126%20332.73478184%2082.00312805%20336.84614563%20C82.01050234%20338.02710621%2082.01787662%20339.20806678%2082.02547437%20340.42481405%20C81.94020249%20353.64162412%2079.58475249%20365.22365731%2070.62890625%20375.30078125%20C59.43149551%20384.98877486%2048.5995069%20385.6116798%2034.29296875%20385.6015625%20C32.92353183%20385.60546179%2031.5540961%20385.60979893%2030.18466187%20385.61454773%20C27.32879702%20385.62196213%2024.47305589%20385.62175381%2021.6171875%20385.61645508%20C17.99089323%20385.61066763%2014.36511094%20385.62759691%2010.73890114%20385.65079975%20C7.91440971%20385.66566391%205.090038%20385.66639174%202.26551437%20385.66329002%20C0.28942353%20385.66404012%20-1.68664899%20385.67780547%20-3.66268921%20385.69197083%20C-16.94942739%20385.62458325%20-27.43251173%20383.47720207%20-37.37109375%20374.30078125%20C-47.75205839%20363.40420578%20-48.83501252%20350.30358148%20-48.75204468%20335.82873535%20C-48.75672465%20334.54849944%20-48.76140462%20333.26826352%20-48.76622641%20331.94923258%20C-48.77861412%20328.43911682%20-48.77262274%20324.92924944%20-48.76326776%20321.41913342%20C-48.75642674%20317.6167424%20-48.7669833%20313.81439149%20-48.77520752%20310.01200867%20C-48.78849361%20302.58027308%20-48.78569009%20295.14862879%20-48.7769696%20287.71688974%20C-48.77017318%20281.67280926%20-48.76928477%20275.62875423%20-48.77254105%20269.58467102%20C-48.77300075%20268.72192193%20-48.77346044%20267.85917284%20-48.77393407%20266.97027984%20C-48.77489332%20265.21720055%20-48.77586597%20263.46412126%20-48.77685185%20261.71104199%20C-48.78539073%20245.30207877%20-48.77559524%20228.89316597%20-48.75945075%20212.48421103%20C-48.74604894%20198.42808811%20-48.74837745%20184.37203954%20-48.76220703%20170.31591797%20C-48.77828944%20153.96258303%20-48.7845669%20137.60929219%20-48.77537024%20121.25595045%20C-48.77441467%20119.50959747%20-48.77347156%20117.76324448%20-48.77254105%20116.01689148%20C-48.77184681%20114.72829141%20-48.77184681%20114.72829141%20-48.77113854%20113.41365901%20C-48.76855663%20107.38223258%20-48.77290236%20101.3508343%20-48.77997971%2095.31941223%20C-48.78842454%2087.96139626%20-48.78605219%2080.60347621%20-48.77013747%2073.24547112%20C-48.76229468%2069.49684254%20-48.75909428%2065.74837344%20-48.76908493%2061.99974632%20C-48.77978258%2057.92396992%20-48.76694385%2053.8485904%20-48.75204468%2049.77282715%20C-48.75873684%2048.60528979%20-48.76542901%2047.43775243%20-48.77232397%2046.23483515%20C-48.67188333%2031.98968244%20-46.49788008%2020.60627557%20-36.37109375%2010.30078125%20C-24.99934532%200.70204736%20-14.4396423%20-0.01018664%200%200%20Z%20'%20fill='%23212121'%20transform='translate(389.37109375,63.69921875)'/%3e%3cpath%20d='M0%200%20C1.37422758%20-0.00135128%202.7484547%20-0.00329565%204.12268066%20-0.00579834%20C6.98694461%20-0.00872786%209.85108284%20-0.00452264%2012.71533203%200.00488281%20C16.35966249%200.01627611%2020.0036982%200.00970489%2023.64801788%20-0.00226212%20C26.48099937%20-0.00953987%2029.31391266%20-0.00716587%2032.14689636%20-0.00200653%20C34.13524571%20-0.00005138%2036.12359788%20-0.00605238%2038.11193848%20-0.01226807%20C50.97970432%200.05377783%2060.71208654%201.43181578%2070.59375%2010.265625%20C80.43904472%2021.59627658%2081.90061916%2032.80877037%2081.85444641%2047.42196655%20C81.85827196%2048.71653011%2081.86209751%2050.01109367%2081.86603898%2051.34488642%20C81.87626947%2054.91345539%2081.87414988%2058.48192333%2081.86985838%2062.05050039%20C81.86738212%2065.90881512%2081.87641644%2069.76710608%2081.88389587%2073.62541199%20C81.89661984%2081.17464796%2081.89843945%2088.72384832%2081.89609561%2096.27309321%20C81.89430976%20102.4116766%2081.89606782%20108.55024922%2081.90032005%20114.68883133%20C81.90091524%20115.56380127%2081.90151043%20116.43877121%2081.90212366%20117.34025539%20C81.90333546%20119.11798027%2081.90454959%20120.89570516%2081.90576603%20122.67343004%20C81.91663264%20139.33028616%2081.91448321%20155.98712201%2081.90838119%20172.64397927%20C81.90321249%20187.86716535%2081.9144678%20203.09028744%2081.93347941%20218.31346087%20C81.95287204%20233.96225318%2081.96111133%20249.61101523%2081.95735615%20265.25981963%20C81.95544632%20274.03837098%2081.9579105%20282.81686787%2081.97207069%20291.59540939%20C81.98400361%20299.06848993%2081.98536797%20306.54148247%2081.97328053%20314.01456426%20C81.96740531%20317.8236788%2081.96625461%20321.63263253%2081.97828293%20325.44173622%20C81.99119743%20329.57972269%2081.98064519%20333.71732895%2081.9679718%20337.85531616%20C81.97534609%20339.04697148%2081.98272037%20340.23862679%2081.99031812%20341.46639287%20C81.9070551%20354.42932661%2079.28845483%20365.35673186%2070.59375%20375.265625%20C59.40723239%20384.95958111%2048.55610413%20385.57651772%2034.2578125%20385.56640625%20C32.88837558%20385.57030554%2031.51893985%20385.57464268%2030.14950562%20385.57939148%20C27.29364077%20385.58680588%2024.43789964%20385.58659756%2021.58203125%20385.58129883%20C17.95573698%20385.57551138%2014.32995469%20385.59244066%2010.70374489%20385.6156435%20C7.87925346%20385.63050766%205.05488175%20385.63123549%202.23035812%20385.62813377%20C0.25426728%20385.62888387%20-1.72180524%20385.64264922%20-3.69784546%20385.65681458%20C-16.86957859%20385.59001028%20-27.6387559%20383.53875206%20-37.40625%20374.265625%20C-47.39849958%20362.83409444%20-48.87080006%20349.69908274%20-48.79393005%20334.88296509%20C-48.79931559%20333.61230741%20-48.80470113%20332.34164973%20-48.81024987%20331.03248727%20C-48.82455435%20327.54904283%20-48.8205075%20324.06583798%20-48.81308305%20320.58238125%20C-48.80831603%20316.80857637%20-48.82089218%20313.03482073%20-48.83110046%20309.2610321%20C-48.84822503%20301.88477917%20-48.84914173%20294.50861166%20-48.84388756%20287.13234402%20C-48.83983281%20281.1321392%20-48.84130485%20275.13195947%20-48.84663582%20269.13175583%20C-48.84738424%20268.27513491%20-48.84813266%20267.41851399%20-48.84890376%20266.53593486%20C-48.85043537%20264.79526103%20-48.85197372%20263.05458721%20-48.85351873%20261.31391339%20C-48.86722079%20245.02030083%20-48.86182222%20228.72673639%20-48.85033352%20212.43312494%20C-48.84040323%20197.55559901%20-48.85334236%20182.67819748%20-48.87726771%20167.80069073%20C-48.90170128%20152.49074933%20-48.91125616%20137.18086577%20-48.90461498%20121.87090528%20C-48.90113225%20113.28900812%20-48.90329207%20104.70720657%20-48.92086601%2096.12532425%20C-48.93564136%2088.82004658%20-48.93615417%2081.51493187%20-48.9187951%2074.20965721%20C-48.91032641%2070.48908615%20-48.90803312%2066.76880554%20-48.92344666%2063.0482502%20C-49.06818906%2025.32392537%20-49.06818906%2025.32392537%20-38.8046875%2012.67578125%20C-27.21540674%201.02987534%20-15.72851608%20-0.04916843%200%200%20Z%20'%20fill='%23212121'%20transform='translate(239.40625,63.734375)'/%3e%3c/svg%3e",SearchRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15.5001%2014.5H14.7101L14.4301%2014.23C15.6301%2012.83%2016.2501%2010.92%2015.9101%208.89002C15.4401%206.11002%2013.1201%203.89002%2010.3201%203.55002C6.09014%203.03002%202.53014%206.59001%203.05014%2010.82C3.39014%2013.62%205.61014%2015.94%208.39014%2016.41C10.4201%2016.75%2012.3301%2016.13%2013.7301%2014.93L14.0001%2015.21V16L18.2501%2020.25C18.6601%2020.66%2019.3301%2020.66%2019.7401%2020.25C20.1501%2019.84%2020.1501%2019.17%2019.7401%2018.76L15.5001%2014.5ZM9.50014%2014.5C7.01014%2014.5%205.00014%2012.49%205.00014%2010C5.00014%207.51002%207.01014%205.50002%209.50014%205.50002C11.9901%205.50002%2014.0001%207.51002%2014.0001%2010C14.0001%2012.49%2011.9901%2014.5%209.50014%2014.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",SortIcon="data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3115_5954)'%3e%3cpath%20d='M4.72326%2013.2386L1.2194%209.72426C0.396731%209.2419%20-0.40373%2010.2466%200.225485%2010.9546C1.77064%2012.4991%203.28619%2014.0746%204.8348%2015.616C4.89796%2015.6789%204.93004%2015.7593%205.00061%2015.8228C5.43736%2016.2172%206.29803%2015.9196%206.3158%2015.2815L6.31382%200.712092C6.27829%20-0.0888571%205.09586%20-0.25464%204.80025%200.452932C4.78347%200.493379%204.72277%200.686625%204.72277%200.711592V13.2391L4.72326%2013.2386Z'%20fill='%23909090'/%3e%3cpath%20d='M10.2754%202.75243L13.7792%206.26632C14.596%206.75068%2015.4078%205.7465%2014.7727%205.03643C13.2423%203.50195%2011.7332%201.94449%2010.2004%200.412502C10.1372%200.349085%2010.1051%200.26919%2010.0345%200.205773C9.56868%20-0.214176%208.72134%200.0359959%208.68235%200.709612L8.68432%2015.279C8.71986%2016.0799%209.90229%2016.2457%2010.1979%2015.5381C10.2147%2015.4977%2010.2754%2015.3045%2010.2754%2015.2795V2.75243Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3115_5954'%3e%3crect%20width='15'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%201%2015%200)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",InfoIcon="data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.71338%2011.25H9.21338V6.75H7.71338V11.25ZM8.46338%205.25C8.67588%205.25%208.85413%205.178%208.99813%205.034C9.14213%204.89%209.21388%204.712%209.21338%204.5C9.21338%204.2875%209.14138%204.1095%208.99738%203.966C8.85338%203.8225%208.67538%203.7505%208.46338%203.75C8.25088%203.75%208.07288%203.822%207.92938%203.966C7.78588%204.11%207.71388%204.288%207.71338%204.5C7.71338%204.7125%207.78538%204.89075%207.92938%205.03475C8.07338%205.17875%208.25138%205.2505%208.46338%205.25ZM8.46338%2015C7.42588%2015%206.45088%2014.803%205.53838%2014.409C4.62588%2014.015%203.83213%2013.4807%203.15713%2012.8062C2.48213%2012.1312%201.94788%2011.3375%201.55438%2010.425C1.16088%209.5125%200.963879%208.5375%200.963379%207.5C0.963379%206.4625%201.16038%205.4875%201.55438%204.575C1.94838%203.6625%202.48263%202.86875%203.15713%202.19375C3.83213%201.51875%204.62588%200.9845%205.53838%200.591C6.45088%200.1975%207.42588%200.0005%208.46338%200C9.50088%200%2010.4759%200.197%2011.3884%200.591C12.3009%200.985%2013.0946%201.51925%2013.7696%202.19375C14.4446%202.86875%2014.9791%203.6625%2015.3731%204.575C15.7671%205.4875%2015.9639%206.4625%2015.9634%207.5C15.9634%208.5375%2015.7664%209.5125%2015.3724%2010.425C14.9784%2011.3375%2014.4441%2012.1312%2013.7696%2012.8062C13.0946%2013.4812%2012.3009%2014.0157%2011.3884%2014.4097C10.4759%2014.8037%209.50088%2015.0005%208.46338%2015ZM8.46338%2013.5C10.1384%2013.5%2011.5571%2012.9187%2012.7196%2011.7562C13.8821%2010.5937%2014.4634%209.175%2014.4634%207.5C14.4634%205.825%2013.8821%204.40625%2012.7196%203.24375C11.5571%202.08125%2010.1384%201.5%208.46338%201.5C6.78838%201.5%205.36963%202.08125%204.20713%203.24375C3.04463%204.40625%202.46338%205.825%202.46338%207.5C2.46338%209.175%203.04463%2010.5937%204.20713%2011.7562C5.36963%2012.9187%206.78838%2013.5%208.46338%2013.5Z'%20fill='%23464646'/%3e%3c/svg%3e",ExportIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.59%209.5H15V4.5C15%203.95%2014.55%203.5%2014%203.5H10C9.45%203.5%209%203.95%209%204.5V9.5H7.41C6.52%209.5%206.07%2010.58%206.7%2011.21L11.29%2015.8C11.68%2016.19%2012.31%2016.19%2012.7%2015.8L17.29%2011.21C17.92%2010.58%2017.48%209.5%2016.59%209.5ZM5%2019.5C5%2020.05%205.45%2020.5%206%2020.5H18C18.55%2020.5%2019%2020.05%2019%2019.5C19%2018.95%2018.55%2018.5%2018%2018.5H6C5.45%2018.5%205%2018.95%205%2019.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FileOpenRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202.5H10.83C10.3%202.5%209.79%202.71%209.41%203.09L4.59%207.91C4.21%208.29%204%208.8%204%209.33V20.5C4%2021.6%204.9%2022.5%206%2022.5H18C19.1%2022.5%2020%2021.6%2020%2020.5V4.5C20%203.4%2019.1%202.5%2018%202.5ZM11.65%2017.15L8.86%2014.36C8.54%2014.04%208.76%2013.5%209.21%2013.5H11V10.51C11%209.96%2011.44%209.52%2011.99%209.51C12.55%209.5%2013%209.95%2013%2010.51V13.5H14.79C15.24%2013.5%2015.46%2014.04%2015.14%2014.35L12.35%2017.14C12.16%2017.34%2011.84%2017.34%2011.65%2017.15Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ReloadIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.6498%206.84999C16.0198%205.21999%2013.7098%204.27999%2011.1698%204.53999C7.49978%204.90999%204.47978%207.88999%204.06978%2011.56C3.51978%2016.41%207.26978%2020.5%2011.9998%2020.5C15.1898%2020.5%2017.9298%2018.63%2019.2098%2015.94C19.5298%2015.27%2019.0498%2014.5%2018.3098%2014.5C17.9398%2014.5%2017.5898%2014.7%2017.4298%2015.03C16.2998%2017.46%2013.5898%2019%2010.6298%2018.34C8.40978%2017.85%206.61978%2016.04%206.14978%2013.82C5.30978%209.93999%208.25978%206.49999%2011.9998%206.49999C13.6598%206.49999%2015.1398%207.18999%2016.2198%208.27999L14.7098%209.78999C14.0798%2010.42%2014.5198%2011.5%2015.4098%2011.5H18.9998C19.5498%2011.5%2019.9998%2011.05%2019.9998%2010.5V6.90999C19.9998%206.01999%2018.9198%205.56999%2018.2898%206.19999L17.6498%206.84999Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FilterAltOffRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.7901%206.11003C20.3001%205.45003%2019.8301%204.50003%2019.0001%204.50003H6.83008L14.8001%2012.47L19.7901%206.11003Z'%20fill='black'%20fill-opacity='0.54'/%3e%3cpath%20d='M20.4901%2020.99L3.51012%204.01003C3.12012%203.62003%202.49012%203.62003%202.10012%204.01003C1.71012%204.40003%201.71012%205.03003%202.10012%205.42003L10.0001%2013.5V18.5C10.0001%2019.6%2010.9001%2020.5%2012.0001%2020.5C13.1001%2020.5%2014.0001%2019.6%2014.0001%2018.5V17.33L19.0701%2022.4C19.4601%2022.79%2020.0901%2022.79%2020.4801%2022.4C20.8701%2022.01%2020.8801%2021.38%2020.4901%2020.99Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",PaginationControls=({currentPage:e,totalPages:t,setCurrentPage:n})=>{const l=Math.floor(e/5)*5,u=Math.min(l+5,t),f=()=>{n(Math.max(0,l-1))},p=()=>{n(Math.min(t-1,u))},d=[];for(let m=l;m<u;m++)d.push(jsxRuntimeExports.jsx("button",{className:`pagination-page${e===m?" active":""}`,onClick:()=>n(m),disabled:e===m,children:m+1},m));return jsxRuntimeExports.jsxs("div",{className:"pagination-controls",children:[jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(0),disabled:e===0,children:"First"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e-1),disabled:e===0,children:"Previous"}),l>0&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:f,children:"..."}),d,u<t&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:p,children:"..."}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e+1),disabled:e===t-1,children:"Next"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(t-1),disabled:e===t-1,children:"Last"})]})},RowsPerPageSelector=({rowsPerPage:e,setRowsPerPage:t,setCurrentPage:n,pageSizeOptions:i})=>jsxRuntimeExports.jsxs("div",{className:"rows-per-page-container",children:[jsxRuntimeExports.jsx("label",{htmlFor:"rows-per-page-select",children:"Rows per page:"}),jsxRuntimeExports.jsx("select",{id:"rows-per-page-select",value:e,onChange:o=>{t(Number(o.target.value)),n(0)},style:{marginLeft:"8px"},children:i.map(o=>jsxRuntimeExports.jsx("option",{value:o,children:o},o))})]}),EntriesInfo=({dataLength:e,currentPage:t,rowsPerPage:n})=>jsxRuntimeExports.jsx("div",{className:"entries-info",children:e>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Showing ",e===0?0:t*n+1," to"," ",Math.min((t+1)*n,e)," of ",e," ","entries"]})}),CEDataGridDynamicTable=({title:e,jsonData:t,columnList:n,ischeckBoxInGrid:i,isSingleSelectionMode:o=!1,isRadioButtonInGrid:l,onRadioChange:u,getSelectedRadioValue:f,renderRadioInColumnId:p,isSearchBoxInGrid:d,isAddButtonRequired:m,isEditButtonRequired:g,isDeleteButtonRequired:_,isApproveButtonRequired:S,isReassignButtonRequired:E,isCancelButtonRequired:b,isExportAllToExcel:T,handleEditClick:C,handleAddClick:A,handleDeleteClick:R,handleApproveClick:O,handleReassignClick:I,handleCancelClick:j,noOfPagesPerPage:M,clickableColumns:N,conditionalClickableColumns:D,clickableCellPredicate:F,handleCellClick:q,onReload:z,showDownloadIcon:G=!0,downloadOptions:ee,showRefreshIcon:Y=!0,showFullViewIcon:V=!0,showColumnVisibilityIcon:W=!0,showSortIcon:L=!0,showFilterIcon:B=!0,defaultSortConfig:U,onDataUpdate:K,isOverrideCSS:H,showPagination:J=!0,shouldResetSearchOnDataChange:X,pageSizeOptions:Q=[10,20,50,100],handleSelectedRows:le,rowsSelected:ye,selectionKey:de="id",onPageChange:fe})=>{const[pe,Ee]=React.useState({}),[te,Te]=React.useState([]),[ue,Me]=React.useState([]),[je,Pe]=React.useState(!1),[Fe,Ve]=React.useState(new Set),[qe,De]=React.useState(null),[ke,Ue]=React.useState(!1),[We,Ge]=React.useState(""),[Xe,Ze]=React.useState(null),[Je,ft]=React.useState("contains"),[ut,Qe]=React.useState(""),[Ke,nt]=React.useState({}),[it,ot]=React.useState(0),[pt,It]=React.useState(M??10),[yt,Rt]=React.useState(new Set),[dt,vt]=React.useState(""),[Et,mt]=React.useState(!1),[ct,gt]=React.useState(new Set),[bt,Le]=React.useState([]),[lt,St]=React.useState(null),jt=React.useRef(null),Bt=React.useRef(null),At=React.useRef(null),Mt=React.useRef(null),[wt,zt]=React.useState(new Set),[Z,oe]=React.useState([]),[ne,ie]=React.useState(!1),[ae,se]=React.useState(null),[ve,Se]=React.useState(!1),[_e,ge]=React.useState(!0),be=React.useRef([]),Ce=()=>Se(!0),Ae=()=>Se(!1),Ie=ce=>{if(ot(ce),typeof fe=="function")try{fe(ce)}catch{}};React.useEffect(()=>{if(typeof fe=="function")try{fe(it)}catch{}},[it]);const Re=(ce,he)=>{if(typeof de=="function")try{const me=de(ce);if(me!=null)return me}catch{}else if(typeof de=="string"&&ce&&ce[de]!==void 0)return ce[de];if(he!==void 0)return`__row_${he}`};React.useEffect(()=>{if(typeof le=="function"){const ce=Array.from(Fe),he=ce.map(me=>{if(typeof me=="string"&&me.startsWith("__row_")){const we=parseInt(me.slice(6),10);return!isNaN(we)&&we>=0&&we<te.length?te[we]:void 0}return(ue||te||[]).find(we=>{const $e=Re(we);return $e!==void 0&&($e===me||String($e)===String(me))})}).filter(Boolean);try{le.length===1?le({ids:ce,rows:he}):le(he)}catch{try{le(he)}catch{}}}},[Fe,te,de]),React.useEffect(()=>{if(!ye)return;const ce=Array.from(ye),he=ce.every(we=>typeof we=="number"&&we>=0&&we<te.length),me=new Set(ce.map(we=>{if(he){const $e=te[we-1];return Re($e,we)??`__row_${we}`}return we}));((we,$e)=>!(we.size!==$e.size||!Array.from(we).every(Ne=>$e.has(Ne))))(me,Fe)||Ve(me)},[ye,te,de]),React.useEffect(()=>{if(t&&Array.isArray(t)){const ce=stripReactElements(be.current),he=stripReactElements(t),me=JSON.stringify(ce)!==JSON.stringify(he);if(t&&Array.isArray(t)&&me){let xe=[...t];if(U){const{column:we,direction:$e}=U;xe.sort((Ne,ze)=>{const He=Ne[we],rt=ze[we],Ye=new Date(He),at=new Date(rt),ht=!isNaN(Ye.getTime()),Ft=!isNaN(at.getTime());if(ht&&Ft)return $e==="asc"?Ye.getTime()-at.getTime():at.getTime()-Ye.getTime();const Dt=String(He||"").toLowerCase(),kt=String(rt||"").toLowerCase();return Dt.localeCompare(kt)}),$e==="desc"&&xe.reverse(),se(U)}if(Te(xe),Me(xe),ge(!1),X?(vt(""),nt({})):Pt(),p){const we={},$e=Array.isArray(p)?p:[p];xe.forEach((Ne,ze)=>{const He=Ne.id??`__row_${ze}`;for(const rt of $e)if(Ne[rt]===!0){we[He]={columnId:rt,rowData:Ne};break}}),Be(we)}be.current=t}}else ge(!0)},[t,U,p]),React.useEffect(()=>{if(te.length>0){const ce=(n??[]).map(xe=>({id:xe.id,label:xe.label??xe.id,tooltip:xe.tooltip,shouldDisplay:xe.shouldDisplay??!0,shouldVisible:xe.shouldVisible??!0,width:xe.width,elementType:xe.elementType,required:xe.required??!1})),he=Object.keys(te[0]||{}).map(xe=>({id:xe,label:xe.charAt(0).toUpperCase()+xe.slice(1),shouldDisplay:!0,shouldVisible:!0})),me=ce.length>0?ce:he;if(oe(me),!ne){const xe=me.filter($e=>$e.shouldDisplay!==!1).map($e=>$e.id),we=me.filter($e=>$e.shouldVisible!==!1).map($e=>$e.id);gt(new Set(xe)),Le(we),ie(!0)}}},[te,n]);const[Oe,Be]=React.useState({}),et=({rowIndex:ce,columnId:he,rowData:me})=>{const xe=Array.isArray(p)?p:[p],we={...me,...Object.fromEntries(xe.map(ze=>[ze,ze===he]))},$e=me.id??`__row_${ce}`;Be(ze=>({...ze,[$e]:{columnId:he,rowData:we}}));const Ne=te.map((ze,He)=>(ze.id??`__row_${He}`)===$e?{...ze,...Object.fromEntries(xe.map(Ye=>[Ye,Ye===he]))}:ze);Te(Ne),Me(Ne),K&&K({fullData:Ne,updatedRow:we})},tt=ce=>{var xe;const he=te.findIndex(we=>we===ce),me=ce.id??`__row_${he}`;return((xe=Oe[me])==null?void 0:xe.columnId)||""},st=React.useMemo(()=>{const ce=it*pt,he=ce+pt;return te.slice(ce,he)},[te,it,pt]),Tt=()=>{vt("");const ce=$t(ue,Ke,"");Te(ce)},Pt=()=>{const ce=$t(ue,Ke,dt);Te(ce),ot(0)},Ct=ce=>{const he=new Set(ct);he.has(ce)?he.size>1&&he.delete(ce):he.add(ce),gt(he)},_t=(ce,he=null)=>{const me=he?`${ce}-${he}`:`${ce}`,xe=new Set(yt);xe.has(me)?xe.delete(me):(Array.from(xe).forEach(we=>{we.startsWith(`${ce}`)&&xe.delete(we)}),xe.add(me)),Rt(xe)},Ot=ce=>{De(qe===ce?null:ce)};React.useEffect(()=>{const ce=he=>{var Ne,ze,He,rt;if(!qe)return;const me=he.target,xe=((Ne=Bt.current)==null?void 0:Ne.contains(me))??!1,we=((ze=At.current)==null?void 0:ze.contains(me))??!1,$e=((rt=(He=he.target)==null?void 0:He.closest)==null?void 0:rt.call(He,".dropdown-trigger"))!=null;!xe&&!we&&!$e&&De(null)};return document.addEventListener("click",ce),()=>{document.removeEventListener("click",ce)}},[qe]),React.useMemo(()=>new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),[]);const xt=(ce,he)=>{if(ce==null)return 1;if(he==null)return-1;const me=new Date(ce),xe=new Date(he);return!isNaN(me.getTime())&&!isNaN(xe.getTime())?me.getTime()-xe.getTime():!isNaN(Number(ce))&&!isNaN(Number(he))?Number(ce)-Number(he):String(ce).localeCompare(String(he),void 0,{numeric:!0,sensitivity:"base"})},Wt=(ce,he,me)=>{const xe=getColumnValue(ce==null?void 0:ce[me]),we=getColumnValue(he==null?void 0:he[me]);return xt(xe,we)},Yt=(ce,he)=>{for(let me=1;me<ce.length;me++)if(Wt(ce[me-1],ce[me],he)>0)return!1;return!0},Zt=(ce,he)=>{for(let me=1;me<ce.length;me++)if(Wt(ce[me-1],ce[me],he)<0)return!1;return!0},$t=(ce,he=Ke,me=dt)=>{let xe=[...ce];if(me&&me.trim()){const we=me.toLowerCase();xe=xe.filter($e=>Object.entries($e).some(([Ne,ze])=>ct.has(Ne)?String(ze??"").toLowerCase().includes(we):!1))}return Object.entries(he||{}).forEach(([we,$e])=>{const{value:Ne,operator:ze}=$e,He=(Ne??"").toLowerCase();xe=xe.filter(rt=>{const Ye=rt[we],at=String(getColumnValue(Ye)??"").toLowerCase();switch((ze||"").toString()){case"contains":return at.includes(He);case"equals":return at===He;case"startsWith":return at.startsWith(He);case"endsWith":return at.endsWith(He);case"does not contain":return!at.includes(He);case"does not equal":return at!==He;case"is any of":return Ne.split(",").map(ht=>ht.trim().toLowerCase()).includes(at);case"Date Range":case"dateRange":{if(!Ne)return!0;const ht=Ne.split(" - ").map(sr=>sr.trim());if(ht.length!==2)return!1;const Ft=new Date(ht[0]),Dt=new Date(ht[1]);if(isNaN(Ft.getTime())||isNaN(Dt.getTime())||(Ft.setHours(0,0,0,0),Dt.setHours(23,59,59,999),!Ye))return!1;const kt=new Date(Ye);return isNaN(kt.getTime())?!1:(kt.setHours(0,0,0,0),kt>=Ft&&kt<=Dt)}default:return!0}})}),xe},Jt=ce=>{if(!ue||ue.length===0)return;const he=Object.keys(Ke).length>0,me=dt.trim().length>0,xe=he||me?te:ue;let we;(ae==null?void 0:ae.column)===ce?we=ae.direction==="asc"?"desc":"asc":Yt(xe,ce)?we="desc":(Zt(xe,ce),we="asc"),se({column:ce,direction:we});const $e=[...ue].sort((ze,He)=>{const rt=Wt(ze,He,ce);return we==="asc"?rt:-rt});Me($e);const Ne=$t($e);Te(Ne),ot(0)},Gt=()=>{if(!We){Ue(!1),Qe(""),Ge(""),ot(0);return}if(Je==="Date Range")if(Xe&&Xe.startDate&&Xe.endDate)Nt(We,void 0,"Date Range");else{Ue(!0);return}else ut&&ut.trim()!==""&&Nt(We,ut,Je);Ue(!1),Qe(""),Ge(""),Ze(null),ot(0)},Nt=(ce,he,me)=>{if(me==="Date Range"&&Xe&&ce){const{startDate:xe,endDate:we}=Xe;if(!xe||!we){console.warn("Invalid date range:",xe,we);return}const $e=new Date(xe);$e.setHours(0,0,0,0);const Ne=new Date(we);Ne.setHours(23,59,59,999);const ze=ue.filter(He=>{const rt=He[ce];if(!rt)return!1;const Ye=new Date(rt);return isNaN(Ye.getTime())?!1:(Ye.setHours(0,0,0,0),Ye>=$e&&Ye<=Ne)});Te(ze),ot(0),nt({...Ke,[ce]:{value:`${xe} - ${we}`,operator:"Date Range"}}),Ue(!1),De(null),Ze(null);return}if(ce){const xe={...Ke};if(he===""&&(me==="contains"||me==="equals")){Ge(ce),ft(me||Je),Qe(""),Ue(!0);return}else he&&he.trim()!==""?xe[ce]={value:he,operator:me||Je}:delete xe[ce];nt(xe);let we=[...ue];Object.entries(xe).forEach(([$e,Ne])=>{const{value:ze,operator:He}=Ne;we=we.filter(rt=>{const Ye=String(getColumnValue(rt[$e])||"").toLowerCase(),at=ze.toLowerCase();switch(He){case"contains":return Ye.includes(at);case"equals":return Ye===at;case"startsWith":return Ye.startsWith(at);case"endsWith":return Ye.endsWith(at);case"does not contain":return!Ye.includes(at);case"does not equal":return Ye!==at;case"is any of":return ze.split(",").map(ht=>ht.trim().toLowerCase()).includes(Ye);default:return!0}})}),Te(we),ot(0),Ue(!1)}},Qt=ce=>{ce.key==="Enter"&&Nt()};useEscapeKey(()=>{De(null),Ue(!1)});const Ut=(ce,he="")=>{const me=xe=>{const we=new Set(wt);we.has(xe)?we.delete(xe):we.add(xe),zt(we)};if(Array.isArray(ce)){const xe=Array.from(new Set(ce.reduce((we,$e)=>typeof $e=="object"&&$e!==null?[...we,...Object.keys($e)]:we,[])));return jsxRuntimeExports.jsx("div",{className:"expanded-section",children:jsxRuntimeExports.jsx("div",{className:"nested-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:xe.map(we=>jsxRuntimeExports.jsx("th",{children:we.charAt(0).toUpperCase()+we.slice(1)},we))})}),jsxRuntimeExports.jsx("tbody",{children:ce.map((we,$e)=>jsxRuntimeExports.jsx("tr",{children:xe.map(Ne=>jsxRuntimeExports.jsx("td",{children:typeof we[Ne]=="object"&&we[Ne]!==null?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>me(`${he}-${$e}-${Ne}`),children:wt.has(`${he}-${$e}-${Ne}`)?"▼":"▶"}),wt.has(`${he}-${$e}-${Ne}`)&&Ut(we[Ne],`${he}-${$e}-${Ne}`)]}):String(we[Ne]||"")},`${he}-${$e}-${Ne}`))},`${he}-${$e}`))})]})})})}else if(typeof ce=="object"&&ce!==null)return jsxRuntimeExports.jsx("div",{className:"nested-object",children:jsxRuntimeExports.jsxs("table",{className:"custom-table nested",children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Property"}),jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Value"})]})}),jsxRuntimeExports.jsx("tbody",{children:Object.entries(ce).map(([xe,we])=>jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:"table-cell",children:jsxRuntimeExports.jsx("strong",{children:xe})}),jsxRuntimeExports.jsx("td",{className:"table-cell",children:typeof we=="object"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>me(`${he}-${xe}`),children:wt.has(`${he}-${xe}`)?"▼":"▶"}),wt.has(`${he}-${xe}`)&&Ut(we,`${he}-${xe}`)]}):String(we)})]},`${he}-${xe}`))})]})});return jsxRuntimeExports.jsx("span",{children:String(ce)})},Kt=ce=>{var he;if(ce){const me=(he=ce.parentElement)==null?void 0:he.querySelector(".dropdown-trigger");if(!me)return;const xe=me.getBoundingClientRect(),we=window.innerHeight,$e=window.innerWidth,Ne=ce.offsetHeight,ze=ce.offsetWidth,He=xe.bottom+Ne>we,rt=xe.left+ze>$e,Ye=xe.left-ze<0;let at,ht;He?(at=xe.top-Ne,ce.classList.add("adjust-top")):(at=xe.bottom,ce.classList.remove("adjust-top")),rt?(ht=xe.right-ze,ce.classList.add("adjust-left"),ce.classList.remove("adjust-right")):Ye?(ht=xe.left,ce.classList.add("adjust-right"),ce.classList.remove("adjust-left")):(ht=xe.left,ce.classList.remove("adjust-left"),ce.classList.remove("adjust-right")),ce.style.top=`${at}px`,ce.style.left=`${ht}px`,ce.classList.add("dropdown-fixed-position")}};React.useEffect(()=>{const ce=he=>{ke&&jt.current&&!jt.current.contains(he.target)&&Ue(!1)};return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[ke]),React.useEffect(()=>()=>{},[qe]),React.useEffect(()=>{const ce=he=>{Et&&Mt.current&&!Mt.current.contains(he.target)&&mt(!1)};return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[Et]);const er=(ce,he)=>{ce.preventDefault();const me=ce.pageX,xe=pe[he]||150,we=Ne=>{const ze=Math.max(100,xe+(Ne.pageX-me));Ee(He=>({...He,[he]:ze}))},$e=()=>{document.removeEventListener("mousemove",we),document.removeEventListener("mouseup",$e)};document.addEventListener("mousemove",we),document.addEventListener("mouseup",$e)},Ht=(ce,he,me)=>{var we;const xe=String(he??"");if(typeof F=="function")try{if(F(me??{},ce))return!0}catch{}return N!=null&&N.includes(ce)?D!=null&&D[ce]?D[ce].includes(xe):!0:!!((we=D==null?void 0:D._global_)!=null&&we.includes(xe))},tr=(ce,he)=>{Ht(he,ce[he],ce)&&q&&q(ce,he)},qt=st.some(ce=>Array.from(ct).some(he=>Array.isArray(ce[he])&&ce[he].length>0&&ce[he].some(me=>typeof me=="object"&&me!==null))),rr=ce=>{const he=/[\\/:*?"<>|]/g;return ce.replace(he,"").trim()},nr=ce=>{try{const he=window.prompt("Enter file name",ce);if(!he)return ce;const me=rr(he);return me.length===0?ce:me.endsWith(".xlsx")?me:`${me}.xlsx`}catch{return ce}},Vt=(ce=!1)=>{const he=Z.filter(He=>ct.has(He.id)),me=ce||!(te&&te.length>0)?ue:te,xe=me.map(He=>he.reduce((rt,Ye)=>(rt[Ye.label||Ye.id]=getColumnValue(He[Ye.id]),rt),{})),we=utils.json_to_sheet(xe),$e=utils.book_new();utils.book_append_sheet($e,we,"Data");const ze=nr(ce||me===ue?"all-data-export.xlsx":"filtered-search-export.xlsx");writeFileSync($e,ze)},ir=()=>jsxRuntimeExports.jsxs("div",{className:H?"esign-table-container":"table-container",children:[jsxRuntimeExports.jsx("div",{className:"table-scroll-container",children:ct.size===0?jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"200px",display:"flex",alignItems:"center",justifyContent:"center",color:"#888",fontSize:"1.2em",background:"#fafafa",border:"1px solid #eee",borderRadius:"8px"},children:"Please select at least one column to show data"}):jsxRuntimeExports.jsxs("table",{className:"custom-table",style:{tableLayout:"fixed",width:"100%"},children:[jsxRuntimeExports.jsxs("thead",{children:[jsxRuntimeExports.jsxs("tr",{children:[qt&&jsxRuntimeExports.jsx("th",{className:"expand-column"}),i&&jsxRuntimeExports.jsx("th",{className:"checkbox-column",children:o?jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:Fe.size>0,onChange:()=>{Ve(new Set)}}):jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:te.length>0&&te.every((ce,he)=>{const me=Re(ce,he);return me!==void 0&&Fe.has(me)}),onChange:ce=>{if(ce){const he=new Set(te.map((me,xe)=>Re(me,xe)));Ve(he)}else Ve(new Set)}})}),bt.filter(ce=>Z.find(me=>me.id===ce)&&ct.has(ce)).map(ce=>{const he=Z.find(me=>me.id===ce);return he?jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:pe[he.id]?`${pe[he.id]}px`:he.width||"150px",minWidth:"80px",maxWidth:"600px"},children:jsxRuntimeExports.jsxs("div",{className:"column-header",children:[jsxRuntimeExports.jsxs("span",{className:"column-label-with-info",children:[he.label,he.tooltip&&jsxRuntimeExports.jsx("img",{src:InfoIcon,alt:"info",title:he.tooltip,width:14,height:14,className:"info-icon"})]}),jsxRuntimeExports.jsxs("div",{className:"column-actions",children:[L&&jsxRuntimeExports.jsx("img",{src:SortIcon,alt:"Sort",title:"Sort",width:14,height:14,onClick:()=>Jt(he.id),style:{cursor:"pointer",transition:"transform 0.2s ease-in-out",transform:(ae==null?void 0:ae.column)===he.id?ae.direction==="asc"?"rotate(0deg)":"rotate(180deg)":"none",filter:(ae==null?void 0:ae.column)===he.id?"brightness(0.6)":"none"}}),B&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:he.id===qe?Bt:null,children:[jsxRuntimeExports.jsx("span",{className:`dropdown-trigger ${Ke[he.id]?"filter-active":""}`,onClick:me=>{me.stopPropagation(),Ot(he.id)},title:Ke[he.id]?`Filter: ${Ke[he.id].operator} "${Ke[he.id].value}"`:"Filter options",children:"⋮"}),qe===he.id&&jsxRuntimeExports.jsxs("div",{className:"dropdown-menu",ref:me=>{me&&setTimeout(()=>Kt(me),0)},children:[jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Ge(he.id),Ue(!0),De(null)},children:"Filter"}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Nt(he.id,"","contains"),De(null)},children:"Contains..."}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Nt(he.id,"","equals"),De(null)},children:"Equals..."}),Ke[he.id]&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{const me={...Ke};delete me[he.id],nt(me),Qe(""),Ge("");const xe=$t(ue,me,dt);Te(xe),ot(0),De(null)},children:"Clear Filter"}),Object.keys(Ke).length>0&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{nt({}),Qe(""),Ge(""),Ze(null),vt(""),Te(ue),ot(0),De(null)},children:"Clear All Filters"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"column-resizer",onMouseDown:me=>er(me,he.id)})]})},he.id):null}),(g||E||b||S||_||m)&&jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:"150px",textAlign:"center"},children:"Action"})]}),je&&jsxRuntimeExports.jsxs("tr",{className:"filter-row",children:[qt&&jsxRuntimeExports.jsx("td",{}),i&&jsxRuntimeExports.jsx("td",{}),bt.filter(ce=>Z.find(me=>me.id===ce)&&ct.has(ce)).map(ce=>{var me;const he=Z.find(xe=>xe.id===ce);return he?jsxRuntimeExports.jsxs("td",{style:{position:"relative"},children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:`Search ${he.label}`,value:((me=Ke[he.id])==null?void 0:me.value)||"",onChange:xe=>{const we=xe.target.value;Qe(we),Ge(he.id);const $e={...Ke};we===""?delete $e[he.id]:$e[he.id]={value:we,operator:"contains"},nt($e);const Ne=$t(ue,$e,dt);Te(Ne),ot(0)},className:"filter-input-with-clear",style:{paddingRight:"28px"}}),Ke[he.id]&&jsxRuntimeExports.jsx("span",{className:"filter-clear-icon-inside",onClick:()=>{const xe={...Ke};delete xe[he.id],nt(xe),Qe(""),Ge("");const we=$t(ue,xe,dt);Te(we),ot(0)},title:"Clear",children:"×"})]},`filter-${he.id}`):null}),(g||E||b||S||_||m)&&jsxRuntimeExports.jsx("td",{})]})]}),jsxRuntimeExports.jsx("tbody",{children:st.length===0?jsxRuntimeExports.jsx("tr",{className:"no-records-row",children:jsxRuntimeExports.jsx("td",{colSpan:(qt?1:0)+(i?1:0)+Array.from(ct).length+(g||E||b||S||_||m?1:0),className:"no-records-cell",children:dt.trim()||Object.keys(Ke).length>0?"No records found for the search criteria":"No Data found"})}):st.map((ce,he)=>jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsxs("tr",{className:ce.isNewRow?"table-new-row":he%2===0?`table-row-even ${ce.hasError?"row-error":ce.isModified?"row-invalid":""}`:`table-row-odd ${ce.hasError?"row-error":ce.isModified?"row-invalid":""}`,title:ce.rowMessage||"",children:[qt&&jsxRuntimeExports.jsx("td",{className:"expand-column",children:Array.from(ct).some(me=>Array.isArray(ce[me])&&ce[me].length>0&&ce[me].some(xe=>typeof xe=="object"&&xe!==null))&&jsxRuntimeExports.jsx("button",{className:"expand-button",onClick:()=>_t(he),children:Array.from(yt).some(me=>me.startsWith(`${he}`))?"▼":"▶"})}),i&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:(()=>{const me=Re(ce,it*pt+he);return me!==void 0&&Fe.has(me)})(),onChange:me=>{const xe=Re(ce,it*pt+he);if(xe!==void 0)if(o)Ve(me?new Set([xe]):new Set);else{const we=new Set(Fe);me?we.add(xe):we.delete(xe),Ve(we)}}})}),l&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:"selected",checked:(f==null?void 0:f(he))==="selected",onChange:()=>u==null?void 0:u({rowIndex:he,columnId:"selected",rowData:ce})})})}),bt.filter(me=>Z.find(we=>we.id===me)&&ct.has(me)).map(me=>{const xe=Z.find(we=>we.id===me);return xe?jsxRuntimeExports.jsx("td",{style:{width:pe[xe.id]?`${pe[xe.id]}px`:"150px",minWidth:"80px",maxWidth:"600px"},className:`table-cell ${Ht(xe.id,ce[xe.id],ce)?"ce-clickable-cell":""}`,onClick:()=>{Ht(xe.id,ce[xe.id],ce)?tr(ce,xe.id):Array.isArray(ce[xe.id])&&ce[xe.id].length>0&&_t(he,xe.id)},children:ce.isNewRow?jsxRuntimeExports.jsx(AddNewRowCell,{row:ce,column:xe,colId:me}):React.isValidElement(ce[xe.id])?ce[xe.id]:(Array.isArray(p)?p.includes(xe.id):p===xe.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:xe.id,checked:tt(ce)===xe.id,onChange:()=>et({rowIndex:he,columnId:xe.id,rowData:ce})})}):Array.isArray(ce[xe.id])?`${ce[xe.id].length}`:typeof ce[xe.id]=="object"&&ce[xe.id]!==null?Object.entries(ce[xe.id]).map(([we,$e])=>`${we}: ${$e}`).join(", "):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(ce[xe.id]??"")})},xe.id):null}),(g||E||b||S||_||m)&&jsxRuntimeExports.jsx("td",{className:"table-cell",style:{textAlign:"center"},children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"8px",flexWrap:"wrap"},children:[g&&jsxRuntimeExports.jsx("img",{src:Edit,alt:"Edit",title:"Edit",width:20,height:20,style:{cursor:"pointer"},onClick:()=>C==null?void 0:C(ce,he)}),E&&jsxRuntimeExports.jsx("img",{src:Reassign,alt:"Reassign",width:20,height:20,style:{cursor:"pointer"},onClick:I}),b&&jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:()=>j==null?void 0:j(ce,he)}),S&&jsxRuntimeExports.jsx("img",{src:Approve,alt:"Approve",width:20,height:20,style:{cursor:"pointer"},onClick:()=>O==null?void 0:O(ce,he)}),_&&jsxRuntimeExports.jsx("img",{src:Delete,alt:"Delete",width:20,height:20,style:{cursor:"pointer"},onClick:()=>R==null?void 0:R(ce,he)}),m&&jsxRuntimeExports.jsx("img",{src:Add,alt:"Add",width:20,height:20,style:{cursor:"pointer"},onClick:A})]})})]}),Array.from(yt).map(me=>{const[xe,we]=me.split("-");if(Number(xe)===he){const $e=we?{[we]:ce[we]}:Object.keys(ce).filter(Ne=>Array.isArray(ce[Ne])||typeof ce[Ne]=="object").reduce((Ne,ze)=>({...Ne,[ze]:ce[ze]}),{});return jsxRuntimeExports.jsx("tr",{className:"expanded-row",children:jsxRuntimeExports.jsx("td",{colSpan:ct.size+2,className:"expanded-cell",children:Object.entries($e).map(([Ne,ze],He)=>jsxRuntimeExports.jsxs("div",{className:`expanded-section ${He%2===0?"expanded-section-even":"expanded-section-odd"}`,style:{backgroundColor:He%2===0?"#e8f5e9":"#e3f2fd",padding:"10px",marginBottom:"10px",borderRadius:"5px"},children:[jsxRuntimeExports.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:Ne.charAt(0).toUpperCase()+Ne.slice(1)}),Ut(ze)]},Ne))})},`expanded-${me}`)}return null})]},he))})]})}),J&&jsxRuntimeExports.jsxs("div",{className:"pagination-container",children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"40px"},children:[jsxRuntimeExports.jsx(EntriesInfo,{dataLength:te.length,currentPage:it,rowsPerPage:pt}),jsxRuntimeExports.jsx(RowsPerPageSelector,{rowsPerPage:pt,setRowsPerPage:It,setCurrentPage:Ie,pageSizeOptions:Q})]}),jsxRuntimeExports.jsx(PaginationControls,{currentPage:it,totalPages:Math.ceil(te.length/pt),setCurrentPage:Ie})]}),ke&&jsxRuntimeExports.jsx("div",{className:"filter-modal",children:jsxRuntimeExports.jsxs("div",{className:"filter-modal-content",ref:jt,onKeyDown:Qt,tabIndex:0,children:[jsxRuntimeExports.jsxs("div",{className:"filter-modal-header",children:[jsxRuntimeExports.jsx("h3",{children:"Filter Data"}),jsxRuntimeExports.jsx(CEButton,{className:"close-button-close",onClick:()=>Ue(!1),children:"×"})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-body",children:[jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Column:"}),jsxRuntimeExports.jsx("select",{value:We,onChange:ce=>Ge(ce.target.value),className:"filter-select","aria-label":"Filter column",title:"Select column to filter",children:Z.map(ce=>jsxRuntimeExports.jsx("option",{value:ce.id,children:ce.label},ce.id))})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Operator:"}),jsxRuntimeExports.jsxs("select",{value:Je,onChange:ce=>ft(ce.target.value),className:"filter-select","aria-label":"Filter operator",title:"Select filter operator",children:[jsxRuntimeExports.jsx("option",{value:"contains",children:"Contains"}),jsxRuntimeExports.jsx("option",{value:"equals",children:"Equals"}),jsxRuntimeExports.jsx("option",{value:"startsWith",children:"Starts with"}),jsxRuntimeExports.jsx("option",{value:"endsWith",children:"Ends with"}),jsxRuntimeExports.jsx("option",{value:"does not contain",children:"Does not contain"}),jsxRuntimeExports.jsx("option",{value:"does not equal",children:"Does not equal"}),jsxRuntimeExports.jsx("option",{value:"Date Range",children:"Date Range"}),jsxRuntimeExports.jsx("option",{value:"is any of",children:"Is any of"})]}),Je==="Date Range"&&jsxRuntimeExports.jsx("div",{style:{marginTop:"10px"},children:jsxRuntimeExports.jsx(CEDateRangePicker,{mode:"range",onChange:ce=>{Ze({startDate:ce.startDate,endDate:ce.endDate})}})})]}),Je!=="Date Range"&&jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Value:"}),jsxRuntimeExports.jsx("input",{type:"text",value:ut,onChange:ce=>Qe(ce.target.value),placeholder:"Enter filter value",title:"Filter value",className:"filter-input",autoFocus:!0,onKeyDown:ce=>{ce.key==="Enter"&&Gt(),ce.key==="Escape"&&Ue(!1)}})]}),Object.keys(Ke).length>0&&jsxRuntimeExports.jsxs("div",{className:"active-filters-summary",children:[jsxRuntimeExports.jsx("div",{className:"active-filters-header",children:"Active Filters:"}),Object.entries(Ke).map(([ce,he])=>{const me=Z.find(xe=>xe.id===ce);return jsxRuntimeExports.jsxs("div",{className:"active-filter-item",children:[jsxRuntimeExports.jsxs("span",{children:[(me==null?void 0:me.label)||ce,": "]}),jsxRuntimeExports.jsx("span",{className:"filter-operator",children:he.operator}),jsxRuntimeExports.jsxs("span",{className:"filter-value",children:['"',he.value,'"']})]},ce)})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-footer",children:[jsxRuntimeExports.jsx(CEButton,{onClick:()=>{nt({}),Te(ue),ot(0),Ue(!1)},className:"clear-filters-button",variant:"outlined",children:"Clear All"}),jsxRuntimeExports.jsx(CEButton,{onClick:Gt,className:"apply-filter-button",variant:"primary",children:"Apply Filter"})]})]})})]}),ar=()=>{z?(ge(!0),Promise.resolve(z()).finally(()=>{nt({});try{const ce=Z.filter(me=>me.shouldDisplay!==!1).map(me=>me.id),he=Z.filter(me=>me.shouldVisible!==!1).map(me=>me.id);gt(new Set(ce)),Le(he),mt(!1)}catch{}ge(!1)})):(ge(!0),setTimeout(()=>{Te(t),Me(t),ot(0),vt(""),Qe(""),Ge(""),nt({}),se(null);try{const ce=Z.filter(me=>me.shouldDisplay!==!1).map(me=>me.id),he=Z.filter(me=>me.shouldVisible!==!1).map(me=>me.id);gt(new Set(ce)),Le(he),mt(!1)}catch{}ge(!1)},300))},or=Z.filter(ce=>ce.shouldVisible!==!1).every(ce=>ct.has(ce.id));return jsxRuntimeExports.jsxs("div",{className:`datatable-wrapper${ve?" ce-grid-fullscreen":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"grid-header",children:[e&&jsxRuntimeExports.jsx("span",{className:"header-title",children:e}),jsxRuntimeExports.jsxs("div",{className:"search-container",children:[d&&jsxRuntimeExports.jsxs("div",{className:"search-wrapper",children:[jsxRuntimeExports.jsx("img",{src:SearchRounded,alt:"Show Filter",title:"Show/Hide Filter",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>{const ce=!je;Pe(ce),ce||(nt({}),Te(ue),ot(0),vt(""))}}),dt&&jsxRuntimeExports.jsx("button",{className:"search-cancel-button",onClick:()=>{vt(""),Tt()},children:"×"})]}),W&&jsxRuntimeExports.jsx("img",{src:ShowOrHideColumn,alt:"Columns",title:"Show/Hide Columns",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>mt(!0)}),Object.keys(Ke).length>0&&jsxRuntimeExports.jsx("img",{src:FilterAltOffRounded,alt:"Clear Filters",title:"Clear All Filters",width:20,height:20,style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:()=>{nt({}),Te(ue),ot(0)}}),T&&jsxRuntimeExports.jsx("img",{src:FileOpenRounded,alt:"Export",title:"Export All to Excel",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",fill:"#808080"},onClick:()=>Vt(!0)}),Y&&jsxRuntimeExports.jsx("img",{src:ReloadIcon,alt:"Reload",title:"Reload Data",width:20,height:20,className:"ce-reload-icon",style:{cursor:"pointer",fill:"#808080"},onClick:ar}),G&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:At,children:[jsxRuntimeExports.jsx("img",{src:ExportIcon,alt:"Download",title:"Download",width:20,height:20,className:"ce-export-icon icon-button dropdown-trigger",style:{cursor:"pointer"},onClick:ce=>{ce.stopPropagation(),ee&&ee.length>0?Ot("download"):Vt()}}),(()=>{const ce=ee??[],he=ce.find(we=>we.usedefault===!0),me=ce.filter(we=>!we.usedefault);let xe=[];return ce.length>0?he?xe=[{label:he.label,onClick:()=>{he.forceAll?Vt(!0):Vt()}},...me]:xe=[...me]:xe=[],qe==="download"&&xe.length>0&&jsxRuntimeExports.jsx("div",{className:"dropdown-menu",ref:we=>{we&&setTimeout(()=>Kt(we),0)},children:xe.map((we,$e)=>jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:Ne=>{Ne.stopPropagation();try{we.onClick()}finally{De(null)}},children:we.label},$e))})})()]}),V&&jsxRuntimeExports.jsx("button",{className:"fullscreen-button",onClick:ve?Ae:Ce,title:ve?"Exit Full Screen":"Full Screen",children:ve?"⤫":"⤢"})]})]}),Et&&jsxRuntimeExports.jsx("div",{className:"column-modal",children:jsxRuntimeExports.jsxs("div",{className:"column-modal-content",ref:Mt,children:[jsxRuntimeExports.jsx("div",{className:"column-modal-header",children:jsxRuntimeExports.jsx("button",{className:"modal-close-button",onClick:()=>mt(!1),children:"×"})}),jsxRuntimeExports.jsx("h3",{className:"column-modal-title",children:"Column Visibility and Order"}),jsxRuntimeExports.jsx("p",{className:"column-modal-description",children:"Drag and drop columns to change their order. Check or uncheck to show or hide columns."}),jsxRuntimeExports.jsx("div",{className:"column-modal-actions",children:jsxRuntimeExports.jsx("div",{className:"select-all-action",children:jsxRuntimeExports.jsx(CECheckBox,{label:"Select All",checked:or,onChange:ce=>{gt(ce?new Set(Z.filter(he=>he.shouldVisible!==!1).map(he=>he.id)):new Set)}})})}),jsxRuntimeExports.jsx("div",{className:"column-list-container",children:bt.filter(ce=>Z.find(he=>he.id===ce&&he.shouldVisible!==!1)).map(ce=>{const he=Z.find(me=>me.id===ce);return he?jsxRuntimeExports.jsxs("div",{className:`column-item ${lt===he.id?"dragging":""}`,draggable:!0,onDragStart:me=>{St(he.id),me.dataTransfer.effectAllowed="move",me.dataTransfer.setData("text/plain",he.id)},onDragEnd:()=>St(null),onDragOver:me=>{me.preventDefault(),me.dataTransfer.dropEffect="move"},onDragEnter:me=>{me.preventDefault(),me.currentTarget.classList.add("drag-over")},onDragLeave:me=>{me.currentTarget.classList.remove("drag-over")},onDrop:me=>{if(me.preventDefault(),me.currentTarget.classList.remove("drag-over"),lt&&lt!==he.id){const xe=[...bt],we=xe.indexOf(lt),$e=xe.indexOf(he.id);we!==-1&&$e!==-1&&(xe.splice(we,1),xe.splice($e,0,lt),Le(xe))}},children:[jsxRuntimeExports.jsx("div",{className:"column-drag-handle",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:jsxRuntimeExports.jsx("path",{d:"M4 4h2v2H4V4zm0 6h2v2H4v-2zm0-3h2v2H4V7zm8 3h-6v2h6v-2zm0-3h-6v2h6V7zm0-3h-6v2h6V4z"})})}),jsxRuntimeExports.jsx(CECheckBox,{label:he.label??he.id,checked:ct.has(he.id),onChange:()=>Ct(he.id)})]},he.id):null})})]})}),_e?jsxRuntimeExports.jsx(CESkeletonTable,{columns:Z.length||5,rows:pt||10}):ir()]})},DateInputPart=({value:e,onChange:t,max:n,min:i,length:o,placeholder:l,className:u,onClick:f,id:p,name:d})=>{const m=React.useRef(null),g=E=>{const b=E.target.value.replace(/\D/g,"");if(b.length<=o){if(b.length===1){const T=parseInt(b);if(n===12&&T>1){t(`0${T}`);return}if(n===31&&T>3){t(`0${T}`);return}}if(b.length===2){const T=parseInt(b);T>=i&&T<=n&&t(b);return}t(b)}},_=()=>{var E;(E=m.current)==null||E.select()},S=()=>{e.length===1&&t(e.padStart(2,"0"))};return jsxRuntimeExports.jsx("input",{ref:m,type:"text",value:e,onChange:g,onFocus:_,onBlur:S,id:p,name:d,onClick:f,maxLength:o,className:u??"date-input-part",placeholder:l})},DateRangeIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%204.5H18V3.5C18%202.95%2017.55%202.5%2017%202.5C16.45%202.5%2016%202.95%2016%203.5V4.5H8V3.5C8%202.95%207.55%202.5%207%202.5C6.45%202.5%206%202.95%206%203.5V4.5H5C3.89%204.5%203.01%205.4%203.01%206.5L3%2020.5C3%2021.6%203.89%2022.5%205%2022.5H19C20.1%2022.5%2021%2021.6%2021%2020.5V6.5C21%205.4%2020.1%204.5%2019%204.5ZM19%2019.5C19%2020.05%2018.55%2020.5%2018%2020.5H6C5.45%2020.5%205%2020.05%205%2019.5V9.5H19V19.5ZM7%2011.5H9V13.5H7V11.5ZM11%2011.5H13V13.5H11V11.5ZM15%2011.5H17V13.5H15V11.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",WEEKDAYS=["Su","Mo","Tu","We","Th","Fr","Sa"],CEDatePicker=({onChange:e,label:t="Calendar",value:n,focused:i=!1,id:o,name:l})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(null),[m,g]=React.useState(new Date),[_,S]=React.useState(!1),[E,b]=React.useState({start:2020,end:2031}),[T,C]=React.useState("left"),[A,R]=React.useState(0),O=React.useRef(null),[I,j]=React.useState(i),[M,N]=React.useState(""),[D,F]=React.useState(""),[q,z]=React.useState(""),[G,ee]=React.useState(!0),Y=()=>{f(!1),!M&&!D&&!q&&j(!1)};useEscapeKey(Y);const V=()=>{f(X=>{if(!X){const Q=p||new Date;g(Q),M||N(String(Q.getMonth()+1).padStart(2,"0")),D||F(String(Q.getDate()).padStart(2,"0")),q||z(String(Q.getFullYear()))}return!X})};React.useEffect(()=>{const X=Q=>{O.current&&!O.current.contains(Q.target)&&Y()};return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[M,D,q]),React.useEffect(()=>{if(n){const[X,Q,le]=n.split("/"),ye=new Date(`${le}-${X}-${Q}`);isNaN(ye.getTime())||(d(ye),g(ye),N(X),F(Q),z(le),ee(!0))}else d(null),N(""),F(""),z(""),ee(!0),g(new Date)},[n]);const W=X=>{const Q=new Date(m.getFullYear(),m.getMonth(),X);d(Q),g(Q);const le=String(Q.getMonth()+1).padStart(2,"0"),ye=String(Q.getDate()).padStart(2,"0"),de=String(Q.getFullYear());N(le),F(ye),z(de),ee(!0),e(`${le}/${ye}/${de}`),f(!1)},L=X=>{C(X>0?"left":"right"),g(Q=>{const le=new Date(Q.getFullYear(),Q.getMonth()+X,1);return p&&N(String(le.getMonth()+1).padStart(2,"0")),R(ye=>ye+1),le})},B=()=>{S(X=>!X)},U=X=>{b(Q=>({start:Q.start+X*10,end:Q.end+X*10}))},K=X=>{const Q=new Date(X,m.getMonth(),1);g(Q),z(String(X)),S(!1)},H=()=>{const X=new Date(m.getFullYear(),m.getMonth(),1),Q=new Date(m.getFullYear(),m.getMonth()+1,0),le=X.getDay(),ye=Q.getDate(),de=new Date,fe=Ee=>!p&&de.getDate()===Ee&&de.getMonth()===m.getMonth()&&de.getFullYear()===m.getFullYear(),pe=[];for(let Ee=0;Ee<le;Ee++)pe.push(jsxRuntimeExports.jsx("div",{className:"dp-day empty"},`empty-${Ee}`));for(let Ee=1;Ee<=ye;Ee++){const te=(p==null?void 0:p.getDate())===Ee&&(p==null?void 0:p.getMonth())===m.getMonth()&&(p==null?void 0:p.getFullYear())===m.getFullYear();pe.push(jsxRuntimeExports.jsx("div",{className:`dp-day ${te?"selected":""} ${fe(Ee)?"today":""}`,onClick:()=>W(Ee),children:Ee},Ee))}return pe},J=(X,Q,le)=>{if(!X||!Q||!le){ee(!1),g(new Date),d(null);return}const ye=`${le}-${X}-${Q}`,de=new Date(ye);if(de.getFullYear()===parseInt(le)&&de.getMonth()+1===parseInt(X)&&de.getDate()===parseInt(Q))d(de),g(de),ee(!0),e(`${X}/${Q}/${le}`);else{const fe=new Date;ee(!1),d(null),g(fe),N(X),F(Q),z(le)}};return jsxRuntimeExports.jsxs("div",{className:"dp-wrapper",ref:O,children:[jsxRuntimeExports.jsxs("div",{className:`dp-input-container ${I||u?"focused":""} ${p||M||D||q?"has-value":""} ${G?"":"invalid"}`,children:[jsxRuntimeExports.jsx("div",{className:`dp-label floating ${G?"":"invalid"}`,children:t}),jsxRuntimeExports.jsxs("div",{className:"dp-input-wrapper",onClick:()=>{j(!0)},children:[jsxRuntimeExports.jsx(DateInputPart,{value:M,onChange:X=>{N(X),J(X,D,q)},max:12,min:1,length:2,placeholder:"MM",onClick:V,id:o?`${o}-month`:void 0,name:l?`${l}-month`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx(DateInputPart,{value:D,onChange:X=>{F(X),J(M,X,q)},placeholder:"DD",max:31,min:1,length:2,onClick:V,id:o?`${o}-day`:void 0,name:l?`${l}-day`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx("input",{type:"text",value:q,onChange:X=>{const Q=X.target.value.replace(/\D/g,"");Q.length<=4&&(z(Q),Q.length===4&&J(M,D,Q))},onFocus:X=>X.target.select(),onBlur:()=>{q.length===4&&J(M,D,q)},className:"date-input-part",id:o?`${o}-year`:void 0,name:l?`${l}-year`:void 0,maxLength:4,placeholder:"YYYY"}),jsxRuntimeExports.jsx("span",{className:"dp-icon",onClick:V,children:jsxRuntimeExports.jsx("img",{src:DateRangeIcon,alt:"Calendar Icon"})})]})]}),u&&jsxRuntimeExports.jsxs("div",{className:"dp-calendar",children:[jsxRuntimeExports.jsxs("div",{className:"dp-header",children:[jsxRuntimeExports.jsxs("div",{className:"dp-title",onClick:B,children:[_?`${E.start} - ${E.end}`:`${m.toLocaleString("default",{month:"long"})} ${m.getFullYear()}`,jsxRuntimeExports.jsx("button",{className:"dp-toggle-icon",children:"▾"})]}),jsxRuntimeExports.jsxs("div",{className:"dp-controls",children:[jsxRuntimeExports.jsx("button",{onClick:()=>_?U(-1):L(-1),children:"‹"}),jsxRuntimeExports.jsx("button",{onClick:()=>_?U(1):L(1),children:"›"})]})]}),!_&&jsxRuntimeExports.jsx("div",{className:"dp-weekdays",children:WEEKDAYS.map(X=>jsxRuntimeExports.jsx("div",{className:"dp-weekday",children:X},X))}),_?jsxRuntimeExports.jsx("div",{className:"dp-years-grid",children:Array.from({length:E.end-E.start+1},(X,Q)=>{const le=E.start+Q;return jsxRuntimeExports.jsx("div",{className:"dp-year-item",onClick:()=>K(le),children:le},le)})}):jsxRuntimeExports.jsx("div",{className:`dp-days dp-slide-${T}`,children:H()},A)]})]})},FieldsInput=({label:e,name:t,placeholder:n="",value:i="",onChange:o,size:l="medium"})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(!1),m=getSizeStyle$1(l);React.useEffect(()=>{i&&i.trim().length>0&&d(!0)},[i]);const g=()=>{f(!0),d(!0)},_=E=>{f(!1),E.target.value.trim()||d(!1)},S=u||!!i;return jsxRuntimeExports.jsxs("div",{className:`floating-input-wrapper${p?" focused":""}`,style:m,children:[jsxRuntimeExports.jsx("label",{htmlFor:t,className:"floating-label",children:e}),jsxRuntimeExports.jsx("input",{id:t,name:t,className:"floating-input",placeholder:S?n:"",value:i,onChange:o,onFocus:g,onBlur:_})]})},CEFooter=()=>jsxRuntimeExports.jsx("footer",{style:{zIndex:1100,backgroundColor:"var(--grey-color)",width:"100%",height:"36px",position:"fixed",bottom:"0",left:"0",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"auto"},children:jsxRuntimeExports.jsx("p",{style:{color:"var(--white-color)",fontSize:"0.8rem",margin:"0"},children:"© All rights reserved by Clean Earth."})}),CEGridItem=({children:e,size:t=1})=>jsxRuntimeExports.jsx("div",{style:{gridColumn:`span ${t}`},children:e}),CEGridLayout=({children:e,columns:t=12,gap:n="1rem",alignItems:i="stretch",justifyItems:o="stretch",gridTemplateColumns:l})=>jsxRuntimeExports.jsx("div",{className:"grid-container",style:{display:"grid",width:"100%",gridTemplateColumns:l||`repeat(${t}, 1fr)`,gap:n,alignItems:i,justifyItems:o,backgroundColor:"transparent"},children:e}),CELogo=({src:e,alt:t="Logo",style:n})=>jsxRuntimeExports.jsx("img",{src:e,alt:t,style:{height:25,...n}}),CESearchBar=({onFocus:e,onBlur:t,quickActions:n=[],recentSearches:i=[]})=>{const[o,l]=React.useState(!1),[u,f]=React.useState(""),[p,d]=React.useState(n),[m,g]=React.useState(i),_=(E,b)=>{E==="quickActions"?d(T=>T.filter((C,A)=>A!==b)):g(T=>T.filter((C,A)=>A!==b))},S=()=>{u.trim()!==""&&(g(E=>[u,...E]),f(""))};return jsxRuntimeExports.jsxs("div",{className:"ceui-search-bar",children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",className:"ceui-search-input",value:u,onChange:E=>f(E.target.value),onFocus:()=>{l(!0),e&&e()},onBlur:()=>{setTimeout(()=>l(!1),200),t&&t()},onKeyDown:E=>{E.key==="Enter"&&S()}}),o&&jsxRuntimeExports.jsxs("div",{className:"ceui-search-suggestions",children:[p.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Quick actions"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:p.map((E,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[E,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("quickActions",b),children:"✕"})]},b))})]}),m.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Recent search"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:m.map((E,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[E,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("recentSearches",b),children:"✕"})]},b))})]})]})]})},CESearchButton=({showSuggestions:e=!1,quickActions:t=[],recentSearches:n=[]})=>{const[i,o]=React.useState(!1),[l,u]=React.useState(!1),f=React.useRef(null),p=m=>{f.current&&!f.current.contains(m.target)&&(o(!1),u(!1))},d=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.5001 14.5H14.7101L14.4301 14.23C15.6301 12.83 16.2501 10.92 15.9101 8.89002C15.4401 6.11002 13.1201 3.89002 10.3201 3.55002C6.09014 3.03002 2.53014 6.59001 3.05014 10.82C3.39014 13.62 5.61014 15.94 8.39014 16.41C10.4201 16.75 12.3301 16.13 13.7301 14.93L14.0001 15.21V16L18.2501 20.25C18.6601 20.66 19.3301 20.66 19.7401 20.25C20.1501 19.84 20.1501 19.17 19.7401 18.76L15.5001 14.5ZM9.50014 14.5C7.01014 14.5 5.00014 12.49 5.00014 10C5.00014 7.51002 7.01014 5.50002 9.50014 5.50002C11.9901 5.50002 14.0001 7.51002 14.0001 10C14.0001 12.49 11.9901 14.5 9.50014 14.5Z",fill:"black",fillOpacity:"0.54"})});return React.useEffect(()=>(i?document.addEventListener("mousedown",p):document.removeEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}),[i]),console.log("isSearchOpen:",i),console.log("showDropdown:",l),console.log("showSuggestions:",e),jsxRuntimeExports.jsxs("div",{ref:f,className:`ceui-animated-search-wrapper ${i?"expanded":"collapsed"}`,children:[jsxRuntimeExports.jsx("button",{className:"ceui-search-button","aria-label":"Open search",onClick:()=>o(!0),children:jsxRuntimeExports.jsx(d,{})}),i&&jsxRuntimeExports.jsx(CESearchBar,{showSuggestions:i&&(e||l),onFocus:()=>u(!0),onBlur:()=>{setTimeout(()=>u(!1),200)},quickActions:t,recentSearches:n})]})},CEHelpButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Help",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2.5C6.48 2.5 2 6.98 2 12.5C2 18.02 6.48 22.5 12 22.5C17.52 22.5 22 18.02 22 12.5C22 6.98 17.52 2.5 12 2.5ZM13 19.5H11V17.5H13V19.5ZM15.07 11.75L14.17 12.67C13.67 13.18 13.31 13.64 13.13 14.36C13.05 14.68 13 15.04 13 15.5H11V15C11 14.54 11.08 14.1 11.22 13.69C11.42 13.11 11.75 12.59 12.17 12.17L13.41 10.91C13.87 10.47 14.09 9.81 13.96 9.11C13.83 8.39 13.27 7.78 12.57 7.58C11.46 7.27 10.43 7.9 10.1 8.85C9.98 9.22 9.67 9.5 9.28 9.5H8.98C8.4 9.5 8 8.94 8.16 8.38C8.59 6.91 9.84 5.79 11.39 5.55C12.91 5.31 14.36 6.1 15.26 7.35C16.44 8.98 16.09 10.73 15.07 11.75Z",fill:"black",fillOpacity:"0.54"})})}),CENotificationButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Notifications",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11.4775 22.2632C12.0837 22.2632 12.6651 21.9999 13.0938 21.531C13.5224 21.0622 13.7633 20.4264 13.7633 19.7634H9.19183C9.19183 20.4264 9.43264 21.0622 9.8613 21.531C10.2899 21.9999 10.8713 22.2632 11.4775 22.2632ZM12.6147 3.63801C12.6306 3.46421 12.6131 3.28869 12.5632 3.12276C12.5133 2.95683 12.4322 2.80417 12.3251 2.67464C12.2179 2.54511 12.0871 2.44157 11.9412 2.37071C11.7952 2.29985 11.6372 2.26324 11.4775 2.26324C11.3178 2.26324 11.1599 2.29985 11.0139 2.37071C10.8679 2.44157 10.7372 2.54511 10.63 2.67464C10.5229 2.80417 10.4417 2.95683 10.3919 3.12276C10.342 3.28869 10.3244 3.46421 10.3404 3.63801C9.04845 3.92494 7.88695 4.6916 7.05275 5.80806C6.21856 6.92452 5.76299 8.3221 5.76325 9.76393C5.76325 11.1364 5.19182 17.2635 3.47754 18.5134H19.4775C17.7633 17.2635 17.1918 11.1364 17.1918 9.76393C17.1918 6.73909 15.2261 4.21423 12.6147 3.63801Z",fill:"#757575"})})}),CEAvatarMenu=()=>{const[e,t]=React.useState(!1),n=React.useRef(null),i=()=>t(!e),o=l=>{n.current&&!n.current.contains(l.target)&&t(!1)};return React.useEffect(()=>(e?document.addEventListener("mousedown",o):document.removeEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}),[e]),jsxRuntimeExports.jsxs("div",{style:{position:"relative",zIndex:1e3},children:[jsxRuntimeExports.jsx("img",{src:"src/assets/profile_pic.png",alt:"Profile",style:{width:40,height:40,borderRadius:"50%",cursor:"pointer"},onClick:i}),e&&jsxRuntimeExports.jsxs("div",{ref:n,style:{position:"absolute",right:0,top:"100%",background:"white",border:"1px solid #ccc",boxShadow:"0 2px 10px rgba(0,0,0,0.1)",zIndex:9999,minWidth:120},children:[jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"My Account"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Settings"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Logout"})]})]})},menuItemStyle={padding:"10px 15px",cursor:"pointer",fontSize:14,borderBottom:"1px solid #eee"},CEUserInfo=({name:e,role:t})=>jsxRuntimeExports.jsxs("div",{className:"ceui-user-info",children:[jsxRuntimeExports.jsx("span",{className:"ceui-user-name",children:e}),jsxRuntimeExports.jsx("span",{className:"ceui-user-role",children:t})]}),CEHeader=({headerColor:e="white",logoSrc:t,logoHeight:n,logoWidth:i,showSearchButton:o=!1,quickActions:l=[],recentSearches:u=[],showHelpButton:f=!1,showNotificationButton:p=!1,showAvatarMenu:d=!1,showUserInfo:m=!1,showHamburgerButton:g=!1,showDrawer:_=!1,userInfoProps:S,onMenuClick:E,drawerJsonUrl:b="",isDrawerOpen:T=!1,onDrawerClose:C})=>{const A=()=>jsxRuntimeExports.jsxs("svg",{width:"120",height:"35",viewBox:"0 0 245 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0_1572_8855)",children:[jsxRuntimeExports.jsx("path",{d:"M0 1.49012e-05H245V60H0V1.49012e-05Z",fill:"#F4F5F7"}),jsxRuntimeExports.jsx("path",{d:"M53.3741 31.7566C53.3741 39.7826 47.1908 46.1485 39.2275 46.1485C31.2641 46.1485 25.0809 39.7826 25.0809 31.7566C25.0809 23.7306 31.2641 17.3646 39.2275 17.3646C47.1908 17.3646 53.3741 23.7306 53.3741 31.7566Z",fill:"#007ACC"}),jsxRuntimeExports.jsx("path",{d:"M91.5 25H76V35H91.5V30H81.5V29H91.5V25Z",fill:"#000"}),jsxRuntimeExports.jsx("path",{d:"M65 35H69V25H65V35Z",fill:"#000"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_1572_8855",children:jsxRuntimeExports.jsx("rect",{width:"245",height:"60",fill:"white"})})})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("header",{className:"ceui-header",style:{backgroundColor:e},children:[jsxRuntimeExports.jsx("div",{className:"ceui-header-left",children:t?jsxRuntimeExports.jsx(CELogo,{src:t,alt:"Core Logo",style:{height:n||35,width:i||"auto",maxWidth:120}}):jsxRuntimeExports.jsx(A,{})}),jsxRuntimeExports.jsxs("div",{className:"ceui-header-right",children:[o&&jsxRuntimeExports.jsx(CESearchButton,{showSuggestions:!0,quickActions:l,recentSearches:u,value:"",onChange:()=>{},onClear:()=>{}}),f&&jsxRuntimeExports.jsx(CEHelpButton,{}),p&&jsxRuntimeExports.jsx(CENotificationButton,{}),d&&jsxRuntimeExports.jsx(CEAvatarMenu,{}),m&&S&&jsxRuntimeExports.jsx(CEUserInfo,{name:S.name,role:S.role})]})]}),_&&g&&jsxRuntimeExports.jsx(CEDrawer,{jsonUrl:b,isOpen:T,onClose:C||(()=>{})})]})},CEGridMenuButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},children:jsxRuntimeExports.jsx("img",{src:"src/assets/Grid_4x4Rounded.svg",alt:""})}),CEHamburgerButton=({onClick:e,style:t})=>jsxRuntimeExports.jsx("button",{onClick:e,style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none",...t},children:jsxRuntimeExports.jsx("img",{src:"src/assets/MenuRounded.svg",alt:"Menu"})}),InputDropDown=({options:e,selected:t,onChange:n,multiple:i=!1,placeholder:o="Select...",size:l="medium",style:u={},allowClear:f=!0,showInputPills:p=!0,id:d,name:m})=>{const[g,_]=React.useState(!1),[S,E]=React.useState(!1),b=React.useRef(null),C={...getSizeStyle$1(l),...u},A=j=>{if(i){const M=t.includes(j)?t.filter(N=>N!==j):[...t,j];n(M)}else n([j]),_(!1)},R=()=>n([]),O=e.filter(j=>t.includes(j.value)).map(j=>j.label);React.useEffect(()=>{const j=M=>{var N;(N=b.current)!=null&&N.contains(M.target)||_(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]);const I=j=>{const M=t.filter(N=>N!==j);n(M)};return jsxRuntimeExports.jsx("div",{className:`dropdown-container ${g||t.length>0?"float":""}`,ref:b,style:C,id:d,"data-name":m,children:jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${g?"open":""}`,onClick:()=>_(j=>!j),onFocus:()=>E(!0),onBlur:()=>E(!1),tabIndex:0,children:[jsxRuntimeExports.jsx("label",{className:"floating-placeholder",children:o}),jsxRuntimeExports.jsx("div",{className:"selected-display",children:t.length===0?"":i?p?O.map((j,M)=>jsxRuntimeExports.jsxs("span",{className:"chip",children:[j,jsxRuntimeExports.jsx("span",{className:"close-icon",onClick:N=>{var D;N.stopPropagation(),I(((D=e.find(F=>F.label===j))==null?void 0:D.value)||"")},children:"×"})]},M)):jsxRuntimeExports.jsx("div",{className:"selected-display-label",children:O.join(",")}):jsxRuntimeExports.jsx("span",{children:O[0]})}),f&&t.length>0&&jsxRuntimeExports.jsx("button",{className:"clear-button",onClick:j=>{j.stopPropagation(),R()},children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-icon-img ${g?"rotate-icon":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"black",fillOpacity:"0.54"})})}),g&&jsxRuntimeExports.jsx("ul",{className:"dropdown-options",children:e.map(j=>jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${t.includes(j.value)?"selected":""}`,onClick:M=>{M.stopPropagation(),A(j.value)},children:[i&&jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:t.includes(j.value)}),j.label]},j.value))})]})})},CELinearProgressBar=({duration:e,color:t="#4caf50",backgroundColor:n="#e0e0e0",height:i="10px",isActive:o=!1})=>{const l=React.useRef(null);return React.useEffect(()=>{const u=l.current;if(!(!u||!o))return u.style.width="0%",u.style.transition="none",u.offsetWidth,requestAnimationFrame(()=>{u&&(u.style.transition=`width ${e}ms linear`,u.style.width="100%")}),()=>{u&&(u.style.width="0%",u.style.transition="none")}},[e,o]),jsxRuntimeExports.jsx("div",{className:"snackbar__progress-container",style:{height:i},children:jsxRuntimeExports.jsx("div",{ref:l,className:"snackbar__progress-bar"})})},CEMenuBar=({menuData:e})=>{const[t,n]=React.useState({}),i=(p,d)=>{n(m=>({...m,[p]:d}))};useEscapeKey(()=>{n({})});const l=p=>p.children&&p.children.length>0,u=p=>p.some(d=>l(d)),f=(p,d="")=>!p||p.length===0?null:jsxRuntimeExports.jsx("ul",{className:d?"ce-submenu":"ce-dropdown",children:p.map(m=>{const g=d?`${d}-${m.name}`:m.name,_=l(m);return jsxRuntimeExports.jsxs("li",{className:`ce-dropdown-item ${_?"has-submenu":""}`,onMouseEnter:()=>_&&i(g,!0),onMouseLeave:()=>_&&i(g,!1),onClick:()=>console.log(`Clicked: ${m.name}`),children:[m.name,_&&jsxRuntimeExports.jsx("span",{className:"ce-icon right",children:"▶"}),_&&t[g]&&f(m.children,g)]},g)})});return jsxRuntimeExports.jsx("div",{className:"ce-menu-bar",children:jsxRuntimeExports.jsx("div",{className:"ce-menu-container",children:e.map(p=>{const d=u(p.items);return jsxRuntimeExports.jsxs("div",{className:"ce-menu-item",onMouseEnter:()=>d&&i(p.title,!0),onMouseLeave:()=>d&&i(p.title,!1),children:[jsxRuntimeExports.jsxs("button",{className:"ce-menu-button",children:[p.title,d&&jsxRuntimeExports.jsx("span",{className:"ce-icon",children:"▼"})]}),d&&t[p.title]&&f(p.items,p.title)]},p.title)})})})},CEPagination=({currentPage:e,totalPages:t,onPageChange:n})=>{const i=()=>{const p=[];if(t<=8)for(let d=0;d<t;d++)p.push(d);else if(e<7){for(let d=0;d<8;d++)p.push(d);p.push("..."),p.push(t-1)}else if(e>=t-8+1){p.push(0),p.push("...");for(let d=t-8;d<t;d++)p.push(d)}else{p.push(0),p.push("...");for(let d=e-3;d<=e+3;d++)p.push(d);p.push("..."),p.push(t-1)}return p},o=f=>{typeof f=="number"&&n(f)},l=()=>{e>0&&n(e-1)},u=()=>{e<t-1&&n(e+1)};return jsxRuntimeExports.jsxs("div",{className:"pagination",children:[jsxRuntimeExports.jsx("button",{onClick:l,disabled:e===0,className:"pagination-button",children:"Previous"}),i().map((f,p)=>typeof f=="number"?jsxRuntimeExports.jsx("button",{onClick:()=>o(f),className:`pagination-button page-number ${e===f?"active":""}`,children:f+1},p):jsxRuntimeExports.jsx("span",{className:"pagination-ellipsis",children:f},p)),jsxRuntimeExports.jsx("button",{onClick:u,disabled:e===t-1,className:"pagination-button",children:"Next"})]})},CERadioButtonGroup=({options:e,name:t,defaultValue:n,onChange:i,direction:o="horizontal",id:l,nameAttr:u})=>{const[f,p]=React.useState(n||""),d=m=>{p(m),i(m)};return jsxRuntimeExports.jsx("div",{className:`radio-button-group ${o}`,role:"radiogroup","aria-labelledby":t,id:l,children:e.map(m=>jsxRuntimeExports.jsx("div",{className:"radio-button",children:jsxRuntimeExports.jsx(CERadioButton,{label:m.label,value:m.value,checked:f===m.value,onChange:d,id:l?`${l}-${m.value}`:void 0,name:u})},m.value))})},saveSelection=()=>{const e=window.getSelection();return e!=null&&e.rangeCount?e.getRangeAt(0):null},restoreSelection=e=>{if(e){const t=window.getSelection();t==null||t.removeAllRanges(),t==null||t.addRange(e)}},CERichTextEditor=({initialValue:e="",onChange:t,width:n="100%",height:i="auto",minHeight:o="200px",maxHeight:l="none",className:u="",style:f={},editorStyle:p={}})=>{const d=React.useRef(null),[m,g]=React.useState("3"),[_,S]=React.useState("Arial"),[E,b]=React.useState({bold:!1,italic:!1,underline:!1,strikeThrough:!1,subscript:!1,superscript:!1,justifyLeft:!0,justifyCenter:!1,justifyRight:!1,justifyFull:!1});React.useEffect(()=>{d.current&&e&&(d.current.innerHTML=e)},[e]);const T=React.useCallback(j=>{try{return document.queryCommandState(j)}catch{return!1}},[]),C=React.useCallback(()=>{b({bold:T("bold"),italic:T("italic"),underline:T("underline"),strikeThrough:T("strikethrough"),subscript:T("subscript"),superscript:T("superscript"),justifyLeft:T("justifyLeft"),justifyCenter:T("justifyCenter"),justifyRight:T("justifyRight"),justifyFull:T("justifyFull")})},[T]),A=React.useCallback((j,M="")=>{var F,q;const N=saveSelection(),D=document.getSelection();if(j==="createLink"){const z=prompt("Enter URL:");if(z){restoreSelection(N),document.execCommand("createLink",!1,z);const G=(F=D==null?void 0:D.anchorNode)==null?void 0:F.parentElement;G instanceof HTMLAnchorElement&&(G.target="_blank",G.rel="noopener noreferrer")}}else if(j==="insertImage"){const z=prompt("Enter image URL:");if(z){restoreSelection(N);const G=`<img src="${z}" alt="image" style="max-width: 100%; height: auto;"/>`;document.execCommand("insertHTML",!1,G)}}else j==="fontSize"||j==="fontName"?(restoreSelection(N),document.execCommand(j,!0,M),j==="fontSize"?g(M):S(M)):(restoreSelection(N),document.execCommand(j,!1,M));d.current&&(t==null||t(d.current.innerHTML)),(q=d.current)==null||q.focus(),C()},[t,C]),R=j=>{if(j.key==="Tab"&&(j.preventDefault(),document.execCommand("insertHTML",!1,"&nbsp;&nbsp;&nbsp;&nbsp;")),j.ctrlKey||j.metaKey)switch(j.key.toLowerCase()){case"z":j.preventDefault(),j.shiftKey?A("redo"):A("undo");break;case"y":j.preventDefault(),A("redo");break}},O=[{value:"1",label:"2"},{value:"2",label:"4"},{value:"3",label:"6"},{value:"4",label:"8"},{value:"5",label:"10"},{value:"6",label:"12"},{value:"7",label:"14"}],I=["Arial","Times New Roman","Courier New","Georgia","Verdana","Helvetica","Serif Fonts","Algerian"];return jsxRuntimeExports.jsxs("div",{className:`rich-text-editor ${u}`,style:{width:n,height:i,...f},children:[jsxRuntimeExports.jsxs("div",{className:"toolbar",children:[jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("bold"),className:`toolbar-button ${E.bold?"active":""}`,title:"Bold",children:jsxRuntimeExports.jsx("strong",{children:"B"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("italic"),className:`toolbar-button ${E.italic?"active":""}`,title:"Italic",children:jsxRuntimeExports.jsx("em",{children:"I"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("underline"),className:`toolbar-button ${E.underline?"active":""}`,title:"Underline",children:jsxRuntimeExports.jsx("u",{children:"U"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("strikeThrough"),className:`toolbar-button ${E.strikeThrough?"active":""}`,title:"Strike Through",children:jsxRuntimeExports.jsx("s",{children:"S"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("subscript"),className:`toolbar-button ${E.subscript?"active":""}`,title:"Subscript",children:"X₂"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("superscript"),className:`toolbar-button ${E.superscript?"active":""}`,title:"Superscript",children:"X²"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyLeft"),className:`toolbar-button ${E.justifyLeft?"active":""}`,title:"Align Left",children:"⇤"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyCenter"),className:`toolbar-button ${E.justifyCenter?"active":""}`,title:"Center",children:"⇔"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyRight"),className:`toolbar-button ${E.justifyRight?"active":""}`,title:"Align Right",children:"⇥"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyFull"),className:`toolbar-button ${E.justifyFull?"active":""}`,title:"Justify",children:"≡"})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("insertUnorderedList"),className:"toolbar-button",title:"Bullet List",children:"●"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertOrderedList"),className:"toolbar-button",title:"Numbered List",children:"1. 2. 3."})]}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:m,onChange:j=>A("fontSize",j.target.value),className:"toolbar-select",title:"Font Size",children:O.map(j=>jsxRuntimeExports.jsx("option",{value:j.value,children:j.label},j.value))})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:_,onChange:j=>A("fontName",j.target.value),className:"toolbar-select",title:"Font Family",children:I.map(j=>jsxRuntimeExports.jsx("option",{value:j,children:j},j))})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("createLink"),className:"toolbar-button",title:"Insert Link",children:"🔗"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertImage"),className:"toolbar-button",title:"Insert Image",children:"📷"})]}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("undo"),className:"toolbar-button",title:"Undo (Ctrl+Z)",children:"↩"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("redo"),className:"toolbar-button",title:"Redo (Ctrl+Y)",children:"↪"})]})]}),jsxRuntimeExports.jsx("div",{ref:d,className:"editor-content",contentEditable:!0,style:{minHeight:o,maxHeight:l,height:i==="auto"?"auto":"100%",...p},onKeyDown:R,onKeyUp:C,onMouseUp:C,onInput:()=>{d.current&&(t==null||t(d.current.innerHTML)),C()}})]})},CETabView=({tabs:e,renderContent:t})=>{const[n,i]=React.useState(e[0]);return jsxRuntimeExports.jsxs("div",{className:"tabview-container",children:[jsxRuntimeExports.jsx("div",{className:"tabview-sidebar",children:e.map(o=>jsxRuntimeExports.jsx("div",{className:`tabview-tab ${n===o?"tabview-tab-active":""}`,onClick:()=>i(o),children:o},o))}),jsxRuntimeExports.jsx("div",{className:"tabview-content",children:t(n)})]})},CETemplate=({children:e,headerProps:t,showHeader:n=!0,showFooter:i=!0,containerClassName:o="",containerStyle:l={}})=>jsxRuntimeExports.jsxs("div",{className:`ce-wrapper ${o}`,style:l,children:[n&&jsxRuntimeExports.jsx(CEHeader,{...t}),jsxRuntimeExports.jsx("main",{className:"main-content",children:e}),i&&jsxRuntimeExports.jsx(CEFooter,{})]}),CETimePicker=({label:e="Select Time",onChange:t,initialTime:n="",className:i="",id:o,name:l})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(n),[m,g]=React.useState("12"),[_,S]=React.useState("00"),[E,b]=React.useState("AM"),[T,C]=React.useState(!1),[A,R]=React.useState(""),[O,I]=React.useState(""),j=React.useRef(null),M=Array.from({length:12},(W,L)=>String(L+1).padStart(2,"0")),N=Array.from({length:60},(W,L)=>String(L).padStart(2,"0")),D=(W,L)=>{if(!W)return"";const B=parseInt(W);return L==="hours"?B>12?"12":B===0?"01":W.padStart(2,"0"):B>59?"59":W.padStart(2,"0")},F=W=>{const L=W.target.value,B=W.target.selectionStart||0;let U=m,K=_,H=E,J=p;if(B<=2){const X=L.substring(0,2).replace(/[^0-9]/g,"");if(X){if(X.length===1){const Q=parseInt(X);Q>=2&&Q<=9?(U=X.padStart(2,"0"),setTimeout(()=>{j.current&&j.current.setSelectionRange(3,5)},10)):(U=X,setTimeout(()=>{j.current&&j.current.setSelectionRange(1,1)},10))}else if(X.length===2){const Q=parseInt(X);Q>=1&&Q<=12?(U=X,setTimeout(()=>{j.current&&j.current.setSelectionRange(3,5)},10)):(U=X[0],setTimeout(()=>{j.current&&j.current.setSelectionRange(1,1)},10))}J=`${U}:${_} ${E}`}}else if(B>=3&&B<=5){const X=L.indexOf(":")+1,Q=L.substring(X,X+2).replace(/[^0-9]/g,"");if(Q){if(Q.length===1)K=Q,J=`${m}:${K} ${E}`,setTimeout(()=>{j.current&&j.current.setSelectionRange(4,4)},10);else if(Q.length===2){const le=parseInt(Q);le>=0&&le<=59?(K=Q,setTimeout(()=>{j.current&&j.current.setSelectionRange(6,8)},10)):(K=Q[0],setTimeout(()=>{j.current&&j.current.setSelectionRange(4,4)},10))}J=`${m}:${K} ${E}`}}else if(B>=6){const Q=L.substring(L.lastIndexOf(" ")+1).toUpperCase();Q.startsWith("A")?(H="AM",J=`${m}:${_} AM`):Q.startsWith("P")&&(H="PM",J=`${m}:${_} PM`)}g(U),S(K),b(H),d(J),f(!1),t==null||t(J)},q=W=>{if(!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","0","1","2","3","4","5","6","7","8","9",":","A","P","M"," ","a","p","m"].includes(W.key)){W.preventDefault();return}if(W.key==="Enter"||W.key===":"){W.preventDefault();const B=W.currentTarget.selectionStart||0;if(B<=2){if(A){const U=D(A,"hours");g(U),R(""),d(`${U}:${_} ${E}`)}W.currentTarget.setSelectionRange(3,5)}else if(B>=3&&B<=5){if(O){const U=D(O,"minutes");S(U),I(""),d(`${m}:${U} ${E}`)}W.currentTarget.setSelectionRange(6,8)}}},z=W=>{const L=W.currentTarget.selectionStart||0,B=j.current;B&&(L<=1?B.setSelectionRange(0,2):L>=3&&L<=4?B.setSelectionRange(3,5):L>=6&&B.setSelectionRange(6,8))},G=()=>{f(!0),C(!0)},ee=(W,L)=>{const B=W==="hours"?L:m,U=W==="minutes"?L:_,K=W==="period"?L:E;g(B),S(U),b(K);const H=`${B}:${U} ${K}`;d(H),t==null||t(H)},Y=()=>{const W=`${m}:${_} ${E}`;d(W),f(!1),t==null||t(W)},V=()=>{d(""),g("12"),S("00"),b("AM"),f(!1),C(!1)};return jsxRuntimeExports.jsxs("div",{className:`time-picker-container ${i}`,children:[jsxRuntimeExports.jsxs("div",{className:`time-picker-input ${u||T?"active":""}`,children:[jsxRuntimeExports.jsx("input",{ref:j,type:"text",id:o,name:l,value:p,onChange:F,onKeyDown:q,onClick:W=>{p||G(),z(W)},onFocus:()=>C(!0),onBlur:()=>!u&&C(!1),placeholder:T||p?"hh:mm AM":"",className:"time-input",maxLength:8}),jsxRuntimeExports.jsx("label",{className:`floating-label ${u||T||p?"active":""}`,children:e}),jsxRuntimeExports.jsx("span",{className:"clock-icon",onClick:W=>{W.stopPropagation(),G()},children:jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("path",{d:"M12 6v6l4 2"})]})})]}),jsxRuntimeExports.jsxs("div",{className:`time-picker-popup ${u?"open":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"time-picker-sections",children:[jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Hours"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:M.map(W=>jsxRuntimeExports.jsx("div",{className:`time-item ${W===m?"selected":""}`,onClick:()=>ee("hours",W),children:W},W))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Minutes"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:N.map(W=>jsxRuntimeExports.jsx("div",{className:`time-item ${W===_?"selected":""}`,onClick:()=>ee("minutes",W),children:W},W))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section period",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Period"}),jsxRuntimeExports.jsx("div",{className:"period-list",children:["AM","PM"].map(W=>jsxRuntimeExports.jsx("div",{className:`period-item ${W===E?"selected":""}`,onClick:()=>ee("period",W),children:W},W))})]})]}),jsxRuntimeExports.jsxs("div",{className:"time-picker-actions",children:[jsxRuntimeExports.jsx("button",{className:"time-picker-button cancel",onClick:V,children:"Cancel"}),jsxRuntimeExports.jsx("button",{className:"time-picker-button ok",onClick:Y,children:"OK"})]})]})]})},TransferItem=({label:e,checked:t,onChange:n,disabled:i})=>jsxRuntimeExports.jsx(CECheckBox,{label:e,checked:t,onChange:n,disabled:i}),CETransferButton=({label:e,onClick:t,disabled:n=!1,className:i=""})=>jsxRuntimeExports.jsx("button",{onClick:t,disabled:n,className:`transfer-button ${i}`,children:e}),TransferList=({dataUrl:e,onTransfer:t,containerClass:n="",boxClass:i="",buttonClass:o=""})=>{const[l,u]=React.useState([]),[f,p]=React.useState([]),[d,m]=React.useState(!0),[g,_]=React.useState(null),[S,E]=React.useState(new Set),[b,T]=React.useState(new Set);React.useEffect(()=>{(async()=>{var j,M;try{m(!0),_(null);const D=(await axios.get(e)).data.items||[];u(D.slice(0,Math.ceil(D.length/2))),p(D.slice(Math.ceil(D.length/2)))}catch(N){_(axios.isAxiosError(N)?((M=(j=N.response)==null?void 0:j.data)==null?void 0:M.message)||N.message:"An error occurred")}finally{m(!1)}})()},[]);const C=I=>{if(I==="available"){const j=l.filter(N=>S.has(N.id)).sort((N,D)=>{const F=parseInt(N.id.replace(/\D/g,"")),q=parseInt(D.id.replace(/\D/g,""));return F-q}),M=l.filter(N=>!S.has(N.id));u(M),p(N=>[...N,...j].sort((F,q)=>{const z=parseInt(F.id.replace(/\D/g,"")),G=parseInt(q.id.replace(/\D/g,""));return z-G})),E(new Set)}else{const j=f.filter(N=>b.has(N.id)).sort((N,D)=>{const F=parseInt(N.id.replace(/\D/g,"")),q=parseInt(D.id.replace(/\D/g,""));return F-q}),M=f.filter(N=>!b.has(N.id));p(M),u(N=>[...N,...j].sort((F,q)=>{const z=parseInt(F.id.replace(/\D/g,"")),G=parseInt(q.id.replace(/\D/g,""));return z-G})),T(new Set)}t(f,l)},A=(I,j,M)=>{M(N=>{const D=new Set(N);return D.has(I)?D.delete(I):D.add(I),D})},R=(I,j,M)=>N=>{const D=new Set(j),F=I.filter(q=>!q.disabled);N?F.forEach(q=>D.add(q.id)):F.forEach(q=>D.delete(q.id)),M(D)},O=(I,j,M,N)=>{const D=I.filter(ee=>!ee.disabled),F=D.length>0&&D.every(ee=>j.has(ee.id)),q=j.size,z=I.length,G=I.length===0;return jsxRuntimeExports.jsxs("div",{className:`transfer-box ${i}`,children:[jsxRuntimeExports.jsx("div",{className:"transfer-box-header",children:jsxRuntimeExports.jsxs("div",{className:"header-content",children:[jsxRuntimeExports.jsx("div",{className:"checkbox-wrapper",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:F,onChange:R(I,j,M),disabled:G})}),jsxRuntimeExports.jsxs("div",{className:"title-section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:N}),jsxRuntimeExports.jsxs("div",{className:"count-text",children:[q,"/",z," selected"]})]})]})}),jsxRuntimeExports.jsx("div",{className:"transfer-items",children:I.map(ee=>jsxRuntimeExports.jsx(TransferItem,{label:ee.label,checked:j.has(ee.id),disabled:ee.disabled,onChange:()=>A(ee.id,j,M)},ee.id))})]})};return d?jsxRuntimeExports.jsx("div",{children:"Loading..."}):g?jsxRuntimeExports.jsxs("div",{children:["Error: ",g]}):jsxRuntimeExports.jsxs("div",{className:`transfer-list-container ${n}`,children:[O(l,S,E,"Choices"),jsxRuntimeExports.jsxs("div",{className:"transfer-buttons",children:[jsxRuntimeExports.jsx(CETransferButton,{label:">>",onClick:()=>C("available"),disabled:S.size===0,className:o}),jsxRuntimeExports.jsx(CETransferButton,{label:"<<",onClick:()=>C("chosen"),disabled:b.size===0,className:o})]}),O(f,b,T,"Chosen")]})},CEBadge=({label:e,backgroundColor:t="#e0e0e0",textColor:n="#000",style:i,id:o,name:l,disable:u=!1})=>jsxRuntimeExports.jsx("span",{id:o,"data-name":l,"aria-disabled":u,style:{backgroundColor:t,color:n,padding:"4px 10px",borderRadius:"12px",fontSize:"12px",display:"inline-block",whiteSpace:"nowrap",...u?{opacity:.6,pointerEvents:"none"}:{},...i},children:e}),chatIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%202.5H4C2.9%202.5%202.01%203.4%202.01%204.5L2%2022.5L6%2018.5H20C21.1%2018.5%2022%2017.6%2022%2016.5V4.5C22%203.4%2021.1%202.5%2020%202.5ZM7%209.5H17C17.55%209.5%2018%209.95%2018%2010.5C18%2011.05%2017.55%2011.5%2017%2011.5H7C6.45%2011.5%206%2011.05%206%2010.5C6%209.95%206.45%209.5%207%209.5ZM13%2014.5H7C6.45%2014.5%206%2014.05%206%2013.5C6%2012.95%206.45%2012.5%207%2012.5H13C13.55%2012.5%2014%2012.95%2014%2013.5C14%2014.05%2013.55%2014.5%2013%2014.5ZM17%208.5H7C6.45%208.5%206%208.05%206%207.5C6%206.95%206.45%206.5%207%206.5H17C17.55%206.5%2018%206.95%2018%207.5C18%208.05%2017.55%208.5%2017%208.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",CEChatbox=({notes:e,onAddNote:t,buttonLabel:n,buttonIcon:i})=>{const[o,l]=React.useState(""),u=()=>{t(o),l("")},f=p=>{p.key==="Enter"&&u()};return jsxRuntimeExports.jsxs("div",{className:"notes-container",children:[jsxRuntimeExports.jsxs("div",{className:"notes-header",children:[jsxRuntimeExports.jsx("img",{src:chatIcon,alt:"Chat Icon",className:"notes-icon"}),jsxRuntimeExports.jsx("span",{className:"notes-title",children:"Notes"})]}),jsxRuntimeExports.jsxs("div",{className:"add-note-section",children:[jsxRuntimeExports.jsx("textarea",{value:o,onChange:p=>l(p.target.value),onKeyPress:f,placeholder:"Add a note...",className:"add-note-input",rows:3}),jsxRuntimeExports.jsx(CEButton,{label:n,icon:i,variant:"outlinedGreen",onClick:u,sx:{width:"100%",marginTop:"10px"},children:void 0})]}),jsxRuntimeExports.jsx("div",{className:"notes-list",children:e.map(p=>jsxRuntimeExports.jsxs("div",{className:"note-item",children:[jsxRuntimeExports.jsx("div",{className:"note-avatar",children:p.initials}),jsxRuntimeExports.jsxs("div",{className:"note-content",children:[jsxRuntimeExports.jsxs("div",{className:"note-header",children:[jsxRuntimeExports.jsx("span",{className:"note-author",children:p.author}),jsxRuntimeExports.jsx("span",{className:"note-timestamp",children:p.timestamp})]}),jsxRuntimeExports.jsx("div",{className:"note-text",children:p.content})]})]},p.id))})]})},CEStatusDropdown=({options:e,selected:t,onChange:n,placeholder:i="Select status...",size:o="medium",disabled:l=!1,ariaLabel:u="Status selection dropdown"})=>{const[f,p]=React.useState(!1),d=React.useRef(null),m=e.find(b=>b.value===t),g=b=>{n(b),p(!1)};React.useEffect(()=>{const b=T=>{var C;(C=d.current)!=null&&C.contains(T.target)||p(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const _=b=>{l||(b.key==="Enter"||b.key===" "?(b.preventDefault(),p(!f)):b.key==="Escape"&&p(!1))},S=b=>{if(b!=null&&b.statusType)switch(b.statusType){case"in-progress":return"in-progress";case"declined":return"declined";case"withdrawn":return"withdrawn";default:return""}return""},E=()=>{if(m){const b={};return m.backgroundColor&&(b.backgroundColor=m.backgroundColor),m.textColor&&(b.color=m.textColor),b}return{}};return jsxRuntimeExports.jsxs("div",{className:`status-dropdown-container ${l?"disabled":""} size-${o}`,ref:d,children:[jsxRuntimeExports.jsxs("div",{className:`status-dropdown-trigger ${f?"open":""} ${m?`has-selection ${S(m)}`:""}`,onClick:()=>!l&&g((m==null?void 0:m.value)||""),onKeyDown:_,tabIndex:l?-1:0,role:"button","aria-haspopup":"listbox","aria-expanded":f?"true":"false","aria-label":u,style:E(),children:[jsxRuntimeExports.jsx("span",{className:"status-text",children:m?m.label:i}),jsxRuntimeExports.jsx("span",{className:"status-dropdown-icon",onClick:b=>{b.stopPropagation(),!l&&p(!f)},children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-arrow ${f?"rotate":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"currentColor",fillOpacity:"0.7"})})})]}),f&&!l&&jsxRuntimeExports.jsx("ul",{className:"status-dropdown-options",role:"listbox","aria-label":"Status options",children:e.map(b=>{const T={};return b.backgroundColor&&(T.backgroundColor=b.backgroundColor),b.textColor&&(T.color=b.textColor),jsxRuntimeExports.jsxs("li",{className:`status-dropdown-option ${t===b.value?"selected":""} ${S(b)}`,onClick:()=>g(b.value),role:"option","aria-selected":t===b.value?"true":"false",style:T,children:[jsxRuntimeExports.jsx("span",{className:"option-indicator",children:b.icon?b.icon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[b.statusType==="declined"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ff4757"}),jsxRuntimeExports.jsx("path",{d:"M15 9l-6 6m0-6l6 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),b.statusType==="withdrawn"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ffa502"}),jsxRuntimeExports.jsx("path",{d:"M12 8v4M12 16h.01",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),b.statusType==="in-progress"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#5f27cd"}),jsxRuntimeExports.jsx("path",{d:"M8 12l2 2 4-4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}),b.label]},b.value)})})]})},CEToggleYesNo=({value:e,onChange:t,label:n})=>jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("div",{className:"label",children:n}),jsxRuntimeExports.jsxs("div",{className:"toggle-group",children:[jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="yes"?"primary":"outlined",className:`toggle-btn ${e==="yes"?"active":""}`,onClick:()=>t("yes"),children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"YES"]}),jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="no"?"primary":"outlined",className:`toggle-btn ${e==="no"?"active":""}`,onClick:()=>t("no"),children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"NO"]})]})]}),days=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],CEOperatingDaysSelector=({selectedDays:e,onChange:t})=>{const n=i=>{e.includes(i)?t(e.filter(o=>o!==i)):t([...e,i])};return jsxRuntimeExports.jsx("div",{className:"days-group",children:days.map(i=>jsxRuntimeExports.jsx(CEButton,{size:"small",variant:e.includes(i)?"primary":"outlined",className:`day-btn ${e.includes(i)?"active":""}`,onClick:()=>n(i),children:i},i))})},CERoundTabNav=({tabs:e,activeTab:t,onTabClick:n,tabBarBgColor:i,tabBarItemBgColor:o})=>jsxRuntimeExports.jsx("div",{className:"om-om-radiusTab-bar-nwo",style:{backgroundColor:i||"#6fb744"},children:e.map(l=>jsxRuntimeExports.jsx("div",{className:`om-radiusTab-item-nwo ${l.value===t?"active":""}`,onClick:u=>n(l.value,u),style:{backgroundColor:l.value===t?o||"#ebebf0":""},children:l.label},l.value))}),CEAccordion=({children:e})=>jsxRuntimeExports.jsx("div",{className:"accordion-container",children:e}),CEAccordionItem=({title:e,children:t,initiallyOpen:n=!1})=>{const[i,o]=React.useState(n);return jsxRuntimeExports.jsxs("div",{className:"accordion-item",children:[jsxRuntimeExports.jsxs("button",{className:`accordion-header ${i?"open":""}`,onClick:()=>o(!i),children:[jsxRuntimeExports.jsx("span",{className:"accordion-title",children:e}),jsxRuntimeExports.jsx("span",{className:`accordion-icon ${i?"open":""}`,children:jsxRuntimeExports.jsxs("svg",{width:"21",height:"12",viewBox:"0 0 21 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_20728_2951)",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 1.89L19.094 0.5L10.487 8.761L9.569 7.88L9.574 7.885L1.927 0.545L0.5 1.914L10.487 11.5L20.5 1.89Z",fill:"black"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_20728_2951",children:jsxRuntimeExports.jsx("rect",{width:"11",height:"20",fill:"white",transform:"matrix(0 -1 1 0 0.5 11.5)"})})})]})})]}),i&&jsxRuntimeExports.jsx("div",{className:"accordion-content",children:t})]})},CEToggleSlide=({checked:e,onToggle:t,label:n})=>{const i=()=>{t(!e)};return jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("span",{className:"toggle-label",children:n}),jsxRuntimeExports.jsxs("label",{className:"toggle-switch",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:e,onChange:i,className:"toggle-checkbox"}),jsxRuntimeExports.jsx("span",{className:"toggle-slider"})]})]})};var DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IconContext=React.createContext&&React.createContext(DefaultContext),_excluded$m=["attr","size","title"];function _objectWithoutProperties$m(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose$m(e,t),i,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)i=l[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _objectWithoutPropertiesLoose$m(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function _extends$y(){return _extends$y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$y.apply(this,arguments)}function ownKeys$F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$F(Object(n),!0).forEach(function(i){_defineProperty$M(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$F(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$M(e,t,n){return t=_toPropertyKey$M(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$M(e){var t=_toPrimitive$M(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$M(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tree2Element(e){return e&&e.map((t,n)=>React.createElement(t.tag,_objectSpread$F({key:n},t.attr),Tree2Element(t.child)))}function GenIcon(e){return t=>React.createElement(IconBase,_extends$y({attr:_objectSpread$F({},e.attr)},t),Tree2Element(e.child))}function IconBase(e){var t=n=>{var{attr:i,size:o,title:l}=e,u=_objectWithoutProperties$m(e,_excluded$m),f=o||n.size||"1em",p;return n.className&&(p=n.className),e.className&&(p=(p?p+" ":"")+e.className),React.createElement("svg",_extends$y({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,u,{className:p,style:_objectSpread$F(_objectSpread$F({color:e.color||n.color},n.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),l&&React.createElement("title",null,l),e.children)};return IconContext!==void 0?React.createElement(IconContext.Consumer,null,n=>t(n)):t(DefaultContext)}function FaSearch(e){return GenIcon({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function MdKeyboardArrowDown(e){return GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(e)}const CEAdvancedMultiSelectDropdown=({options:e,onSelectItem:t,onChange:n,placeholder:i="Search customers...",allowSearch:o=!0,width:l="100%",inputHeight:u="3rem",dropdownMaxHeight:f="20rem",id:p,name:d})=>{const[m,g]=React.useState(!1),[_,S]=React.useState(""),[E,b]=React.useState([]),T=React.useRef(null);React.useEffect(()=>{n&&n(E)},[E,n]);const C=e.filter(A=>{var R;return A.label.toLowerCase().includes(_.toLowerCase())||((R=A.subtitle)==null?void 0:R.toLowerCase().includes(_.toLowerCase()))});return React.useEffect(()=>{const A=R=>{var O;(O=T.current)!=null&&O.contains(R.target)||g(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:T,style:{width:l},children:[jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${m?"open":""}`,style:{minHeight:u},children:[jsxRuntimeExports.jsx(FaSearch,{className:"search-icon"}),jsxRuntimeExports.jsxs("div",{className:"selected-chips",onClick:()=>g(!0),children:[E.length===0&&jsxRuntimeExports.jsx("input",{type:"text",className:"search-input",id:p,name:d,placeholder:i,value:_,onChange:A=>{S(A.target.value),m||g(!0)},onClick:A=>{A.stopPropagation(),g(!0)},style:{height:u}}),E.map(A=>jsxRuntimeExports.jsxs("div",{className:"selected-item-inline",children:[jsxRuntimeExports.jsx("span",{className:"selected-item-label",children:A.label}),jsxRuntimeExports.jsx("button",{type:"button",className:"selected-item-remove",onClick:R=>{R.stopPropagation(),b(O=>O.filter(I=>I.value!==A.value))},"aria-label":`Remove ${A.label}`,children:"×"})]},A.value))]}),jsxRuntimeExports.jsx(MdKeyboardArrowDown,{className:`dropdown-arrow ${m?"rotated":""}`,onClick:A=>{A.stopPropagation(),g(R=>!R)}})]}),m&&jsxRuntimeExports.jsx("div",{className:"dropdown-options",style:{maxHeight:f},children:jsxRuntimeExports.jsx("ul",{className:"dropdown-list",children:C.length>0?C.map(A=>{const R=E.some(O=>O.value===A.value);return jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${R?"selected":""}`,onClick:O=>{O.stopPropagation(),b(I=>{const j=I.some(N=>N.value===A.value);let M;return j?M=I.filter(N=>N.value!==A.value):M=[...I,A],M}),S(""),t(A),g(!1)},children:[jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("div",{className:"option-line-1",children:A.label}),A.subtitle&&jsxRuntimeExports.jsx("div",{className:"option-line-2",children:A.subtitle})]}),A.icon&&jsxRuntimeExports.jsx("div",{className:"option-icon",children:A.icon})]},A.value)}):jsxRuntimeExports.jsx("li",{className:"dropdown-option no-results",children:"No results found"})})})]})},AutoCompleteInput=({label:e,options:t,value:n,onChange:i,multiple:o=!0,showCheckboxes:l=!0})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(!1),[m,g]=React.useState(""),_=React.useRef(null),S=React.useRef(null),E=t.filter(C=>C.toLowerCase().includes(m.toLowerCase())),b=C=>{if(o){const A=n.includes(C);i(A?n.filter(R=>R!==C):[...n,C]),g("")}else i([C]),g(C),f(!1)},T=C=>{S.current&&!S.current.contains(C.target)&&(f(!1),d(!1))};return React.useEffect(()=>(document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)),[]),jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:S,children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper ${p||u?"focused":""} ${n.length>0?"has-value":""}`,children:[jsxRuntimeExports.jsx("label",{className:"autocomplete-label",children:e}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[o&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:n.map(C=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[C,jsxRuntimeExports.jsx("button",{onClick:A=>{A.stopPropagation(),i(n.filter(R=>R!==C))},children:"×"})]},C))}),jsxRuntimeExports.jsx("input",{ref:_,type:"text",className:"autocomplete-input",value:m,onChange:C=>g(C.target.value),onFocus:()=>{d(!0),f(!0)}}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onClick:()=>f(C=>!C),children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5H7z",fill:"gray"})})})]})]}),u&&jsxRuntimeExports.jsxs("ul",{className:"autocomplete-list",children:[o&&l&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{const C=n.length===t.length;i(C?[]:[...t])}}),"Select All"]})}),E.map(C=>jsxRuntimeExports.jsx("li",{onClick:()=>b(C),children:o&&l?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(C),onChange:()=>b(C),onClick:A=>A.stopPropagation()}),C]}):C},C))]})]})},CEAutoCompleteSelect=({label:e,options:t,value:n,onChange:i,multiple:o=!1,showCheckboxes:l=!1,id:u})=>{const[f,p]=React.useState(!1),[d,m]=React.useState(!1),[g,_]=React.useState(""),S=React.useRef(null),E=React.useRef(null),b=t.filter(O=>{var I;return(I=O.label)==null?void 0:I.toLowerCase().includes(g==null?void 0:g.toLowerCase())});React.useEffect(()=>{if(o)o&&_("");else{const O=A(n[0]);_(O||"")}},[n,o,t]);const T=O=>{if(o){const I=n.includes(O.value);i(I?n.filter(j=>j!==O.value):[...n,O.value]),_("")}else i([O.value]),_(O.label),p(!1)},C=O=>{E.current&&!E.current.contains(O.target)&&(p(!1),m(!1))};React.useEffect(()=>(document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)),[]);const A=O=>{var I;return((I=t.find(j=>j.value===O))==null?void 0:I.label)||O},R=O=>{O.stopPropagation(),_(""),i([])};return jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:E,id:u,"data-testid":u?`ce-autocomplete-${u}`:"ce-autocomplete",children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper ${d||f?"focused":""} ${n.length>0?"has-value":""}`,onClick:()=>p(!0),children:[jsxRuntimeExports.jsx("label",{className:"autocomplete-label",children:e}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[o&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:n.map(O=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[A(O),jsxRuntimeExports.jsx("button",{onClick:I=>{I.stopPropagation(),i(n.filter(j=>j!==O))},children:"×"})]},O))}),jsxRuntimeExports.jsx("input",{ref:S,type:"text",className:"autocomplete-input",value:g,onChange:O=>_(O.target.value),onFocus:()=>{m(!0),p(!0)}}),n.length>0&&jsxRuntimeExports.jsx("span",{className:"clear-icon",onClick:R,title:"Clear",children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onClick:O=>{O.stopPropagation(),p(I=>!I)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5H7z",fill:"gray"})})})]})]}),f&&jsxRuntimeExports.jsxs("ul",{className:"autocomplete-list",children:[o&&l&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{const O=n.length===t.length;i(O?[]:t.map(I=>I.value))}}),"Select All"]})}),b.map(O=>jsxRuntimeExports.jsx("li",{onClick:()=>T(O),children:o&&l?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(O.value),onChange:()=>T(O),onClick:I=>I.stopPropagation()}),O.label]}):O.label},O.value))]})]})};var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return _root=n,_root}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,n=t.hasOwnProperty,i=t.toString,o=e?e.toStringTag:void 0;function l(u){var f=n.call(u,o),p=u[o];try{u[o]=void 0;var d=!0}catch{}var m=i.call(u);return d&&(f?u[o]=p:delete u[o]),m}return _getRawTag=l,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function n(i){return t.call(i)}return _objectToString=n,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),n=require_objectToString(),i="[object Null]",o="[object Undefined]",l=e?e.toStringTag:void 0;function u(f){return f==null?f===void 0?o:i:l&&l in Object(f)?t(f):n(f)}return _baseGetTag=u,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),n="[object Symbol]";function i(o){return typeof o=="symbol"||t(o)&&e(o)==n}return isSymbol_1=i,isSymbol_1}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(l,u){if(e(l))return!1;var f=typeof l;return f=="number"||f=="symbol"||f=="boolean"||l==null||t(l)?!0:i.test(l)||!n.test(l)||u!=null&&l in Object(u)}return _isKey=o,_isKey}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return isObject_1=e,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),n="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",l="[object Proxy]";function u(f){if(!t(f))return!1;var p=e(f);return p==i||p==o||p==n||p==l}return isFunction_1=u,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function n(i){return!!t&&t in i}return _isMasked=n,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function n(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return _toSource=n,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),n=requireIsObject(),i=require_toSource(),o=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,u=Function.prototype,f=Object.prototype,p=u.toString,d=f.hasOwnProperty,m=RegExp("^"+p.call(d).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(_){if(!n(_)||t(_))return!1;var S=e(_)?m:l;return S.test(i(_))}return _baseIsNative=g,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,n){return t==null?void 0:t[n]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function n(i,o){var l=t(i,o);return e(l)?l:void 0}return _getNative=n,_getNative}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",n=Object.prototype,i=n.hasOwnProperty;function o(l){var u=this.__data__;if(e){var f=u[l];return f===t?void 0:f}return i.call(u,l)?u[l]:void 0}return _hashGet=o,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,n=t.hasOwnProperty;function i(o){var l=this.__data__;return e?l[o]!==void 0:n.call(l,o)}return _hashHas=i,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function n(i,o){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=e&&o===void 0?t:o,this}return _hashSet=n,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),n=require_hashGet(),i=require_hashHas(),o=require_hashSet();function l(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var d=u[f];this.set(d[0],d[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_Hash=l,_Hash}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,n){return t===n||t!==t&&n!==n}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(n,i){for(var o=n.length;o--;)if(e(n[o][0],i))return o;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,n=t.splice;function i(o){var l=this.__data__,u=e(l,o);if(u<0)return!1;var f=l.length-1;return u==f?l.pop():n.call(l,u,1),--this.size,!0}return _listCacheDelete=i,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(n){var i=this.__data__,o=e(i,n);return o<0?void 0:i[o][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(n){return e(this.__data__,n)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(n,i){var o=this.__data__,l=e(o,n);return l<0?(++this.size,o.push([n,i])):o[l][1]=i,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),n=require_listCacheGet(),i=require_listCacheHas(),o=require_listCacheSet();function l(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var d=u[f];this.set(d[0],d[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_ListCache=l,_ListCache}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),n=e(t,"Map");return _Map=n,_Map}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),n=require_Map();function i(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _mapCacheClear=i,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(n,i){var o=n.__data__;return e(i)?o[typeof i=="string"?"string":"hash"]:o.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(n){var i=e(this,n).delete(n);return this.size-=i?1:0,i}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(n){return e(this,n).get(n)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(n){return e(this,n).has(n)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(n,i){var o=e(this,n),l=o.size;return o.set(n,i),this.size+=o.size==l?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),n=require_mapCacheGet(),i=require_mapCacheHas(),o=require_mapCacheSet();function l(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var d=u[f];this.set(d[0],d[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_MapCache=l,_MapCache}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function n(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var l=function(){var u=arguments,f=o?o.apply(this,u):u[0],p=l.cache;if(p.has(f))return p.get(f);var d=i.apply(this,u);return l.cache=p.set(f,d)||p,d};return l.cache=new(n.Cache||e),l}return n.Cache=e,memoize_1=n,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function n(i){var o=e(i,function(u){return l.size===t&&l.clear(),u}),l=o.cache;return o}return _memoizeCapped=n,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,i=e(function(o){var l=[];return o.charCodeAt(0)===46&&l.push(""),o.replace(t,function(u,f,p,d){l.push(p?d.replace(n,"$1"):f||u)}),l});return _stringToPath=i,_stringToPath}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,l=Array(o);++i<o;)l[i]=n(t[i],i,t);return l}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),n=requireIsArray(),i=requireIsSymbol(),o=e?e.prototype:void 0,l=o?o.toString:void 0;function u(f){if(typeof f=="string")return f;if(n(f))return t(f,u)+"";if(i(f))return l?l.call(f):"";var p=f+"";return p=="0"&&1/f==-1/0?"-0":p}return _baseToString=u,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(n){return n==null?"":e(n)}return toString_1=t,toString_1}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),n=require_stringToPath(),i=requireToString();function o(l,u){return e(l)?l:t(l,u)?[l]:n(i(l))}return _castPath=o,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(n){if(typeof n=="string"||e(n))return n;var i=n+"";return i=="0"&&1/n==-1/0?"-0":i}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function n(i,o){o=e(o,i);for(var l=0,u=o.length;i!=null&&l<u;)i=i[t(o[l++])];return l&&l==u?i:void 0}return _baseGet=n,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(n,i,o){var l=n==null?void 0:e(n,i);return l===void 0?o:l}return get_1=t,get_1}var getExports=requireGet();const get=getDefaultExportFromCjs(getExports);var isNil_1,hasRequiredIsNil;function requireIsNil(){if(hasRequiredIsNil)return isNil_1;hasRequiredIsNil=1;function e(t){return t==null}return isNil_1=e,isNil_1}var isNilExports=requireIsNil();const isNil=getDefaultExportFromCjs(isNilExports);var isString_1,hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),n=requireIsObjectLike(),i="[object String]";function o(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==i}return isString_1=o,isString_1}var isStringExports=requireIsString();const isString=getDefaultExportFromCjs(isStringExports);var isFunctionExports=requireIsFunction();const isFunction=getDefaultExportFromCjs(isFunctionExports);var isObjectExports=requireIsObject();const isObject=getDefaultExportFromCjs(isObjectExports);var reactIs={exports:{}},reactIs_production_min={};/**
341
+ `;var n=sheet_to_csv(e,t);return n}function sheet_to_formulae(e){var t="",n,i="";if(e==null||e["!ref"]==null)return[];var o=safe_decode_range(e["!ref"]),l="",u=[],f,p=[],d=Array.isArray(e);for(f=o.s.c;f<=o.e.c;++f)u[f]=encode_col(f);for(var m=o.s.r;m<=o.e.r;++m)for(l=encode_row(m),f=o.s.c;f<=o.e.c;++f)if(t=u[f]+l,n=d?(e[m]||[])[f]:e[t],i="",n!==void 0){if(n.F!=null){if(t=n.F,!n.f)continue;i=n.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(n.f!=null)i=n.f;else{if(n.t=="z")continue;if(n.t=="n"&&n.v!=null)i=""+n.v;else if(n.t=="b")i=n.v?"TRUE":"FALSE";else if(n.w!==void 0)i="'"+n.w;else{if(n.v===void 0)continue;n.t=="s"?i="'"+n.v:i=""+n.v}}p[p.length]=t+"="+i}return p}function sheet_add_json(e,t,n){var i=n||{},o=+!i.skipHeader,l=e||{},u=0,f=0;if(l&&i.origin!=null)if(typeof i.origin=="number")u=i.origin;else{var p=typeof i.origin=="string"?decode_cell(i.origin):i.origin;u=p.r,f=p.c}var d,m={s:{c:0,r:0},e:{c:f,r:u+t.length-1+o}};if(l["!ref"]){var g=safe_decode_range(l["!ref"]);m.e.c=Math.max(m.e.c,g.e.c),m.e.r=Math.max(m.e.r,g.e.r),u==-1&&(u=g.e.r+1,m.e.r=u+t.length-1+o)}else u==-1&&(u=0,m.e.r=t.length-1+o);var _=i.header||[],S=0;t.forEach(function(b,T){keys$1(b).forEach(function(C){(S=_.indexOf(C))==-1&&(_[S=_.length]=C);var A=b[C],R="z",O="",I=encode_cell({c:f+S,r:u+T+o});d=ws_get_cell_stub(l,I),A&&typeof A=="object"&&!(A instanceof Date)?l[I]=A:(typeof A=="number"?R="n":typeof A=="boolean"?R="b":typeof A=="string"?R="s":A instanceof Date?(R="d",i.cellDates||(R="n",A=datenum(A)),O=i.dateNF||table_fmt[14]):A===null&&i.nullError&&(R="e",A=0),d?(d.t=R,d.v=A,delete d.w,delete d.R,O&&(d.z=O)):l[I]=d={t:R,v:A},O&&(d.z=O))})}),m.e.c=Math.max(m.e.c,f+_.length-1);var E=encode_row(u);if(o)for(S=0;S<_.length;++S)l[encode_col(S+f)+E]={t:"s",v:_[S]};return l["!ref"]=encode_range(m),l}function json_to_sheet(e,t){return sheet_add_json(null,e,t)}function ws_get_cell_stub(e,t,n){if(typeof t=="string"){if(Array.isArray(e)){var i=decode_cell(t);return e[i.r]||(e[i.r]=[]),e[i.r][i.c]||(e[i.r][i.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?ws_get_cell_stub(e,encode_cell(t)):ws_get_cell_stub(e,encode_cell({r:t,c:n||0}))}function wb_sheet_idx(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var n=e.SheetNames.indexOf(t);if(n>-1)return n;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function book_new(){return{SheetNames:[],Sheets:{}}}function book_append_sheet(e,t,n,i){var o=1;if(!n)for(;o<=65535&&e.SheetNames.indexOf(n="Sheet"+o)!=-1;++o,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(i&&e.SheetNames.indexOf(n)>=0){var l=n.match(/(^.*?)(\d+)$/);o=l&&+l[2]||0;var u=l&&l[1]||n;for(++o;o<=65535&&e.SheetNames.indexOf(n=u+o)!=-1;++o);}if(check_ws_name(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n}function book_set_sheet_visibility(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var i=wb_sheet_idx(e,t);switch(e.Workbook.Sheets[i]||(e.Workbook.Sheets[i]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[i].Hidden=n}function cell_set_number_format(e,t){return e.z=t,e}function cell_set_hyperlink(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}function cell_set_internal_link(e,t,n){return cell_set_hyperlink(e,"#"+t,n)}function cell_add_comment(e,t,n){e.c||(e.c=[]),e.c.push({t,a:n||"SheetJS"})}function sheet_set_array_formula(e,t,n,i){for(var o=typeof t!="string"?t:safe_decode_range(t),l=typeof t=="string"?t:encode_range(t),u=o.s.r;u<=o.e.r;++u)for(var f=o.s.c;f<=o.e.c;++f){var p=ws_get_cell_stub(e,u,f);p.t="n",p.F=l,delete p.v,u==o.s.r&&f==o.s.c&&(p.f=n,i&&(p.D=!0))}return e}var utils={encode_col,encode_row,encode_cell,encode_range,decode_col,decode_row,split_cell,decode_cell,decode_range,format_cell,sheet_add_aoa,sheet_add_json,sheet_add_dom,aoa_to_sheet,json_to_sheet,table_to_sheet:parse_dom_table,table_to_book,sheet_to_csv,sheet_to_txt,sheet_to_json,sheet_to_html,sheet_to_formulae,sheet_to_row_object_array:sheet_to_json,sheet_get_cell:ws_get_cell_stub,book_new,book_append_sheet,book_set_sheet_visibility,cell_set_number_format,cell_set_hyperlink,cell_set_internal_link,cell_add_comment,sheet_set_array_formula,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const CESkeletonTable=({columns:e,rows:t})=>jsxRuntimeExports.jsx("div",{className:"skeleton-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((n,i)=>jsxRuntimeExports.jsx("th",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-header"})},i))})}),jsxRuntimeExports.jsx("tbody",{children:Array.from({length:t}).map((n,i)=>jsxRuntimeExports.jsx("tr",{children:Array.from({length:e}).map((o,l)=>jsxRuntimeExports.jsx("td",{children:jsxRuntimeExports.jsx("div",{className:"skeleton skeleton-cell"})},l))},i))})]})}),CERadioButton=({label:e,value:t,checked:n,onChange:i,id:o,name:l})=>jsxRuntimeExports.jsxs("label",{className:"radio-button",style:{margin:"0.5rem 0"},children:[jsxRuntimeExports.jsx("input",{type:"radio",id:o,name:l,value:t,checked:n,onChange:()=>i(t),style:{marginRight:e?"0.5rem":0}}),e&&jsxRuntimeExports.jsx("span",{children:e})]}),CETruncatedTextWithTooltip=({text:e})=>{const[t,n]=React.useState(!1),[i,o]=React.useState({top:0,left:0}),l=React.useRef(null),[u,f]=React.useState(!1);React.useEffect(()=>{l.current&&f(l.current.scrollWidth>l.current.clientWidth)},[e]);const p=()=>{if(!l.current)return;const m=l.current.getBoundingClientRect(),g=300,_=100;let S=m.bottom+window.scrollY+8,E=m.left+window.scrollX;const b=window.innerWidth,T=window.innerHeight;E+g>b&&(E=b-g-8),m.bottom+_>T&&(S=m.top+window.scrollY-_-8),o({top:S,left:E}),n(!0)},d=()=>n(!1);return jsxRuntimeExports.jsxs("span",{className:"truncated-text-with-tooltip",ref:l,onMouseEnter:p,onMouseLeave:d,children:[e,u&&t&&ReactDOM.createPortal(jsxRuntimeExports.jsx("div",{className:"truncated-text-tooltip global-tooltip",style:{position:"absolute",top:`${i.top}px`,left:`${i.left}px`},children:e}),document.body)]})},DatePickerCell=({row:e,colId:t})=>{var i;const n=o=>{var u;const l=o.target.value;(u=e[t])==null||u.onchange(l)};return jsxRuntimeExports.jsx("div",{style:{minWidth:"120px"},children:jsxRuntimeExports.jsx("input",{type:"date",value:(i=e[t])==null?void 0:i.value,onChange:o=>n(o)})})},AddNewRowCell=({row:e,column:t,colId:n})=>{var p,d,m,g,_,S,E,b,T,C,A,R,O,I;const i=(((p=e[n])==null?void 0:p.required)??t.required)||!1,o=!!e[n].error,[l,u]=React.useState(!1),f=t.elementType;return React.useEffect(()=>{u(!(o||i))},[o,i,t.required]),jsxRuntimeExports.jsx("div",{children:o&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-content",onClick:()=>u(!0),role:"button",tabIndex:0,title:((d=e[n])==null?void 0:d.tooltip)||"","aria-label":((m=e[n])==null?void 0:m.tooltip)||"",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:(g=e[n])==null?void 0:g.value}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#d32f2f",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-circle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),jsxRuntimeExports.jsx("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})]},e.id):i&&!l?jsxRuntimeExports.jsxs("div",{className:"add-new-row-error-warning",onClick:()=>u(!0),role:"button",tabIndex:0,title:((_=e[n])==null?void 0:_.tooltip)||"This field is required. Click to enter a value.","aria-label":((S=e[n])==null?void 0:S.tooltip)||"This field is required. Click to enter a value.",children:[jsxRuntimeExports.jsx("span",{className:"table-new-row-warning-message",children:((E=e[n])==null?void 0:E.value)||"Required"}),jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#ff9800",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-triangle-alert",style:{flexShrink:0},children:[jsxRuntimeExports.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),jsxRuntimeExports.jsx("path",{d:"M12 9v4"}),jsxRuntimeExports.jsx("path",{d:"M12 17h.01"})]})]},e.id):l&&(f==="auto-suggest"?jsxRuntimeExports.jsx(CEAdvancedAutoSuggest,{label:"",fetchSuggestions:(b=e[n])==null?void 0:b.fetchOptions,onChange:()=>{},onSelect:j=>{var M,N;return(N=(M=e[n])==null?void 0:M.onselect)==null?void 0:N.call(M,j)},value:((T=e[n])==null?void 0:T.selectedOption)||null}):f==="date-picker"?jsxRuntimeExports.jsx(DatePickerCell,{row:e,colId:n}):f==="text-input"?jsxRuntimeExports.jsx(CEInputBox,{onChange:j=>{var M;return(M=e[n])==null?void 0:M.onchange(j)},value:((C=e[n])==null?void 0:C.value)||"",showError:!1}):f==="number-input"?jsxRuntimeExports.jsx(CEInputBox,{type:"number",onChange:j=>{var M;return(M=e[n])==null?void 0:M.onchange(j)},value:((A=e[n])==null?void 0:A.value)||"",showError:!1}):f==="drop-down-input"?jsxRuntimeExports.jsx(CEDynamicSelectField,{label:"",value:((R=e[n])==null?void 0:R.value)||"",onChange:j=>{var M;(M=e[n])==null||M.onchange(j.target.value)},options:((O=e[n])==null?void 0:O.options)||[],showPlaceholder:!0,placeholderText:""}):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(((I=e[n])==null?void 0:I.value)??"")}))})},CEDateRangePicker=({label:e="Submitted Date",onChange:t,size:n="medium",style:i,inputGroupStyle:o,id:l,name:u,mode:f="range",defaultValue:p,disabled:d=!1,minDate:m=""})=>{const[g,_]=React.useState(""),[S,E]=React.useState(""),[b,T]=React.useState(!1),[C,A]=React.useState(""),R=m?new Date(m).toISOString().split("T")[0]:void 0,O=D=>{!D.currentTarget.value&&!g&&!S&&T(!1)},I=(D,F)=>{if(t==null||t({startDate:D||"",endDate:F||""}),D&&!F||!D&&F){A("Both start and end dates must be selected");return}if(D&&F&&new Date(F)<new Date(D)){A("End date must be after or equal to start date");return}A("")},j=D=>{if(!D)return D;const F=D.split("-");if(F.length===0)return D;const q=F[0].slice(0,4),z=F.slice(1);return z.length?`${q}-${z.join("-")}`:q};React.useEffect(()=>{p&&(p.startDate&&_(j(p.startDate)),p.endDate&&E(j(p.endDate)))},[p]);const M=D=>{const F=D.target.value,q=j(F);_(q),I(q,S)},N=D=>{const F=D.target.value,q=j(F);E(q),I(g,q)};return jsxRuntimeExports.jsxs("div",{className:"date-range-picker",style:i,id:l,"data-testid":l?`${l}-wrapper`:void 0,children:[jsxRuntimeExports.jsx("div",{className:"date-range-field-group",style:o,children:f==="single"?jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:g,name:u,"data-testid":l?`${l}-input`:void 0,min:R,onChange:D=>{const F=D.target.value,q=j(F);_(q),t==null||t({startDate:q,endDate:""})},onFocus:()=>T(!0),onBlur:D=>O(D),disabled:d}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:e||"Select Date"})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:g,name:u?`${u}-from`:void 0,"data-testid":l?`${l}-from`:void 0,onChange:M,onFocus:()=>T(!0),onBlur:D=>O(D),disabled:d}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"From"})]}),jsxRuntimeExports.jsx("span",{className:"range-separator centered",children:"to"}),jsxRuntimeExports.jsxs("div",{className:"field-box float",children:[jsxRuntimeExports.jsx("input",{type:"date",value:S,name:u?`${u}-to`:void 0,"data-testid":l?`${l}-to`:void 0,onChange:N,onFocus:()=>T(!0),onBlur:D=>O(D),disabled:d}),jsxRuntimeExports.jsx("label",{className:"floating-label-box",children:"To"})]})]})}),C&&f!=="single"&&jsxRuntimeExports.jsx("div",{className:"error-text",children:C})]})},useEscapeKey=e=>{React.useEffect(()=>{const t=n=>{n.key==="Escape"&&e()};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[e])},getColumnValue=e=>{if(e==null)return"";if(React.isValidElement(e)){const t=e;return t.props["data-value"]||t.props["data-sort"]||""}return typeof e=="string"||typeof e=="number"?e:String(e)},stripReactElements=e=>{if(Array.isArray(e))return e.map(stripReactElements);if(e&&typeof e=="object"&&!React.isValidElement(e)){const t={};for(const n in e)React.isValidElement(e[n])||(t[n]=stripReactElements(e[n]));return t}return e},Edit="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M19.06%203.58988L20.41%204.93988C21.2%205.71988%2021.2%206.98988%2020.41%207.76988L7.18%2020.9999H3V16.8199L13.4%206.40988L16.23%203.58988C17.01%202.80988%2018.28%202.80988%2019.06%203.58988ZM5%2018.9999L6.41%2019.0599L16.23%209.22988L14.82%207.81988L5%2017.6399V18.9999Z'%20fill='%2379747E'/%3e%3c/svg%3e",Approve="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.00003%2016.1701L4.83003%2012.0001L3.41003%2013.4101L9.00003%2019.0001L21%207.00009L19.59%205.59009L9.00003%2016.1701Z'%20fill='%2379747E'/%3e%3c/svg%3e",Reassign="data:image/svg+xml,%3csvg%20width='17'%20height='20'%20viewBox='0%200%2017%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.83828%200.221421C8.68188%200.075693%208.47503%20-0.00364251%208.2613%200.000128532C8.04757%200.00389957%207.84365%200.0904828%207.69249%200.241637C7.54134%200.392791%207.45476%200.596715%207.45098%200.810446C7.44721%201.02418%207.52655%201.23103%207.67228%201.38742L9.01428%202.72942H8.53028C6.89858%202.72942%205.30353%203.21327%203.94682%204.1198C2.59012%205.02632%201.53269%206.31479%200.908271%207.82228C0.283848%209.32977%200.120471%2010.9886%200.438799%2012.5889C0.757127%2014.1893%201.54286%2015.6593%202.69665%2016.8131C3.85043%2017.9668%205.32044%2018.7526%206.92078%2019.0709C8.52112%2019.3892%2010.1799%2019.2258%2011.6874%2018.6014C13.1949%2017.977%2014.4834%2016.9196%2015.3899%2015.5629C16.2964%2014.2062%2016.7803%2012.6111%2016.7803%2010.9794C16.7803%2010.7606%2016.6934%2010.5508%2016.5386%2010.3961C16.3839%2010.2413%2016.1741%2010.1544%2015.9553%2010.1544C15.7365%2010.1544%2015.5266%2010.2413%2015.3719%2010.3961C15.2172%2010.5508%2015.1303%2010.7606%2015.1303%2010.9794C15.1302%2012.2819%2014.7448%2013.5553%2014.0225%2014.6391C13.3002%2015.723%2012.2733%2016.5689%2011.0712%2017.0703C9.86915%2017.5718%208.54557%2017.7064%207.26716%2017.4571C5.98875%2017.2078%204.81268%2016.5859%203.88704%2015.6695C2.96139%2014.7532%202.32757%2013.5835%202.06538%2012.3077C1.80319%2011.0318%201.92436%209.70696%202.41362%208.49986C2.90289%207.29276%203.73837%206.25741%204.81488%205.52419C5.89138%204.79097%207.16076%204.39266%208.46318%204.37942L7.67118%205.17142C7.52097%205.32709%207.43791%205.53552%207.43989%205.75184C7.44187%205.96815%207.52873%206.17503%207.68177%206.32792C7.8348%206.48081%208.04177%206.56748%208.25808%206.56925C8.47439%206.57103%208.68275%206.48778%208.83828%206.33742L11.3133%203.86242C11.4678%203.70773%2011.5546%203.49805%2011.5546%203.27942C11.5546%203.0608%2011.4678%202.85111%2011.3133%202.69642L8.83828%200.221421ZM12.9523%207.08542C13.1097%207.23717%2013.2005%207.44523%2013.2046%207.66387C13.2087%207.8825%2013.1259%208.09384%2012.9743%208.25142L8.73928%2012.6514C8.66232%2012.7313%208.57005%2012.7948%208.46799%2012.8382C8.36593%2012.8815%208.25617%2012.9039%208.14528%2012.9039C8.03438%2012.9039%207.92462%2012.8815%207.82256%2012.8382C7.7205%2012.7948%207.62824%2012.7313%207.55128%2012.6514L5.73628%2010.766C5.65735%2010.6888%205.59473%2010.5965%205.55212%2010.4947C5.50952%2010.3928%205.48779%2010.2834%205.48822%2010.173C5.48866%2010.0626%205.51125%209.95343%205.55467%209.85191C5.59808%209.75039%205.66143%209.65862%205.74096%209.58204C5.82049%209.50545%205.91459%209.44561%206.01767%209.40606C6.12075%209.3665%206.23073%209.34804%206.34107%209.35177C6.45142%209.3555%206.5599%209.38134%206.66008%209.42776C6.76026%209.47418%206.8501%209.54024%206.92428%209.62202L8.14528%2010.8892L11.7863%207.10742C11.938%206.94997%2012.1461%206.85921%2012.3647%206.85509C12.5834%206.85096%2012.7947%206.93381%2012.9523%207.08542Z'%20fill='%2365B230'/%3e%3c/svg%3e",Add="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%2013H13V20H11V13H4V11H11V4H13V11H20V13Z'%20fill='%2379747E'/%3e%3c/svg%3e",Delete="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15%203V4H20V6H19V19C19%2020.1%2018.1%2021%2017%2021H7C5.9%2021%205%2020.1%205%2019V6H4V4H9V3H15ZM7%2019H17V6H7V19ZM9%208H11V17H9V8ZM15%208H13V17H15V8Z'%20fill='%2379747E'/%3e%3c/svg%3e",Cancel="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202C6.47%202%202%206.47%202%2012C2%2017.53%206.47%2022%2012%2022C17.53%2022%2022%2017.53%2022%2012C22%206.47%2017.53%202%2012%202ZM12%2020C7.59%2020%204%2016.41%204%2012C4%207.59%207.59%204%2012%204C16.41%204%2020%207.59%2020%2012C20%2016.41%2016.41%2020%2012%2020ZM12%2010.59L15.59%207L17%208.41L13.41%2012L17%2015.59L15.59%2017L12%2013.41L8.41%2017L7%2015.59L10.59%2012L7%208.41L8.41%207L12%2010.59Z'%20fill='%23C53225'/%3e%3c/svg%3e",ShowOrHideColumn="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='512'%20height='512'%3e%3cpath%20d='M0%200%20C1.39042818%20-0.00202787%202.78085531%20-0.00494519%204.17127991%20-0.00869751%20C7.06831102%20-0.0130889%209.9650623%20-0.00679496%2012.86206055%200.00732422%20C16.54104169%200.02439842%2020.21936509%200.01456623%2023.89832211%20-0.00339317%20C26.76486496%20-0.0143319%2029.63125676%20-0.01073875%2032.49780464%20-0.0030098%20C34.50268617%20-0.00008719%2036.50757401%20-0.00906178%2038.51243591%20-0.0184021%20C51.84643905%200.08288397%2062.36831214%202.18438052%2072.34765625%2011.3984375%20C82.72862089%2022.29501297%2083.81157502%2035.39563727%2083.72860718%2049.8704834%20C83.73328715%2051.15071931%2083.73796712%2052.43095523%2083.74278891%2053.74998617%20C83.75517662%2057.26010193%2083.74918524%2060.76996931%2083.73983026%2064.28008533%20C83.73298924%2068.08247635%2083.7435458%2071.88482726%2083.75177002%2075.68721008%20C83.76505611%2083.11894567%2083.76225259%2090.55058996%2083.7535321%2097.98232901%20C83.74673568%20104.02640949%2083.74584727%20110.07046452%2083.74910355%20116.11454773%20C83.74956325%20116.97729682%2083.75002294%20117.84004591%2083.75049657%20118.72893891%20C83.75145582%20120.4820182%2083.75242847%20122.23509749%2083.75341435%20123.98817676%20C83.76195323%20140.39713998%2083.75215774%20156.80605278%2083.73601325%20173.21500772%20C83.72261144%20187.27113064%2083.72493995%20201.32717921%2083.73876953%20215.38330078%20C83.75485194%20231.73663572%2083.7611294%20248.08992656%2083.75193274%20264.4432683%20C83.75097717%20266.18962128%2083.75003406%20267.93597427%2083.74910355%20269.68232727%20C83.74864072%20270.54139399%2083.74817789%20271.4004607%2083.74770104%20272.28555974%20C83.74511913%20278.31698617%2083.74946486%20284.34838445%2083.75654221%20290.37980652%20C83.76498704%20297.73782249%2083.76261469%20305.09574254%2083.74669997%20312.45374763%20C83.73885718%20316.20237621%2083.73565678%20319.95084531%2083.74564743%20323.69947243%20C83.75634508%20327.77524883%2083.74350635%20331.85062835%2083.72860718%20335.9263916%20C83.73529934%20337.09392896%2083.74199151%20338.26146632%2083.74888647%20339.4643836%20C83.6547451%20352.81613252%2081.80817857%20364.46802168%2072.34765625%20374.3984375%20C61.26850374%20384.62796175%2049.36756952%20385.86653363%2034.74609375%20385.76171875%20C33.37472535%20385.7611982%2032.0033562%20385.76172342%2030.63198853%20385.76322937%20C27.77960848%20385.76314043%2024.92751564%20385.75287014%2022.07519531%20385.73461914%20C18.44659665%20385.71189135%2014.81841439%20385.71140425%2011.18976402%20385.71813679%20C8.36535029%20385.72150093%205.54102895%20385.71480174%202.71663284%20385.70500755%20C0.73715224%20385.69937125%20-1.24234414%20385.70058074%20-3.22183228%20385.70198059%20C-16.18209116%20385.60087128%20-25.59788448%20384.09755013%20-35.65234375%20375.3984375%20C-45.54661727%20364.26539458%20-47.11519405%20351.39165616%20-47.03329468%20336.96398926%20C-47.03797465%20335.6757351%20-47.04265462%20334.38748094%20-47.04747641%20333.06018877%20C-47.05988124%20329.52308071%20-47.0538647%20325.98621866%20-47.04451776%20322.44911027%20C-47.03768394%20318.61945404%20-47.04822979%20314.78983788%20-47.05645752%20310.96018982%20C-47.06975116%20303.47317331%20-47.06693669%20295.98624736%20-47.0582196%20288.4992274%20C-47.05142618%20282.41077808%20-47.05053348%20276.32235401%20-47.05379105%20270.23390198%20C-47.05425075%20269.36517795%20-47.05471044%20268.49645393%20-47.05518407%20267.60140494%20C-47.05614331%20265.83624438%20-47.05711595%20264.07108383%20-47.05810185%20262.30592328%20C-47.06664294%20245.77967925%20-47.05684175%20229.25348526%20-47.04070075%20212.72724944%20C-47.02729873%20198.56732745%20-47.02962719%20184.40747926%20-47.04345703%20170.24755859%20C-47.05953551%20153.7777782%20-47.06581909%20137.3080416%20-47.05662024%20120.83825445%20C-47.05566466%20119.07982732%20-47.05472155%20117.32140017%20-47.05379105%20115.56297302%20C-47.05332822%20114.69794239%20-47.05286539%20113.83291175%20-47.05238854%20112.94166806%20C-47.04980545%20106.8651998%20-47.05415492%20100.78875947%20-47.06122971%2094.71229553%20C-47.06967015%2087.30042821%20-47.06731132%2079.88865612%20-47.05138747%2072.47679961%20C-47.04353884%2068.69994852%20-47.04035446%2064.92325585%20-47.05033493%2061.14640617%20C-47.06101703%2057.0417633%20-47.04820598%2052.93751546%20-47.03329468%2048.83288574%20C-47.03998684%2047.65397152%20-47.04667901%2046.47505731%20-47.05357397%2045.26041842%20C-46.9542233%2031.0988315%20-44.31098753%2020.04518898%20-34.13671875%209.88671875%20C-23.81712366%200.73176368%20-13.42909464%20-0.06246693%200%200%20Z%20'%20fill='%23212121'%20transform='translate(88.65234375,63.6015625)'/%3e%3cpath%20d='M0%200%20C1.37183255%20-0.00389885%202.74366391%20-0.00823591%204.11549377%20-0.01298523%20C6.97555474%20-0.02039888%209.83549214%20-0.02019147%2012.69555664%20-0.01489258%20C16.33091665%20-0.00909958%2019.96576688%20-0.02604816%2023.60104275%20-0.04923725%20C26.42978286%20-0.06408398%2029.25840319%20-0.06483166%2032.08717537%20-0.06172752%20C34.0694059%20-0.06247893%2036.05161807%20-0.07625581%2038.03379822%20-0.09040833%20C50.34165442%20-0.02798927%2060.24736289%202.00602656%2069.62890625%2010.30078125%20C80.23052058%2021.7808721%2081.93785653%2033.21068447%2081.88960266%2048.37446594%20C81.89342821%2049.66015683%2081.89725376%2050.94584772%2081.90119523%2052.27049893%20C81.9114249%2055.81433436%2081.90930634%2059.35806804%2081.90501463%2062.90191162%20C81.9025382%2066.73366042%2081.91157295%2070.56538531%2081.91905212%2074.39712524%20C81.93177597%2081.89455933%2081.93359569%2089.39195757%2081.93125186%2096.88940064%20C81.92946586%20102.98649949%2081.93122438%20109.08358749%2081.9354763%20115.18068504%20C81.93607149%20116.04981554%2081.93666668%20116.91894603%2081.93727991%20117.81441381%20C81.93849171%20119.58029897%2081.93970585%20121.34618412%2081.94092228%20123.11206927%20C81.95178902%20139.65831656%2081.9496395%20156.20454344%2081.94353744%20172.75079187%20C81.93836971%20187.86983815%2081.94962147%20202.98881998%2081.96863566%20218.10785351%20C81.98803326%20233.65155953%2081.99626664%20249.19523509%2081.9925124%20264.73895329%20C81.99060319%20273.45773292%2081.99306052%20282.17645771%2082.00722694%20290.89522743%20C82.01916628%20298.31814058%2082.02051713%20305.74096513%2082.00843678%20313.16387955%20C82.00256581%20316.94678992%2082.00139893%20320.72953843%2082.01343918%20324.51243782%20C82.02637213%20328.62380077%2082.01579126%20332.73478184%2082.00312805%20336.84614563%20C82.01050234%20338.02710621%2082.01787662%20339.20806678%2082.02547437%20340.42481405%20C81.94020249%20353.64162412%2079.58475249%20365.22365731%2070.62890625%20375.30078125%20C59.43149551%20384.98877486%2048.5995069%20385.6116798%2034.29296875%20385.6015625%20C32.92353183%20385.60546179%2031.5540961%20385.60979893%2030.18466187%20385.61454773%20C27.32879702%20385.62196213%2024.47305589%20385.62175381%2021.6171875%20385.61645508%20C17.99089323%20385.61066763%2014.36511094%20385.62759691%2010.73890114%20385.65079975%20C7.91440971%20385.66566391%205.090038%20385.66639174%202.26551437%20385.66329002%20C0.28942353%20385.66404012%20-1.68664899%20385.67780547%20-3.66268921%20385.69197083%20C-16.94942739%20385.62458325%20-27.43251173%20383.47720207%20-37.37109375%20374.30078125%20C-47.75205839%20363.40420578%20-48.83501252%20350.30358148%20-48.75204468%20335.82873535%20C-48.75672465%20334.54849944%20-48.76140462%20333.26826352%20-48.76622641%20331.94923258%20C-48.77861412%20328.43911682%20-48.77262274%20324.92924944%20-48.76326776%20321.41913342%20C-48.75642674%20317.6167424%20-48.7669833%20313.81439149%20-48.77520752%20310.01200867%20C-48.78849361%20302.58027308%20-48.78569009%20295.14862879%20-48.7769696%20287.71688974%20C-48.77017318%20281.67280926%20-48.76928477%20275.62875423%20-48.77254105%20269.58467102%20C-48.77300075%20268.72192193%20-48.77346044%20267.85917284%20-48.77393407%20266.97027984%20C-48.77489332%20265.21720055%20-48.77586597%20263.46412126%20-48.77685185%20261.71104199%20C-48.78539073%20245.30207877%20-48.77559524%20228.89316597%20-48.75945075%20212.48421103%20C-48.74604894%20198.42808811%20-48.74837745%20184.37203954%20-48.76220703%20170.31591797%20C-48.77828944%20153.96258303%20-48.7845669%20137.60929219%20-48.77537024%20121.25595045%20C-48.77441467%20119.50959747%20-48.77347156%20117.76324448%20-48.77254105%20116.01689148%20C-48.77184681%20114.72829141%20-48.77184681%20114.72829141%20-48.77113854%20113.41365901%20C-48.76855663%20107.38223258%20-48.77290236%20101.3508343%20-48.77997971%2095.31941223%20C-48.78842454%2087.96139626%20-48.78605219%2080.60347621%20-48.77013747%2073.24547112%20C-48.76229468%2069.49684254%20-48.75909428%2065.74837344%20-48.76908493%2061.99974632%20C-48.77978258%2057.92396992%20-48.76694385%2053.8485904%20-48.75204468%2049.77282715%20C-48.75873684%2048.60528979%20-48.76542901%2047.43775243%20-48.77232397%2046.23483515%20C-48.67188333%2031.98968244%20-46.49788008%2020.60627557%20-36.37109375%2010.30078125%20C-24.99934532%200.70204736%20-14.4396423%20-0.01018664%200%200%20Z%20'%20fill='%23212121'%20transform='translate(389.37109375,63.69921875)'/%3e%3cpath%20d='M0%200%20C1.37422758%20-0.00135128%202.7484547%20-0.00329565%204.12268066%20-0.00579834%20C6.98694461%20-0.00872786%209.85108284%20-0.00452264%2012.71533203%200.00488281%20C16.35966249%200.01627611%2020.0036982%200.00970489%2023.64801788%20-0.00226212%20C26.48099937%20-0.00953987%2029.31391266%20-0.00716587%2032.14689636%20-0.00200653%20C34.13524571%20-0.00005138%2036.12359788%20-0.00605238%2038.11193848%20-0.01226807%20C50.97970432%200.05377783%2060.71208654%201.43181578%2070.59375%2010.265625%20C80.43904472%2021.59627658%2081.90061916%2032.80877037%2081.85444641%2047.42196655%20C81.85827196%2048.71653011%2081.86209751%2050.01109367%2081.86603898%2051.34488642%20C81.87626947%2054.91345539%2081.87414988%2058.48192333%2081.86985838%2062.05050039%20C81.86738212%2065.90881512%2081.87641644%2069.76710608%2081.88389587%2073.62541199%20C81.89661984%2081.17464796%2081.89843945%2088.72384832%2081.89609561%2096.27309321%20C81.89430976%20102.4116766%2081.89606782%20108.55024922%2081.90032005%20114.68883133%20C81.90091524%20115.56380127%2081.90151043%20116.43877121%2081.90212366%20117.34025539%20C81.90333546%20119.11798027%2081.90454959%20120.89570516%2081.90576603%20122.67343004%20C81.91663264%20139.33028616%2081.91448321%20155.98712201%2081.90838119%20172.64397927%20C81.90321249%20187.86716535%2081.9144678%20203.09028744%2081.93347941%20218.31346087%20C81.95287204%20233.96225318%2081.96111133%20249.61101523%2081.95735615%20265.25981963%20C81.95544632%20274.03837098%2081.9579105%20282.81686787%2081.97207069%20291.59540939%20C81.98400361%20299.06848993%2081.98536797%20306.54148247%2081.97328053%20314.01456426%20C81.96740531%20317.8236788%2081.96625461%20321.63263253%2081.97828293%20325.44173622%20C81.99119743%20329.57972269%2081.98064519%20333.71732895%2081.9679718%20337.85531616%20C81.97534609%20339.04697148%2081.98272037%20340.23862679%2081.99031812%20341.46639287%20C81.9070551%20354.42932661%2079.28845483%20365.35673186%2070.59375%20375.265625%20C59.40723239%20384.95958111%2048.55610413%20385.57651772%2034.2578125%20385.56640625%20C32.88837558%20385.57030554%2031.51893985%20385.57464268%2030.14950562%20385.57939148%20C27.29364077%20385.58680588%2024.43789964%20385.58659756%2021.58203125%20385.58129883%20C17.95573698%20385.57551138%2014.32995469%20385.59244066%2010.70374489%20385.6156435%20C7.87925346%20385.63050766%205.05488175%20385.63123549%202.23035812%20385.62813377%20C0.25426728%20385.62888387%20-1.72180524%20385.64264922%20-3.69784546%20385.65681458%20C-16.86957859%20385.59001028%20-27.6387559%20383.53875206%20-37.40625%20374.265625%20C-47.39849958%20362.83409444%20-48.87080006%20349.69908274%20-48.79393005%20334.88296509%20C-48.79931559%20333.61230741%20-48.80470113%20332.34164973%20-48.81024987%20331.03248727%20C-48.82455435%20327.54904283%20-48.8205075%20324.06583798%20-48.81308305%20320.58238125%20C-48.80831603%20316.80857637%20-48.82089218%20313.03482073%20-48.83110046%20309.2610321%20C-48.84822503%20301.88477917%20-48.84914173%20294.50861166%20-48.84388756%20287.13234402%20C-48.83983281%20281.1321392%20-48.84130485%20275.13195947%20-48.84663582%20269.13175583%20C-48.84738424%20268.27513491%20-48.84813266%20267.41851399%20-48.84890376%20266.53593486%20C-48.85043537%20264.79526103%20-48.85197372%20263.05458721%20-48.85351873%20261.31391339%20C-48.86722079%20245.02030083%20-48.86182222%20228.72673639%20-48.85033352%20212.43312494%20C-48.84040323%20197.55559901%20-48.85334236%20182.67819748%20-48.87726771%20167.80069073%20C-48.90170128%20152.49074933%20-48.91125616%20137.18086577%20-48.90461498%20121.87090528%20C-48.90113225%20113.28900812%20-48.90329207%20104.70720657%20-48.92086601%2096.12532425%20C-48.93564136%2088.82004658%20-48.93615417%2081.51493187%20-48.9187951%2074.20965721%20C-48.91032641%2070.48908615%20-48.90803312%2066.76880554%20-48.92344666%2063.0482502%20C-49.06818906%2025.32392537%20-49.06818906%2025.32392537%20-38.8046875%2012.67578125%20C-27.21540674%201.02987534%20-15.72851608%20-0.04916843%200%200%20Z%20'%20fill='%23212121'%20transform='translate(239.40625,63.734375)'/%3e%3c/svg%3e",SearchRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15.5001%2014.5H14.7101L14.4301%2014.23C15.6301%2012.83%2016.2501%2010.92%2015.9101%208.89002C15.4401%206.11002%2013.1201%203.89002%2010.3201%203.55002C6.09014%203.03002%202.53014%206.59001%203.05014%2010.82C3.39014%2013.62%205.61014%2015.94%208.39014%2016.41C10.4201%2016.75%2012.3301%2016.13%2013.7301%2014.93L14.0001%2015.21V16L18.2501%2020.25C18.6601%2020.66%2019.3301%2020.66%2019.7401%2020.25C20.1501%2019.84%2020.1501%2019.17%2019.7401%2018.76L15.5001%2014.5ZM9.50014%2014.5C7.01014%2014.5%205.00014%2012.49%205.00014%2010C5.00014%207.51002%207.01014%205.50002%209.50014%205.50002C11.9901%205.50002%2014.0001%207.51002%2014.0001%2010C14.0001%2012.49%2011.9901%2014.5%209.50014%2014.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",SortIcon="data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3115_5954)'%3e%3cpath%20d='M4.72326%2013.2386L1.2194%209.72426C0.396731%209.2419%20-0.40373%2010.2466%200.225485%2010.9546C1.77064%2012.4991%203.28619%2014.0746%204.8348%2015.616C4.89796%2015.6789%204.93004%2015.7593%205.00061%2015.8228C5.43736%2016.2172%206.29803%2015.9196%206.3158%2015.2815L6.31382%200.712092C6.27829%20-0.0888571%205.09586%20-0.25464%204.80025%200.452932C4.78347%200.493379%204.72277%200.686625%204.72277%200.711592V13.2391L4.72326%2013.2386Z'%20fill='%23909090'/%3e%3cpath%20d='M10.2754%202.75243L13.7792%206.26632C14.596%206.75068%2015.4078%205.7465%2014.7727%205.03643C13.2423%203.50195%2011.7332%201.94449%2010.2004%200.412502C10.1372%200.349085%2010.1051%200.26919%2010.0345%200.205773C9.56868%20-0.214176%208.72134%200.0359959%208.68235%200.709612L8.68432%2015.279C8.71986%2016.0799%209.90229%2016.2457%2010.1979%2015.5381C10.2147%2015.4977%2010.2754%2015.3045%2010.2754%2015.2795V2.75243Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3115_5954'%3e%3crect%20width='15'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%201%2015%200)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",InfoIcon="data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.71338%2011.25H9.21338V6.75H7.71338V11.25ZM8.46338%205.25C8.67588%205.25%208.85413%205.178%208.99813%205.034C9.14213%204.89%209.21388%204.712%209.21338%204.5C9.21338%204.2875%209.14138%204.1095%208.99738%203.966C8.85338%203.8225%208.67538%203.7505%208.46338%203.75C8.25088%203.75%208.07288%203.822%207.92938%203.966C7.78588%204.11%207.71388%204.288%207.71338%204.5C7.71338%204.7125%207.78538%204.89075%207.92938%205.03475C8.07338%205.17875%208.25138%205.2505%208.46338%205.25ZM8.46338%2015C7.42588%2015%206.45088%2014.803%205.53838%2014.409C4.62588%2014.015%203.83213%2013.4807%203.15713%2012.8062C2.48213%2012.1312%201.94788%2011.3375%201.55438%2010.425C1.16088%209.5125%200.963879%208.5375%200.963379%207.5C0.963379%206.4625%201.16038%205.4875%201.55438%204.575C1.94838%203.6625%202.48263%202.86875%203.15713%202.19375C3.83213%201.51875%204.62588%200.9845%205.53838%200.591C6.45088%200.1975%207.42588%200.0005%208.46338%200C9.50088%200%2010.4759%200.197%2011.3884%200.591C12.3009%200.985%2013.0946%201.51925%2013.7696%202.19375C14.4446%202.86875%2014.9791%203.6625%2015.3731%204.575C15.7671%205.4875%2015.9639%206.4625%2015.9634%207.5C15.9634%208.5375%2015.7664%209.5125%2015.3724%2010.425C14.9784%2011.3375%2014.4441%2012.1312%2013.7696%2012.8062C13.0946%2013.4812%2012.3009%2014.0157%2011.3884%2014.4097C10.4759%2014.8037%209.50088%2015.0005%208.46338%2015ZM8.46338%2013.5C10.1384%2013.5%2011.5571%2012.9187%2012.7196%2011.7562C13.8821%2010.5937%2014.4634%209.175%2014.4634%207.5C14.4634%205.825%2013.8821%204.40625%2012.7196%203.24375C11.5571%202.08125%2010.1384%201.5%208.46338%201.5C6.78838%201.5%205.36963%202.08125%204.20713%203.24375C3.04463%204.40625%202.46338%205.825%202.46338%207.5C2.46338%209.175%203.04463%2010.5937%204.20713%2011.7562C5.36963%2012.9187%206.78838%2013.5%208.46338%2013.5Z'%20fill='%23464646'/%3e%3c/svg%3e",ExportIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.59%209.5H15V4.5C15%203.95%2014.55%203.5%2014%203.5H10C9.45%203.5%209%203.95%209%204.5V9.5H7.41C6.52%209.5%206.07%2010.58%206.7%2011.21L11.29%2015.8C11.68%2016.19%2012.31%2016.19%2012.7%2015.8L17.29%2011.21C17.92%2010.58%2017.48%209.5%2016.59%209.5ZM5%2019.5C5%2020.05%205.45%2020.5%206%2020.5H18C18.55%2020.5%2019%2020.05%2019%2019.5C19%2018.95%2018.55%2018.5%2018%2018.5H6C5.45%2018.5%205%2018.95%205%2019.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FileOpenRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202.5H10.83C10.3%202.5%209.79%202.71%209.41%203.09L4.59%207.91C4.21%208.29%204%208.8%204%209.33V20.5C4%2021.6%204.9%2022.5%206%2022.5H18C19.1%2022.5%2020%2021.6%2020%2020.5V4.5C20%203.4%2019.1%202.5%2018%202.5ZM11.65%2017.15L8.86%2014.36C8.54%2014.04%208.76%2013.5%209.21%2013.5H11V10.51C11%209.96%2011.44%209.52%2011.99%209.51C12.55%209.5%2013%209.95%2013%2010.51V13.5H14.79C15.24%2013.5%2015.46%2014.04%2015.14%2014.35L12.35%2017.14C12.16%2017.34%2011.84%2017.34%2011.65%2017.15Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",ReloadIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.6498%206.84999C16.0198%205.21999%2013.7098%204.27999%2011.1698%204.53999C7.49978%204.90999%204.47978%207.88999%204.06978%2011.56C3.51978%2016.41%207.26978%2020.5%2011.9998%2020.5C15.1898%2020.5%2017.9298%2018.63%2019.2098%2015.94C19.5298%2015.27%2019.0498%2014.5%2018.3098%2014.5C17.9398%2014.5%2017.5898%2014.7%2017.4298%2015.03C16.2998%2017.46%2013.5898%2019%2010.6298%2018.34C8.40978%2017.85%206.61978%2016.04%206.14978%2013.82C5.30978%209.93999%208.25978%206.49999%2011.9998%206.49999C13.6598%206.49999%2015.1398%207.18999%2016.2198%208.27999L14.7098%209.78999C14.0798%2010.42%2014.5198%2011.5%2015.4098%2011.5H18.9998C19.5498%2011.5%2019.9998%2011.05%2019.9998%2010.5V6.90999C19.9998%206.01999%2018.9198%205.56999%2018.2898%206.19999L17.6498%206.84999Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",FilterAltOffRounded="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.7901%206.11003C20.3001%205.45003%2019.8301%204.50003%2019.0001%204.50003H6.83008L14.8001%2012.47L19.7901%206.11003Z'%20fill='black'%20fill-opacity='0.54'/%3e%3cpath%20d='M20.4901%2020.99L3.51012%204.01003C3.12012%203.62003%202.49012%203.62003%202.10012%204.01003C1.71012%204.40003%201.71012%205.03003%202.10012%205.42003L10.0001%2013.5V18.5C10.0001%2019.6%2010.9001%2020.5%2012.0001%2020.5C13.1001%2020.5%2014.0001%2019.6%2014.0001%2018.5V17.33L19.0701%2022.4C19.4601%2022.79%2020.0901%2022.79%2020.4801%2022.4C20.8701%2022.01%2020.8801%2021.38%2020.4901%2020.99Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",PaginationControls=({currentPage:e,totalPages:t,setCurrentPage:n})=>{const l=Math.floor(e/5)*5,u=Math.min(l+5,t),f=()=>{n(Math.max(0,l-1))},p=()=>{n(Math.min(t-1,u))},d=[];for(let m=l;m<u;m++)d.push(jsxRuntimeExports.jsx("button",{className:`pagination-page${e===m?" active":""}`,onClick:()=>n(m),disabled:e===m,children:m+1},m));return jsxRuntimeExports.jsxs("div",{className:"pagination-controls",children:[jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(0),disabled:e===0,children:"First"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e-1),disabled:e===0,children:"Previous"}),l>0&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:f,children:"..."}),d,u<t&&jsxRuntimeExports.jsx("button",{className:"pagination-ellipsis",onClick:p,children:"..."}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(e+1),disabled:e===t-1,children:"Next"}),jsxRuntimeExports.jsx("button",{className:"pagination-button",onClick:()=>n(t-1),disabled:e===t-1,children:"Last"})]})},RowsPerPageSelector=({rowsPerPage:e,setRowsPerPage:t,setCurrentPage:n,pageSizeOptions:i})=>jsxRuntimeExports.jsxs("div",{className:"rows-per-page-container",children:[jsxRuntimeExports.jsx("label",{htmlFor:"rows-per-page-select",children:"Rows per page:"}),jsxRuntimeExports.jsx("select",{id:"rows-per-page-select",value:e,onChange:o=>{t(Number(o.target.value)),n(0)},style:{marginLeft:"8px"},children:i.map(o=>jsxRuntimeExports.jsx("option",{value:o,children:o},o))})]}),EntriesInfo=({dataLength:e,currentPage:t,rowsPerPage:n})=>jsxRuntimeExports.jsx("div",{className:"entries-info",children:e>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Showing ",e===0?0:t*n+1," to"," ",Math.min((t+1)*n,e)," of ",e," ","entries"]})}),CEDataGridDynamicTable=({title:e,jsonData:t,columnList:n,ischeckBoxInGrid:i,isSingleSelectionMode:o=!1,isRadioButtonInGrid:l,onRadioChange:u,getSelectedRadioValue:f,renderRadioInColumnId:p,isSearchBoxInGrid:d,isAddButtonRequired:m,isEditButtonRequired:g,isDeleteButtonRequired:_,isApproveButtonRequired:S,isReassignButtonRequired:E,isCancelButtonRequired:b,isExportAllToExcel:T,handleEditClick:C,handleAddClick:A,handleDeleteClick:R,handleApproveClick:O,handleReassignClick:I,handleCancelClick:j,noOfPagesPerPage:M,clickableColumns:N,conditionalClickableColumns:D,clickableCellPredicate:F,handleCellClick:q,onReload:z,showDownloadIcon:G=!0,downloadOptions:ee,showRefreshIcon:Y=!0,showFullViewIcon:V=!0,showColumnVisibilityIcon:W=!0,showSortIcon:L=!0,showFilterIcon:B=!0,defaultSortConfig:U,onDataUpdate:K,isOverrideCSS:H,showPagination:J=!0,shouldResetSearchOnDataChange:X,pageSizeOptions:Q=[10,20,50,100],handleSelectedRows:le,rowsSelected:ye,selectionKey:de="id",onPageChange:fe})=>{const[pe,Ee]=React.useState({}),[te,Te]=React.useState([]),[ue,Me]=React.useState([]),[je,Pe]=React.useState(!1),[Fe,Ve]=React.useState(new Set),[qe,De]=React.useState(null),[ke,Ue]=React.useState(!1),[We,Ge]=React.useState(""),[Xe,Ze]=React.useState(null),[Je,ft]=React.useState("contains"),[ut,Qe]=React.useState(""),[Ke,nt]=React.useState({}),[it,ot]=React.useState(0),[pt,It]=React.useState(M??10),[yt,Rt]=React.useState(new Set),[dt,vt]=React.useState(""),[Et,mt]=React.useState(!1),[ct,gt]=React.useState(new Set),[bt,Le]=React.useState([]),[lt,St]=React.useState(null),jt=React.useRef(null),Bt=React.useRef(null),At=React.useRef(null),Mt=React.useRef(null),[wt,zt]=React.useState(new Set),[Z,oe]=React.useState([]),[ne,ie]=React.useState(!1),[ae,se]=React.useState(null),[ve,Se]=React.useState(!1),[_e,ge]=React.useState(!0),be=React.useRef([]),Ce=()=>Se(!0),Ae=()=>Se(!1),Ie=ce=>{if(ot(ce),typeof fe=="function")try{fe(ce)}catch{}};React.useEffect(()=>{if(typeof fe=="function")try{fe(it)}catch{}},[it]);const Re=(ce,he)=>{if(typeof de=="function")try{const me=de(ce);if(me!=null)return me}catch{}else if(typeof de=="string"&&ce&&ce[de]!==void 0)return ce[de];if(he!==void 0)return`__row_${he}`};React.useEffect(()=>{if(typeof le=="function"){const ce=Array.from(Fe),he=ce.map(me=>{if(typeof me=="string"&&me.startsWith("__row_")){const we=parseInt(me.slice(6),10);return!isNaN(we)&&we>=0&&we<te.length?te[we]:void 0}return(ue||te||[]).find(we=>{const $e=Re(we);return $e!==void 0&&($e===me||String($e)===String(me))})}).filter(Boolean);try{le.length===1?le({ids:ce,rows:he}):le(he)}catch{try{le(he)}catch{}}}},[Fe,te,de]),React.useEffect(()=>{if(!ye)return;const ce=Array.from(ye),he=ce.every(we=>typeof we=="number"&&we>=0&&we<te.length),me=new Set(ce.map(we=>{if(he){const $e=te[we-1];return Re($e,we)??`__row_${we}`}return we}));((we,$e)=>!(we.size!==$e.size||!Array.from(we).every(Ne=>$e.has(Ne))))(me,Fe)||Ve(me)},[ye,te,de]),React.useEffect(()=>{if(t&&Array.isArray(t)){const ce=stripReactElements(be.current),he=stripReactElements(t),me=JSON.stringify(ce)!==JSON.stringify(he);if(t&&Array.isArray(t)&&me){let xe=[...t];if(U){const{column:we,direction:$e}=U;xe.sort((Ne,ze)=>{const He=Ne[we],rt=ze[we],Ye=new Date(He),at=new Date(rt),ht=!isNaN(Ye.getTime()),Ft=!isNaN(at.getTime());if(ht&&Ft)return $e==="asc"?Ye.getTime()-at.getTime():at.getTime()-Ye.getTime();const Dt=String(He||"").toLowerCase(),kt=String(rt||"").toLowerCase();return Dt.localeCompare(kt)}),$e==="desc"&&xe.reverse(),se(U)}if(Te(xe),Me(xe),ge(!1),X?(vt(""),nt({})):Pt(),p){const we={},$e=Array.isArray(p)?p:[p];xe.forEach((Ne,ze)=>{const He=Ne.id??`__row_${ze}`;for(const rt of $e)if(Ne[rt]===!0){we[He]={columnId:rt,rowData:Ne};break}}),Be(we)}be.current=t}}else ge(!0)},[t,U,p]),React.useEffect(()=>{if(te.length>0){const ce=(n??[]).map(xe=>({id:xe.id,label:xe.label??xe.id,tooltip:xe.tooltip,shouldDisplay:xe.shouldDisplay??!0,shouldVisible:xe.shouldVisible??!0,width:xe.width,elementType:xe.elementType,required:xe.required??!1})),he=Object.keys(te[0]||{}).map(xe=>({id:xe,label:xe.charAt(0).toUpperCase()+xe.slice(1),shouldDisplay:!0,shouldVisible:!0})),me=ce.length>0?ce:he;if(oe(me),!ne){const xe=me.filter($e=>$e.shouldDisplay!==!1).map($e=>$e.id),we=me.filter($e=>$e.shouldVisible!==!1).map($e=>$e.id);gt(new Set(xe)),Le(we),ie(!0)}}},[te,n]);const[Oe,Be]=React.useState({}),et=({rowIndex:ce,columnId:he,rowData:me})=>{const xe=Array.isArray(p)?p:[p],we={...me,...Object.fromEntries(xe.map(ze=>[ze,ze===he]))},$e=me.id??`__row_${ce}`;Be(ze=>({...ze,[$e]:{columnId:he,rowData:we}}));const Ne=te.map((ze,He)=>(ze.id??`__row_${He}`)===$e?{...ze,...Object.fromEntries(xe.map(Ye=>[Ye,Ye===he]))}:ze);Te(Ne),Me(Ne),K&&K({fullData:Ne,updatedRow:we})},tt=ce=>{var xe;const he=te.findIndex(we=>we===ce),me=ce.id??`__row_${he}`;return((xe=Oe[me])==null?void 0:xe.columnId)||""},st=React.useMemo(()=>{const ce=it*pt,he=ce+pt;return te.slice(ce,he)},[te,it,pt]),Tt=()=>{vt("");const ce=$t(ue,Ke,"");Te(ce)},Pt=()=>{const ce=$t(ue,Ke,dt);Te(ce),ot(0)},Ct=ce=>{const he=new Set(ct);he.has(ce)?he.size>1&&he.delete(ce):he.add(ce),gt(he)},_t=(ce,he=null)=>{const me=he?`${ce}-${he}`:`${ce}`,xe=new Set(yt);xe.has(me)?xe.delete(me):(Array.from(xe).forEach(we=>{we.startsWith(`${ce}`)&&xe.delete(we)}),xe.add(me)),Rt(xe)},Ot=ce=>{De(qe===ce?null:ce)};React.useEffect(()=>{const ce=he=>{var Ne,ze,He,rt;if(!qe)return;const me=he.target,xe=((Ne=Bt.current)==null?void 0:Ne.contains(me))??!1,we=((ze=At.current)==null?void 0:ze.contains(me))??!1,$e=((rt=(He=he.target)==null?void 0:He.closest)==null?void 0:rt.call(He,".dropdown-trigger"))!=null;!xe&&!we&&!$e&&De(null)};return document.addEventListener("click",ce),()=>{document.removeEventListener("click",ce)}},[qe]),React.useMemo(()=>new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),[]);const xt=(ce,he)=>{if(ce==null)return 1;if(he==null)return-1;const me=new Date(ce),xe=new Date(he);return!isNaN(me.getTime())&&!isNaN(xe.getTime())?me.getTime()-xe.getTime():!isNaN(Number(ce))&&!isNaN(Number(he))?Number(ce)-Number(he):String(ce).localeCompare(String(he),void 0,{numeric:!0,sensitivity:"base"})},Wt=(ce,he,me)=>{const xe=getColumnValue(ce==null?void 0:ce[me]),we=getColumnValue(he==null?void 0:he[me]);return xt(xe,we)},Yt=(ce,he)=>{for(let me=1;me<ce.length;me++)if(Wt(ce[me-1],ce[me],he)>0)return!1;return!0},Zt=(ce,he)=>{for(let me=1;me<ce.length;me++)if(Wt(ce[me-1],ce[me],he)<0)return!1;return!0},$t=(ce,he=Ke,me=dt)=>{let xe=[...ce];if(me&&me.trim()){const we=me.toLowerCase();xe=xe.filter($e=>Object.entries($e).some(([Ne,ze])=>ct.has(Ne)?String(ze??"").toLowerCase().includes(we):!1))}return Object.entries(he||{}).forEach(([we,$e])=>{const{value:Ne,operator:ze}=$e,He=(Ne??"").toLowerCase();xe=xe.filter(rt=>{const Ye=rt[we],at=String(getColumnValue(Ye)??"").toLowerCase();switch((ze||"").toString()){case"contains":return at.includes(He);case"equals":return at===He;case"startsWith":return at.startsWith(He);case"endsWith":return at.endsWith(He);case"does not contain":return!at.includes(He);case"does not equal":return at!==He;case"is any of":return Ne.split(",").map(ht=>ht.trim().toLowerCase()).includes(at);case"Date Range":case"dateRange":{if(!Ne)return!0;const ht=Ne.split(" - ").map(sr=>sr.trim());if(ht.length!==2)return!1;const Ft=new Date(ht[0]),Dt=new Date(ht[1]);if(isNaN(Ft.getTime())||isNaN(Dt.getTime())||(Ft.setHours(0,0,0,0),Dt.setHours(23,59,59,999),!Ye))return!1;const kt=new Date(Ye);return isNaN(kt.getTime())?!1:(kt.setHours(0,0,0,0),kt>=Ft&&kt<=Dt)}default:return!0}})}),xe},Jt=ce=>{if(!ue||ue.length===0)return;const he=Object.keys(Ke).length>0,me=dt.trim().length>0,xe=he||me?te:ue;let we;(ae==null?void 0:ae.column)===ce?we=ae.direction==="asc"?"desc":"asc":Yt(xe,ce)?we="desc":(Zt(xe,ce),we="asc"),se({column:ce,direction:we});const $e=[...ue].sort((ze,He)=>{const rt=Wt(ze,He,ce);return we==="asc"?rt:-rt});Me($e);const Ne=$t($e);Te(Ne),ot(0)},Gt=()=>{if(!We){Ue(!1),Qe(""),Ge(""),ot(0);return}if(Je==="Date Range")if(Xe&&Xe.startDate&&Xe.endDate)Nt(We,void 0,"Date Range");else{Ue(!0);return}else ut&&ut.trim()!==""&&Nt(We,ut,Je);Ue(!1),Qe(""),Ge(""),Ze(null),ot(0)},Nt=(ce,he,me)=>{if(me==="Date Range"&&Xe&&ce){const{startDate:xe,endDate:we}=Xe;if(!xe||!we){console.warn("Invalid date range:",xe,we);return}const $e=new Date(xe);$e.setHours(0,0,0,0);const Ne=new Date(we);Ne.setHours(23,59,59,999);const ze=ue.filter(He=>{const rt=He[ce];if(!rt)return!1;const Ye=new Date(rt);return isNaN(Ye.getTime())?!1:(Ye.setHours(0,0,0,0),Ye>=$e&&Ye<=Ne)});Te(ze),ot(0),nt({...Ke,[ce]:{value:`${xe} - ${we}`,operator:"Date Range"}}),Ue(!1),De(null),Ze(null);return}if(ce){const xe={...Ke};if(he===""&&(me==="contains"||me==="equals")){Ge(ce),ft(me||Je),Qe(""),Ue(!0);return}else he&&he.trim()!==""?xe[ce]={value:he,operator:me||Je}:delete xe[ce];nt(xe);let we=[...ue];Object.entries(xe).forEach(([$e,Ne])=>{const{value:ze,operator:He}=Ne;we=we.filter(rt=>{const Ye=String(getColumnValue(rt[$e])||"").toLowerCase(),at=ze.toLowerCase();switch(He){case"contains":return Ye.includes(at);case"equals":return Ye===at;case"startsWith":return Ye.startsWith(at);case"endsWith":return Ye.endsWith(at);case"does not contain":return!Ye.includes(at);case"does not equal":return Ye!==at;case"is any of":return ze.split(",").map(ht=>ht.trim().toLowerCase()).includes(Ye);default:return!0}})}),Te(we),ot(0),Ue(!1)}},Qt=ce=>{ce.key==="Enter"&&Nt()};useEscapeKey(()=>{De(null),Ue(!1)});const Ut=(ce,he="")=>{const me=xe=>{const we=new Set(wt);we.has(xe)?we.delete(xe):we.add(xe),zt(we)};if(Array.isArray(ce)){const xe=Array.from(new Set(ce.reduce((we,$e)=>typeof $e=="object"&&$e!==null?[...we,...Object.keys($e)]:we,[])));return jsxRuntimeExports.jsx("div",{className:"expanded-section",children:jsxRuntimeExports.jsx("div",{className:"nested-table",children:jsxRuntimeExports.jsxs("table",{children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:xe.map(we=>jsxRuntimeExports.jsx("th",{children:we.charAt(0).toUpperCase()+we.slice(1)},we))})}),jsxRuntimeExports.jsx("tbody",{children:ce.map((we,$e)=>jsxRuntimeExports.jsx("tr",{children:xe.map(Ne=>jsxRuntimeExports.jsx("td",{children:typeof we[Ne]=="object"&&we[Ne]!==null?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>me(`${he}-${$e}-${Ne}`),children:wt.has(`${he}-${$e}-${Ne}`)?"▼":"▶"}),wt.has(`${he}-${$e}-${Ne}`)&&Ut(we[Ne],`${he}-${$e}-${Ne}`)]}):String(we[Ne]||"")},`${he}-${$e}-${Ne}`))},`${he}-${$e}`))})]})})})}else if(typeof ce=="object"&&ce!==null)return jsxRuntimeExports.jsx("div",{className:"nested-object",children:jsxRuntimeExports.jsxs("table",{className:"custom-table nested",children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Property"}),jsxRuntimeExports.jsx("th",{className:"table-header-cell",children:"Value"})]})}),jsxRuntimeExports.jsx("tbody",{children:Object.entries(ce).map(([xe,we])=>jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("td",{className:"table-cell",children:jsxRuntimeExports.jsx("strong",{children:xe})}),jsxRuntimeExports.jsx("td",{className:"table-cell",children:typeof we=="object"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"toggle-button",onClick:()=>me(`${he}-${xe}`),children:wt.has(`${he}-${xe}`)?"▼":"▶"}),wt.has(`${he}-${xe}`)&&Ut(we,`${he}-${xe}`)]}):String(we)})]},`${he}-${xe}`))})]})});return jsxRuntimeExports.jsx("span",{children:String(ce)})},Kt=ce=>{var he;if(ce){const me=(he=ce.parentElement)==null?void 0:he.querySelector(".dropdown-trigger");if(!me)return;const xe=me.getBoundingClientRect(),we=window.innerHeight,$e=window.innerWidth,Ne=ce.offsetHeight,ze=ce.offsetWidth,He=xe.bottom+Ne>we,rt=xe.left+ze>$e,Ye=xe.left-ze<0;let at,ht;He?(at=xe.top-Ne,ce.classList.add("adjust-top")):(at=xe.bottom,ce.classList.remove("adjust-top")),rt?(ht=xe.right-ze,ce.classList.add("adjust-left"),ce.classList.remove("adjust-right")):Ye?(ht=xe.left,ce.classList.add("adjust-right"),ce.classList.remove("adjust-left")):(ht=xe.left,ce.classList.remove("adjust-left"),ce.classList.remove("adjust-right")),ce.style.top=`${at}px`,ce.style.left=`${ht}px`,ce.classList.add("dropdown-fixed-position")}};React.useEffect(()=>{const ce=he=>{ke&&jt.current&&!jt.current.contains(he.target)&&Ue(!1)};return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[ke]),React.useEffect(()=>()=>{},[qe]),React.useEffect(()=>{const ce=he=>{Et&&Mt.current&&!Mt.current.contains(he.target)&&mt(!1)};return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[Et]);const er=(ce,he)=>{ce.preventDefault();const me=ce.pageX,xe=pe[he]||150,we=Ne=>{const ze=Math.max(100,xe+(Ne.pageX-me));Ee(He=>({...He,[he]:ze}))},$e=()=>{document.removeEventListener("mousemove",we),document.removeEventListener("mouseup",$e)};document.addEventListener("mousemove",we),document.addEventListener("mouseup",$e)},Ht=(ce,he,me)=>{var we;const xe=String(he??"");if(typeof F=="function")try{if(F(me??{},ce))return!0}catch{}return N!=null&&N.includes(ce)?D!=null&&D[ce]?D[ce].includes(xe):!0:!!((we=D==null?void 0:D._global_)!=null&&we.includes(xe))},tr=(ce,he)=>{Ht(he,ce[he],ce)&&q&&q(ce,he)},qt=st.some(ce=>Array.from(ct).some(he=>Array.isArray(ce[he])&&ce[he].length>0&&ce[he].some(me=>typeof me=="object"&&me!==null))),rr=ce=>{const he=/[\\/:*?"<>|]/g;return ce.replace(he,"").trim()},nr=ce=>{try{const he=window.prompt("Enter file name",ce);if(!he)return ce;const me=rr(he);return me.length===0?ce:me.endsWith(".xlsx")?me:`${me}.xlsx`}catch{return ce}},Vt=(ce=!1)=>{const he=Z.filter(He=>ct.has(He.id)),me=ce||!(te&&te.length>0)?ue:te,xe=me.map(He=>he.reduce((rt,Ye)=>(rt[Ye.label||Ye.id]=getColumnValue(He[Ye.id]),rt),{})),we=utils.json_to_sheet(xe),$e=utils.book_new();utils.book_append_sheet($e,we,"Data");const ze=nr(ce||me===ue?"all-data-export.xlsx":"filtered-search-export.xlsx");writeFileSync($e,ze)},ir=()=>jsxRuntimeExports.jsxs("div",{className:H?"esign-table-container":"table-container",children:[jsxRuntimeExports.jsx("div",{className:"table-scroll-container",children:ct.size===0?jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"200px",display:"flex",alignItems:"center",justifyContent:"center",color:"#888",fontSize:"1.2em",background:"#fafafa",border:"1px solid #eee",borderRadius:"8px"},children:"Please select at least one column to show data"}):jsxRuntimeExports.jsxs("table",{className:"custom-table",style:{tableLayout:"fixed",width:"100%"},children:[jsxRuntimeExports.jsxs("thead",{children:[jsxRuntimeExports.jsxs("tr",{children:[qt&&jsxRuntimeExports.jsx("th",{className:"expand-column"}),i&&jsxRuntimeExports.jsx("th",{className:"checkbox-column",children:o?jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:Fe.size>0,onChange:()=>{Ve(new Set)}}):jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:te.length>0&&te.every((ce,he)=>{const me=Re(ce,he);return me!==void 0&&Fe.has(me)}),onChange:ce=>{if(ce){const he=new Set(te.map((me,xe)=>Re(me,xe)));Ve(he)}else Ve(new Set)}})}),bt.filter(ce=>Z.find(me=>me.id===ce)&&ct.has(ce)).map(ce=>{const he=Z.find(me=>me.id===ce);return he?jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:pe[he.id]?`${pe[he.id]}px`:he.width||"150px",minWidth:"80px",maxWidth:"600px"},children:jsxRuntimeExports.jsxs("div",{className:"column-header",children:[jsxRuntimeExports.jsxs("span",{className:"column-label-with-info",children:[he.label,he.tooltip&&jsxRuntimeExports.jsx("img",{src:InfoIcon,alt:"info",title:he.tooltip,width:14,height:14,className:"info-icon"})]}),jsxRuntimeExports.jsxs("div",{className:"column-actions",children:[L&&jsxRuntimeExports.jsx("img",{src:SortIcon,alt:"Sort",title:"Sort",width:14,height:14,onClick:()=>Jt(he.id),style:{cursor:"pointer",transition:"transform 0.2s ease-in-out",transform:(ae==null?void 0:ae.column)===he.id?ae.direction==="asc"?"rotate(0deg)":"rotate(180deg)":"none",filter:(ae==null?void 0:ae.column)===he.id?"brightness(0.6)":"none"}}),B&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:he.id===qe?Bt:null,children:[jsxRuntimeExports.jsx("span",{className:`dropdown-trigger ${Ke[he.id]?"filter-active":""}`,onClick:me=>{me.stopPropagation(),Ot(he.id)},title:Ke[he.id]?`Filter: ${Ke[he.id].operator} "${Ke[he.id].value}"`:"Filter options",children:"⋮"}),qe===he.id&&jsxRuntimeExports.jsxs("div",{className:"dropdown-menu",ref:me=>{me&&setTimeout(()=>Kt(me),0)},children:[jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Ge(he.id),Ue(!0),De(null)},children:"Filter"}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Nt(he.id,"","contains"),De(null)},children:"Contains..."}),jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{Nt(he.id,"","equals"),De(null)},children:"Equals..."}),Ke[he.id]&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{const me={...Ke};delete me[he.id],nt(me),Qe(""),Ge("");const xe=$t(ue,me,dt);Te(xe),ot(0),De(null)},children:"Clear Filter"}),Object.keys(Ke).length>0&&jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:()=>{nt({}),Qe(""),Ge(""),Ze(null),vt(""),Te(ue),ot(0),De(null)},children:"Clear All Filters"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"column-resizer",onMouseDown:me=>er(me,he.id)})]})},he.id):null}),(g||E||b||S||_||m)&&jsxRuntimeExports.jsx("th",{className:"table-header-cell",style:{width:"150px",textAlign:"center"},children:"Action"})]}),je&&jsxRuntimeExports.jsxs("tr",{className:"filter-row",children:[qt&&jsxRuntimeExports.jsx("td",{}),i&&jsxRuntimeExports.jsx("td",{}),bt.filter(ce=>Z.find(me=>me.id===ce)&&ct.has(ce)).map(ce=>{var me;const he=Z.find(xe=>xe.id===ce);return he?jsxRuntimeExports.jsxs("td",{style:{position:"relative"},children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:`Search ${he.label}`,value:((me=Ke[he.id])==null?void 0:me.value)||"",onChange:xe=>{const we=xe.target.value;Qe(we),Ge(he.id);const $e={...Ke};we===""?delete $e[he.id]:$e[he.id]={value:we,operator:"contains"},nt($e);const Ne=$t(ue,$e,dt);Te(Ne),ot(0)},className:"filter-input-with-clear",style:{paddingRight:"28px"}}),Ke[he.id]&&jsxRuntimeExports.jsx("span",{className:"filter-clear-icon-inside",onClick:()=>{const xe={...Ke};delete xe[he.id],nt(xe),Qe(""),Ge("");const we=$t(ue,xe,dt);Te(we),ot(0)},title:"Clear",children:"×"})]},`filter-${he.id}`):null}),(g||E||b||S||_||m)&&jsxRuntimeExports.jsx("td",{})]})]}),jsxRuntimeExports.jsx("tbody",{children:st.length===0?jsxRuntimeExports.jsx("tr",{className:"no-records-row",children:jsxRuntimeExports.jsx("td",{colSpan:(qt?1:0)+(i?1:0)+Array.from(ct).length+(g||E||b||S||_||m?1:0),className:"no-records-cell",children:dt.trim()||Object.keys(Ke).length>0?"No records found for the search criteria":"No Data found"})}):st.map((ce,he)=>jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsxs("tr",{className:ce.isNewRow?"table-new-row":he%2===0?`table-row-even ${ce.hasError?"row-error":ce.isModified?"row-invalid":""}`:`table-row-odd ${ce.hasError?"row-error":ce.isModified?"row-invalid":""}`,title:ce.rowMessage||"",children:[qt&&jsxRuntimeExports.jsx("td",{className:"expand-column",children:Array.from(ct).some(me=>Array.isArray(ce[me])&&ce[me].length>0&&ce[me].some(xe=>typeof xe=="object"&&xe!==null))&&jsxRuntimeExports.jsx("button",{className:"expand-button",onClick:()=>_t(he),children:Array.from(yt).some(me=>me.startsWith(`${he}`))?"▼":"▶"})}),i&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:(()=>{const me=Re(ce,it*pt+he);return me!==void 0&&Fe.has(me)})(),onChange:me=>{const xe=Re(ce,it*pt+he);if(xe!==void 0)if(o)Ve(me?new Set([xe]):new Set);else{const we=new Set(Fe);me?we.add(xe):we.delete(xe),Ve(we)}}})}),l&&jsxRuntimeExports.jsx("td",{className:"checkbox-column",children:jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:"selected",checked:(f==null?void 0:f(he))==="selected",onChange:()=>u==null?void 0:u({rowIndex:he,columnId:"selected",rowData:ce})})})}),bt.filter(me=>Z.find(we=>we.id===me)&&ct.has(me)).map(me=>{const xe=Z.find(we=>we.id===me);return xe?jsxRuntimeExports.jsx("td",{style:{width:pe[xe.id]?`${pe[xe.id]}px`:"150px",minWidth:"80px",maxWidth:"600px"},className:`table-cell ${Ht(xe.id,ce[xe.id],ce)?"ce-clickable-cell":""}`,onClick:()=>{Ht(xe.id,ce[xe.id],ce)?tr(ce,xe.id):Array.isArray(ce[xe.id])&&ce[xe.id].length>0&&_t(he,xe.id)},children:ce.isNewRow?jsxRuntimeExports.jsx(AddNewRowCell,{row:ce,column:xe,colId:me}):React.isValidElement(ce[xe.id])?ce[xe.id]:(Array.isArray(p)?p.includes(xe.id):p===xe.id)?jsxRuntimeExports.jsx("div",{className:"radio-center-wrapper",children:jsxRuntimeExports.jsx(CERadioButton,{label:"",value:xe.id,checked:tt(ce)===xe.id,onChange:()=>et({rowIndex:he,columnId:xe.id,rowData:ce})})}):Array.isArray(ce[xe.id])?`${ce[xe.id].length}`:typeof ce[xe.id]=="object"&&ce[xe.id]!==null?Object.entries(ce[xe.id]).map(([we,$e])=>`${we}: ${$e}`).join(", "):jsxRuntimeExports.jsx(CETruncatedTextWithTooltip,{text:String(ce[xe.id]??"")})},xe.id):null}),(g||E||b||S||_||m)&&jsxRuntimeExports.jsx("td",{className:"table-cell",style:{textAlign:"center"},children:jsxRuntimeExports.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"8px",flexWrap:"wrap"},children:[g&&jsxRuntimeExports.jsx("img",{src:Edit,alt:"Edit",title:"Edit",width:20,height:20,style:{cursor:"pointer"},onClick:()=>C==null?void 0:C(ce,he)}),E&&jsxRuntimeExports.jsx("img",{src:Reassign,alt:"Reassign",width:20,height:20,style:{cursor:"pointer"},onClick:I}),b&&jsxRuntimeExports.jsx("img",{src:Cancel,alt:"Cancel",width:20,height:20,style:{cursor:"pointer"},onClick:()=>j==null?void 0:j(ce,he)}),S&&jsxRuntimeExports.jsx("img",{src:Approve,alt:"Approve",width:20,height:20,style:{cursor:"pointer"},onClick:()=>O==null?void 0:O(ce,he)}),_&&jsxRuntimeExports.jsx("img",{src:Delete,alt:"Delete",width:20,height:20,style:{cursor:"pointer"},onClick:()=>R==null?void 0:R(ce,he)}),m&&jsxRuntimeExports.jsx("img",{src:Add,alt:"Add",width:20,height:20,style:{cursor:"pointer"},onClick:A})]})})]}),Array.from(yt).map(me=>{const[xe,we]=me.split("-");if(Number(xe)===he){const $e=we?{[we]:ce[we]}:Object.keys(ce).filter(Ne=>Array.isArray(ce[Ne])||typeof ce[Ne]=="object").reduce((Ne,ze)=>({...Ne,[ze]:ce[ze]}),{});return jsxRuntimeExports.jsx("tr",{className:"expanded-row",children:jsxRuntimeExports.jsx("td",{colSpan:ct.size+2,className:"expanded-cell",children:Object.entries($e).map(([Ne,ze],He)=>jsxRuntimeExports.jsxs("div",{className:`expanded-section ${He%2===0?"expanded-section-even":"expanded-section-odd"}`,style:{backgroundColor:He%2===0?"#e8f5e9":"#e3f2fd",padding:"10px",marginBottom:"10px",borderRadius:"5px"},children:[jsxRuntimeExports.jsx("h4",{style:{margin:"0 0 10px 0",color:"#333"},children:Ne.charAt(0).toUpperCase()+Ne.slice(1)}),Ut(ze)]},Ne))})},`expanded-${me}`)}return null})]},he))})]})}),J&&jsxRuntimeExports.jsxs("div",{className:"pagination-container",children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"40px"},children:[jsxRuntimeExports.jsx(EntriesInfo,{dataLength:te.length,currentPage:it,rowsPerPage:pt}),jsxRuntimeExports.jsx(RowsPerPageSelector,{rowsPerPage:pt,setRowsPerPage:It,setCurrentPage:Ie,pageSizeOptions:Q})]}),jsxRuntimeExports.jsx(PaginationControls,{currentPage:it,totalPages:Math.ceil(te.length/pt),setCurrentPage:Ie})]}),ke&&jsxRuntimeExports.jsx("div",{className:"filter-modal",children:jsxRuntimeExports.jsxs("div",{className:"filter-modal-content",ref:jt,onKeyDown:Qt,tabIndex:0,children:[jsxRuntimeExports.jsxs("div",{className:"filter-modal-header",children:[jsxRuntimeExports.jsx("h3",{children:"Filter Data"}),jsxRuntimeExports.jsx(CEButton,{className:"close-button-close",onClick:()=>Ue(!1),children:"×"})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-body",children:[jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Column:"}),jsxRuntimeExports.jsx("select",{value:We,onChange:ce=>Ge(ce.target.value),className:"filter-select","aria-label":"Filter column",title:"Select column to filter",children:Z.map(ce=>jsxRuntimeExports.jsx("option",{value:ce.id,children:ce.label},ce.id))})]}),jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Operator:"}),jsxRuntimeExports.jsxs("select",{value:Je,onChange:ce=>ft(ce.target.value),className:"filter-select","aria-label":"Filter operator",title:"Select filter operator",children:[jsxRuntimeExports.jsx("option",{value:"contains",children:"Contains"}),jsxRuntimeExports.jsx("option",{value:"equals",children:"Equals"}),jsxRuntimeExports.jsx("option",{value:"startsWith",children:"Starts with"}),jsxRuntimeExports.jsx("option",{value:"endsWith",children:"Ends with"}),jsxRuntimeExports.jsx("option",{value:"does not contain",children:"Does not contain"}),jsxRuntimeExports.jsx("option",{value:"does not equal",children:"Does not equal"}),jsxRuntimeExports.jsx("option",{value:"Date Range",children:"Date Range"}),jsxRuntimeExports.jsx("option",{value:"is any of",children:"Is any of"})]}),Je==="Date Range"&&jsxRuntimeExports.jsx("div",{style:{marginTop:"10px"},children:jsxRuntimeExports.jsx(CEDateRangePicker,{mode:"range",onChange:ce=>{Ze({startDate:ce.startDate,endDate:ce.endDate})}})})]}),Je!=="Date Range"&&jsxRuntimeExports.jsxs("div",{className:"filter-form-group",children:[jsxRuntimeExports.jsx("label",{children:"Value:"}),jsxRuntimeExports.jsx("input",{type:"text",value:ut,onChange:ce=>Qe(ce.target.value),placeholder:"Enter filter value",title:"Filter value",className:"filter-input",autoFocus:!0,onKeyDown:ce=>{ce.key==="Enter"&&Gt(),ce.key==="Escape"&&Ue(!1)}})]}),Object.keys(Ke).length>0&&jsxRuntimeExports.jsxs("div",{className:"active-filters-summary",children:[jsxRuntimeExports.jsx("div",{className:"active-filters-header",children:"Active Filters:"}),Object.entries(Ke).map(([ce,he])=>{const me=Z.find(xe=>xe.id===ce);return jsxRuntimeExports.jsxs("div",{className:"active-filter-item",children:[jsxRuntimeExports.jsxs("span",{children:[(me==null?void 0:me.label)||ce,": "]}),jsxRuntimeExports.jsx("span",{className:"filter-operator",children:he.operator}),jsxRuntimeExports.jsxs("span",{className:"filter-value",children:['"',he.value,'"']})]},ce)})]})]}),jsxRuntimeExports.jsxs("div",{className:"filter-modal-footer",children:[jsxRuntimeExports.jsx(CEButton,{onClick:()=>{nt({}),Te(ue),ot(0),Ue(!1)},className:"clear-filters-button",variant:"outlined",children:"Clear All"}),jsxRuntimeExports.jsx(CEButton,{onClick:Gt,className:"apply-filter-button",variant:"primary",children:"Apply Filter"})]})]})})]}),ar=()=>{z?(ge(!0),Promise.resolve(z()).finally(()=>{nt({});try{const ce=Z.filter(me=>me.shouldDisplay!==!1).map(me=>me.id),he=Z.filter(me=>me.shouldVisible!==!1).map(me=>me.id);gt(new Set(ce)),Le(he),mt(!1)}catch{}ge(!1)})):(ge(!0),setTimeout(()=>{Te(t),Me(t),ot(0),vt(""),Qe(""),Ge(""),nt({}),se(null);try{const ce=Z.filter(me=>me.shouldDisplay!==!1).map(me=>me.id),he=Z.filter(me=>me.shouldVisible!==!1).map(me=>me.id);gt(new Set(ce)),Le(he),mt(!1)}catch{}ge(!1)},300))},or=Z.filter(ce=>ce.shouldVisible!==!1).every(ce=>ct.has(ce.id));return jsxRuntimeExports.jsxs("div",{className:`datatable-wrapper${ve?" ce-grid-fullscreen":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"grid-header",children:[e&&jsxRuntimeExports.jsx("span",{className:"header-title",children:e}),jsxRuntimeExports.jsxs("div",{className:"search-container",children:[d&&jsxRuntimeExports.jsxs("div",{className:"search-wrapper",children:[jsxRuntimeExports.jsx("img",{src:SearchRounded,alt:"Show Filter",title:"Show/Hide Filter",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>{const ce=!je;Pe(ce),ce||(nt({}),Te(ue),ot(0),vt(""))}}),dt&&jsxRuntimeExports.jsx("button",{className:"search-cancel-button",onClick:()=>{vt(""),Tt()},children:"×"})]}),W&&jsxRuntimeExports.jsx("img",{src:ShowOrHideColumn,alt:"Columns",title:"Show/Hide Columns",width:20,height:20,style:{cursor:"pointer",fill:"#808080"},onClick:()=>mt(!0)}),Object.keys(Ke).length>0&&jsxRuntimeExports.jsx("img",{src:FilterAltOffRounded,alt:"Clear Filters",title:"Clear All Filters",width:20,height:20,style:{cursor:"pointer",marginLeft:"8px",fill:"#808080"},onClick:()=>{nt({}),Te(ue),ot(0)}}),T&&jsxRuntimeExports.jsx("img",{src:FileOpenRounded,alt:"Export",title:"Export All to Excel",width:20,height:20,className:"ce-export-icon",style:{cursor:"pointer",fill:"#808080"},onClick:()=>Vt(!0)}),Y&&jsxRuntimeExports.jsx("img",{src:ReloadIcon,alt:"Reload",title:"Reload Data",width:20,height:20,className:"ce-reload-icon",style:{cursor:"pointer",fill:"#808080"},onClick:ar}),G&&jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:At,children:[jsxRuntimeExports.jsx("img",{src:ExportIcon,alt:"Download",title:"Download",width:20,height:20,className:"ce-export-icon icon-button dropdown-trigger",style:{cursor:"pointer"},onClick:ce=>{ce.stopPropagation(),ee&&ee.length>0?Ot("download"):Vt()}}),(()=>{const ce=ee??[],he=ce.find(we=>we.usedefault===!0),me=ce.filter(we=>!we.usedefault);let xe=[];return ce.length>0?he?xe=[{label:he.label,onClick:()=>{he.forceAll?Vt(!0):Vt()}},...me]:xe=[...me]:xe=[],qe==="download"&&xe.length>0&&jsxRuntimeExports.jsx("div",{className:"dropdown-menu",ref:we=>{we&&setTimeout(()=>Kt(we),0)},children:xe.map((we,$e)=>jsxRuntimeExports.jsx("button",{className:"dropdown-item",onClick:Ne=>{Ne.stopPropagation();try{we.onClick()}finally{De(null)}},children:we.label},$e))})})()]}),V&&jsxRuntimeExports.jsx("button",{className:"fullscreen-button",onClick:ve?Ae:Ce,title:ve?"Exit Full Screen":"Full Screen",children:ve?"⤫":"⤢"})]})]}),Et&&jsxRuntimeExports.jsx("div",{className:"column-modal",children:jsxRuntimeExports.jsxs("div",{className:"column-modal-content",ref:Mt,children:[jsxRuntimeExports.jsx("div",{className:"column-modal-header",children:jsxRuntimeExports.jsx("button",{className:"modal-close-button",onClick:()=>mt(!1),children:"×"})}),jsxRuntimeExports.jsx("h3",{className:"column-modal-title",children:"Column Visibility and Order"}),jsxRuntimeExports.jsx("p",{className:"column-modal-description",children:"Drag and drop columns to change their order. Check or uncheck to show or hide columns."}),jsxRuntimeExports.jsx("div",{className:"column-modal-actions",children:jsxRuntimeExports.jsx("div",{className:"select-all-action",children:jsxRuntimeExports.jsx(CECheckBox,{label:"Select All",checked:or,onChange:ce=>{gt(ce?new Set(Z.filter(he=>he.shouldVisible!==!1).map(he=>he.id)):new Set)}})})}),jsxRuntimeExports.jsx("div",{className:"column-list-container",children:bt.filter(ce=>Z.find(he=>he.id===ce&&he.shouldVisible!==!1)).map(ce=>{const he=Z.find(me=>me.id===ce);return he?jsxRuntimeExports.jsxs("div",{className:`column-item ${lt===he.id?"dragging":""}`,draggable:!0,onDragStart:me=>{St(he.id),me.dataTransfer.effectAllowed="move",me.dataTransfer.setData("text/plain",he.id)},onDragEnd:()=>St(null),onDragOver:me=>{me.preventDefault(),me.dataTransfer.dropEffect="move"},onDragEnter:me=>{me.preventDefault(),me.currentTarget.classList.add("drag-over")},onDragLeave:me=>{me.currentTarget.classList.remove("drag-over")},onDrop:me=>{if(me.preventDefault(),me.currentTarget.classList.remove("drag-over"),lt&&lt!==he.id){const xe=[...bt],we=xe.indexOf(lt),$e=xe.indexOf(he.id);we!==-1&&$e!==-1&&(xe.splice(we,1),xe.splice($e,0,lt),Le(xe))}},children:[jsxRuntimeExports.jsx("div",{className:"column-drag-handle",children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:jsxRuntimeExports.jsx("path",{d:"M4 4h2v2H4V4zm0 6h2v2H4v-2zm0-3h2v2H4V7zm8 3h-6v2h6v-2zm0-3h-6v2h6V7zm0-3h-6v2h6V4z"})})}),jsxRuntimeExports.jsx(CECheckBox,{label:he.label??he.id,checked:ct.has(he.id),onChange:()=>Ct(he.id)})]},he.id):null})})]})}),_e?jsxRuntimeExports.jsx(CESkeletonTable,{columns:Z.length||5,rows:pt||10}):ir()]})},DateInputPart=({value:e,onChange:t,max:n,min:i,length:o,placeholder:l,className:u,onClick:f,id:p,name:d})=>{const m=React.useRef(null),g=E=>{const b=E.target.value.replace(/\D/g,"");if(b.length<=o){if(b.length===1){const T=parseInt(b);if(n===12&&T>1){t(`0${T}`);return}if(n===31&&T>3){t(`0${T}`);return}}if(b.length===2){const T=parseInt(b);T>=i&&T<=n&&t(b);return}t(b)}},_=()=>{var E;(E=m.current)==null||E.select()},S=()=>{e.length===1&&t(e.padStart(2,"0"))};return jsxRuntimeExports.jsx("input",{ref:m,type:"text",value:e,onChange:g,onFocus:_,onBlur:S,id:p,name:d,onClick:f,maxLength:o,className:u??"date-input-part",placeholder:l})},DateRangeIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19%204.5H18V3.5C18%202.95%2017.55%202.5%2017%202.5C16.45%202.5%2016%202.95%2016%203.5V4.5H8V3.5C8%202.95%207.55%202.5%207%202.5C6.45%202.5%206%202.95%206%203.5V4.5H5C3.89%204.5%203.01%205.4%203.01%206.5L3%2020.5C3%2021.6%203.89%2022.5%205%2022.5H19C20.1%2022.5%2021%2021.6%2021%2020.5V6.5C21%205.4%2020.1%204.5%2019%204.5ZM19%2019.5C19%2020.05%2018.55%2020.5%2018%2020.5H6C5.45%2020.5%205%2020.05%205%2019.5V9.5H19V19.5ZM7%2011.5H9V13.5H7V11.5ZM11%2011.5H13V13.5H11V11.5ZM15%2011.5H17V13.5H15V11.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",WEEKDAYS=["Su","Mo","Tu","We","Th","Fr","Sa"],CEDatePicker=({onChange:e,label:t="Calendar",value:n,focused:i=!1,id:o,name:l})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(null),[m,g]=React.useState(new Date),[_,S]=React.useState(!1),[E,b]=React.useState({start:2020,end:2031}),[T,C]=React.useState("left"),[A,R]=React.useState(0),O=React.useRef(null),[I,j]=React.useState(i),[M,N]=React.useState(""),[D,F]=React.useState(""),[q,z]=React.useState(""),[G,ee]=React.useState(!0),Y=()=>{f(!1),!M&&!D&&!q&&j(!1)};useEscapeKey(Y);const V=()=>{f(X=>{if(!X){const Q=p||new Date;g(Q),M||N(String(Q.getMonth()+1).padStart(2,"0")),D||F(String(Q.getDate()).padStart(2,"0")),q||z(String(Q.getFullYear()))}return!X})};React.useEffect(()=>{const X=Q=>{O.current&&!O.current.contains(Q.target)&&Y()};return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[M,D,q]),React.useEffect(()=>{if(n){const[X,Q,le]=n.split("/"),ye=new Date(`${le}-${X}-${Q}`);isNaN(ye.getTime())||(d(ye),g(ye),N(X),F(Q),z(le),ee(!0))}else d(null),N(""),F(""),z(""),ee(!0),g(new Date)},[n]);const W=X=>{const Q=new Date(m.getFullYear(),m.getMonth(),X);d(Q),g(Q);const le=String(Q.getMonth()+1).padStart(2,"0"),ye=String(Q.getDate()).padStart(2,"0"),de=String(Q.getFullYear());N(le),F(ye),z(de),ee(!0),e(`${le}/${ye}/${de}`),f(!1)},L=X=>{C(X>0?"left":"right"),g(Q=>{const le=new Date(Q.getFullYear(),Q.getMonth()+X,1);return p&&N(String(le.getMonth()+1).padStart(2,"0")),R(ye=>ye+1),le})},B=()=>{S(X=>!X)},U=X=>{b(Q=>({start:Q.start+X*10,end:Q.end+X*10}))},K=X=>{const Q=new Date(X,m.getMonth(),1);g(Q),z(String(X)),S(!1)},H=()=>{const X=new Date(m.getFullYear(),m.getMonth(),1),Q=new Date(m.getFullYear(),m.getMonth()+1,0),le=X.getDay(),ye=Q.getDate(),de=new Date,fe=Ee=>!p&&de.getDate()===Ee&&de.getMonth()===m.getMonth()&&de.getFullYear()===m.getFullYear(),pe=[];for(let Ee=0;Ee<le;Ee++)pe.push(jsxRuntimeExports.jsx("div",{className:"dp-day empty"},`empty-${Ee}`));for(let Ee=1;Ee<=ye;Ee++){const te=(p==null?void 0:p.getDate())===Ee&&(p==null?void 0:p.getMonth())===m.getMonth()&&(p==null?void 0:p.getFullYear())===m.getFullYear();pe.push(jsxRuntimeExports.jsx("div",{className:`dp-day ${te?"selected":""} ${fe(Ee)?"today":""}`,onClick:()=>W(Ee),children:Ee},Ee))}return pe},J=(X,Q,le)=>{if(!X||!Q||!le){ee(!1),g(new Date),d(null);return}const ye=`${le}-${X}-${Q}`,de=new Date(ye);if(de.getFullYear()===parseInt(le)&&de.getMonth()+1===parseInt(X)&&de.getDate()===parseInt(Q))d(de),g(de),ee(!0),e(`${X}/${Q}/${le}`);else{const fe=new Date;ee(!1),d(null),g(fe),N(X),F(Q),z(le)}};return jsxRuntimeExports.jsxs("div",{className:"dp-wrapper",ref:O,children:[jsxRuntimeExports.jsxs("div",{className:`dp-input-container ${I||u?"focused":""} ${p||M||D||q?"has-value":""} ${G?"":"invalid"}`,children:[jsxRuntimeExports.jsx("div",{className:`dp-label floating ${G?"":"invalid"}`,children:t}),jsxRuntimeExports.jsxs("div",{className:"dp-input-wrapper",onClick:()=>{j(!0)},children:[jsxRuntimeExports.jsx(DateInputPart,{value:M,onChange:X=>{N(X),J(X,D,q)},max:12,min:1,length:2,placeholder:"MM",onClick:V,id:o?`${o}-month`:void 0,name:l?`${l}-month`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx(DateInputPart,{value:D,onChange:X=>{F(X),J(M,X,q)},placeholder:"DD",max:31,min:1,length:2,onClick:V,id:o?`${o}-day`:void 0,name:l?`${l}-day`:void 0}),jsxRuntimeExports.jsx("span",{children:"/"}),jsxRuntimeExports.jsx("input",{type:"text",value:q,onChange:X=>{const Q=X.target.value.replace(/\D/g,"");Q.length<=4&&(z(Q),Q.length===4&&J(M,D,Q))},onFocus:X=>X.target.select(),onBlur:()=>{q.length===4&&J(M,D,q)},className:"date-input-part",id:o?`${o}-year`:void 0,name:l?`${l}-year`:void 0,maxLength:4,placeholder:"YYYY"}),jsxRuntimeExports.jsx("span",{className:"dp-icon",onClick:V,children:jsxRuntimeExports.jsx("img",{src:DateRangeIcon,alt:"Calendar Icon"})})]})]}),u&&jsxRuntimeExports.jsxs("div",{className:"dp-calendar",children:[jsxRuntimeExports.jsxs("div",{className:"dp-header",children:[jsxRuntimeExports.jsxs("div",{className:"dp-title",onClick:B,children:[_?`${E.start} - ${E.end}`:`${m.toLocaleString("default",{month:"long"})} ${m.getFullYear()}`,jsxRuntimeExports.jsx("button",{className:"dp-toggle-icon",children:"▾"})]}),jsxRuntimeExports.jsxs("div",{className:"dp-controls",children:[jsxRuntimeExports.jsx("button",{onClick:()=>_?U(-1):L(-1),children:"‹"}),jsxRuntimeExports.jsx("button",{onClick:()=>_?U(1):L(1),children:"›"})]})]}),!_&&jsxRuntimeExports.jsx("div",{className:"dp-weekdays",children:WEEKDAYS.map(X=>jsxRuntimeExports.jsx("div",{className:"dp-weekday",children:X},X))}),_?jsxRuntimeExports.jsx("div",{className:"dp-years-grid",children:Array.from({length:E.end-E.start+1},(X,Q)=>{const le=E.start+Q;return jsxRuntimeExports.jsx("div",{className:"dp-year-item",onClick:()=>K(le),children:le},le)})}):jsxRuntimeExports.jsx("div",{className:`dp-days dp-slide-${T}`,children:H()},A)]})]})},FieldsInput=({label:e,name:t,placeholder:n="",value:i="",onChange:o,size:l="medium"})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(!1),m=getSizeStyle$1(l);React.useEffect(()=>{i&&i.trim().length>0&&d(!0)},[i]);const g=()=>{f(!0),d(!0)},_=E=>{f(!1),E.target.value.trim()||d(!1)},S=u||!!i;return jsxRuntimeExports.jsxs("div",{className:`floating-input-wrapper${p?" focused":""}`,style:m,children:[jsxRuntimeExports.jsx("label",{htmlFor:t,className:"floating-label",children:e}),jsxRuntimeExports.jsx("input",{id:t,name:t,className:"floating-input",placeholder:S?n:"",value:i,onChange:o,onFocus:g,onBlur:_})]})},CEFooter=()=>jsxRuntimeExports.jsx("footer",{style:{zIndex:1100,backgroundColor:"var(--grey-color)",width:"100%",height:"36px",position:"fixed",bottom:"0",left:"0",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",marginTop:"auto"},children:jsxRuntimeExports.jsx("p",{style:{color:"var(--white-color)",fontSize:"0.8rem",margin:"0"},children:"© All rights reserved by Clean Earth."})}),CEGridItem=({children:e,size:t=1})=>jsxRuntimeExports.jsx("div",{style:{gridColumn:`span ${t}`},children:e}),CEGridLayout=({children:e,columns:t=12,gap:n="1rem",alignItems:i="stretch",justifyItems:o="stretch",gridTemplateColumns:l})=>jsxRuntimeExports.jsx("div",{className:"grid-container",style:{display:"grid",width:"100%",gridTemplateColumns:l||`repeat(${t}, 1fr)`,gap:n,alignItems:i,justifyItems:o,backgroundColor:"transparent"},children:e}),CELogo=({src:e,alt:t="Logo",style:n})=>jsxRuntimeExports.jsx("img",{src:e,alt:t,style:{height:25,...n}}),CESearchBar=({onFocus:e,onBlur:t,quickActions:n=[],recentSearches:i=[]})=>{const[o,l]=React.useState(!1),[u,f]=React.useState(""),[p,d]=React.useState(n),[m,g]=React.useState(i),_=(E,b)=>{E==="quickActions"?d(T=>T.filter((C,A)=>A!==b)):g(T=>T.filter((C,A)=>A!==b))},S=()=>{u.trim()!==""&&(g(E=>[u,...E]),f(""))};return jsxRuntimeExports.jsxs("div",{className:"ceui-search-bar",children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search...",className:"ceui-search-input",value:u,onChange:E=>f(E.target.value),onFocus:()=>{l(!0),e&&e()},onBlur:()=>{setTimeout(()=>l(!1),200),t&&t()},onKeyDown:E=>{E.key==="Enter"&&S()}}),o&&jsxRuntimeExports.jsxs("div",{className:"ceui-search-suggestions",children:[p.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Quick actions"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:p.map((E,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[E,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("quickActions",b),children:"✕"})]},b))})]}),m.length>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"suggestion-category",children:"Recent search"}),jsxRuntimeExports.jsx("div",{className:"suggestions",children:m.map((E,b)=>jsxRuntimeExports.jsxs("span",{className:"suggestion-item",children:[E,jsxRuntimeExports.jsx("button",{className:"close-icon",onClick:()=>_("recentSearches",b),children:"✕"})]},b))})]})]})]})},CESearchButton=({showSuggestions:e=!1,quickActions:t=[],recentSearches:n=[]})=>{const[i,o]=React.useState(!1),[l,u]=React.useState(!1),f=React.useRef(null),p=m=>{f.current&&!f.current.contains(m.target)&&(o(!1),u(!1))},d=()=>jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M15.5001 14.5H14.7101L14.4301 14.23C15.6301 12.83 16.2501 10.92 15.9101 8.89002C15.4401 6.11002 13.1201 3.89002 10.3201 3.55002C6.09014 3.03002 2.53014 6.59001 3.05014 10.82C3.39014 13.62 5.61014 15.94 8.39014 16.41C10.4201 16.75 12.3301 16.13 13.7301 14.93L14.0001 15.21V16L18.2501 20.25C18.6601 20.66 19.3301 20.66 19.7401 20.25C20.1501 19.84 20.1501 19.17 19.7401 18.76L15.5001 14.5ZM9.50014 14.5C7.01014 14.5 5.00014 12.49 5.00014 10C5.00014 7.51002 7.01014 5.50002 9.50014 5.50002C11.9901 5.50002 14.0001 7.51002 14.0001 10C14.0001 12.49 11.9901 14.5 9.50014 14.5Z",fill:"black",fillOpacity:"0.54"})});return React.useEffect(()=>(i?document.addEventListener("mousedown",p):document.removeEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}),[i]),console.log("isSearchOpen:",i),console.log("showDropdown:",l),console.log("showSuggestions:",e),jsxRuntimeExports.jsxs("div",{ref:f,className:`ceui-animated-search-wrapper ${i?"expanded":"collapsed"}`,children:[jsxRuntimeExports.jsx("button",{className:"ceui-search-button","aria-label":"Open search",onClick:()=>o(!0),children:jsxRuntimeExports.jsx(d,{})}),i&&jsxRuntimeExports.jsx(CESearchBar,{showSuggestions:i&&(e||l),onFocus:()=>u(!0),onBlur:()=>{setTimeout(()=>u(!1),200)},quickActions:t,recentSearches:n})]})},CEHelpButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Help",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M12 2.5C6.48 2.5 2 6.98 2 12.5C2 18.02 6.48 22.5 12 22.5C17.52 22.5 22 18.02 22 12.5C22 6.98 17.52 2.5 12 2.5ZM13 19.5H11V17.5H13V19.5ZM15.07 11.75L14.17 12.67C13.67 13.18 13.31 13.64 13.13 14.36C13.05 14.68 13 15.04 13 15.5H11V15C11 14.54 11.08 14.1 11.22 13.69C11.42 13.11 11.75 12.59 12.17 12.17L13.41 10.91C13.87 10.47 14.09 9.81 13.96 9.11C13.83 8.39 13.27 7.78 12.57 7.58C11.46 7.27 10.43 7.9 10.1 8.85C9.98 9.22 9.67 9.5 9.28 9.5H8.98C8.4 9.5 8 8.94 8.16 8.38C8.59 6.91 9.84 5.79 11.39 5.55C12.91 5.31 14.36 6.1 15.26 7.35C16.44 8.98 16.09 10.73 15.07 11.75Z",fill:"black",fillOpacity:"0.54"})})}),CENotificationButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},"aria-label":"Notifications",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M11.4775 22.2632C12.0837 22.2632 12.6651 21.9999 13.0938 21.531C13.5224 21.0622 13.7633 20.4264 13.7633 19.7634H9.19183C9.19183 20.4264 9.43264 21.0622 9.8613 21.531C10.2899 21.9999 10.8713 22.2632 11.4775 22.2632ZM12.6147 3.63801C12.6306 3.46421 12.6131 3.28869 12.5632 3.12276C12.5133 2.95683 12.4322 2.80417 12.3251 2.67464C12.2179 2.54511 12.0871 2.44157 11.9412 2.37071C11.7952 2.29985 11.6372 2.26324 11.4775 2.26324C11.3178 2.26324 11.1599 2.29985 11.0139 2.37071C10.8679 2.44157 10.7372 2.54511 10.63 2.67464C10.5229 2.80417 10.4417 2.95683 10.3919 3.12276C10.342 3.28869 10.3244 3.46421 10.3404 3.63801C9.04845 3.92494 7.88695 4.6916 7.05275 5.80806C6.21856 6.92452 5.76299 8.3221 5.76325 9.76393C5.76325 11.1364 5.19182 17.2635 3.47754 18.5134H19.4775C17.7633 17.2635 17.1918 11.1364 17.1918 9.76393C17.1918 6.73909 15.2261 4.21423 12.6147 3.63801Z",fill:"#757575"})})}),CEAvatarMenu=()=>{const[e,t]=React.useState(!1),n=React.useRef(null),i=()=>t(!e),o=l=>{n.current&&!n.current.contains(l.target)&&t(!1)};return React.useEffect(()=>(e?document.addEventListener("mousedown",o):document.removeEventListener("mousedown",o),()=>{document.removeEventListener("mousedown",o)}),[e]),jsxRuntimeExports.jsxs("div",{style:{position:"relative",zIndex:1e3},children:[jsxRuntimeExports.jsx("img",{src:"src/assets/profile_pic.png",alt:"Profile",style:{width:40,height:40,borderRadius:"50%",cursor:"pointer"},onClick:i}),e&&jsxRuntimeExports.jsxs("div",{ref:n,style:{position:"absolute",right:0,top:"100%",background:"white",border:"1px solid #ccc",boxShadow:"0 2px 10px rgba(0,0,0,0.1)",zIndex:9999,minWidth:120},children:[jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"My Account"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Settings"}),jsxRuntimeExports.jsx("div",{style:menuItemStyle,children:"Logout"})]})]})},menuItemStyle={padding:"10px 15px",cursor:"pointer",fontSize:14,borderBottom:"1px solid #eee"},CEUserInfo=({name:e,role:t})=>jsxRuntimeExports.jsxs("div",{className:"ceui-user-info",children:[jsxRuntimeExports.jsx("span",{className:"ceui-user-name",children:e}),jsxRuntimeExports.jsx("span",{className:"ceui-user-role",children:t})]}),CEHeader=({headerColor:e="white",logoSrc:t,logoHeight:n,logoWidth:i,showSearchButton:o=!1,quickActions:l=[],recentSearches:u=[],showHelpButton:f=!1,showNotificationButton:p=!1,showAvatarMenu:d=!1,showUserInfo:m=!1,showHamburgerButton:g=!1,showDrawer:_=!1,userInfoProps:S,onMenuClick:E,drawerJsonUrl:b="",isDrawerOpen:T=!1,onDrawerClose:C})=>{const A=()=>jsxRuntimeExports.jsxs("svg",{width:"120",height:"35",viewBox:"0 0 245 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsxs("g",{clipPath:"url(#clip0_1572_8855)",children:[jsxRuntimeExports.jsx("path",{d:"M0 1.49012e-05H245V60H0V1.49012e-05Z",fill:"#F4F5F7"}),jsxRuntimeExports.jsx("path",{d:"M53.3741 31.7566C53.3741 39.7826 47.1908 46.1485 39.2275 46.1485C31.2641 46.1485 25.0809 39.7826 25.0809 31.7566C25.0809 23.7306 31.2641 17.3646 39.2275 17.3646C47.1908 17.3646 53.3741 23.7306 53.3741 31.7566Z",fill:"#007ACC"}),jsxRuntimeExports.jsx("path",{d:"M91.5 25H76V35H91.5V30H81.5V29H91.5V25Z",fill:"#000"}),jsxRuntimeExports.jsx("path",{d:"M65 35H69V25H65V35Z",fill:"#000"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_1572_8855",children:jsxRuntimeExports.jsx("rect",{width:"245",height:"60",fill:"white"})})})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("header",{className:"ceui-header",style:{backgroundColor:e},children:[jsxRuntimeExports.jsx("div",{className:"ceui-header-left",children:t?jsxRuntimeExports.jsx(CELogo,{src:t,alt:"Core Logo",style:{height:n||35,width:i||"auto",maxWidth:120}}):jsxRuntimeExports.jsx(A,{})}),jsxRuntimeExports.jsxs("div",{className:"ceui-header-right",children:[o&&jsxRuntimeExports.jsx(CESearchButton,{showSuggestions:!0,quickActions:l,recentSearches:u,value:"",onChange:()=>{},onClear:()=>{}}),f&&jsxRuntimeExports.jsx(CEHelpButton,{}),p&&jsxRuntimeExports.jsx(CENotificationButton,{}),d&&jsxRuntimeExports.jsx(CEAvatarMenu,{}),m&&S&&jsxRuntimeExports.jsx(CEUserInfo,{name:S.name,role:S.role})]})]}),_&&g&&jsxRuntimeExports.jsx(CEDrawer,{jsonUrl:b,isOpen:T,onClose:C||(()=>{})})]})},CEGridMenuButton=()=>jsxRuntimeExports.jsx("button",{style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none"},children:jsxRuntimeExports.jsx("img",{src:"src/assets/Grid_4x4Rounded.svg",alt:""})}),CEHamburgerButton=({onClick:e,style:t})=>jsxRuntimeExports.jsx("button",{onClick:e,style:{background:"none",border:"none",cursor:"pointer",padding:0,margin:0,outline:"none",...t},children:jsxRuntimeExports.jsx("img",{src:"src/assets/MenuRounded.svg",alt:"Menu"})}),InputDropDown=({options:e,selected:t,onChange:n,multiple:i=!1,placeholder:o="Select...",size:l="medium",style:u={},allowClear:f=!0,showInputPills:p=!0,id:d,name:m})=>{const[g,_]=React.useState(!1),[S,E]=React.useState(!1),b=React.useRef(null),C={...getSizeStyle$1(l),...u},A=j=>{if(i){const M=t.includes(j)?t.filter(N=>N!==j):[...t,j];n(M)}else n([j]),_(!1)},R=()=>n([]),O=e.filter(j=>t.includes(j.value)).map(j=>j.label);React.useEffect(()=>{const j=M=>{var N;(N=b.current)!=null&&N.contains(M.target)||_(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]);const I=j=>{const M=t.filter(N=>N!==j);n(M)};return jsxRuntimeExports.jsx("div",{className:`dropdown-container ${g||t.length>0?"float":""}`,ref:b,style:C,id:d,"data-name":m,children:jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${g?"open":""}`,onClick:()=>_(j=>!j),onFocus:()=>E(!0),onBlur:()=>E(!1),tabIndex:0,children:[jsxRuntimeExports.jsx("label",{className:"floating-placeholder",children:o}),jsxRuntimeExports.jsx("div",{className:"selected-display",children:t.length===0?"":i?p?O.map((j,M)=>jsxRuntimeExports.jsxs("span",{className:"chip",children:[j,jsxRuntimeExports.jsx("span",{className:"close-icon",onClick:N=>{var D;N.stopPropagation(),I(((D=e.find(F=>F.label===j))==null?void 0:D.value)||"")},children:"×"})]},M)):jsxRuntimeExports.jsx("div",{className:"selected-display-label",children:O.join(",")}):jsxRuntimeExports.jsx("span",{children:O[0]})}),f&&t.length>0&&jsxRuntimeExports.jsx("button",{className:"clear-button",onClick:j=>{j.stopPropagation(),R()},children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",children:jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-icon-img ${g?"rotate-icon":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"black",fillOpacity:"0.54"})})}),g&&jsxRuntimeExports.jsx("ul",{className:"dropdown-options",children:e.map(j=>jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${t.includes(j.value)?"selected":""}`,onClick:M=>{M.stopPropagation(),A(j.value)},children:[i&&jsxRuntimeExports.jsx("input",{type:"checkbox",readOnly:!0,checked:t.includes(j.value)}),j.label]},j.value))})]})})},CELinearProgressBar=({duration:e,color:t="#4caf50",backgroundColor:n="#e0e0e0",height:i="10px",isActive:o=!1})=>{const l=React.useRef(null);return React.useEffect(()=>{const u=l.current;if(!(!u||!o))return u.style.width="0%",u.style.transition="none",u.offsetWidth,requestAnimationFrame(()=>{u&&(u.style.transition=`width ${e}ms linear`,u.style.width="100%")}),()=>{u&&(u.style.width="0%",u.style.transition="none")}},[e,o]),jsxRuntimeExports.jsx("div",{className:"snackbar__progress-container",style:{height:i},children:jsxRuntimeExports.jsx("div",{ref:l,className:"snackbar__progress-bar"})})},CEMenuBar=({menuData:e})=>{const[t,n]=React.useState({}),i=(p,d)=>{n(m=>({...m,[p]:d}))};useEscapeKey(()=>{n({})});const l=p=>p.children&&p.children.length>0,u=p=>p.some(d=>l(d)),f=(p,d="")=>!p||p.length===0?null:jsxRuntimeExports.jsx("ul",{className:d?"ce-submenu":"ce-dropdown",children:p.map(m=>{const g=d?`${d}-${m.name}`:m.name,_=l(m);return jsxRuntimeExports.jsxs("li",{className:`ce-dropdown-item ${_?"has-submenu":""}`,onMouseEnter:()=>_&&i(g,!0),onMouseLeave:()=>_&&i(g,!1),onClick:()=>console.log(`Clicked: ${m.name}`),children:[m.name,_&&jsxRuntimeExports.jsx("span",{className:"ce-icon right",children:"▶"}),_&&t[g]&&f(m.children,g)]},g)})});return jsxRuntimeExports.jsx("div",{className:"ce-menu-bar",children:jsxRuntimeExports.jsx("div",{className:"ce-menu-container",children:e.map(p=>{const d=u(p.items);return jsxRuntimeExports.jsxs("div",{className:"ce-menu-item",onMouseEnter:()=>d&&i(p.title,!0),onMouseLeave:()=>d&&i(p.title,!1),children:[jsxRuntimeExports.jsxs("button",{className:"ce-menu-button",children:[p.title,d&&jsxRuntimeExports.jsx("span",{className:"ce-icon",children:"▼"})]}),d&&t[p.title]&&f(p.items,p.title)]},p.title)})})})},CEPagination=({currentPage:e,totalPages:t,onPageChange:n})=>{const i=()=>{const p=[];if(t<=8)for(let d=0;d<t;d++)p.push(d);else if(e<7){for(let d=0;d<8;d++)p.push(d);p.push("..."),p.push(t-1)}else if(e>=t-8+1){p.push(0),p.push("...");for(let d=t-8;d<t;d++)p.push(d)}else{p.push(0),p.push("...");for(let d=e-3;d<=e+3;d++)p.push(d);p.push("..."),p.push(t-1)}return p},o=f=>{typeof f=="number"&&n(f)},l=()=>{e>0&&n(e-1)},u=()=>{e<t-1&&n(e+1)};return jsxRuntimeExports.jsxs("div",{className:"pagination",children:[jsxRuntimeExports.jsx("button",{onClick:l,disabled:e===0,className:"pagination-button",children:"Previous"}),i().map((f,p)=>typeof f=="number"?jsxRuntimeExports.jsx("button",{onClick:()=>o(f),className:`pagination-button page-number ${e===f?"active":""}`,children:f+1},p):jsxRuntimeExports.jsx("span",{className:"pagination-ellipsis",children:f},p)),jsxRuntimeExports.jsx("button",{onClick:u,disabled:e===t-1,className:"pagination-button",children:"Next"})]})},CERadioButtonGroup=({options:e,name:t,defaultValue:n,onChange:i,direction:o="horizontal",id:l,nameAttr:u})=>{const[f,p]=React.useState(n||""),d=m=>{p(m),i(m)};return jsxRuntimeExports.jsx("div",{className:`radio-button-group ${o}`,role:"radiogroup","aria-labelledby":t,id:l,children:e.map(m=>jsxRuntimeExports.jsx("div",{className:"radio-button",children:jsxRuntimeExports.jsx(CERadioButton,{label:m.label,value:m.value,checked:f===m.value,onChange:d,id:l?`${l}-${m.value}`:void 0,name:u})},m.value))})},saveSelection=()=>{const e=window.getSelection();return e!=null&&e.rangeCount?e.getRangeAt(0):null},restoreSelection=e=>{if(e){const t=window.getSelection();t==null||t.removeAllRanges(),t==null||t.addRange(e)}},CERichTextEditor=({initialValue:e="",onChange:t,width:n="100%",height:i="auto",minHeight:o="200px",maxHeight:l="none",className:u="",style:f={},editorStyle:p={}})=>{const d=React.useRef(null),[m,g]=React.useState("3"),[_,S]=React.useState("Arial"),[E,b]=React.useState({bold:!1,italic:!1,underline:!1,strikeThrough:!1,subscript:!1,superscript:!1,justifyLeft:!0,justifyCenter:!1,justifyRight:!1,justifyFull:!1});React.useEffect(()=>{d.current&&e&&(d.current.innerHTML=e)},[e]);const T=React.useCallback(j=>{try{return document.queryCommandState(j)}catch{return!1}},[]),C=React.useCallback(()=>{b({bold:T("bold"),italic:T("italic"),underline:T("underline"),strikeThrough:T("strikethrough"),subscript:T("subscript"),superscript:T("superscript"),justifyLeft:T("justifyLeft"),justifyCenter:T("justifyCenter"),justifyRight:T("justifyRight"),justifyFull:T("justifyFull")})},[T]),A=React.useCallback((j,M="")=>{var F,q;const N=saveSelection(),D=document.getSelection();if(j==="createLink"){const z=prompt("Enter URL:");if(z){restoreSelection(N),document.execCommand("createLink",!1,z);const G=(F=D==null?void 0:D.anchorNode)==null?void 0:F.parentElement;G instanceof HTMLAnchorElement&&(G.target="_blank",G.rel="noopener noreferrer")}}else if(j==="insertImage"){const z=prompt("Enter image URL:");if(z){restoreSelection(N);const G=`<img src="${z}" alt="image" style="max-width: 100%; height: auto;"/>`;document.execCommand("insertHTML",!1,G)}}else j==="fontSize"||j==="fontName"?(restoreSelection(N),document.execCommand(j,!0,M),j==="fontSize"?g(M):S(M)):(restoreSelection(N),document.execCommand(j,!1,M));d.current&&(t==null||t(d.current.innerHTML)),(q=d.current)==null||q.focus(),C()},[t,C]),R=j=>{if(j.key==="Tab"&&(j.preventDefault(),document.execCommand("insertHTML",!1,"&nbsp;&nbsp;&nbsp;&nbsp;")),j.ctrlKey||j.metaKey)switch(j.key.toLowerCase()){case"z":j.preventDefault(),j.shiftKey?A("redo"):A("undo");break;case"y":j.preventDefault(),A("redo");break}},O=[{value:"1",label:"2"},{value:"2",label:"4"},{value:"3",label:"6"},{value:"4",label:"8"},{value:"5",label:"10"},{value:"6",label:"12"},{value:"7",label:"14"}],I=["Arial","Times New Roman","Courier New","Georgia","Verdana","Helvetica","Serif Fonts","Algerian"];return jsxRuntimeExports.jsxs("div",{className:`rich-text-editor ${u}`,style:{width:n,height:i,...f},children:[jsxRuntimeExports.jsxs("div",{className:"toolbar",children:[jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("bold"),className:`toolbar-button ${E.bold?"active":""}`,title:"Bold",children:jsxRuntimeExports.jsx("strong",{children:"B"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("italic"),className:`toolbar-button ${E.italic?"active":""}`,title:"Italic",children:jsxRuntimeExports.jsx("em",{children:"I"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("underline"),className:`toolbar-button ${E.underline?"active":""}`,title:"Underline",children:jsxRuntimeExports.jsx("u",{children:"U"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("strikeThrough"),className:`toolbar-button ${E.strikeThrough?"active":""}`,title:"Strike Through",children:jsxRuntimeExports.jsx("s",{children:"S"})})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("subscript"),className:`toolbar-button ${E.subscript?"active":""}`,title:"Subscript",children:"X₂"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("superscript"),className:`toolbar-button ${E.superscript?"active":""}`,title:"Superscript",children:"X²"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyLeft"),className:`toolbar-button ${E.justifyLeft?"active":""}`,title:"Align Left",children:"⇤"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyCenter"),className:`toolbar-button ${E.justifyCenter?"active":""}`,title:"Center",children:"⇔"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyRight"),className:`toolbar-button ${E.justifyRight?"active":""}`,title:"Align Right",children:"⇥"})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("button",{onClick:()=>A("justifyFull"),className:`toolbar-button ${E.justifyFull?"active":""}`,title:"Justify",children:"≡"})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("insertUnorderedList"),className:"toolbar-button",title:"Bullet List",children:"●"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertOrderedList"),className:"toolbar-button",title:"Numbered List",children:"1. 2. 3."})]}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:m,onChange:j=>A("fontSize",j.target.value),className:"toolbar-select",title:"Font Size",children:O.map(j=>jsxRuntimeExports.jsx("option",{value:j.value,children:j.label},j.value))})}),jsxRuntimeExports.jsx("div",{className:"toolbar-group",children:jsxRuntimeExports.jsx("select",{value:_,onChange:j=>A("fontName",j.target.value),className:"toolbar-select",title:"Font Family",children:I.map(j=>jsxRuntimeExports.jsx("option",{value:j,children:j},j))})}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("createLink"),className:"toolbar-button",title:"Insert Link",children:"🔗"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("insertImage"),className:"toolbar-button",title:"Insert Image",children:"📷"})]}),jsxRuntimeExports.jsxs("div",{className:"toolbar-group",children:[jsxRuntimeExports.jsx("button",{onClick:()=>A("undo"),className:"toolbar-button",title:"Undo (Ctrl+Z)",children:"↩"}),jsxRuntimeExports.jsx("button",{onClick:()=>A("redo"),className:"toolbar-button",title:"Redo (Ctrl+Y)",children:"↪"})]})]}),jsxRuntimeExports.jsx("div",{ref:d,className:"editor-content",contentEditable:!0,style:{minHeight:o,maxHeight:l,height:i==="auto"?"auto":"100%",...p},onKeyDown:R,onKeyUp:C,onMouseUp:C,onInput:()=>{d.current&&(t==null||t(d.current.innerHTML)),C()}})]})},CETabView=({tabs:e,renderContent:t})=>{const[n,i]=React.useState(e[0]);return jsxRuntimeExports.jsxs("div",{className:"tabview-container",children:[jsxRuntimeExports.jsx("div",{className:"tabview-sidebar",children:e.map(o=>jsxRuntimeExports.jsx("div",{className:`tabview-tab ${n===o?"tabview-tab-active":""}`,onClick:()=>i(o),children:o},o))}),jsxRuntimeExports.jsx("div",{className:"tabview-content",children:t(n)})]})},CETemplate=({children:e,headerProps:t,showHeader:n=!0,showFooter:i=!0,containerClassName:o="",containerStyle:l={}})=>jsxRuntimeExports.jsxs("div",{className:`ce-wrapper ${o}`,style:l,children:[n&&jsxRuntimeExports.jsx(CEHeader,{...t}),jsxRuntimeExports.jsx("main",{className:"main-content",children:e}),i&&jsxRuntimeExports.jsx(CEFooter,{})]}),CETimePicker=({label:e="Select Time",onChange:t,initialTime:n="",className:i="",id:o,name:l})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(n),[m,g]=React.useState("12"),[_,S]=React.useState("00"),[E,b]=React.useState("AM"),[T,C]=React.useState(!1),[A,R]=React.useState(""),[O,I]=React.useState(""),j=React.useRef(null),M=Array.from({length:12},(W,L)=>String(L+1).padStart(2,"0")),N=Array.from({length:60},(W,L)=>String(L).padStart(2,"0")),D=(W,L)=>{if(!W)return"";const B=parseInt(W);return L==="hours"?B>12?"12":B===0?"01":W.padStart(2,"0"):B>59?"59":W.padStart(2,"0")},F=W=>{const L=W.target.value,B=W.target.selectionStart||0;let U=m,K=_,H=E,J=p;if(B<=2){const X=L.substring(0,2).replace(/[^0-9]/g,"");if(X){if(X.length===1){const Q=parseInt(X);Q>=2&&Q<=9?(U=X.padStart(2,"0"),setTimeout(()=>{j.current&&j.current.setSelectionRange(3,5)},10)):(U=X,setTimeout(()=>{j.current&&j.current.setSelectionRange(1,1)},10))}else if(X.length===2){const Q=parseInt(X);Q>=1&&Q<=12?(U=X,setTimeout(()=>{j.current&&j.current.setSelectionRange(3,5)},10)):(U=X[0],setTimeout(()=>{j.current&&j.current.setSelectionRange(1,1)},10))}J=`${U}:${_} ${E}`}}else if(B>=3&&B<=5){const X=L.indexOf(":")+1,Q=L.substring(X,X+2).replace(/[^0-9]/g,"");if(Q){if(Q.length===1)K=Q,J=`${m}:${K} ${E}`,setTimeout(()=>{j.current&&j.current.setSelectionRange(4,4)},10);else if(Q.length===2){const le=parseInt(Q);le>=0&&le<=59?(K=Q,setTimeout(()=>{j.current&&j.current.setSelectionRange(6,8)},10)):(K=Q[0],setTimeout(()=>{j.current&&j.current.setSelectionRange(4,4)},10))}J=`${m}:${K} ${E}`}}else if(B>=6){const Q=L.substring(L.lastIndexOf(" ")+1).toUpperCase();Q.startsWith("A")?(H="AM",J=`${m}:${_} AM`):Q.startsWith("P")&&(H="PM",J=`${m}:${_} PM`)}g(U),S(K),b(H),d(J),f(!1),t==null||t(J)},q=W=>{if(!["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","0","1","2","3","4","5","6","7","8","9",":","A","P","M"," ","a","p","m"].includes(W.key)){W.preventDefault();return}if(W.key==="Enter"||W.key===":"){W.preventDefault();const B=W.currentTarget.selectionStart||0;if(B<=2){if(A){const U=D(A,"hours");g(U),R(""),d(`${U}:${_} ${E}`)}W.currentTarget.setSelectionRange(3,5)}else if(B>=3&&B<=5){if(O){const U=D(O,"minutes");S(U),I(""),d(`${m}:${U} ${E}`)}W.currentTarget.setSelectionRange(6,8)}}},z=W=>{const L=W.currentTarget.selectionStart||0,B=j.current;B&&(L<=1?B.setSelectionRange(0,2):L>=3&&L<=4?B.setSelectionRange(3,5):L>=6&&B.setSelectionRange(6,8))},G=()=>{f(!0),C(!0)},ee=(W,L)=>{const B=W==="hours"?L:m,U=W==="minutes"?L:_,K=W==="period"?L:E;g(B),S(U),b(K);const H=`${B}:${U} ${K}`;d(H),t==null||t(H)},Y=()=>{const W=`${m}:${_} ${E}`;d(W),f(!1),t==null||t(W)},V=()=>{d(""),g("12"),S("00"),b("AM"),f(!1),C(!1)};return jsxRuntimeExports.jsxs("div",{className:`time-picker-container ${i}`,children:[jsxRuntimeExports.jsxs("div",{className:`time-picker-input ${u||T?"active":""}`,children:[jsxRuntimeExports.jsx("input",{ref:j,type:"text",id:o,name:l,value:p,onChange:F,onKeyDown:q,onClick:W=>{p||G(),z(W)},onFocus:()=>C(!0),onBlur:()=>!u&&C(!1),placeholder:T||p?"hh:mm AM":"",className:"time-input",maxLength:8}),jsxRuntimeExports.jsx("label",{className:`floating-label ${u||T||p?"active":""}`,children:e}),jsxRuntimeExports.jsx("span",{className:"clock-icon",onClick:W=>{W.stopPropagation(),G()},children:jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10"}),jsxRuntimeExports.jsx("path",{d:"M12 6v6l4 2"})]})})]}),jsxRuntimeExports.jsxs("div",{className:`time-picker-popup ${u?"open":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"time-picker-sections",children:[jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Hours"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:M.map(W=>jsxRuntimeExports.jsx("div",{className:`time-item ${W===m?"selected":""}`,onClick:()=>ee("hours",W),children:W},W))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Minutes"}),jsxRuntimeExports.jsx("div",{className:"time-list",children:N.map(W=>jsxRuntimeExports.jsx("div",{className:`time-item ${W===_?"selected":""}`,onClick:()=>ee("minutes",W),children:W},W))})]}),jsxRuntimeExports.jsxs("div",{className:"time-section period",children:[jsxRuntimeExports.jsx("div",{className:"section-label",children:"Period"}),jsxRuntimeExports.jsx("div",{className:"period-list",children:["AM","PM"].map(W=>jsxRuntimeExports.jsx("div",{className:`period-item ${W===E?"selected":""}`,onClick:()=>ee("period",W),children:W},W))})]})]}),jsxRuntimeExports.jsxs("div",{className:"time-picker-actions",children:[jsxRuntimeExports.jsx("button",{className:"time-picker-button cancel",onClick:V,children:"Cancel"}),jsxRuntimeExports.jsx("button",{className:"time-picker-button ok",onClick:Y,children:"OK"})]})]})]})},TransferItem=({label:e,checked:t,onChange:n,disabled:i})=>jsxRuntimeExports.jsx(CECheckBox,{label:e,checked:t,onChange:n,disabled:i}),CETransferButton=({label:e,onClick:t,disabled:n=!1,className:i=""})=>jsxRuntimeExports.jsx("button",{onClick:t,disabled:n,className:`transfer-button ${i}`,children:e}),TransferList=({dataUrl:e,onTransfer:t,containerClass:n="",boxClass:i="",buttonClass:o=""})=>{const[l,u]=React.useState([]),[f,p]=React.useState([]),[d,m]=React.useState(!0),[g,_]=React.useState(null),[S,E]=React.useState(new Set),[b,T]=React.useState(new Set);React.useEffect(()=>{(async()=>{var j,M;try{m(!0),_(null);const D=(await axios.get(e)).data.items||[];u(D.slice(0,Math.ceil(D.length/2))),p(D.slice(Math.ceil(D.length/2)))}catch(N){_(axios.isAxiosError(N)?((M=(j=N.response)==null?void 0:j.data)==null?void 0:M.message)||N.message:"An error occurred")}finally{m(!1)}})()},[]);const C=I=>{if(I==="available"){const j=l.filter(N=>S.has(N.id)).sort((N,D)=>{const F=parseInt(N.id.replace(/\D/g,"")),q=parseInt(D.id.replace(/\D/g,""));return F-q}),M=l.filter(N=>!S.has(N.id));u(M),p(N=>[...N,...j].sort((F,q)=>{const z=parseInt(F.id.replace(/\D/g,"")),G=parseInt(q.id.replace(/\D/g,""));return z-G})),E(new Set)}else{const j=f.filter(N=>b.has(N.id)).sort((N,D)=>{const F=parseInt(N.id.replace(/\D/g,"")),q=parseInt(D.id.replace(/\D/g,""));return F-q}),M=f.filter(N=>!b.has(N.id));p(M),u(N=>[...N,...j].sort((F,q)=>{const z=parseInt(F.id.replace(/\D/g,"")),G=parseInt(q.id.replace(/\D/g,""));return z-G})),T(new Set)}t(f,l)},A=(I,j,M)=>{M(N=>{const D=new Set(N);return D.has(I)?D.delete(I):D.add(I),D})},R=(I,j,M)=>N=>{const D=new Set(j),F=I.filter(q=>!q.disabled);N?F.forEach(q=>D.add(q.id)):F.forEach(q=>D.delete(q.id)),M(D)},O=(I,j,M,N)=>{const D=I.filter(ee=>!ee.disabled),F=D.length>0&&D.every(ee=>j.has(ee.id)),q=j.size,z=I.length,G=I.length===0;return jsxRuntimeExports.jsxs("div",{className:`transfer-box ${i}`,children:[jsxRuntimeExports.jsx("div",{className:"transfer-box-header",children:jsxRuntimeExports.jsxs("div",{className:"header-content",children:[jsxRuntimeExports.jsx("div",{className:"checkbox-wrapper",children:jsxRuntimeExports.jsx(CECheckBox,{label:"",checked:F,onChange:R(I,j,M),disabled:G})}),jsxRuntimeExports.jsxs("div",{className:"title-section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:N}),jsxRuntimeExports.jsxs("div",{className:"count-text",children:[q,"/",z," selected"]})]})]})}),jsxRuntimeExports.jsx("div",{className:"transfer-items",children:I.map(ee=>jsxRuntimeExports.jsx(TransferItem,{label:ee.label,checked:j.has(ee.id),disabled:ee.disabled,onChange:()=>A(ee.id,j,M)},ee.id))})]})};return d?jsxRuntimeExports.jsx("div",{children:"Loading..."}):g?jsxRuntimeExports.jsxs("div",{children:["Error: ",g]}):jsxRuntimeExports.jsxs("div",{className:`transfer-list-container ${n}`,children:[O(l,S,E,"Choices"),jsxRuntimeExports.jsxs("div",{className:"transfer-buttons",children:[jsxRuntimeExports.jsx(CETransferButton,{label:">>",onClick:()=>C("available"),disabled:S.size===0,className:o}),jsxRuntimeExports.jsx(CETransferButton,{label:"<<",onClick:()=>C("chosen"),disabled:b.size===0,className:o})]}),O(f,b,T,"Chosen")]})},CEBadge=({label:e,backgroundColor:t="#e0e0e0",textColor:n="#000",style:i,id:o,name:l,disable:u=!1})=>jsxRuntimeExports.jsx("span",{id:o,"data-name":l,"aria-disabled":u,style:{backgroundColor:t,color:n,padding:"4px 10px",borderRadius:"12px",fontSize:"12px",display:"inline-block",whiteSpace:"nowrap",...u?{opacity:.6,pointerEvents:"none"}:{},...i},children:e}),chatIcon="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20%202.5H4C2.9%202.5%202.01%203.4%202.01%204.5L2%2022.5L6%2018.5H20C21.1%2018.5%2022%2017.6%2022%2016.5V4.5C22%203.4%2021.1%202.5%2020%202.5ZM7%209.5H17C17.55%209.5%2018%209.95%2018%2010.5C18%2011.05%2017.55%2011.5%2017%2011.5H7C6.45%2011.5%206%2011.05%206%2010.5C6%209.95%206.45%209.5%207%209.5ZM13%2014.5H7C6.45%2014.5%206%2014.05%206%2013.5C6%2012.95%206.45%2012.5%207%2012.5H13C13.55%2012.5%2014%2012.95%2014%2013.5C14%2014.05%2013.55%2014.5%2013%2014.5ZM17%208.5H7C6.45%208.5%206%208.05%206%207.5C6%206.95%206.45%206.5%207%206.5H17C17.55%206.5%2018%206.95%2018%207.5C18%208.05%2017.55%208.5%2017%208.5Z'%20fill='black'%20fill-opacity='0.54'/%3e%3c/svg%3e",CEChatbox=({notes:e,onAddNote:t,buttonLabel:n,buttonIcon:i})=>{const[o,l]=React.useState(""),u=()=>{t(o),l("")},f=p=>{p.key==="Enter"&&u()};return jsxRuntimeExports.jsxs("div",{className:"notes-container",children:[jsxRuntimeExports.jsxs("div",{className:"notes-header",children:[jsxRuntimeExports.jsx("img",{src:chatIcon,alt:"Chat Icon",className:"notes-icon"}),jsxRuntimeExports.jsx("span",{className:"notes-title",children:"Notes"})]}),jsxRuntimeExports.jsxs("div",{className:"add-note-section",children:[jsxRuntimeExports.jsx("textarea",{value:o,onChange:p=>l(p.target.value),onKeyPress:f,placeholder:"Add a note...",className:"add-note-input",rows:3}),jsxRuntimeExports.jsx(CEButton,{label:n,icon:i,variant:"outlinedGreen",onClick:u,sx:{width:"100%",marginTop:"10px"},children:void 0})]}),jsxRuntimeExports.jsx("div",{className:"notes-list",children:e.map(p=>jsxRuntimeExports.jsxs("div",{className:"note-item",children:[jsxRuntimeExports.jsx("div",{className:"note-avatar",children:p.initials}),jsxRuntimeExports.jsxs("div",{className:"note-content",children:[jsxRuntimeExports.jsxs("div",{className:"note-header",children:[jsxRuntimeExports.jsx("span",{className:"note-author",children:p.author}),jsxRuntimeExports.jsx("span",{className:"note-timestamp",children:p.timestamp})]}),jsxRuntimeExports.jsx("div",{className:"note-text",children:p.content})]})]},p.id))})]})},CEStatusDropdown=({options:e,selected:t,onChange:n,placeholder:i="Select status...",size:o="medium",disabled:l=!1,ariaLabel:u="Status selection dropdown"})=>{const[f,p]=React.useState(!1),d=React.useRef(null),m=e.find(b=>b.value===t),g=b=>{n(b),p(!1)};React.useEffect(()=>{const b=T=>{var C;(C=d.current)!=null&&C.contains(T.target)||p(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[]);const _=b=>{l||(b.key==="Enter"||b.key===" "?(b.preventDefault(),p(!f)):b.key==="Escape"&&p(!1))},S=b=>{if(b!=null&&b.statusType)switch(b.statusType){case"in-progress":return"in-progress";case"declined":return"declined";case"withdrawn":return"withdrawn";default:return""}return""},E=()=>{if(m){const b={};return m.backgroundColor&&(b.backgroundColor=m.backgroundColor),m.textColor&&(b.color=m.textColor),b}return{}};return jsxRuntimeExports.jsxs("div",{className:`status-dropdown-container ${l?"disabled":""} size-${o}`,ref:d,children:[jsxRuntimeExports.jsxs("div",{className:`status-dropdown-trigger ${f?"open":""} ${m?`has-selection ${S(m)}`:""}`,onClick:()=>!l&&g((m==null?void 0:m.value)||""),onKeyDown:_,tabIndex:l?-1:0,role:"button","aria-haspopup":"listbox","aria-expanded":f?"true":"false","aria-label":u,style:E(),children:[jsxRuntimeExports.jsx("span",{className:"status-text",children:m?m.label:i}),jsxRuntimeExports.jsx("span",{className:"status-dropdown-icon",onClick:b=>{b.stopPropagation(),!l&&p(!f)},children:jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`dropdown-arrow ${f?"rotate":""}`,children:jsxRuntimeExports.jsx("path",{d:"M8.12021 9.79006L12.0002 13.6701L15.8802 9.79006C16.2702 9.40006 16.9002 9.40006 17.2902 9.79006C17.6802 10.1801 17.6802 10.8101 17.2902 11.2001L12.7002 15.7901C12.3102 16.1801 11.6802 16.1801 11.2902 15.7901L6.70021 11.2001C6.31021 10.8101 6.31021 10.1801 6.70021 9.79006C7.09021 9.41006 7.73021 9.40006 8.12021 9.79006Z",fill:"currentColor",fillOpacity:"0.7"})})})]}),f&&!l&&jsxRuntimeExports.jsx("ul",{className:"status-dropdown-options",role:"listbox","aria-label":"Status options",children:e.map(b=>{const T={};return b.backgroundColor&&(T.backgroundColor=b.backgroundColor),b.textColor&&(T.color=b.textColor),jsxRuntimeExports.jsxs("li",{className:`status-dropdown-option ${t===b.value?"selected":""} ${S(b)}`,onClick:()=>g(b.value),role:"option","aria-selected":t===b.value?"true":"false",style:T,children:[jsxRuntimeExports.jsx("span",{className:"option-indicator",children:b.icon?b.icon:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[b.statusType==="declined"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ff4757"}),jsxRuntimeExports.jsx("path",{d:"M15 9l-6 6m0-6l6 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),b.statusType==="withdrawn"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#ffa502"}),jsxRuntimeExports.jsx("path",{d:"M12 8v4M12 16h.01",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]}),b.statusType==="in-progress"&&jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"#5f27cd"}),jsxRuntimeExports.jsx("path",{d:"M8 12l2 2 4-4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})]})}),b.label]},b.value)})})]})},CEToggleYesNo=({value:e,onChange:t,label:n})=>jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("div",{className:"label",children:n}),jsxRuntimeExports.jsxs("div",{className:"toggle-group",children:[jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="yes"?"primary":"outlined",className:`toggle-btn ${e==="yes"?"active":""}`,onClick:()=>t("yes"),children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"YES"]}),jsxRuntimeExports.jsxs(CEButton,{size:"small",variant:e==="no"?"primary":"outlined",className:`toggle-btn ${e==="no"?"active":""}`,onClick:()=>t("no"),children:[jsxRuntimeExports.jsx("span",{className:"circle"}),"NO"]})]})]}),days=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],CEOperatingDaysSelector=({selectedDays:e,onChange:t})=>{const n=i=>{e.includes(i)?t(e.filter(o=>o!==i)):t([...e,i])};return jsxRuntimeExports.jsx("div",{className:"days-group",children:days.map(i=>jsxRuntimeExports.jsx(CEButton,{size:"small",variant:e.includes(i)?"primary":"outlined",className:`day-btn ${e.includes(i)?"active":""}`,onClick:()=>n(i),children:i},i))})},CERoundTabNav=({tabs:e,activeTab:t,onTabClick:n,tabBarBgColor:i,tabBarItemBgColor:o})=>jsxRuntimeExports.jsx("div",{className:"om-om-radiusTab-bar-nwo",style:{backgroundColor:i||"#6fb744"},children:e.map(l=>jsxRuntimeExports.jsx("div",{className:`om-radiusTab-item-nwo ${l.value===t?"active":""}`,onClick:u=>n(l.value,u),style:{backgroundColor:l.value===t?o||"#ebebf0":""},children:l.label},l.value))}),CEAccordion=({children:e})=>jsxRuntimeExports.jsx("div",{className:"accordion-container",children:e}),CEAccordionItem=({title:e,children:t,initiallyOpen:n=!1})=>{const[i,o]=React.useState(n);return jsxRuntimeExports.jsxs("div",{className:"accordion-item",children:[jsxRuntimeExports.jsxs("button",{className:`accordion-header ${i?"open":""}`,onClick:()=>o(!i),children:[jsxRuntimeExports.jsx("span",{className:"accordion-title",children:e}),jsxRuntimeExports.jsx("span",{className:`accordion-icon ${i?"open":""}`,children:jsxRuntimeExports.jsxs("svg",{width:"21",height:"12",viewBox:"0 0 21 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("g",{clipPath:"url(#clip0_20728_2951)",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 1.89L19.094 0.5L10.487 8.761L9.569 7.88L9.574 7.885L1.927 0.545L0.5 1.914L10.487 11.5L20.5 1.89Z",fill:"black"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"clip0_20728_2951",children:jsxRuntimeExports.jsx("rect",{width:"11",height:"20",fill:"white",transform:"matrix(0 -1 1 0 0.5 11.5)"})})})]})})]}),i&&jsxRuntimeExports.jsx("div",{className:"accordion-content",children:t})]})},CEToggleSlide=({checked:e,onToggle:t,label:n})=>{const i=()=>{t(!e)};return jsxRuntimeExports.jsxs("div",{className:"toggle-container",children:[n&&jsxRuntimeExports.jsx("span",{className:"toggle-label",children:n}),jsxRuntimeExports.jsxs("label",{className:"toggle-switch",children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:e,onChange:i,className:"toggle-checkbox"}),jsxRuntimeExports.jsx("span",{className:"toggle-slider"})]})]})};var DefaultContext={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},IconContext=React.createContext&&React.createContext(DefaultContext),_excluded$m=["attr","size","title"];function _objectWithoutProperties$m(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose$m(e,t),i,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)i=l[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _objectWithoutPropertiesLoose$m(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function _extends$y(){return _extends$y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$y.apply(this,arguments)}function ownKeys$F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$F(Object(n),!0).forEach(function(i){_defineProperty$M(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$F(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$M(e,t,n){return t=_toPropertyKey$M(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$M(e){var t=_toPrimitive$M(e,"string");return typeof t=="symbol"?t:t+""}function _toPrimitive$M(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tree2Element(e){return e&&e.map((t,n)=>React.createElement(t.tag,_objectSpread$F({key:n},t.attr),Tree2Element(t.child)))}function GenIcon(e){return t=>React.createElement(IconBase,_extends$y({attr:_objectSpread$F({},e.attr)},t),Tree2Element(e.child))}function IconBase(e){var t=n=>{var{attr:i,size:o,title:l}=e,u=_objectWithoutProperties$m(e,_excluded$m),f=o||n.size||"1em",p;return n.className&&(p=n.className),e.className&&(p=(p?p+" ":"")+e.className),React.createElement("svg",_extends$y({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,u,{className:p,style:_objectSpread$F(_objectSpread$F({color:e.color||n.color},n.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),l&&React.createElement("title",null,l),e.children)};return IconContext!==void 0?React.createElement(IconContext.Consumer,null,n=>t(n)):t(DefaultContext)}function FaSearch(e){return GenIcon({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function MdKeyboardArrowDown(e){return GenIcon({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(e)}const CEAdvancedMultiSelectDropdown=({options:e,onSelectItem:t,onChange:n,placeholder:i="Search customers...",allowSearch:o=!0,width:l="100%",inputHeight:u="3rem",dropdownMaxHeight:f="20rem",id:p,name:d})=>{const[m,g]=React.useState(!1),[_,S]=React.useState(""),[E,b]=React.useState([]),T=React.useRef(null);React.useEffect(()=>{n&&n(E)},[E,n]);const C=e.filter(A=>{var R;return A.label.toLowerCase().includes(_.toLowerCase())||((R=A.subtitle)==null?void 0:R.toLowerCase().includes(_.toLowerCase()))});return React.useEffect(()=>{const A=R=>{var O;(O=T.current)!=null&&O.contains(R.target)||g(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]),jsxRuntimeExports.jsxs("div",{className:"dropdown-container",ref:T,style:{width:l},children:[jsxRuntimeExports.jsxs("div",{className:`dropdown-input ${m?"open":""}`,style:{minHeight:u},children:[jsxRuntimeExports.jsx(FaSearch,{className:"search-icon"}),jsxRuntimeExports.jsxs("div",{className:"selected-chips",onClick:()=>g(!0),children:[E.length===0&&jsxRuntimeExports.jsx("input",{type:"text",className:"search-input",id:p,name:d,placeholder:i,value:_,onChange:A=>{S(A.target.value),m||g(!0)},onClick:A=>{A.stopPropagation(),g(!0)},style:{height:u}}),E.map(A=>jsxRuntimeExports.jsxs("div",{className:"selected-item-inline",children:[jsxRuntimeExports.jsx("span",{className:"selected-item-label",children:A.label}),jsxRuntimeExports.jsx("button",{type:"button",className:"selected-item-remove",onClick:R=>{R.stopPropagation(),b(O=>O.filter(I=>I.value!==A.value))},"aria-label":`Remove ${A.label}`,children:"×"})]},A.value))]}),jsxRuntimeExports.jsx(MdKeyboardArrowDown,{className:`dropdown-arrow ${m?"rotated":""}`,onClick:A=>{A.stopPropagation(),g(R=>!R)}})]}),m&&jsxRuntimeExports.jsx("div",{className:"dropdown-options",style:{maxHeight:f},children:jsxRuntimeExports.jsx("ul",{className:"dropdown-list",children:C.length>0?C.map(A=>{const R=E.some(O=>O.value===A.value);return jsxRuntimeExports.jsxs("li",{className:`dropdown-option ${R?"selected":""}`,onClick:O=>{O.stopPropagation(),b(I=>{const j=I.some(N=>N.value===A.value);let M;return j?M=I.filter(N=>N.value!==A.value):M=[...I,A],M}),S(""),t(A),g(!1)},children:[jsxRuntimeExports.jsxs("div",{className:"option-content",children:[jsxRuntimeExports.jsx("div",{className:"option-line-1",children:A.label}),A.subtitle&&jsxRuntimeExports.jsx("div",{className:"option-line-2",children:A.subtitle})]}),A.icon&&jsxRuntimeExports.jsx("div",{className:"option-icon",children:A.icon})]},A.value)}):jsxRuntimeExports.jsx("li",{className:"dropdown-option no-results",children:"No results found"})})})]})},AutoCompleteInput=({label:e,options:t,value:n,onChange:i,multiple:o=!0,showCheckboxes:l=!0})=>{const[u,f]=React.useState(!1),[p,d]=React.useState(!1),[m,g]=React.useState(""),_=React.useRef(null),S=React.useRef(null),E=t.filter(C=>C.toLowerCase().includes(m.toLowerCase())),b=C=>{if(o){const A=n.includes(C);i(A?n.filter(R=>R!==C):[...n,C]),g("")}else i([C]),g(C),f(!1)},T=C=>{S.current&&!S.current.contains(C.target)&&(f(!1),d(!1))};return React.useEffect(()=>(document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)),[]),jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:S,children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper ${p||u?"focused":""} ${n.length>0?"has-value":""}`,children:[jsxRuntimeExports.jsx("label",{className:"autocomplete-label",children:e}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[o&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:n.map(C=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[C,jsxRuntimeExports.jsx("button",{onClick:A=>{A.stopPropagation(),i(n.filter(R=>R!==C))},children:"×"})]},C))}),jsxRuntimeExports.jsx("input",{ref:_,type:"text",className:"autocomplete-input",value:m,onChange:C=>g(C.target.value),onFocus:()=>{d(!0),f(!0)}}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onClick:()=>f(C=>!C),children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5H7z",fill:"gray"})})})]})]}),u&&jsxRuntimeExports.jsxs("ul",{className:"autocomplete-list",children:[o&&l&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{const C=n.length===t.length;i(C?[]:[...t])}}),"Select All"]})}),E.map(C=>jsxRuntimeExports.jsx("li",{onClick:()=>b(C),children:o&&l?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(C),onChange:()=>b(C),onClick:A=>A.stopPropagation()}),C]}):C},C))]})]})},CEAutoCompleteSelect=({label:e,options:t,value:n,onChange:i,multiple:o=!1,showCheckboxes:l=!1,id:u})=>{const[f,p]=React.useState(!1),[d,m]=React.useState(!1),[g,_]=React.useState(""),S=React.useRef(null),E=React.useRef(null),b=t.filter(O=>{var I;return(I=O.label)==null?void 0:I.toLowerCase().includes(g==null?void 0:g.toLowerCase())});React.useEffect(()=>{if(o)o&&_("");else{const O=A(n[0]);_(O||"")}},[n,o,t]);const T=O=>{if(o){const I=n.includes(O.value);i(I?n.filter(j=>j!==O.value):[...n,O.value]),_("")}else i([O.value]),_(O.label),p(!1)},C=O=>{E.current&&!E.current.contains(O.target)&&(p(!1),m(!1))};React.useEffect(()=>(document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)),[]);const A=O=>{var I;return((I=t.find(j=>j.value===O))==null?void 0:I.label)||O},R=O=>{O.stopPropagation(),_(""),i([])};return jsxRuntimeExports.jsxs("div",{className:"autocomplete-container",ref:E,id:u,"data-testid":u?`ce-autocomplete-${u}`:"ce-autocomplete",children:[jsxRuntimeExports.jsxs("div",{className:`autocomplete-wrapper ${d||f?"focused":""} ${n.length>0?"has-value":""}`,onClick:()=>p(!0),children:[jsxRuntimeExports.jsx("label",{className:"autocomplete-label",children:e}),jsxRuntimeExports.jsxs("div",{className:"input-area",children:[o&&n.length>0&&jsxRuntimeExports.jsx("div",{className:"selected-values",children:n.map(O=>jsxRuntimeExports.jsxs("span",{className:"selected-tag",children:[A(O),jsxRuntimeExports.jsx("button",{onClick:I=>{I.stopPropagation(),i(n.filter(j=>j!==O))},children:"×"})]},O))}),jsxRuntimeExports.jsx("input",{ref:S,type:"text",className:"autocomplete-input",value:g,onChange:O=>_(O.target.value),onFocus:()=>{m(!0),p(!0)}}),n.length>0&&jsxRuntimeExports.jsx("span",{className:"clear-icon",onClick:R,title:"Clear",children:"×"}),jsxRuntimeExports.jsx("span",{className:"dropdown-toggle-icon",onClick:O=>{O.stopPropagation(),p(I=>!I)},children:jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",children:jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5H7z",fill:"gray"})})})]})]}),f&&jsxRuntimeExports.jsxs("ul",{className:"autocomplete-list",children:[o&&l&&jsxRuntimeExports.jsx("li",{className:"select-all-option",children:jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.length===t.length,onChange:()=>{const O=n.length===t.length;i(O?[]:t.map(I=>I.value))}}),"Select All"]})}),b.map(O=>jsxRuntimeExports.jsx("li",{onClick:()=>T(O),children:o&&l?jsxRuntimeExports.jsxs("label",{children:[jsxRuntimeExports.jsx("input",{type:"checkbox",checked:n.includes(O.value),onChange:()=>T(O),onClick:I=>I.stopPropagation()}),O.label]}):O.label},O.value))]})]})};var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return _root=n,_root}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,n=t.hasOwnProperty,i=t.toString,o=e?e.toStringTag:void 0;function l(u){var f=n.call(u,o),p=u[o];try{u[o]=void 0;var d=!0}catch{}var m=i.call(u);return d&&(f?u[o]=p:delete u[o]),m}return _getRawTag=l,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function n(i){return t.call(i)}return _objectToString=n,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),n=require_objectToString(),i="[object Null]",o="[object Undefined]",l=e?e.toStringTag:void 0;function u(f){return f==null?f===void 0?o:i:l&&l in Object(f)?t(f):n(f)}return _baseGetTag=u,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),n="[object Symbol]";function i(o){return typeof o=="symbol"||t(o)&&e(o)==n}return isSymbol_1=i,isSymbol_1}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(l,u){if(e(l))return!1;var f=typeof l;return f=="number"||f=="symbol"||f=="boolean"||l==null||t(l)?!0:i.test(l)||!n.test(l)||u!=null&&l in Object(u)}return _isKey=o,_isKey}var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return isObject_1=e,isObject_1}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),n="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",l="[object Proxy]";function u(f){if(!t(f))return!1;var p=e(f);return p==i||p==o||p==n||p==l}return isFunction_1=u,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function n(i){return!!t&&t in i}return _isMasked=n,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function n(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return _toSource=n,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),n=requireIsObject(),i=require_toSource(),o=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,u=Function.prototype,f=Object.prototype,p=u.toString,d=f.hasOwnProperty,m=RegExp("^"+p.call(d).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(_){if(!n(_)||t(_))return!1;var S=e(_)?m:l;return S.test(i(_))}return _baseIsNative=g,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,n){return t==null?void 0:t[n]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function n(i,o){var l=t(i,o);return e(l)?l:void 0}return _getNative=n,_getNative}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",n=Object.prototype,i=n.hasOwnProperty;function o(l){var u=this.__data__;if(e){var f=u[l];return f===t?void 0:f}return i.call(u,l)?u[l]:void 0}return _hashGet=o,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,n=t.hasOwnProperty;function i(o){var l=this.__data__;return e?l[o]!==void 0:n.call(l,o)}return _hashHas=i,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function n(i,o){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=e&&o===void 0?t:o,this}return _hashSet=n,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),n=require_hashGet(),i=require_hashHas(),o=require_hashSet();function l(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var d=u[f];this.set(d[0],d[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_Hash=l,_Hash}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,n){return t===n||t!==t&&n!==n}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(n,i){for(var o=n.length;o--;)if(e(n[o][0],i))return o;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,n=t.splice;function i(o){var l=this.__data__,u=e(l,o);if(u<0)return!1;var f=l.length-1;return u==f?l.pop():n.call(l,u,1),--this.size,!0}return _listCacheDelete=i,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(n){var i=this.__data__,o=e(i,n);return o<0?void 0:i[o][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(n){return e(this.__data__,n)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(n,i){var o=this.__data__,l=e(o,n);return l<0?(++this.size,o.push([n,i])):o[l][1]=i,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),n=require_listCacheGet(),i=require_listCacheHas(),o=require_listCacheSet();function l(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var d=u[f];this.set(d[0],d[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_ListCache=l,_ListCache}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),n=e(t,"Map");return _Map=n,_Map}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),n=require_Map();function i(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return _mapCacheClear=i,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(n,i){var o=n.__data__;return e(i)?o[typeof i=="string"?"string":"hash"]:o.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(n){var i=e(this,n).delete(n);return this.size-=i?1:0,i}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(n){return e(this,n).get(n)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(n){return e(this,n).has(n)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(n,i){var o=e(this,n),l=o.size;return o.set(n,i),this.size+=o.size==l?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),n=require_mapCacheGet(),i=require_mapCacheHas(),o=require_mapCacheSet();function l(u){var f=-1,p=u==null?0:u.length;for(this.clear();++f<p;){var d=u[f];this.set(d[0],d[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=n,l.prototype.has=i,l.prototype.set=o,_MapCache=l,_MapCache}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function n(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var l=function(){var u=arguments,f=o?o.apply(this,u):u[0],p=l.cache;if(p.has(f))return p.get(f);var d=i.apply(this,u);return l.cache=p.set(f,d)||p,d};return l.cache=new(n.Cache||e),l}return n.Cache=e,memoize_1=n,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function n(i){var o=e(i,function(u){return l.size===t&&l.clear(),u}),l=o.cache;return o}return _memoizeCapped=n,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,i=e(function(o){var l=[];return o.charCodeAt(0)===46&&l.push(""),o.replace(t,function(u,f,p,d){l.push(p?d.replace(n,"$1"):f||u)}),l});return _stringToPath=i,_stringToPath}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,l=Array(o);++i<o;)l[i]=n(t[i],i,t);return l}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),n=requireIsArray(),i=requireIsSymbol(),o=e?e.prototype:void 0,l=o?o.toString:void 0;function u(f){if(typeof f=="string")return f;if(n(f))return t(f,u)+"";if(i(f))return l?l.call(f):"";var p=f+"";return p=="0"&&1/f==-1/0?"-0":p}return _baseToString=u,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(n){return n==null?"":e(n)}return toString_1=t,toString_1}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),n=require_stringToPath(),i=requireToString();function o(l,u){return e(l)?l:t(l,u)?[l]:n(i(l))}return _castPath=o,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(n){if(typeof n=="string"||e(n))return n;var i=n+"";return i=="0"&&1/n==-1/0?"-0":i}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function n(i,o){o=e(o,i);for(var l=0,u=o.length;i!=null&&l<u;)i=i[t(o[l++])];return l&&l==u?i:void 0}return _baseGet=n,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(n,i,o){var l=n==null?void 0:e(n,i);return l===void 0?o:l}return get_1=t,get_1}var getExports=requireGet();const get=getDefaultExportFromCjs(getExports);var isNil_1,hasRequiredIsNil;function requireIsNil(){if(hasRequiredIsNil)return isNil_1;hasRequiredIsNil=1;function e(t){return t==null}return isNil_1=e,isNil_1}var isNilExports=requireIsNil();const isNil=getDefaultExportFromCjs(isNilExports);var isString_1,hasRequiredIsString;function requireIsString(){if(hasRequiredIsString)return isString_1;hasRequiredIsString=1;var e=require_baseGetTag(),t=requireIsArray(),n=requireIsObjectLike(),i="[object String]";function o(l){return typeof l=="string"||!t(l)&&n(l)&&e(l)==i}return isString_1=o,isString_1}var isStringExports=requireIsString();const isString=getDefaultExportFromCjs(isStringExports);var isFunctionExports=requireIsFunction();const isFunction=getDefaultExportFromCjs(isFunctionExports);var isObjectExports=requireIsObject();const isObject=getDefaultExportFromCjs(isObjectExports);var reactIs={exports:{}},reactIs_production_min={};/**
342
342
  * @license React
343
343
  * react-is.production.min.js
344
344
  *
@@ -418,4 +418,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
418
418
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$2(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray$2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$2(e,t)}}function _iterableToArray$2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _arrayWithoutHoles$2(e){if(Array.isArray(e))return _arrayLikeToArray$2(e)}function _arrayLikeToArray$2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _classCallCheck$7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$8(i.key),i)}}function _createClass$7(e,t,n){return t&&_defineProperties$7(e.prototype,t),n&&_defineProperties$7(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper$6(e,t,n){return t=_getPrototypeOf$6(t),_possibleConstructorReturn$6(e,_isNativeReflectConstruct$6()?Reflect.construct(t,n||[],_getPrototypeOf$6(e).constructor):t.apply(e,n))}function _possibleConstructorReturn$6(e,t){if(t&&(_typeof$8(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$6(e)}function _assertThisInitialized$6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$6=function(){return!!e})()}function _getPrototypeOf$6(e){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf$6(e)}function _inherits$6(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$6(e,t)}function _setPrototypeOf$6(e,t){return _setPrototypeOf$6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},_setPrototypeOf$6(e,t)}function _defineProperty$8(e,t,n){return t=_toPropertyKey$8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$8(e){var t=_toPrimitive$8(e,"string");return _typeof$8(t)=="symbol"?t:t+""}function _toPrimitive$8(e,t){if(_typeof$8(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$8(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Line=function(e){function t(){var n;_classCallCheck$7(this,t);for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n=_callSuper$6(this,t,[].concat(o)),_defineProperty$8(n,"state",{isAnimationFinished:!0,totalLength:0}),_defineProperty$8(n,"generateSimpleStrokeDasharray",function(u,f){return"".concat(f,"px ").concat(u-f,"px")}),_defineProperty$8(n,"getStrokeDasharray",function(u,f,p){var d=p.reduce(function(C,A){return C+A});if(!d)return n.generateSimpleStrokeDasharray(f,u);for(var m=Math.floor(u/d),g=u%d,_=f-u,S=[],E=0,b=0;E<p.length;b+=p[E],++E)if(b+p[E]>g){S=[].concat(_toConsumableArray$2(p.slice(0,E)),[g-b]);break}var T=S.length%2===0?[0,_]:[_];return[].concat(_toConsumableArray$2(t.repeat(p,m)),_toConsumableArray$2(S),T).map(function(C){return"".concat(C,"px")}).join(", ")}),_defineProperty$8(n,"id",uniqueId("recharts-line-")),_defineProperty$8(n,"pathRef",function(u){n.mainCurve=u}),_defineProperty$8(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),_defineProperty$8(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return _inherits$6(t,e),_createClass$7(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var l=this.props,u=l.points,f=l.xAxis,p=l.yAxis,d=l.layout,m=l.children,g=findAllByType(m,ErrorBar);if(!g)return null;var _=function(b,T){return{x:b.x,y:b.y,value:b.value,errorVal:getValueByDataKey(b.payload,T)}},S={clipPath:i?"url(#clipPath-".concat(o,")"):null};return React.createElement(Layer,S,g.map(function(E){return React.cloneElement(E,{key:"bar-".concat(E.props.dataKey),data:u,xAxis:f,yAxis:p,layout:d,dataPointFormatter:_})}))}},{key:"renderDots",value:function(i,o,l){var u=this.props.isAnimationActive;if(u&&!this.state.isAnimationFinished)return null;var f=this.props,p=f.dot,d=f.points,m=f.dataKey,g=filterProps(this.props,!1),_=filterProps(p,!0),S=d.map(function(b,T){var C=_objectSpread$4(_objectSpread$4(_objectSpread$4({key:"dot-".concat(T),r:3},g),_),{},{value:b.value,dataKey:m,cx:b.x,cy:b.y,index:T,payload:b.payload});return t.renderDotItem(p,C)}),E={clipPath:i?"url(#clipPath-".concat(o?"":"dots-").concat(l,")"):null};return React.createElement(Layer,_extends$6({className:"recharts-line-dots",key:"dots"},E),S)}},{key:"renderCurveStatically",value:function(i,o,l,u){var f=this.props,p=f.type,d=f.layout,m=f.connectNulls;f.ref;var g=_objectWithoutProperties$3(f,_excluded$3),_=_objectSpread$4(_objectSpread$4(_objectSpread$4({},filterProps(g,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(l,")"):null,points:i},u),{},{type:p,layout:d,connectNulls:m});return React.createElement(Curve,_extends$6({},_,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,o){var l=this,u=this.props,f=u.points,p=u.strokeDasharray,d=u.isAnimationActive,m=u.animationBegin,g=u.animationDuration,_=u.animationEasing,S=u.animationId,E=u.animateNewValues,b=u.width,T=u.height,C=this.state,A=C.prevPoints,R=C.totalLength;return React.createElement(Animate,{begin:m,duration:g,isActive:d,easing:_,from:{t:0},to:{t:1},key:"line-".concat(S),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var I=O.t;if(A){var j=A.length/f.length,M=f.map(function(z,G){var ee=Math.floor(G*j);if(A[ee]){var Y=A[ee],V=interpolateNumber$2(Y.x,z.x),W=interpolateNumber$2(Y.y,z.y);return _objectSpread$4(_objectSpread$4({},z),{},{x:V(I),y:W(I)})}if(E){var L=interpolateNumber$2(b*2,z.x),B=interpolateNumber$2(T/2,z.y);return _objectSpread$4(_objectSpread$4({},z),{},{x:L(I),y:B(I)})}return _objectSpread$4(_objectSpread$4({},z),{},{x:z.x,y:z.y})});return l.renderCurveStatically(M,i,o)}var N=interpolateNumber$2(0,R),D=N(I),F;if(p){var q="".concat(p).split(/[,\s]+/gim).map(function(z){return parseFloat(z)});F=l.getStrokeDasharray(D,R,q)}else F=l.generateSimpleStrokeDasharray(R,D);return l.renderCurveStatically(f,i,o,{strokeDasharray:F})})}},{key:"renderCurve",value:function(i,o){var l=this.props,u=l.points,f=l.isAnimationActive,p=this.state,d=p.prevPoints,m=p.totalLength;return f&&u&&u.length&&(!d&&m>0||!isEqual(d,u))?this.renderCurveWithAnimation(i,o):this.renderCurveStatically(u,i,o)}},{key:"render",value:function(){var i,o=this.props,l=o.hide,u=o.dot,f=o.points,p=o.className,d=o.xAxis,m=o.yAxis,g=o.top,_=o.left,S=o.width,E=o.height,b=o.isAnimationActive,T=o.id;if(l||!f||!f.length)return null;var C=this.state.isAnimationFinished,A=f.length===1,R=clsx("recharts-line",p),O=d&&d.allowDataOverflow,I=m&&m.allowDataOverflow,j=O||I,M=isNil(T)?this.id:T,N=(i=filterProps(u,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},D=N.r,F=D===void 0?3:D,q=N.strokeWidth,z=q===void 0?2:q,G=hasClipDot(u)?u:{},ee=G.clipDot,Y=ee===void 0?!0:ee,V=F*2+z;return React.createElement(Layer,{className:R},O||I?React.createElement("defs",null,React.createElement("clipPath",{id:"clipPath-".concat(M)},React.createElement("rect",{x:O?_:_-S/2,y:I?g:g-E/2,width:O?S:S*2,height:I?E:E*2})),!Y&&React.createElement("clipPath",{id:"clipPath-dots-".concat(M)},React.createElement("rect",{x:_-V/2,y:g-V/2,width:S+V,height:E+V}))):null,!A&&this.renderCurve(j,M),this.renderErrorBar(j,M),(A||u)&&this.renderDots(j,Y,M),(!b||C)&&LabelList.renderCallByParent(this.props,f))}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.animationId!==o.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:o.curPoints}:i.points!==o.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,o){for(var l=i.length%2!==0?[].concat(_toConsumableArray$2(i),[0]):i,u=[],f=0;f<o;++f)u=[].concat(_toConsumableArray$2(u),_toConsumableArray$2(l));return u}},{key:"renderDotItem",value:function(i,o){var l;if(React.isValidElement(i))l=React.cloneElement(i,o);else if(isFunction(i))l=i(o);else{var u=o.key,f=_objectWithoutProperties$3(o,_excluded2$2),p=clsx("recharts-line-dot",typeof i!="boolean"?i.className:"");l=React.createElement(Dot,_extends$6({key:u},f,{className:p}))}return l}}])}(React.PureComponent);_defineProperty$8(Line,"displayName","Line");_defineProperty$8(Line,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Global.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});_defineProperty$8(Line,"getComposedData",function(e){var t=e.props,n=e.xAxis,i=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,u=e.dataKey,f=e.bandSize,p=e.displayedData,d=e.offset,m=t.layout,g=p.map(function(_,S){var E=getValueByDataKey(_,u);return m==="horizontal"?{x:getCateCoordinateOfLine({axis:n,ticks:o,bandSize:f,entry:_,index:S}),y:isNil(E)?null:i.scale(E),value:E,payload:_}:{x:isNil(E)?null:n.scale(E),y:getCateCoordinateOfLine({axis:i,ticks:l,bandSize:f,entry:_,index:S}),value:E,payload:_}});return _objectSpread$4({points:g,layout:m},d)});var _excluded$2=["layout","type","stroke","connectNulls","isRange","ref"],_excluded2$1=["key"],_Area;function _typeof$7(e){"@babel/helpers - typeof";return _typeof$7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$7(e)}function _objectWithoutProperties$2(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose$2(e,t),i,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)i=l[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _objectWithoutPropertiesLoose$2(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$5.apply(this,arguments)}function ownKeys$3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$3(Object(n),!0).forEach(function(i){_defineProperty$7(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$3(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _classCallCheck$6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$6(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$7(i.key),i)}}function _createClass$6(e,t,n){return t&&_defineProperties$6(e.prototype,t),n&&_defineProperties$6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper$5(e,t,n){return t=_getPrototypeOf$5(t),_possibleConstructorReturn$5(e,_isNativeReflectConstruct$5()?Reflect.construct(t,n||[],_getPrototypeOf$5(e).constructor):t.apply(e,n))}function _possibleConstructorReturn$5(e,t){if(t&&(_typeof$7(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$5(e)}function _assertThisInitialized$5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$5=function(){return!!e})()}function _getPrototypeOf$5(e){return _getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf$5(e)}function _inherits$5(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$5(e,t)}function _setPrototypeOf$5(e,t){return _setPrototypeOf$5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},_setPrototypeOf$5(e,t)}function _defineProperty$7(e,t,n){return t=_toPropertyKey$7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$7(e){var t=_toPrimitive$7(e,"string");return _typeof$7(t)=="symbol"?t:t+""}function _toPrimitive$7(e,t){if(_typeof$7(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$7(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Area=function(e){function t(){var n;_classCallCheck$6(this,t);for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n=_callSuper$5(this,t,[].concat(o)),_defineProperty$7(n,"state",{isAnimationFinished:!0}),_defineProperty$7(n,"id",uniqueId("recharts-area-")),_defineProperty$7(n,"handleAnimationEnd",function(){var u=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),isFunction(u)&&u()}),_defineProperty$7(n,"handleAnimationStart",function(){var u=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),isFunction(u)&&u()}),n}return _inherits$5(t,e),_createClass$6(t,[{key:"renderDots",value:function(i,o,l){var u=this.props.isAnimationActive,f=this.state.isAnimationFinished;if(u&&!f)return null;var p=this.props,d=p.dot,m=p.points,g=p.dataKey,_=filterProps(this.props,!1),S=filterProps(d,!0),E=m.map(function(T,C){var A=_objectSpread$3(_objectSpread$3(_objectSpread$3({key:"dot-".concat(C),r:3},_),S),{},{index:C,cx:T.x,cy:T.y,dataKey:g,value:T.value,payload:T.payload,points:m});return t.renderDotItem(d,A)}),b={clipPath:i?"url(#clipPath-".concat(o?"":"dots-").concat(l,")"):null};return React.createElement(Layer,_extends$5({className:"recharts-area-dots"},b),E)}},{key:"renderHorizontalRect",value:function(i){var o=this.props,l=o.baseLine,u=o.points,f=o.strokeWidth,p=u[0].x,d=u[u.length-1].x,m=i*Math.abs(p-d),g=max(u.map(function(_){return _.y||0}));return isNumber(l)&&typeof l=="number"?g=Math.max(l,g):l&&Array.isArray(l)&&l.length&&(g=Math.max(max(l.map(function(_){return _.y||0})),g)),isNumber(g)?React.createElement("rect",{x:p<d?p:p-m,y:0,width:m,height:Math.floor(g+(f?parseInt("".concat(f),10):1))}):null}},{key:"renderVerticalRect",value:function(i){var o=this.props,l=o.baseLine,u=o.points,f=o.strokeWidth,p=u[0].y,d=u[u.length-1].y,m=i*Math.abs(p-d),g=max(u.map(function(_){return _.x||0}));return isNumber(l)&&typeof l=="number"?g=Math.max(l,g):l&&Array.isArray(l)&&l.length&&(g=Math.max(max(l.map(function(_){return _.x||0})),g)),isNumber(g)?React.createElement("rect",{x:0,y:p<d?p:p-m,width:g+(f?parseInt("".concat(f),10):1),height:Math.floor(m)}):null}},{key:"renderClipRect",value:function(i){var o=this.props.layout;return o==="vertical"?this.renderVerticalRect(i):this.renderHorizontalRect(i)}},{key:"renderAreaStatically",value:function(i,o,l,u){var f=this.props,p=f.layout,d=f.type,m=f.stroke,g=f.connectNulls,_=f.isRange;f.ref;var S=_objectWithoutProperties$2(f,_excluded$2);return React.createElement(Layer,{clipPath:l?"url(#clipPath-".concat(u,")"):null},React.createElement(Curve,_extends$5({},filterProps(S,!0),{points:i,connectNulls:g,type:d,baseLine:o,layout:p,stroke:"none",className:"recharts-area-area"})),m!=="none"&&React.createElement(Curve,_extends$5({},filterProps(this.props,!1),{className:"recharts-area-curve",layout:p,type:d,connectNulls:g,fill:"none",points:i})),m!=="none"&&_&&React.createElement(Curve,_extends$5({},filterProps(this.props,!1),{className:"recharts-area-curve",layout:p,type:d,connectNulls:g,fill:"none",points:o})))}},{key:"renderAreaWithAnimation",value:function(i,o){var l=this,u=this.props,f=u.points,p=u.baseLine,d=u.isAnimationActive,m=u.animationBegin,g=u.animationDuration,_=u.animationEasing,S=u.animationId,E=this.state,b=E.prevPoints,T=E.prevBaseLine;return React.createElement(Animate,{begin:m,duration:g,isActive:d,easing:_,from:{t:0},to:{t:1},key:"area-".concat(S),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var A=C.t;if(b){var R=b.length/f.length,O=f.map(function(N,D){var F=Math.floor(D*R);if(b[F]){var q=b[F],z=interpolateNumber$2(q.x,N.x),G=interpolateNumber$2(q.y,N.y);return _objectSpread$3(_objectSpread$3({},N),{},{x:z(A),y:G(A)})}return N}),I;if(isNumber(p)&&typeof p=="number"){var j=interpolateNumber$2(T,p);I=j(A)}else if(isNil(p)||isNan(p)){var M=interpolateNumber$2(T,0);I=M(A)}else I=p.map(function(N,D){var F=Math.floor(D*R);if(T[F]){var q=T[F],z=interpolateNumber$2(q.x,N.x),G=interpolateNumber$2(q.y,N.y);return _objectSpread$3(_objectSpread$3({},N),{},{x:z(A),y:G(A)})}return N});return l.renderAreaStatically(O,I,i,o)}return React.createElement(Layer,null,React.createElement("defs",null,React.createElement("clipPath",{id:"animationClipPath-".concat(o)},l.renderClipRect(A))),React.createElement(Layer,{clipPath:"url(#animationClipPath-".concat(o,")")},l.renderAreaStatically(f,p,i,o)))})}},{key:"renderArea",value:function(i,o){var l=this.props,u=l.points,f=l.baseLine,p=l.isAnimationActive,d=this.state,m=d.prevPoints,g=d.prevBaseLine,_=d.totalLength;return p&&u&&u.length&&(!m&&_>0||!isEqual(m,u)||!isEqual(g,f))?this.renderAreaWithAnimation(i,o):this.renderAreaStatically(u,f,i,o)}},{key:"render",value:function(){var i,o=this.props,l=o.hide,u=o.dot,f=o.points,p=o.className,d=o.top,m=o.left,g=o.xAxis,_=o.yAxis,S=o.width,E=o.height,b=o.isAnimationActive,T=o.id;if(l||!f||!f.length)return null;var C=this.state.isAnimationFinished,A=f.length===1,R=clsx("recharts-area",p),O=g&&g.allowDataOverflow,I=_&&_.allowDataOverflow,j=O||I,M=isNil(T)?this.id:T,N=(i=filterProps(u,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},D=N.r,F=D===void 0?3:D,q=N.strokeWidth,z=q===void 0?2:q,G=hasClipDot(u)?u:{},ee=G.clipDot,Y=ee===void 0?!0:ee,V=F*2+z;return React.createElement(Layer,{className:R},O||I?React.createElement("defs",null,React.createElement("clipPath",{id:"clipPath-".concat(M)},React.createElement("rect",{x:O?m:m-S/2,y:I?d:d-E/2,width:O?S:S*2,height:I?E:E*2})),!Y&&React.createElement("clipPath",{id:"clipPath-dots-".concat(M)},React.createElement("rect",{x:m-V/2,y:d-V/2,width:S+V,height:E+V}))):null,A?null:this.renderArea(j,M),(u||A)&&this.renderDots(j,Y,M),(!b||C)&&LabelList.renderCallByParent(this.props,f))}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.animationId!==o.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:i.points!==o.curPoints||i.baseLine!==o.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])}(React.PureComponent);_Area=Area;_defineProperty$7(Area,"displayName","Area");_defineProperty$7(Area,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Global.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});_defineProperty$7(Area,"getBaseValue",function(e,t,n,i){var o=e.layout,l=e.baseValue,u=t.props.baseValue,f=u??l;if(isNumber(f)&&typeof f=="number")return f;var p=o==="horizontal"?i:n,d=p.scale.domain();if(p.type==="number"){var m=Math.max(d[0],d[1]),g=Math.min(d[0],d[1]);return f==="dataMin"?g:f==="dataMax"||m<0?m:Math.max(Math.min(d[0],d[1]),0)}return f==="dataMin"?d[0]:f==="dataMax"?d[1]:d[0]});_defineProperty$7(Area,"getComposedData",function(e){var t=e.props,n=e.item,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,u=e.yAxisTicks,f=e.bandSize,p=e.dataKey,d=e.stackedData,m=e.dataStartIndex,g=e.displayedData,_=e.offset,S=t.layout,E=d&&d.length,b=_Area.getBaseValue(t,n,i,o),T=S==="horizontal",C=!1,A=g.map(function(O,I){var j;E?j=d[m+I]:(j=getValueByDataKey(O,p),Array.isArray(j)?C=!0:j=[b,j]);var M=j[1]==null||E&&getValueByDataKey(O,p)==null;return T?{x:getCateCoordinateOfLine({axis:i,ticks:l,bandSize:f,entry:O,index:I}),y:M?null:o.scale(j[1]),value:j,payload:O}:{x:M?null:i.scale(j[1]),y:getCateCoordinateOfLine({axis:o,ticks:u,bandSize:f,entry:O,index:I}),value:j,payload:O}}),R;return E||C?R=A.map(function(O){var I=Array.isArray(O.value)?O.value[0]:null;return T?{x:O.x,y:I!=null&&O.y!=null?o.scale(I):null}:{x:I!=null?i.scale(I):null,y:O.y}}):R=T?o.scale(b):i.scale(b),_objectSpread$3({points:A,baseLine:R,layout:S,isRange:C},_)});_defineProperty$7(Area,"renderDotItem",function(e,t){var n;if(React.isValidElement(e))n=React.cloneElement(e,t);else if(isFunction(e))n=e(t);else{var i=clsx("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,l=_objectWithoutProperties$2(t,_excluded2$1);n=React.createElement(Dot,_extends$5({},l,{key:o,className:i}))}return n});function _typeof$6(e){"@babel/helpers - typeof";return _typeof$6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(e)}function _classCallCheck$5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$6(i.key),i)}}function _createClass$5(e,t,n){return t&&_defineProperties$5(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper$4(e,t,n){return t=_getPrototypeOf$4(t),_possibleConstructorReturn$4(e,_isNativeReflectConstruct$4()?Reflect.construct(t,n||[],_getPrototypeOf$4(e).constructor):t.apply(e,n))}function _possibleConstructorReturn$4(e,t){if(t&&(_typeof$6(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$4(e)}function _assertThisInitialized$4(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$4(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$4=function(){return!!e})()}function _getPrototypeOf$4(e){return _getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf$4(e)}function _inherits$4(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$4(e,t)}function _setPrototypeOf$4(e,t){return _setPrototypeOf$4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},_setPrototypeOf$4(e,t)}function _defineProperty$6(e,t,n){return t=_toPropertyKey$6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$6(e){var t=_toPrimitive$6(e,"string");return _typeof$6(t)=="symbol"?t:t+""}function _toPrimitive$6(e,t){if(_typeof$6(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$6(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZAxis=function(e){function t(){return _classCallCheck$5(this,t),_callSuper$4(this,t,arguments)}return _inherits$4(t,e),_createClass$5(t,[{key:"render",value:function(){return null}}])}(React.Component);_defineProperty$6(ZAxis,"displayName","ZAxis");_defineProperty$6(ZAxis,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var _excluded$1=["option","isActive"];function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$4.apply(this,arguments)}function _objectWithoutProperties$1(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose$1(e,t),i,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)i=l[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _objectWithoutPropertiesLoose$1(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function ScatterSymbol(e){var t=e.option,n=e.isActive,i=_objectWithoutProperties$1(e,_excluded$1);return typeof t=="string"?React.createElement(Shape,_extends$4({option:React.createElement(Symbols,_extends$4({type:t},i)),isActive:n,shapeType:"symbols"},i)):React.createElement(Shape,_extends$4({option:t,isActive:n,shapeType:"symbols"},i))}function _typeof$5(e){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(e)}function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$3.apply(this,arguments)}function ownKeys$2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$2(Object(n),!0).forEach(function(i){_defineProperty$5(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$2(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$5(i.key),i)}}function _createClass$4(e,t,n){return t&&_defineProperties$4(e.prototype,t),n&&_defineProperties$4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper$3(e,t,n){return t=_getPrototypeOf$3(t),_possibleConstructorReturn$3(e,_isNativeReflectConstruct$3()?Reflect.construct(t,n||[],_getPrototypeOf$3(e).constructor):t.apply(e,n))}function _possibleConstructorReturn$3(e,t){if(t&&(_typeof$5(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$3(e)}function _assertThisInitialized$3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$3=function(){return!!e})()}function _getPrototypeOf$3(e){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf$3(e)}function _inherits$3(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$3(e,t)}function _setPrototypeOf$3(e,t){return _setPrototypeOf$3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},_setPrototypeOf$3(e,t)}function _defineProperty$5(e,t,n){return t=_toPropertyKey$5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$5(e){var t=_toPrimitive$5(e,"string");return _typeof$5(t)=="symbol"?t:t+""}function _toPrimitive$5(e,t){if(_typeof$5(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$5(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Scatter=function(e){function t(){var n;_classCallCheck$4(this,t);for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n=_callSuper$3(this,t,[].concat(o)),_defineProperty$5(n,"state",{isAnimationFinished:!1}),_defineProperty$5(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),_defineProperty$5(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),_defineProperty$5(n,"id",uniqueId("recharts-scatter-")),n}return _inherits$3(t,e),_createClass$4(t,[{key:"renderSymbolsStatically",value:function(i){var o=this,l=this.props,u=l.shape,f=l.activeShape,p=l.activeIndex,d=filterProps(this.props,!1);return i.map(function(m,g){var _=p===g,S=_?f:u,E=_objectSpread$2(_objectSpread$2({},d),m);return React.createElement(Layer,_extends$3({className:"recharts-scatter-symbol",key:"symbol-".concat(m==null?void 0:m.cx,"-").concat(m==null?void 0:m.cy,"-").concat(m==null?void 0:m.size,"-").concat(g)},adaptEventsOfChild(o.props,m,g),{role:"img"}),React.createElement(ScatterSymbol,_extends$3({option:S,isActive:_,key:"symbol-".concat(g)},E)))})}},{key:"renderSymbolsWithAnimation",value:function(){var i=this,o=this.props,l=o.points,u=o.isAnimationActive,f=o.animationBegin,p=o.animationDuration,d=o.animationEasing,m=o.animationId,g=this.state.prevPoints;return React.createElement(Animate,{begin:f,duration:p,isActive:u,easing:d,from:{t:0},to:{t:1},key:"pie-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(_){var S=_.t,E=l.map(function(b,T){var C=g&&g[T];if(C){var A=interpolateNumber$2(C.cx,b.cx),R=interpolateNumber$2(C.cy,b.cy),O=interpolateNumber$2(C.size,b.size);return _objectSpread$2(_objectSpread$2({},b),{},{cx:A(S),cy:R(S),size:O(S)})}var I=interpolateNumber$2(0,b.size);return _objectSpread$2(_objectSpread$2({},b),{},{size:I(S)})});return React.createElement(Layer,null,i.renderSymbolsStatically(E))})}},{key:"renderSymbols",value:function(){var i=this.props,o=i.points,l=i.isAnimationActive,u=this.state.prevPoints;return l&&o&&o.length&&(!u||!isEqual(u,o))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(o)}},{key:"renderErrorBar",value:function(){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.points,u=o.xAxis,f=o.yAxis,p=o.children,d=findAllByType(p,ErrorBar);return d?d.map(function(m,g){var _=m.props,S=_.direction,E=_.dataKey;return React.cloneElement(m,{key:"".concat(S,"-").concat(E,"-").concat(l[g]),data:l,xAxis:u,yAxis:f,layout:S==="x"?"vertical":"horizontal",dataPointFormatter:function(T,C){return{x:T.cx,y:T.cy,value:S==="x"?+T.node.x:+T.node.y,errorVal:getValueByDataKey(T,C)}}})}):null}},{key:"renderLine",value:function(){var i=this.props,o=i.points,l=i.line,u=i.lineType,f=i.lineJointType,p=filterProps(this.props,!1),d=filterProps(l,!1),m,g;if(u==="joint")m=o.map(function(R){return{x:R.cx,y:R.cy}});else if(u==="fitting"){var _=getLinearRegression(o),S=_.xmin,E=_.xmax,b=_.a,T=_.b,C=function(O){return b*O+T};m=[{x:S,y:C(S)},{x:E,y:C(E)}]}var A=_objectSpread$2(_objectSpread$2(_objectSpread$2({},p),{},{fill:"none",stroke:p&&p.fill},d),{},{points:m});return React.isValidElement(l)?g=React.cloneElement(l,A):isFunction(l)?g=l(A):g=React.createElement(Curve,_extends$3({},A,{type:f})),React.createElement(Layer,{className:"recharts-scatter-line",key:"recharts-scatter-line"},g)}},{key:"render",value:function(){var i=this.props,o=i.hide,l=i.points,u=i.line,f=i.className,p=i.xAxis,d=i.yAxis,m=i.left,g=i.top,_=i.width,S=i.height,E=i.id,b=i.isAnimationActive;if(o||!l||!l.length)return null;var T=this.state.isAnimationFinished,C=clsx("recharts-scatter",f),A=p&&p.allowDataOverflow,R=d&&d.allowDataOverflow,O=A||R,I=isNil(E)?this.id:E;return React.createElement(Layer,{className:C,clipPath:O?"url(#clipPath-".concat(I,")"):null},A||R?React.createElement("defs",null,React.createElement("clipPath",{id:"clipPath-".concat(I)},React.createElement("rect",{x:A?m:m-_/2,y:R?g:g-S/2,width:A?_:_*2,height:R?S:S*2}))):null,u&&this.renderLine(),this.renderErrorBar(),React.createElement(Layer,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!b||T)&&LabelList.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.animationId!==o.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:o.curPoints}:i.points!==o.curPoints?{curPoints:i.points}:null}}])}(React.PureComponent);_defineProperty$5(Scatter,"displayName","Scatter");_defineProperty$5(Scatter,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!Global.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});_defineProperty$5(Scatter,"getComposedData",function(e){var t=e.xAxis,n=e.yAxis,i=e.zAxis,o=e.item,l=e.displayedData,u=e.xAxisTicks,f=e.yAxisTicks,p=e.offset,d=o.props.tooltipType,m=findAllByType(o.props.children,Cell),g=isNil(t.dataKey)?o.props.dataKey:t.dataKey,_=isNil(n.dataKey)?o.props.dataKey:n.dataKey,S=i&&i.dataKey,E=i?i.range:ZAxis.defaultProps.range,b=E&&E[0],T=t.scale.bandwidth?t.scale.bandwidth():0,C=n.scale.bandwidth?n.scale.bandwidth():0,A=l.map(function(R,O){var I=getValueByDataKey(R,g),j=getValueByDataKey(R,_),M=!isNil(S)&&getValueByDataKey(R,S)||"-",N=[{name:isNil(t.dataKey)?o.props.name:t.name||t.dataKey,unit:t.unit||"",value:I,payload:R,dataKey:g,type:d},{name:isNil(n.dataKey)?o.props.name:n.name||n.dataKey,unit:n.unit||"",value:j,payload:R,dataKey:_,type:d}];M!=="-"&&N.push({name:i.name||i.dataKey,unit:i.unit||"",value:M,payload:R,dataKey:S,type:d});var D=getCateCoordinateOfLine({axis:t,ticks:u,bandSize:T,entry:R,index:O,dataKey:g}),F=getCateCoordinateOfLine({axis:n,ticks:f,bandSize:C,entry:R,index:O,dataKey:_}),q=M!=="-"?i.scale(M):b,z=Math.sqrt(Math.max(q,0)/Math.PI);return _objectSpread$2(_objectSpread$2({},R),{},{cx:D,cy:F,x:D-z,y:F-z,xAxis:t,yAxis:n,zAxis:i,width:2*z,height:2*z,size:q,node:{x:I,y:j,z:M},tooltipPayload:N,tooltipPosition:{x:D,y:F},payload:R},m&&m[O]&&m[O].props)});return _objectSpread$2({points:A},p)});function _typeof$4(e){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(e)}function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$4(i.key),i)}}function _createClass$3(e,t,n){return t&&_defineProperties$3(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper$2(e,t,n){return t=_getPrototypeOf$2(t),_possibleConstructorReturn$2(e,_isNativeReflectConstruct$2()?Reflect.construct(t,n||[],_getPrototypeOf$2(e).constructor):t.apply(e,n))}function _possibleConstructorReturn$2(e,t){if(t&&(_typeof$4(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$2(e)}function _assertThisInitialized$2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$2=function(){return!!e})()}function _getPrototypeOf$2(e){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf$2(e)}function _inherits$2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$2(e,t)}function _setPrototypeOf$2(e,t){return _setPrototypeOf$2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},_setPrototypeOf$2(e,t)}function _defineProperty$4(e,t,n){return t=_toPropertyKey$4(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$4(e){var t=_toPrimitive$4(e,"string");return _typeof$4(t)=="symbol"?t:t+""}function _toPrimitive$4(e,t){if(_typeof$4(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$4(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$2.apply(this,arguments)}function XAxisImpl(e){var t=e.xAxisId,n=useChartWidth(),i=useChartHeight(),o=useXAxisOrThrow(t);return o==null?null:React.createElement(CartesianAxis,_extends$2({},o,{className:clsx("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(u){return getTicksOfAxis(u,!0)}}))}var XAxis=function(e){function t(){return _classCallCheck$3(this,t),_callSuper$2(this,t,arguments)}return _inherits$2(t,e),_createClass$3(t,[{key:"render",value:function(){return React.createElement(XAxisImpl,this.props)}}])}(React.Component);_defineProperty$4(XAxis,"displayName","XAxis");_defineProperty$4(XAxis,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function _typeof$3(e){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(e)}function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$3(i.key),i)}}function _createClass$2(e,t,n){return t&&_defineProperties$2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper$1(e,t,n){return t=_getPrototypeOf$1(t),_possibleConstructorReturn$1(e,_isNativeReflectConstruct$1()?Reflect.construct(t,n||[],_getPrototypeOf$1(e).constructor):t.apply(e,n))}function _possibleConstructorReturn$1(e,t){if(t&&(_typeof$3(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(e)}function _assertThisInitialized$1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct$1=function(){return!!e})()}function _getPrototypeOf$1(e){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf$1(e)}function _inherits$1(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$1(e,t)}function _setPrototypeOf$1(e,t){return _setPrototypeOf$1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},_setPrototypeOf$1(e,t)}function _defineProperty$3(e,t,n){return t=_toPropertyKey$3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$3(e){var t=_toPrimitive$3(e,"string");return _typeof$3(t)=="symbol"?t:t+""}function _toPrimitive$3(e,t){if(_typeof$3(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$3(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends$1.apply(this,arguments)}var YAxisImpl=function e(t){var n=t.yAxisId,i=useChartWidth(),o=useChartHeight(),l=useYAxisOrThrow(n);return l==null?null:React.createElement(CartesianAxis,_extends$1({},l,{className:clsx("recharts-".concat(l.axisType," ").concat(l.axisType),l.className),viewBox:{x:0,y:0,width:i,height:o},ticksGenerator:function(f){return getTicksOfAxis(f,!0)}}))},YAxis=function(e){function t(){return _classCallCheck$2(this,t),_callSuper$1(this,t,arguments)}return _inherits$1(t,e),_createClass$2(t,[{key:"render",value:function(){return React.createElement(YAxisImpl,this.props)}}])}(React.Component);_defineProperty$3(YAxis,"displayName","YAxis");_defineProperty$3(YAxis,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function _toConsumableArray$1(e){return _arrayWithoutHoles$1(e)||_iterableToArray$1(e)||_unsupportedIterableToArray$1(e)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
419
419
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$1(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray$1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray$1(e,t)}}function _iterableToArray$1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _arrayWithoutHoles$1(e){if(Array.isArray(e))return _arrayLikeToArray$1(e)}function _arrayLikeToArray$1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var detectReferenceElementsDomain=function e(t,n,i,o,l){var u=findAllByType(t,ReferenceLine),f=findAllByType(t,ReferenceDot),p=[].concat(_toConsumableArray$1(u),_toConsumableArray$1(f)),d=findAllByType(t,ReferenceArea),m="".concat(o,"Id"),g=o[0],_=n;if(p.length&&(_=p.reduce(function(b,T){if(T.props[m]===i&&ifOverflowMatches(T.props,"extendDomain")&&isNumber(T.props[g])){var C=T.props[g];return[Math.min(b[0],C),Math.max(b[1],C)]}return b},_)),d.length){var S="".concat(g,"1"),E="".concat(g,"2");_=d.reduce(function(b,T){if(T.props[m]===i&&ifOverflowMatches(T.props,"extendDomain")&&isNumber(T.props[S])&&isNumber(T.props[E])){var C=T.props[S],A=T.props[E];return[Math.min(b[0],C,A),Math.max(b[1],C,A)]}return b},_)}return l&&l.length&&(_=l.reduce(function(b,T){return isNumber(T)?[Math.min(b[0],T),Math.max(b[1],T)]:b},_)),_},eventemitter3={exports:{}},hasRequiredEventemitter3;function requireEventemitter3(){return hasRequiredEventemitter3||(hasRequiredEventemitter3=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function o(p,d,m){this.fn=p,this.context=d,this.once=m||!1}function l(p,d,m,g,_){if(typeof m!="function")throw new TypeError("The listener must be a function");var S=new o(m,g||p,_),E=n?n+d:d;return p._events[E]?p._events[E].fn?p._events[E]=[p._events[E],S]:p._events[E].push(S):(p._events[E]=S,p._eventsCount++),p}function u(p,d){--p._eventsCount===0?p._events=new i:delete p._events[d]}function f(){this._events=new i,this._eventsCount=0}f.prototype.eventNames=function(){var d=[],m,g;if(this._eventsCount===0)return d;for(g in m=this._events)t.call(m,g)&&d.push(n?g.slice(1):g);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(m)):d},f.prototype.listeners=function(d){var m=n?n+d:d,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var _=0,S=g.length,E=new Array(S);_<S;_++)E[_]=g[_].fn;return E},f.prototype.listenerCount=function(d){var m=n?n+d:d,g=this._events[m];return g?g.fn?1:g.length:0},f.prototype.emit=function(d,m,g,_,S,E){var b=n?n+d:d;if(!this._events[b])return!1;var T=this._events[b],C=arguments.length,A,R;if(T.fn){switch(T.once&&this.removeListener(d,T.fn,void 0,!0),C){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,m),!0;case 3:return T.fn.call(T.context,m,g),!0;case 4:return T.fn.call(T.context,m,g,_),!0;case 5:return T.fn.call(T.context,m,g,_,S),!0;case 6:return T.fn.call(T.context,m,g,_,S,E),!0}for(R=1,A=new Array(C-1);R<C;R++)A[R-1]=arguments[R];T.fn.apply(T.context,A)}else{var O=T.length,I;for(R=0;R<O;R++)switch(T[R].once&&this.removeListener(d,T[R].fn,void 0,!0),C){case 1:T[R].fn.call(T[R].context);break;case 2:T[R].fn.call(T[R].context,m);break;case 3:T[R].fn.call(T[R].context,m,g);break;case 4:T[R].fn.call(T[R].context,m,g,_);break;default:if(!A)for(I=1,A=new Array(C-1);I<C;I++)A[I-1]=arguments[I];T[R].fn.apply(T[R].context,A)}}return!0},f.prototype.on=function(d,m,g){return l(this,d,m,g,!1)},f.prototype.once=function(d,m,g){return l(this,d,m,g,!0)},f.prototype.removeListener=function(d,m,g,_){var S=n?n+d:d;if(!this._events[S])return this;if(!m)return u(this,S),this;var E=this._events[S];if(E.fn)E.fn===m&&(!_||E.once)&&(!g||E.context===g)&&u(this,S);else{for(var b=0,T=[],C=E.length;b<C;b++)(E[b].fn!==m||_&&!E[b].once||g&&E[b].context!==g)&&T.push(E[b]);T.length?this._events[S]=T.length===1?T[0]:T:u(this,S)}return this},f.prototype.removeAllListeners=function(d){var m;return d?(m=n?n+d:d,this._events[m]&&u(this,m)):(this._events=new i,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=n,f.EventEmitter=f,e.exports=f}(eventemitter3)),eventemitter3.exports}var eventemitter3Exports=requireEventemitter3();const EventEmitter=getDefaultExportFromCjs(eventemitter3Exports);var eventCenter=new EventEmitter,SYNC_EVENT="recharts.syncMouseEvents";function _typeof$2(e){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(e)}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$2(i.key),i)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty$2(e,t,n){return t=_toPropertyKey$2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$2(e){var t=_toPrimitive$2(e,"string");return _typeof$2(t)=="symbol"?t:t+""}function _toPrimitive$2(e,t){if(_typeof$2(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$2(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var AccessibilityManager=function(){function e(){_classCallCheck$1(this,e),_defineProperty$2(this,"activeIndex",0),_defineProperty$2(this,"coordinateList",[]),_defineProperty$2(this,"layout","horizontal")}return _createClass$1(e,[{key:"setDetails",value:function(n){var i,o=n.coordinateList,l=o===void 0?null:o,u=n.container,f=u===void 0?null:u,p=n.layout,d=p===void 0?null:p,m=n.offset,g=m===void 0?null:m,_=n.mouseHandlerCallback,S=_===void 0?null:_;this.coordinateList=(i=l??this.coordinateList)!==null&&i!==void 0?i:[],this.container=f??this.container,this.layout=d??this.layout,this.offset=g??this.offset,this.mouseHandlerCallback=S??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,i;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var o=this.container.getBoundingClientRect(),l=o.x,u=o.y,f=o.height,p=this.coordinateList[this.activeIndex].coordinate,d=((n=window)===null||n===void 0?void 0:n.scrollX)||0,m=((i=window)===null||i===void 0?void 0:i.scrollY)||0,g=l+p+d,_=u+this.offset.top+f/2+m;this.mouseHandlerCallback({pageX:g,pageY:_})}}}])}();function isDomainSpecifiedByUser(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var i=e==null?void 0:e[0],o=e==null?void 0:e[1];if(i&&o&&isNumber(i)&&isNumber(o))return!0}return!1}function getCursorRectangle(e,t,n,i){var o=i/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-o:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-o,width:e==="horizontal"?i:n.width-1,height:e==="horizontal"?n.height-1:i}}function getRadialCursorPoints(e){var t=e.cx,n=e.cy,i=e.radius,o=e.startAngle,l=e.endAngle,u=polarToCartesian(t,n,i,o),f=polarToCartesian(t,n,i,l);return{points:[u,f],cx:t,cy:n,radius:i,startAngle:o,endAngle:l}}function getCursorPoints(e,t,n){var i,o,l,u;if(e==="horizontal")i=t.x,l=i,o=n.top,u=n.top+n.height;else if(e==="vertical")o=t.y,u=o,i=n.left,l=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var f=t.cx,p=t.cy,d=t.innerRadius,m=t.outerRadius,g=t.angle,_=polarToCartesian(f,p,d,g),S=polarToCartesian(f,p,m,g);i=_.x,o=_.y,l=S.x,u=S.y}else return getRadialCursorPoints(t);return[{x:i,y:o},{x:l,y:u}]}function _typeof$1(e){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(e)}function ownKeys$1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread$1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys$1(Object(n),!0).forEach(function(i){_defineProperty$1(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$1(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty$1(e,t,n){return t=_toPropertyKey$1(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey$1(e){var t=_toPrimitive$1(e,"string");return _typeof$1(t)=="symbol"?t:t+""}function _toPrimitive$1(e,t){if(_typeof$1(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof$1(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cursor(e){var t,n,i=e.element,o=e.tooltipEventType,l=e.isActive,u=e.activeCoordinate,f=e.activePayload,p=e.offset,d=e.activeTooltipIndex,m=e.tooltipAxisBandSize,g=e.layout,_=e.chartName,S=(t=i.props.cursor)!==null&&t!==void 0?t:(n=i.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!i||!S||!l||!u||_!=="ScatterChart"&&o!=="axis")return null;var E,b=Curve;if(_==="ScatterChart")E=u,b=Cross;else if(_==="BarChart")E=getCursorRectangle(g,u,p,m),b=Rectangle;else if(g==="radial"){var T=getRadialCursorPoints(u),C=T.cx,A=T.cy,R=T.radius,O=T.startAngle,I=T.endAngle;E={cx:C,cy:A,startAngle:O,endAngle:I,innerRadius:R,outerRadius:R},b=Sector}else E={points:getCursorPoints(g,u,p)},b=Curve;var j=_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({stroke:"#ccc",pointerEvents:"none"},p),E),filterProps(S,!1)),{},{payload:f,payloadIndex:d,className:clsx("recharts-tooltip-cursor",S.className)});return React.isValidElement(S)?React.cloneElement(S,j):React.createElement(b,j)}var _excluded=["item"],_excluded2=["children","className","width","height","style","compact","title","desc"];function _typeof(e){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(e)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},_extends.apply(this,arguments)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
420
420
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,l,u,f=[],p=!0,d=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(p=(i=l.call(n)).done)&&(f.push(i.value),f.length!==t);p=!0);}catch(m){d=!0,o=m}finally{try{if(!p&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(d)throw o}}return f}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _objectWithoutProperties(e,t){if(e==null)return{};var n=_objectWithoutPropertiesLoose(e,t),i,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)i=l[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&(_typeof(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf(e)}function _inherits(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},_setPrototypeOf(e,t)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
421
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}function _iterableToArray(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(i){_defineProperty(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty(e,t,n){return t=_toPropertyKey(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return _typeof(t)=="symbol"?t:t+""}function _toPrimitive(e,t){if(_typeof(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ORIENT_MAP={xAxis:["bottom","top"],yAxis:["left","right"]},FULL_WIDTH_AND_HEIGHT={width:"100%",height:"100%"},originCoordinate={x:0,y:0};function renderAsIs(e){return e}var calculateTooltipPos=function e(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},getActiveCoordinate=function e(t,n,i,o){var l=n.find(function(m){return m&&m.index===i});if(l){if(t==="horizontal")return{x:l.coordinate,y:o.y};if(t==="vertical")return{x:o.x,y:l.coordinate};if(t==="centric"){var u=l.coordinate,f=o.radius;return _objectSpread(_objectSpread(_objectSpread({},o),polarToCartesian(o.cx,o.cy,f,u)),{},{angle:u,radius:f})}var p=l.coordinate,d=o.angle;return _objectSpread(_objectSpread(_objectSpread({},o),polarToCartesian(o.cx,o.cy,p,d)),{},{angle:d,radius:p})}return originCoordinate},getDisplayedData=function e(t,n){var i=n.graphicalItems,o=n.dataStartIndex,l=n.dataEndIndex,u=(i??[]).reduce(function(f,p){var d=p.props.data;return d&&d.length?[].concat(_toConsumableArray(f),_toConsumableArray(d)):f},[]);return u.length>0?u:t&&t.length&&isNumber(o)&&isNumber(l)?t.slice(o,l+1):[]};function getDefaultDomainByAxisType(e){return e==="number"?[0,"auto"]:void 0}var getTooltipContent=function e(t,n,i,o){var l=t.graphicalItems,u=t.tooltipAxis,f=getDisplayedData(n,t);return i<0||!l||!l.length||i>=f.length?null:l.reduce(function(p,d){var m,g=(m=d.props.data)!==null&&m!==void 0?m:n;g&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=i&&(g=g.slice(t.dataStartIndex,t.dataEndIndex+1));var _;if(u.dataKey&&!u.allowDuplicatedCategory){var S=g===void 0?f:g;_=findEntryInArray(S,u.dataKey,o)}else _=g&&g[i]||f[i];return _?[].concat(_toConsumableArray(p),[getTooltipItem(d,_)]):p},[])},getTooltipData=function e(t,n,i,o){var l=o||{x:t.chartX,y:t.chartY},u=calculateTooltipPos(l,i),f=t.orderedTooltipTicks,p=t.tooltipAxis,d=t.tooltipTicks,m=calculateActiveTickIndex(u,f,d,p);if(m>=0&&d){var g=d[m]&&d[m].value,_=getTooltipContent(t,n,m,g),S=getActiveCoordinate(i,f,m,l);return{activeTooltipIndex:m,activeLabel:g,activePayload:_,activeCoordinate:S}}return null},getAxisMapByAxes=function e(t,n){var i=n.axes,o=n.graphicalItems,l=n.axisType,u=n.axisIdKey,f=n.stackGroups,p=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,g=t.children,_=t.stackOffset,S=isCategoricalAxis(m,l);return i.reduce(function(E,b){var T,C=b.type.defaultProps!==void 0?_objectSpread(_objectSpread({},b.type.defaultProps),b.props):b.props,A=C.type,R=C.dataKey,O=C.allowDataOverflow,I=C.allowDuplicatedCategory,j=C.scale,M=C.ticks,N=C.includeHidden,D=C[u];if(E[D])return E;var F=getDisplayedData(t.data,{graphicalItems:o.filter(function(H){var J,X=u in H.props?H.props[u]:(J=H.type.defaultProps)===null||J===void 0?void 0:J[u];return X===D}),dataStartIndex:p,dataEndIndex:d}),q=F.length,z,G,ee;isDomainSpecifiedByUser(C.domain,O,A)&&(z=parseSpecifiedDomain(C.domain,null,O),S&&(A==="number"||j!=="auto")&&(ee=getDomainOfDataByKey(F,R,"category")));var Y=getDefaultDomainByAxisType(A);if(!z||z.length===0){var V,W=(V=C.domain)!==null&&V!==void 0?V:Y;if(R){if(z=getDomainOfDataByKey(F,R,A),A==="category"&&S){var L=hasDuplicate(z);I&&L?(G=z,z=range(0,q)):I||(z=parseDomainOfCategoryAxis(W,z,b).reduce(function(H,J){return H.indexOf(J)>=0?H:[].concat(_toConsumableArray(H),[J])},[]))}else if(A==="category")I?z=z.filter(function(H){return H!==""&&!isNil(H)}):z=parseDomainOfCategoryAxis(W,z,b).reduce(function(H,J){return H.indexOf(J)>=0||J===""||isNil(J)?H:[].concat(_toConsumableArray(H),[J])},[]);else if(A==="number"){var B=parseErrorBarsOfAxis(F,o.filter(function(H){var J,X,Q=u in H.props?H.props[u]:(J=H.type.defaultProps)===null||J===void 0?void 0:J[u],le="hide"in H.props?H.props.hide:(X=H.type.defaultProps)===null||X===void 0?void 0:X.hide;return Q===D&&(N||!le)}),R,l,m);B&&(z=B)}S&&(A==="number"||j!=="auto")&&(ee=getDomainOfDataByKey(F,R,"category"))}else S?z=range(0,q):f&&f[D]&&f[D].hasStack&&A==="number"?z=_==="expand"?[0,1]:getDomainOfStackGroups(f[D].stackGroups,p,d):z=getDomainOfItemsWithSameAxis(F,o.filter(function(H){var J=u in H.props?H.props[u]:H.type.defaultProps[u],X="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return J===D&&(N||!X)}),A,m,!0);if(A==="number")z=detectReferenceElementsDomain(g,z,D,l,M),W&&(z=parseSpecifiedDomain(W,z,O));else if(A==="category"&&W){var U=W,K=z.every(function(H){return U.indexOf(H)>=0});K&&(z=U)}}return _objectSpread(_objectSpread({},E),{},_defineProperty({},D,_objectSpread(_objectSpread({},C),{},{axisType:l,domain:z,categoricalDomain:ee,duplicateDomain:G,originalDomain:(T=C.domain)!==null&&T!==void 0?T:Y,isCategorical:S,layout:m})))},{})},getAxisMapByItems=function e(t,n){var i=n.graphicalItems,o=n.Axis,l=n.axisType,u=n.axisIdKey,f=n.stackGroups,p=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,g=t.children,_=getDisplayedData(t.data,{graphicalItems:i,dataStartIndex:p,dataEndIndex:d}),S=_.length,E=isCategoricalAxis(m,l),b=-1;return i.reduce(function(T,C){var A=C.type.defaultProps!==void 0?_objectSpread(_objectSpread({},C.type.defaultProps),C.props):C.props,R=A[u],O=getDefaultDomainByAxisType("number");if(!T[R]){b++;var I;return E?I=range(0,S):f&&f[R]&&f[R].hasStack?(I=getDomainOfStackGroups(f[R].stackGroups,p,d),I=detectReferenceElementsDomain(g,I,R,l)):(I=parseSpecifiedDomain(O,getDomainOfItemsWithSameAxis(_,i.filter(function(j){var M,N,D=u in j.props?j.props[u]:(M=j.type.defaultProps)===null||M===void 0?void 0:M[u],F="hide"in j.props?j.props.hide:(N=j.type.defaultProps)===null||N===void 0?void 0:N.hide;return D===R&&!F}),"number",m),o.defaultProps.allowDataOverflow),I=detectReferenceElementsDomain(g,I,R,l)),_objectSpread(_objectSpread({},T),{},_defineProperty({},R,_objectSpread(_objectSpread({axisType:l},o.defaultProps),{},{hide:!0,orientation:get(ORIENT_MAP,"".concat(l,".").concat(b%2),null),domain:I,originalDomain:O,isCategorical:E,layout:m})))}return T},{})},getAxisMap=function e(t,n){var i=n.axisType,o=i===void 0?"xAxis":i,l=n.AxisComp,u=n.graphicalItems,f=n.stackGroups,p=n.dataStartIndex,d=n.dataEndIndex,m=t.children,g="".concat(o,"Id"),_=findAllByType(m,l),S={};return _&&_.length?S=getAxisMapByAxes(t,{axes:_,graphicalItems:u,axisType:o,axisIdKey:g,stackGroups:f,dataStartIndex:p,dataEndIndex:d}):u&&u.length&&(S=getAxisMapByItems(t,{Axis:l,graphicalItems:u,axisType:o,axisIdKey:g,stackGroups:f,dataStartIndex:p,dataEndIndex:d})),S},tooltipTicksGenerator=function e(t){var n=getAnyElementOfObject(t),i=getTicksOfAxis(n,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:sortBy(i,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:getBandSizeOfAxis(n,i)}},createDefaultState=function e(t){var n=t.children,i=t.defaultShowTooltip,o=findChildByType(n,Brush),l=0,u=0;return t.data&&t.data.length!==0&&(u=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(l=o.props.startIndex),o.props.endIndex>=0&&(u=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:l,dataEndIndex:u,activeTooltipIndex:-1,isTooltipActive:!!i}},hasGraphicalBarItem=function e(t){return!t||!t.length?!1:t.some(function(n){var i=getDisplayName(n&&n.type);return i&&i.indexOf("Bar")>=0})},getAxisNameByLayout=function e(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},calculateOffset=function e(t,n){var i=t.props,o=t.graphicalItems,l=t.xAxisMap,u=l===void 0?{}:l,f=t.yAxisMap,p=f===void 0?{}:f,d=i.width,m=i.height,g=i.children,_=i.margin||{},S=findChildByType(g,Brush),E=findChildByType(g,Legend),b=Object.keys(p).reduce(function(I,j){var M=p[j],N=M.orientation;return!M.mirror&&!M.hide?_objectSpread(_objectSpread({},I),{},_defineProperty({},N,I[N]+M.width)):I},{left:_.left||0,right:_.right||0}),T=Object.keys(u).reduce(function(I,j){var M=u[j],N=M.orientation;return!M.mirror&&!M.hide?_objectSpread(_objectSpread({},I),{},_defineProperty({},N,get(I,"".concat(N))+M.height)):I},{top:_.top||0,bottom:_.bottom||0}),C=_objectSpread(_objectSpread({},T),b),A=C.bottom;S&&(C.bottom+=S.props.height||Brush.defaultProps.height),E&&n&&(C=appendOffsetOfLegend(C,o,i,n));var R=d-C.left-C.right,O=m-C.top-C.bottom;return _objectSpread(_objectSpread({brushBottom:A},C),{},{width:Math.max(R,0),height:Math.max(O,0)})},getCartesianAxisSize=function e(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},generateCategoricalChart=function e(t){var n=t.chartName,i=t.GraphicalChild,o=t.defaultTooltipEventType,l=o===void 0?"axis":o,u=t.validateTooltipEventTypes,f=u===void 0?["axis"]:u,p=t.axisComponents,d=t.legendContent,m=t.formatAxisMap,g=t.defaultProps,_=function(C,A){var R=A.graphicalItems,O=A.stackGroups,I=A.offset,j=A.updateId,M=A.dataStartIndex,N=A.dataEndIndex,D=C.barSize,F=C.layout,q=C.barGap,z=C.barCategoryGap,G=C.maxBarSize,ee=getAxisNameByLayout(F),Y=ee.numericAxisName,V=ee.cateAxisName,W=hasGraphicalBarItem(R),L=[];return R.forEach(function(B,U){var K=getDisplayedData(C.data,{graphicalItems:[B],dataStartIndex:M,dataEndIndex:N}),H=B.type.defaultProps!==void 0?_objectSpread(_objectSpread({},B.type.defaultProps),B.props):B.props,J=H.dataKey,X=H.maxBarSize,Q=H["".concat(Y,"Id")],le=H["".concat(V,"Id")],ye={},de=p.reduce(function(De,ke){var Ue,We,Ge=A["".concat(ke.axisType,"Map")],Xe=H["".concat(ke.axisType,"Id")];Ge&&Ge[Xe]||ke.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?invariant(!1,"Specifying a(n) ".concat(ke.axisType,"Id requires a corresponding ").concat(ke.axisType,"Id on the targeted graphical component ").concat((Ue=B==null||(We=B.type)===null||We===void 0?void 0:We.displayName)!==null&&Ue!==void 0?Ue:"")):invariant());var Ze=Ge[Xe];return _objectSpread(_objectSpread({},De),{},_defineProperty(_defineProperty({},ke.axisType,Ze),"".concat(ke.axisType,"Ticks"),getTicksOfAxis(Ze)))},ye),fe=de[V],pe=de["".concat(V,"Ticks")],Ee=O&&O[Q]&&O[Q].hasStack&&getStackedDataOfItem(B,O[Q].stackGroups),te=getDisplayName(B.type).indexOf("Bar")>=0,Te=getBandSizeOfAxis(fe,pe),ue=[],Me=W&&getBarSizeList({barSize:D,stackGroups:O,totalSize:getCartesianAxisSize(de,V)});if(te){var je,Pe,Fe=isNil(X)?G:X,Ve=(je=(Pe=getBandSizeOfAxis(fe,pe,!0))!==null&&Pe!==void 0?Pe:Fe)!==null&&je!==void 0?je:0;ue=getBarPosition({barGap:q,barCategoryGap:z,bandSize:Ve!==Te?Ve:Te,sizeList:Me[le],maxBarSize:Fe}),Ve!==Te&&(ue=ue.map(function(De){return _objectSpread(_objectSpread({},De),{},{position:_objectSpread(_objectSpread({},De.position),{},{offset:De.position.offset-Ve/2})})}))}var qe=B&&B.type&&B.type.getComposedData;qe&&L.push({props:_objectSpread(_objectSpread({},qe(_objectSpread(_objectSpread({},de),{},{displayedData:K,props:C,dataKey:J,item:B,bandSize:Te,barPosition:ue,offset:I,stackedData:Ee,layout:F,dataStartIndex:M,dataEndIndex:N}))),{},_defineProperty(_defineProperty(_defineProperty({key:B.key||"item-".concat(U)},Y,de[Y]),V,de[V]),"animationId",j)),childIndex:parseChildIndex(B,C.children),item:B})}),L},S=function(C,A){var R=C.props,O=C.dataStartIndex,I=C.dataEndIndex,j=C.updateId;if(!validateWidthHeight({props:R}))return null;var M=R.children,N=R.layout,D=R.stackOffset,F=R.data,q=R.reverseStackOrder,z=getAxisNameByLayout(N),G=z.numericAxisName,ee=z.cateAxisName,Y=findAllByType(M,i),V=getStackGroupsByAxisId(F,Y,"".concat(G,"Id"),"".concat(ee,"Id"),D,q),W=p.reduce(function(H,J){var X="".concat(J.axisType,"Map");return _objectSpread(_objectSpread({},H),{},_defineProperty({},X,getAxisMap(R,_objectSpread(_objectSpread({},J),{},{graphicalItems:Y,stackGroups:J.axisType===G&&V,dataStartIndex:O,dataEndIndex:I}))))},{}),L=calculateOffset(_objectSpread(_objectSpread({},W),{},{props:R,graphicalItems:Y}),A==null?void 0:A.legendBBox);Object.keys(W).forEach(function(H){W[H]=m(R,W[H],L,H.replace("Map",""),n)});var B=W["".concat(ee,"Map")],U=tooltipTicksGenerator(B),K=_(R,_objectSpread(_objectSpread({},W),{},{dataStartIndex:O,dataEndIndex:I,updateId:j,graphicalItems:Y,stackGroups:V,offset:L}));return _objectSpread(_objectSpread({formattedGraphicalItems:K,graphicalItems:Y,offset:L,stackGroups:V},U),W)},E=function(T){function C(A){var R,O,I;return _classCallCheck(this,C),I=_callSuper(this,C,[A]),_defineProperty(I,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_defineProperty(I,"accessibilityManager",new AccessibilityManager),_defineProperty(I,"handleLegendBBoxUpdate",function(j){if(j){var M=I.state,N=M.dataStartIndex,D=M.dataEndIndex,F=M.updateId;I.setState(_objectSpread({legendBBox:j},S({props:I.props,dataStartIndex:N,dataEndIndex:D,updateId:F},_objectSpread(_objectSpread({},I.state),{},{legendBBox:j}))))}}),_defineProperty(I,"handleReceiveSyncEvent",function(j,M,N){if(I.props.syncId===j){if(N===I.eventEmitterSymbol&&typeof I.props.syncMethod!="function")return;I.applySyncEvent(M)}}),_defineProperty(I,"handleBrushChange",function(j){var M=j.startIndex,N=j.endIndex;if(M!==I.state.dataStartIndex||N!==I.state.dataEndIndex){var D=I.state.updateId;I.setState(function(){return _objectSpread({dataStartIndex:M,dataEndIndex:N},S({props:I.props,dataStartIndex:M,dataEndIndex:N,updateId:D},I.state))}),I.triggerSyncEvent({dataStartIndex:M,dataEndIndex:N})}}),_defineProperty(I,"handleMouseEnter",function(j){var M=I.getMouseInfo(j);if(M){var N=_objectSpread(_objectSpread({},M),{},{isTooltipActive:!0});I.setState(N),I.triggerSyncEvent(N);var D=I.props.onMouseEnter;isFunction(D)&&D(N,j)}}),_defineProperty(I,"triggeredAfterMouseMove",function(j){var M=I.getMouseInfo(j),N=M?_objectSpread(_objectSpread({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};I.setState(N),I.triggerSyncEvent(N);var D=I.props.onMouseMove;isFunction(D)&&D(N,j)}),_defineProperty(I,"handleItemMouseEnter",function(j){I.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),_defineProperty(I,"handleItemMouseLeave",function(){I.setState(function(){return{isTooltipActive:!1}})}),_defineProperty(I,"handleMouseMove",function(j){j.persist(),I.throttleTriggeredAfterMouseMove(j)}),_defineProperty(I,"handleMouseLeave",function(j){I.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};I.setState(M),I.triggerSyncEvent(M);var N=I.props.onMouseLeave;isFunction(N)&&N(M,j)}),_defineProperty(I,"handleOuterEvent",function(j){var M=getReactEventByType(j),N=get(I.props,"".concat(M));if(M&&isFunction(N)){var D,F;/.*touch.*/i.test(M)?F=I.getMouseInfo(j.changedTouches[0]):F=I.getMouseInfo(j),N((D=F)!==null&&D!==void 0?D:{},j)}}),_defineProperty(I,"handleClick",function(j){var M=I.getMouseInfo(j);if(M){var N=_objectSpread(_objectSpread({},M),{},{isTooltipActive:!0});I.setState(N),I.triggerSyncEvent(N);var D=I.props.onClick;isFunction(D)&&D(N,j)}}),_defineProperty(I,"handleMouseDown",function(j){var M=I.props.onMouseDown;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"handleMouseUp",function(j){var M=I.props.onMouseUp;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&I.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),_defineProperty(I,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&I.handleMouseDown(j.changedTouches[0])}),_defineProperty(I,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&I.handleMouseUp(j.changedTouches[0])}),_defineProperty(I,"handleDoubleClick",function(j){var M=I.props.onDoubleClick;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"handleContextMenu",function(j){var M=I.props.onContextMenu;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"triggerSyncEvent",function(j){I.props.syncId!==void 0&&eventCenter.emit(SYNC_EVENT,I.props.syncId,j,I.eventEmitterSymbol)}),_defineProperty(I,"applySyncEvent",function(j){var M=I.props,N=M.layout,D=M.syncMethod,F=I.state.updateId,q=j.dataStartIndex,z=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)I.setState(_objectSpread({dataStartIndex:q,dataEndIndex:z},S({props:I.props,dataStartIndex:q,dataEndIndex:z,updateId:F},I.state)));else if(j.activeTooltipIndex!==void 0){var G=j.chartX,ee=j.chartY,Y=j.activeTooltipIndex,V=I.state,W=V.offset,L=V.tooltipTicks;if(!W)return;if(typeof D=="function")Y=D(L,j);else if(D==="value"){Y=-1;for(var B=0;B<L.length;B++)if(L[B].value===j.activeLabel){Y=B;break}}var U=_objectSpread(_objectSpread({},W),{},{x:W.left,y:W.top}),K=Math.min(G,U.x+U.width),H=Math.min(ee,U.y+U.height),J=L[Y]&&L[Y].value,X=getTooltipContent(I.state,I.props.data,Y),Q=L[Y]?{x:N==="horizontal"?L[Y].coordinate:K,y:N==="horizontal"?H:L[Y].coordinate}:originCoordinate;I.setState(_objectSpread(_objectSpread({},j),{},{activeLabel:J,activeCoordinate:Q,activePayload:X,activeTooltipIndex:Y}))}else I.setState(j)}),_defineProperty(I,"renderCursor",function(j){var M,N=I.state,D=N.isTooltipActive,F=N.activeCoordinate,q=N.activePayload,z=N.offset,G=N.activeTooltipIndex,ee=N.tooltipAxisBandSize,Y=I.getTooltipEventType(),V=(M=j.props.active)!==null&&M!==void 0?M:D,W=I.props.layout,L=j.key||"_recharts-cursor";return React.createElement(Cursor,{key:L,activeCoordinate:F,activePayload:q,activeTooltipIndex:G,chartName:n,element:j,isActive:V,layout:W,offset:z,tooltipAxisBandSize:ee,tooltipEventType:Y})}),_defineProperty(I,"renderPolarAxis",function(j,M,N){var D=get(j,"type.axisType"),F=get(I.state,"".concat(D,"Map")),q=j.type.defaultProps,z=q!==void 0?_objectSpread(_objectSpread({},q),j.props):j.props,G=F&&F[z["".concat(D,"Id")]];return React.cloneElement(j,_objectSpread(_objectSpread({},G),{},{className:clsx(D,G.className),key:j.key||"".concat(M,"-").concat(N),ticks:getTicksOfAxis(G,!0)}))}),_defineProperty(I,"renderPolarGrid",function(j){var M=j.props,N=M.radialLines,D=M.polarAngles,F=M.polarRadius,q=I.state,z=q.radiusAxisMap,G=q.angleAxisMap,ee=getAnyElementOfObject(z),Y=getAnyElementOfObject(G),V=Y.cx,W=Y.cy,L=Y.innerRadius,B=Y.outerRadius;return React.cloneElement(j,{polarAngles:Array.isArray(D)?D:getTicksOfAxis(Y,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(F)?F:getTicksOfAxis(ee,!0).map(function(U){return U.coordinate}),cx:V,cy:W,innerRadius:L,outerRadius:B,key:j.key||"polar-grid",radialLines:N})}),_defineProperty(I,"renderLegend",function(){var j=I.state.formattedGraphicalItems,M=I.props,N=M.children,D=M.width,F=M.height,q=I.props.margin||{},z=D-(q.left||0)-(q.right||0),G=getLegendProps({children:N,formattedGraphicalItems:j,legendWidth:z,legendContent:d});if(!G)return null;var ee=G.item,Y=_objectWithoutProperties(G,_excluded);return React.cloneElement(ee,_objectSpread(_objectSpread({},Y),{},{chartWidth:D,chartHeight:F,margin:q,onBBoxUpdate:I.handleLegendBBoxUpdate}))}),_defineProperty(I,"renderTooltip",function(){var j,M=I.props,N=M.children,D=M.accessibilityLayer,F=findChildByType(N,Tooltip);if(!F)return null;var q=I.state,z=q.isTooltipActive,G=q.activeCoordinate,ee=q.activePayload,Y=q.activeLabel,V=q.offset,W=(j=F.props.active)!==null&&j!==void 0?j:z;return React.cloneElement(F,{viewBox:_objectSpread(_objectSpread({},V),{},{x:V.left,y:V.top}),active:W,label:Y,payload:W?ee:[],coordinate:G,accessibilityLayer:D})}),_defineProperty(I,"renderBrush",function(j){var M=I.props,N=M.margin,D=M.data,F=I.state,q=F.offset,z=F.dataStartIndex,G=F.dataEndIndex,ee=F.updateId;return React.cloneElement(j,{key:j.key||"_recharts-brush",onChange:combineEventHandlers(I.handleBrushChange,j.props.onChange),data:D,x:isNumber(j.props.x)?j.props.x:q.left,y:isNumber(j.props.y)?j.props.y:q.top+q.height+q.brushBottom-(N.bottom||0),width:isNumber(j.props.width)?j.props.width:q.width,startIndex:z,endIndex:G,updateId:"brush-".concat(ee)})}),_defineProperty(I,"renderReferenceElement",function(j,M,N){if(!j)return null;var D=I,F=D.clipPathId,q=I.state,z=q.xAxisMap,G=q.yAxisMap,ee=q.offset,Y=j.type.defaultProps||{},V=j.props,W=V.xAxisId,L=W===void 0?Y.xAxisId:W,B=V.yAxisId,U=B===void 0?Y.yAxisId:B;return React.cloneElement(j,{key:j.key||"".concat(M,"-").concat(N),xAxis:z[L],yAxis:G[U],viewBox:{x:ee.left,y:ee.top,width:ee.width,height:ee.height},clipPathId:F})}),_defineProperty(I,"renderActivePoints",function(j){var M=j.item,N=j.activePoint,D=j.basePoint,F=j.childIndex,q=j.isRange,z=[],G=M.props.key,ee=M.item.type.defaultProps!==void 0?_objectSpread(_objectSpread({},M.item.type.defaultProps),M.item.props):M.item.props,Y=ee.activeDot,V=ee.dataKey,W=_objectSpread(_objectSpread({index:F,dataKey:V,cx:N.x,cy:N.y,r:4,fill:getMainColorOfGraphicItem(M.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},filterProps(Y,!1)),adaptEventHandlers(Y));return z.push(C.renderActiveDot(Y,W,"".concat(G,"-activePoint-").concat(F))),D?z.push(C.renderActiveDot(Y,_objectSpread(_objectSpread({},W),{},{cx:D.x,cy:D.y}),"".concat(G,"-basePoint-").concat(F))):q&&z.push(null),z}),_defineProperty(I,"renderGraphicChild",function(j,M,N){var D=I.filterFormatItem(j,M,N);if(!D)return null;var F=I.getTooltipEventType(),q=I.state,z=q.isTooltipActive,G=q.tooltipAxis,ee=q.activeTooltipIndex,Y=q.activeLabel,V=I.props.children,W=findChildByType(V,Tooltip),L=D.props,B=L.points,U=L.isRange,K=L.baseLine,H=D.item.type.defaultProps!==void 0?_objectSpread(_objectSpread({},D.item.type.defaultProps),D.item.props):D.item.props,J=H.activeDot,X=H.hide,Q=H.activeBar,le=H.activeShape,ye=!!(!X&&z&&W&&(J||Q||le)),de={};F!=="axis"&&W&&W.props.trigger==="click"?de={onClick:combineEventHandlers(I.handleItemMouseEnter,j.props.onClick)}:F!=="axis"&&(de={onMouseLeave:combineEventHandlers(I.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:combineEventHandlers(I.handleItemMouseEnter,j.props.onMouseEnter)});var fe=React.cloneElement(j,_objectSpread(_objectSpread({},D.props),de));function pe(ke){return typeof G.dataKey=="function"?G.dataKey(ke.payload):null}if(ye)if(ee>=0){var Ee,te;if(G.dataKey&&!G.allowDuplicatedCategory){var Te=typeof G.dataKey=="function"?pe:"payload.".concat(G.dataKey.toString());Ee=findEntryInArray(B,Te,Y),te=U&&K&&findEntryInArray(K,Te,Y)}else Ee=B==null?void 0:B[ee],te=U&&K&&K[ee];if(le||Q){var ue=j.props.activeIndex!==void 0?j.props.activeIndex:ee;return[React.cloneElement(j,_objectSpread(_objectSpread(_objectSpread({},D.props),de),{},{activeIndex:ue})),null,null]}if(!isNil(Ee))return[fe].concat(_toConsumableArray(I.renderActivePoints({item:D,activePoint:Ee,basePoint:te,childIndex:ee,isRange:U})))}else{var Me,je=(Me=I.getItemByXY(I.state.activeCoordinate))!==null&&Me!==void 0?Me:{graphicalItem:fe},Pe=je.graphicalItem,Fe=Pe.item,Ve=Fe===void 0?j:Fe,qe=Pe.childIndex,De=_objectSpread(_objectSpread(_objectSpread({},D.props),de),{},{activeIndex:qe});return[React.cloneElement(Ve,De),null,null]}return U?[fe,null,null]:[fe,null]}),_defineProperty(I,"renderCustomized",function(j,M,N){return React.cloneElement(j,_objectSpread(_objectSpread({key:"recharts-customized-".concat(N)},I.props),I.state))}),_defineProperty(I,"renderMap",{CartesianGrid:{handler:renderAsIs,once:!0},ReferenceArea:{handler:I.renderReferenceElement},ReferenceLine:{handler:renderAsIs},ReferenceDot:{handler:I.renderReferenceElement},XAxis:{handler:renderAsIs},YAxis:{handler:renderAsIs},Brush:{handler:I.renderBrush,once:!0},Bar:{handler:I.renderGraphicChild},Line:{handler:I.renderGraphicChild},Area:{handler:I.renderGraphicChild},Radar:{handler:I.renderGraphicChild},RadialBar:{handler:I.renderGraphicChild},Scatter:{handler:I.renderGraphicChild},Pie:{handler:I.renderGraphicChild},Funnel:{handler:I.renderGraphicChild},Tooltip:{handler:I.renderCursor,once:!0},PolarGrid:{handler:I.renderPolarGrid,once:!0},PolarAngleAxis:{handler:I.renderPolarAxis},PolarRadiusAxis:{handler:I.renderPolarAxis},Customized:{handler:I.renderCustomized}}),I.clipPathId="".concat((R=A.id)!==null&&R!==void 0?R:uniqueId("recharts"),"-clip"),I.throttleTriggeredAfterMouseMove=throttle(I.triggeredAfterMouseMove,(O=A.throttleDelay)!==null&&O!==void 0?O:1e3/60),I.state={},I}return _inherits(C,T),_createClass(C,[{key:"componentDidMount",value:function(){var R,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(R=this.props.margin.left)!==null&&R!==void 0?R:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var R=this.props,O=R.children,I=R.data,j=R.height,M=R.layout,N=findChildByType(O,Tooltip);if(N){var D=N.props.defaultIndex;if(!(typeof D!="number"||D<0||D>this.state.tooltipTicks.length-1)){var F=this.state.tooltipTicks[D]&&this.state.tooltipTicks[D].value,q=getTooltipContent(this.state,I,D,F),z=this.state.tooltipTicks[D].coordinate,G=(this.state.offset.top+j)/2,ee=M==="horizontal",Y=ee?{x:z,y:G}:{y:z,x:G},V=this.state.formattedGraphicalItems.find(function(L){var B=L.item;return B.type.name==="Scatter"});V&&(Y=_objectSpread(_objectSpread({},Y),V.props.points[D].tooltipPosition),q=V.props.points[D].tooltipPayload);var W={activeTooltipIndex:D,isTooltipActive:!0,activeLabel:F,activePayload:q,activeCoordinate:Y};this.setState(W),this.renderCursor(N),this.accessibilityManager.setIndex(D)}}}},{key:"getSnapshotBeforeUpdate",value:function(R,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==R.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==R.margin){var I,j;this.accessibilityManager.setDetails({offset:{left:(I=this.props.margin.left)!==null&&I!==void 0?I:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(R){isChildrenEqual([findChildByType(R.children,Tooltip)],[findChildByType(this.props.children,Tooltip)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var R=findChildByType(this.props.children,Tooltip);if(R&&typeof R.props.shared=="boolean"){var O=R.props.shared?"axis":"item";return f.indexOf(O)>=0?O:l}return l}},{key:"getMouseInfo",value:function(R){if(!this.container)return null;var O=this.container,I=O.getBoundingClientRect(),j=getOffset(I),M={chartX:Math.round(R.pageX-j.left),chartY:Math.round(R.pageY-j.top)},N=I.width/O.offsetWidth||1,D=this.inRange(M.chartX,M.chartY,N);if(!D)return null;var F=this.state,q=F.xAxisMap,z=F.yAxisMap,G=this.getTooltipEventType();if(G!=="axis"&&q&&z){var ee=getAnyElementOfObject(q).scale,Y=getAnyElementOfObject(z).scale,V=ee&&ee.invert?ee.invert(M.chartX):null,W=Y&&Y.invert?Y.invert(M.chartY):null;return _objectSpread(_objectSpread({},M),{},{xValue:V,yValue:W})}var L=getTooltipData(this.state,this.props.data,this.props.layout,D);return L?_objectSpread(_objectSpread({},M),L):null}},{key:"inRange",value:function(R,O){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,M=R/I,N=O/I;if(j==="horizontal"||j==="vertical"){var D=this.state.offset,F=M>=D.left&&M<=D.left+D.width&&N>=D.top&&N<=D.top+D.height;return F?{x:M,y:N}:null}var q=this.state,z=q.angleAxisMap,G=q.radiusAxisMap;if(z&&G){var ee=getAnyElementOfObject(z);return inRangeOfSector({x:M,y:N},ee)}return null}},{key:"parseEventsOfWrapper",value:function(){var R=this.props.children,O=this.getTooltipEventType(),I=findChildByType(R,Tooltip),j={};I&&O==="axis"&&(I.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=adaptEventHandlers(this.props,this.handleOuterEvent);return _objectSpread(_objectSpread({},M),j)}},{key:"addListener",value:function(){eventCenter.on(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){eventCenter.removeListener(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(R,O,I){for(var j=this.state.formattedGraphicalItems,M=0,N=j.length;M<N;M++){var D=j[M];if(D.item===R||D.props.key===R.key||O===getDisplayName(D.item.type)&&I===D.childIndex)return D}return null}},{key:"renderClipPath",value:function(){var R=this.clipPathId,O=this.state.offset,I=O.left,j=O.top,M=O.height,N=O.width;return React.createElement("defs",null,React.createElement("clipPath",{id:R},React.createElement("rect",{x:I,y:j,height:M,width:N})))}},{key:"getXScales",value:function(){var R=this.state.xAxisMap;return R?Object.entries(R).reduce(function(O,I){var j=_slicedToArray(I,2),M=j[0],N=j[1];return _objectSpread(_objectSpread({},O),{},_defineProperty({},M,N.scale))},{}):null}},{key:"getYScales",value:function(){var R=this.state.yAxisMap;return R?Object.entries(R).reduce(function(O,I){var j=_slicedToArray(I,2),M=j[0],N=j[1];return _objectSpread(_objectSpread({},O),{},_defineProperty({},M,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(R){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[R])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(R){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[R])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(R){var O=this.state,I=O.formattedGraphicalItems,j=O.activeItem;if(I&&I.length)for(var M=0,N=I.length;M<N;M++){var D=I[M],F=D.props,q=D.item,z=q.type.defaultProps!==void 0?_objectSpread(_objectSpread({},q.type.defaultProps),q.props):q.props,G=getDisplayName(q.type);if(G==="Bar"){var ee=(F.data||[]).find(function(L){return isInRectangle(R,L)});if(ee)return{graphicalItem:D,payload:ee}}else if(G==="RadialBar"){var Y=(F.data||[]).find(function(L){return inRangeOfSector(R,L)});if(Y)return{graphicalItem:D,payload:Y}}else if(isFunnel(D,j)||isPie(D,j)||isScatter(D,j)){var V=getActiveShapeIndexForTooltip({graphicalItem:D,activeTooltipItem:j,itemData:z.data}),W=z.activeIndex===void 0?V:z.activeIndex;return{graphicalItem:_objectSpread(_objectSpread({},D),{},{childIndex:W}),payload:isScatter(D,j)?z.data[V]:D.props.data[V]}}}return null}},{key:"render",value:function(){var R=this;if(!validateWidthHeight(this))return null;var O=this.props,I=O.children,j=O.className,M=O.width,N=O.height,D=O.style,F=O.compact,q=O.title,z=O.desc,G=_objectWithoutProperties(O,_excluded2),ee=filterProps(G,!1);if(F)return React.createElement(ChartLayoutContextProvider,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},React.createElement(Surface,_extends({},ee,{width:M,height:N,title:q,desc:z}),this.renderClipPath(),renderByOrder(I,this.renderMap)));if(this.props.accessibilityLayer){var Y,V;ee.tabIndex=(Y=this.props.tabIndex)!==null&&Y!==void 0?Y:0,ee.role=(V=this.props.role)!==null&&V!==void 0?V:"application",ee.onKeyDown=function(L){R.accessibilityManager.keyboardEvent(L)},ee.onFocus=function(){R.accessibilityManager.focus()}}var W=this.parseEventsOfWrapper();return React.createElement(ChartLayoutContextProvider,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},React.createElement("div",_extends({className:clsx("recharts-wrapper",j),style:_objectSpread({position:"relative",cursor:"default",width:M,height:N},D)},W,{ref:function(B){R.container=B}}),React.createElement(Surface,_extends({},ee,{width:M,height:N,title:q,desc:z,style:FULL_WIDTH_AND_HEIGHT}),this.renderClipPath(),renderByOrder(I,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(React.Component);_defineProperty(E,"displayName",n),_defineProperty(E,"defaultProps",_objectSpread({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},g)),_defineProperty(E,"getDerivedStateFromProps",function(T,C){var A=T.dataKey,R=T.data,O=T.children,I=T.width,j=T.height,M=T.layout,N=T.stackOffset,D=T.margin,F=C.dataStartIndex,q=C.dataEndIndex;if(C.updateId===void 0){var z=createDefaultState(T);return _objectSpread(_objectSpread(_objectSpread({},z),{},{updateId:0},S(_objectSpread(_objectSpread({props:T},z),{},{updateId:0}),C)),{},{prevDataKey:A,prevData:R,prevWidth:I,prevHeight:j,prevLayout:M,prevStackOffset:N,prevMargin:D,prevChildren:O})}if(A!==C.prevDataKey||R!==C.prevData||I!==C.prevWidth||j!==C.prevHeight||M!==C.prevLayout||N!==C.prevStackOffset||!shallowEqual(D,C.prevMargin)){var G=createDefaultState(T),ee={chartX:C.chartX,chartY:C.chartY,isTooltipActive:C.isTooltipActive},Y=_objectSpread(_objectSpread({},getTooltipData(C,R,M)),{},{updateId:C.updateId+1}),V=_objectSpread(_objectSpread(_objectSpread({},G),ee),Y);return _objectSpread(_objectSpread(_objectSpread({},V),S(_objectSpread({props:T},V),C)),{},{prevDataKey:A,prevData:R,prevWidth:I,prevHeight:j,prevLayout:M,prevStackOffset:N,prevMargin:D,prevChildren:O})}if(!isChildrenEqual(O,C.prevChildren)){var W,L,B,U,K=findChildByType(O,Brush),H=K&&(W=(L=K.props)===null||L===void 0?void 0:L.startIndex)!==null&&W!==void 0?W:F,J=K&&(B=(U=K.props)===null||U===void 0?void 0:U.endIndex)!==null&&B!==void 0?B:q,X=H!==F||J!==q,Q=!isNil(R),le=Q&&!X?C.updateId:C.updateId+1;return _objectSpread(_objectSpread({updateId:le},S(_objectSpread(_objectSpread({props:T},C),{},{updateId:le,dataStartIndex:H,dataEndIndex:J}),C)),{},{prevChildren:O,dataStartIndex:H,dataEndIndex:J})}return null}),_defineProperty(E,"renderActiveDot",function(T,C,A){var R;return React.isValidElement(T)?R=React.cloneElement(T,C):isFunction(T)?R=T(C):R=React.createElement(Dot,C),React.createElement(Layer,{className:"recharts-active-dot",key:A},R)});var b=React.forwardRef(function(C,A){return React.createElement(E,_extends({},C,{ref:A}))});return b.displayName=E.displayName,b},BarChart=generateCategoricalChart({chartName:"BarChart",GraphicalChild:Bar,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:XAxis},{axisType:"yAxis",AxisComp:YAxis}],formatAxisMap}),PieChart=generateCategoricalChart({chartName:"PieChart",GraphicalChild:Pie,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:PolarAngleAxis},{axisType:"radiusAxis",AxisComp:PolarRadiusAxis}],formatAxisMap:formatAxisMap$1,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),ComposedChart=generateCategoricalChart({chartName:"ComposedChart",GraphicalChild:[Line,Area,Bar,Scatter],axisComponents:[{axisType:"xAxis",AxisComp:XAxis},{axisType:"yAxis",AxisComp:YAxis},{axisType:"zAxis",AxisComp:ZAxis}],formatAxisMap});const CEBarChart=({dataKey:e,chartData:t,onBarClick:n,refreshKey:i=0,height:o=300,barColor:l="#64B230"})=>jsxRuntimeExports.jsx(CeBox,{children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:o,children:jsxRuntimeExports.jsxs(BarChart,{data:t,children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"name",angle:-45,textAnchor:"end",height:80}),jsxRuntimeExports.jsx(YAxis,{}),jsxRuntimeExports.jsx(Tooltip,{}),jsxRuntimeExports.jsx(Bar,{dataKey:e,fill:l,onClick:u=>n(u),className:"cursor-pointer"})]})})},i),CEPieChart=({chartData:e,onPieClick:t,refreshKey:n=0,height:i=300})=>jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:i,children:jsxRuntimeExports.jsxs(PieChart,{children:[jsxRuntimeExports.jsx(Pie,{data:e,cx:"50%",cy:"50%",outerRadius:100,innerRadius:0,fill:"#8884d8",dataKey:"value",onClick:t,className:"cursor-pointer",label:({name:o,percentage:l})=>`${o} ${l}%`,labelLine:!0,fontSize:12,children:e.map((o,l)=>jsxRuntimeExports.jsx(Cell,{fill:o.color},`cell-${l}`))}),jsxRuntimeExports.jsx(Tooltip,{formatter:(o,l,u)=>{var f;return[`${o} ${u.payload.type||""} (${(f=u==null?void 0:u.payload)==null?void 0:f.percentage}%)`,u.payload.name]}})]})})},n),CEStackedBarChart=({chartData:e,refreshKey:t=0,statusOrder:n,statusColor:i,height:o=300})=>{const l=({active:u,payload:f,label:p})=>{if(u&&f&&f.length){const d=f.reduce((m,g)=>m+(g.value||0),0);return jsxRuntimeExports.jsxs("div",{className:"stacked-barchart-tooltip",children:[jsxRuntimeExports.jsx("p",{className:"fstacked-barchart-tooltip-title",children:`${p}: ${d} total orders`}),f.filter(m=>m.value>0).sort((m,g)=>n.indexOf(m.dataKey)-n.indexOf(g.dataKey)).map((m,g)=>jsxRuntimeExports.jsx("p",{className:"text-sm",style:{color:m.color},children:`${m.dataKey}: ${m.value} orders`},g))]})}return null};return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:o,children:jsxRuntimeExports.jsxs(BarChart,{data:e,children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"name"}),jsxRuntimeExports.jsx(YAxis,{}),jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsx(l,{})}),jsxRuntimeExports.jsx(Legend,{}),n.map(u=>jsxRuntimeExports.jsx(Bar,{dataKey:u,stackId:"age",fill:i[u]||"#6b7280",name:u},u))]})})},t)},LINE_OF_BUSINESS_COLORS={"Waste Disposal & Transportation":"#2F7D32","Lab Pack":"#E91E63","Household Hazardous Waste":"#607D8B","Emergency Response Services":"#1976D2","Electronic Recycling & Data Management Services":"#FF9800","Universal Waste Services":"#9C27B0","DEA Destruction Services":"#795548","Resource Circularity, Sustainability and Recycling Services":"#8BC34A","Onsite Services":"#FF5722","Professional Services":"#3F51B5","Soil Services":"#673AB7","Dredge Services":"#9E9E9E",Remediation:"#009688",PFAS:"#FFC107"},CEStackedBarLineChart=({chartData:e,chartColumns:t,onBarClick:n,refreshKey:i=0,zoomLevel:o=60,height:l=650,showLengend:u=!0,showTootip:f=!0,config:p})=>{const[d,m]=React.useState(t||[]),g=d.length>0?e.filter(C=>d.includes(C.facility)):e,_=C=>{const{x:A,y:R,width:O,height:I,value:j}=C;if(I<20||j<1.5)return null;const M=parseFloat(Number(j).toFixed(1));return jsxRuntimeExports.jsxs("text",{x:A+O/2,y:R+I/2,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:10,fontWeight:"500",children:[M,p==null?void 0:p.unit]})},S=({active:C,payload:A,label:R})=>{if(C&&A&&A.length){const O=A.find(N=>N.dataKey===(p==null?void 0:p.key)),I=A.filter(N=>N.dataKey!==(p==null?void 0:p.key)),j=I.reduce((N,D)=>N+D.value,0),M=parseFloat(j.toFixed(1));return jsxRuntimeExports.jsxs("div",{className:"chart-tooltip",children:[jsxRuntimeExports.jsx("p",{className:"chart-tooltip-title",children:R}),I.map((N,D)=>jsxRuntimeExports.jsxs("div",{className:"chart-tooltip-row",children:[jsxRuntimeExports.jsx("div",{className:"chart-tooltip-color",style:{backgroundColor:N.color}}),jsxRuntimeExports.jsxs("span",{className:"chart-tooltip-label",children:[N.name,":"]}),jsxRuntimeExports.jsxs("span",{className:"chart-tooltip-value",children:[p==null?void 0:p.currencySymbol,N.value,p==null?void 0:p.unit]})]},D)),jsxRuntimeExports.jsxs("div",{className:"chart-tooltip-total",children:["Stack Total: $",M,p==null?void 0:p.unit]}),O&&jsxRuntimeExports.jsxs("div",{className:"chart-tooltip-revenue",children:["Total ",p==null?void 0:p.type,": $",O.value,p==null?void 0:p.unit]})]})}return null},E=C=>{const A=[];for(let R=0;R<=C;R+=(p==null?void 0:p.incrementValue)??10)A.push(R);return A},b=(C,A)=>{m(d.filter(R=>R!==C))},T=E(o);return jsxRuntimeExports.jsxs("div",{children:[d.length>0&&jsxRuntimeExports.jsx("div",{className:"ce-selected-facilities-container",children:d.map(C=>jsxRuntimeExports.jsxs("div",{className:"ce-facility-chip",children:[C,jsxRuntimeExports.jsx("button",{onClick:()=>b(C),className:"ce-remove-btn",children:"×"})]},C))}),jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:l,children:jsxRuntimeExports.jsxs(ComposedChart,{data:g,margin:{left:60,right:60,top:20,bottom:30},children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"facility",tick:{fontSize:12,fill:"#6b7280",textAnchor:"end"},axisLine:{stroke:"#d1d5db"},tickLine:{stroke:"#d1d5db"},height:80,angle:-45}),jsxRuntimeExports.jsx(YAxis,{yAxisId:"left",domain:[0,o],ticks:T,tickFormatter:C=>`${C}${p==null?void 0:p.unit}`,tick:{fontSize:11,fill:(p==null?void 0:p.leftAxisColor)??"#6b7280"}}),jsxRuntimeExports.jsx(YAxis,{yAxisId:"right",orientation:"right",tickFormatter:C=>`$${C}${p==null?void 0:p.unit}`,tick:{fontSize:11,fill:(p==null?void 0:p.rightAxisColor)??"#dc2626"}}),f&&jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsx(S,{})}),Object.keys(LINE_OF_BUSINESS_COLORS).map(C=>jsxRuntimeExports.jsx(Bar,{yAxisId:"left",dataKey:C,stackId:"stack",fill:LINE_OF_BUSINESS_COLORS[C],name:C,onClick:n,children:jsxRuntimeExports.jsx(LabelList,{content:_})},C)),jsxRuntimeExports.jsx(Line,{yAxisId:"right",type:"monotone",dataKey:(p==null?void 0:p.key)||"totalRevenue",stroke:"#dc2626",strokeWidth:3,dot:{fill:p.lineCOlor??"#dc2626",strokeWidth:2,r:4},name:"Total Revenue"})]})}),u&&jsxRuntimeExports.jsxs("div",{className:"chart-legend",children:[Object.entries(LINE_OF_BUSINESS_COLORS).map(([C,A])=>jsxRuntimeExports.jsxs("div",{className:"chart-legend-item",children:[jsxRuntimeExports.jsx("div",{className:"chart-legend-color",style:{backgroundColor:A}}),jsxRuntimeExports.jsx("span",{className:"chart-legend-text",children:C})]},C)),jsxRuntimeExports.jsxs("div",{className:"chart-legend-item",children:[jsxRuntimeExports.jsx("div",{className:"chart-legend-line"}),jsxRuntimeExports.jsx("span",{className:"chart-legend-text",children:"Total Revenue"})]})]})]},i)};exports.CEAccordion=CEAccordion;exports.CEAccordionItem=CEAccordionItem;exports.CEAdvAutoSuggestInput=CEAdvancedAutoSuggest;exports.CEAdvancedMultiSelectDropdown=CEAdvancedMultiSelectDropdown;exports.CEAutoCompleteInput=AutoCompleteInput;exports.CEAutoCompleteSelect=CEAutoCompleteSelect;exports.CEAutoSuggestInput=CEAutoSuggestInput;exports.CEAvatarMenu=CEAvatarMenu;exports.CEBadge=CEBadge;exports.CEBarChart=CEBarChart;exports.CEBreadcrumbs=Breadcrumbs;exports.CEButton=CEButton;exports.CEChatbox=CEChatbox;exports.CECheckbox=CECheckBox;exports.CEChipInput=CEChipInput;exports.CEDataGridDynamicTable=CEDataGridDynamicTable;exports.CEDatePicker=CEDatePicker;exports.CEDateRangePicker=CEDateRangePicker;exports.CEDialogBox=CEDialogBox;exports.CEDrawer=CEDrawer;exports.CEDynamicSearchField=CEDynamicSearchField;exports.CEDynamicSelectField=CEDynamicSelectField;exports.CEDynamicTextField=CEDynamicTextField;exports.CEFieldsInput=FieldsInput;exports.CEFileUpload=CEFileUpload;exports.CEFileUploadDocument=CEFileUploadDocument;exports.CEFooter=CEFooter;exports.CEGridItem=CEGridItem;exports.CEGridLayout=CEGridLayout;exports.CEGridMenuButton=CEGridMenuButton;exports.CEHamburgerButton=CEHamburgerButton;exports.CEHeader=CEHeader;exports.CEInputBox=CEInputBox;exports.CEInputDropDown=InputDropDown;exports.CELinearProgressBar=CELinearProgressBar;exports.CELogo=CELogo;exports.CEMenuBar=CEMenuBar;exports.CEMessageModal=CEMessageModal;exports.CEModalPopUp=CECustomModal;exports.CENotificationButton=CENotificationButton;exports.CEOperatingDaysSelector=CEOperatingDaysSelector;exports.CEPagination=CEPagination;exports.CEPieChart=CEPieChart;exports.CERadioButton=CERadioButton;exports.CERadioGroup=CERadioButtonGroup;exports.CERichTextEditor=CERichTextEditor;exports.CERoundTabNav=CERoundTabNav;exports.CESearchBar=CESearchBar;exports.CESearchButton=CESearchButton;exports.CESkeletonTable=CESkeletonTable;exports.CESnackBar=CESnackBar;exports.CEStackedBarChart=CEStackedBarChart;exports.CEStackedLineChart=CEStackedBarLineChart;exports.CEStatusDropdown=CEStatusDropdown;exports.CEStepper=CEStepper;exports.CETabView=CETabView;exports.CETemplate=CETemplate;exports.CETimePicker=CETimePicker;exports.CEToggleSlider=CEToggleSlide;exports.CEToggleYesNo=CEToggleYesNo;exports.CETransferButton=CETransferButton;exports.CETruncatedTextWithTooltip=CETruncatedTextWithTooltip;exports.CEUploadModalWrapper=CEUploadModalWrapper;exports.CEUserInfo=CEUserInfo;exports.CeBox=CeBox;exports.TransferList=TransferList;
421
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(e,t){if(e){if(typeof e=="string")return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}}function _iterableToArray(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(i){_defineProperty(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function _defineProperty(e,t,n){return t=_toPropertyKey(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return _typeof(t)=="symbol"?t:t+""}function _toPrimitive(e,t){if(_typeof(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(_typeof(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ORIENT_MAP={xAxis:["bottom","top"],yAxis:["left","right"]},FULL_WIDTH_AND_HEIGHT={width:"100%",height:"100%"},originCoordinate={x:0,y:0};function renderAsIs(e){return e}var calculateTooltipPos=function e(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},getActiveCoordinate=function e(t,n,i,o){var l=n.find(function(m){return m&&m.index===i});if(l){if(t==="horizontal")return{x:l.coordinate,y:o.y};if(t==="vertical")return{x:o.x,y:l.coordinate};if(t==="centric"){var u=l.coordinate,f=o.radius;return _objectSpread(_objectSpread(_objectSpread({},o),polarToCartesian(o.cx,o.cy,f,u)),{},{angle:u,radius:f})}var p=l.coordinate,d=o.angle;return _objectSpread(_objectSpread(_objectSpread({},o),polarToCartesian(o.cx,o.cy,p,d)),{},{angle:d,radius:p})}return originCoordinate},getDisplayedData=function e(t,n){var i=n.graphicalItems,o=n.dataStartIndex,l=n.dataEndIndex,u=(i??[]).reduce(function(f,p){var d=p.props.data;return d&&d.length?[].concat(_toConsumableArray(f),_toConsumableArray(d)):f},[]);return u.length>0?u:t&&t.length&&isNumber(o)&&isNumber(l)?t.slice(o,l+1):[]};function getDefaultDomainByAxisType(e){return e==="number"?[0,"auto"]:void 0}var getTooltipContent=function e(t,n,i,o){var l=t.graphicalItems,u=t.tooltipAxis,f=getDisplayedData(n,t);return i<0||!l||!l.length||i>=f.length?null:l.reduce(function(p,d){var m,g=(m=d.props.data)!==null&&m!==void 0?m:n;g&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=i&&(g=g.slice(t.dataStartIndex,t.dataEndIndex+1));var _;if(u.dataKey&&!u.allowDuplicatedCategory){var S=g===void 0?f:g;_=findEntryInArray(S,u.dataKey,o)}else _=g&&g[i]||f[i];return _?[].concat(_toConsumableArray(p),[getTooltipItem(d,_)]):p},[])},getTooltipData=function e(t,n,i,o){var l=o||{x:t.chartX,y:t.chartY},u=calculateTooltipPos(l,i),f=t.orderedTooltipTicks,p=t.tooltipAxis,d=t.tooltipTicks,m=calculateActiveTickIndex(u,f,d,p);if(m>=0&&d){var g=d[m]&&d[m].value,_=getTooltipContent(t,n,m,g),S=getActiveCoordinate(i,f,m,l);return{activeTooltipIndex:m,activeLabel:g,activePayload:_,activeCoordinate:S}}return null},getAxisMapByAxes=function e(t,n){var i=n.axes,o=n.graphicalItems,l=n.axisType,u=n.axisIdKey,f=n.stackGroups,p=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,g=t.children,_=t.stackOffset,S=isCategoricalAxis(m,l);return i.reduce(function(E,b){var T,C=b.type.defaultProps!==void 0?_objectSpread(_objectSpread({},b.type.defaultProps),b.props):b.props,A=C.type,R=C.dataKey,O=C.allowDataOverflow,I=C.allowDuplicatedCategory,j=C.scale,M=C.ticks,N=C.includeHidden,D=C[u];if(E[D])return E;var F=getDisplayedData(t.data,{graphicalItems:o.filter(function(H){var J,X=u in H.props?H.props[u]:(J=H.type.defaultProps)===null||J===void 0?void 0:J[u];return X===D}),dataStartIndex:p,dataEndIndex:d}),q=F.length,z,G,ee;isDomainSpecifiedByUser(C.domain,O,A)&&(z=parseSpecifiedDomain(C.domain,null,O),S&&(A==="number"||j!=="auto")&&(ee=getDomainOfDataByKey(F,R,"category")));var Y=getDefaultDomainByAxisType(A);if(!z||z.length===0){var V,W=(V=C.domain)!==null&&V!==void 0?V:Y;if(R){if(z=getDomainOfDataByKey(F,R,A),A==="category"&&S){var L=hasDuplicate(z);I&&L?(G=z,z=range(0,q)):I||(z=parseDomainOfCategoryAxis(W,z,b).reduce(function(H,J){return H.indexOf(J)>=0?H:[].concat(_toConsumableArray(H),[J])},[]))}else if(A==="category")I?z=z.filter(function(H){return H!==""&&!isNil(H)}):z=parseDomainOfCategoryAxis(W,z,b).reduce(function(H,J){return H.indexOf(J)>=0||J===""||isNil(J)?H:[].concat(_toConsumableArray(H),[J])},[]);else if(A==="number"){var B=parseErrorBarsOfAxis(F,o.filter(function(H){var J,X,Q=u in H.props?H.props[u]:(J=H.type.defaultProps)===null||J===void 0?void 0:J[u],le="hide"in H.props?H.props.hide:(X=H.type.defaultProps)===null||X===void 0?void 0:X.hide;return Q===D&&(N||!le)}),R,l,m);B&&(z=B)}S&&(A==="number"||j!=="auto")&&(ee=getDomainOfDataByKey(F,R,"category"))}else S?z=range(0,q):f&&f[D]&&f[D].hasStack&&A==="number"?z=_==="expand"?[0,1]:getDomainOfStackGroups(f[D].stackGroups,p,d):z=getDomainOfItemsWithSameAxis(F,o.filter(function(H){var J=u in H.props?H.props[u]:H.type.defaultProps[u],X="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return J===D&&(N||!X)}),A,m,!0);if(A==="number")z=detectReferenceElementsDomain(g,z,D,l,M),W&&(z=parseSpecifiedDomain(W,z,O));else if(A==="category"&&W){var U=W,K=z.every(function(H){return U.indexOf(H)>=0});K&&(z=U)}}return _objectSpread(_objectSpread({},E),{},_defineProperty({},D,_objectSpread(_objectSpread({},C),{},{axisType:l,domain:z,categoricalDomain:ee,duplicateDomain:G,originalDomain:(T=C.domain)!==null&&T!==void 0?T:Y,isCategorical:S,layout:m})))},{})},getAxisMapByItems=function e(t,n){var i=n.graphicalItems,o=n.Axis,l=n.axisType,u=n.axisIdKey,f=n.stackGroups,p=n.dataStartIndex,d=n.dataEndIndex,m=t.layout,g=t.children,_=getDisplayedData(t.data,{graphicalItems:i,dataStartIndex:p,dataEndIndex:d}),S=_.length,E=isCategoricalAxis(m,l),b=-1;return i.reduce(function(T,C){var A=C.type.defaultProps!==void 0?_objectSpread(_objectSpread({},C.type.defaultProps),C.props):C.props,R=A[u],O=getDefaultDomainByAxisType("number");if(!T[R]){b++;var I;return E?I=range(0,S):f&&f[R]&&f[R].hasStack?(I=getDomainOfStackGroups(f[R].stackGroups,p,d),I=detectReferenceElementsDomain(g,I,R,l)):(I=parseSpecifiedDomain(O,getDomainOfItemsWithSameAxis(_,i.filter(function(j){var M,N,D=u in j.props?j.props[u]:(M=j.type.defaultProps)===null||M===void 0?void 0:M[u],F="hide"in j.props?j.props.hide:(N=j.type.defaultProps)===null||N===void 0?void 0:N.hide;return D===R&&!F}),"number",m),o.defaultProps.allowDataOverflow),I=detectReferenceElementsDomain(g,I,R,l)),_objectSpread(_objectSpread({},T),{},_defineProperty({},R,_objectSpread(_objectSpread({axisType:l},o.defaultProps),{},{hide:!0,orientation:get(ORIENT_MAP,"".concat(l,".").concat(b%2),null),domain:I,originalDomain:O,isCategorical:E,layout:m})))}return T},{})},getAxisMap=function e(t,n){var i=n.axisType,o=i===void 0?"xAxis":i,l=n.AxisComp,u=n.graphicalItems,f=n.stackGroups,p=n.dataStartIndex,d=n.dataEndIndex,m=t.children,g="".concat(o,"Id"),_=findAllByType(m,l),S={};return _&&_.length?S=getAxisMapByAxes(t,{axes:_,graphicalItems:u,axisType:o,axisIdKey:g,stackGroups:f,dataStartIndex:p,dataEndIndex:d}):u&&u.length&&(S=getAxisMapByItems(t,{Axis:l,graphicalItems:u,axisType:o,axisIdKey:g,stackGroups:f,dataStartIndex:p,dataEndIndex:d})),S},tooltipTicksGenerator=function e(t){var n=getAnyElementOfObject(t),i=getTicksOfAxis(n,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:sortBy(i,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:getBandSizeOfAxis(n,i)}},createDefaultState=function e(t){var n=t.children,i=t.defaultShowTooltip,o=findChildByType(n,Brush),l=0,u=0;return t.data&&t.data.length!==0&&(u=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(l=o.props.startIndex),o.props.endIndex>=0&&(u=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:l,dataEndIndex:u,activeTooltipIndex:-1,isTooltipActive:!!i}},hasGraphicalBarItem=function e(t){return!t||!t.length?!1:t.some(function(n){var i=getDisplayName(n&&n.type);return i&&i.indexOf("Bar")>=0})},getAxisNameByLayout=function e(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},calculateOffset=function e(t,n){var i=t.props,o=t.graphicalItems,l=t.xAxisMap,u=l===void 0?{}:l,f=t.yAxisMap,p=f===void 0?{}:f,d=i.width,m=i.height,g=i.children,_=i.margin||{},S=findChildByType(g,Brush),E=findChildByType(g,Legend),b=Object.keys(p).reduce(function(I,j){var M=p[j],N=M.orientation;return!M.mirror&&!M.hide?_objectSpread(_objectSpread({},I),{},_defineProperty({},N,I[N]+M.width)):I},{left:_.left||0,right:_.right||0}),T=Object.keys(u).reduce(function(I,j){var M=u[j],N=M.orientation;return!M.mirror&&!M.hide?_objectSpread(_objectSpread({},I),{},_defineProperty({},N,get(I,"".concat(N))+M.height)):I},{top:_.top||0,bottom:_.bottom||0}),C=_objectSpread(_objectSpread({},T),b),A=C.bottom;S&&(C.bottom+=S.props.height||Brush.defaultProps.height),E&&n&&(C=appendOffsetOfLegend(C,o,i,n));var R=d-C.left-C.right,O=m-C.top-C.bottom;return _objectSpread(_objectSpread({brushBottom:A},C),{},{width:Math.max(R,0),height:Math.max(O,0)})},getCartesianAxisSize=function e(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},generateCategoricalChart=function e(t){var n=t.chartName,i=t.GraphicalChild,o=t.defaultTooltipEventType,l=o===void 0?"axis":o,u=t.validateTooltipEventTypes,f=u===void 0?["axis"]:u,p=t.axisComponents,d=t.legendContent,m=t.formatAxisMap,g=t.defaultProps,_=function(C,A){var R=A.graphicalItems,O=A.stackGroups,I=A.offset,j=A.updateId,M=A.dataStartIndex,N=A.dataEndIndex,D=C.barSize,F=C.layout,q=C.barGap,z=C.barCategoryGap,G=C.maxBarSize,ee=getAxisNameByLayout(F),Y=ee.numericAxisName,V=ee.cateAxisName,W=hasGraphicalBarItem(R),L=[];return R.forEach(function(B,U){var K=getDisplayedData(C.data,{graphicalItems:[B],dataStartIndex:M,dataEndIndex:N}),H=B.type.defaultProps!==void 0?_objectSpread(_objectSpread({},B.type.defaultProps),B.props):B.props,J=H.dataKey,X=H.maxBarSize,Q=H["".concat(Y,"Id")],le=H["".concat(V,"Id")],ye={},de=p.reduce(function(De,ke){var Ue,We,Ge=A["".concat(ke.axisType,"Map")],Xe=H["".concat(ke.axisType,"Id")];Ge&&Ge[Xe]||ke.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?invariant(!1,"Specifying a(n) ".concat(ke.axisType,"Id requires a corresponding ").concat(ke.axisType,"Id on the targeted graphical component ").concat((Ue=B==null||(We=B.type)===null||We===void 0?void 0:We.displayName)!==null&&Ue!==void 0?Ue:"")):invariant());var Ze=Ge[Xe];return _objectSpread(_objectSpread({},De),{},_defineProperty(_defineProperty({},ke.axisType,Ze),"".concat(ke.axisType,"Ticks"),getTicksOfAxis(Ze)))},ye),fe=de[V],pe=de["".concat(V,"Ticks")],Ee=O&&O[Q]&&O[Q].hasStack&&getStackedDataOfItem(B,O[Q].stackGroups),te=getDisplayName(B.type).indexOf("Bar")>=0,Te=getBandSizeOfAxis(fe,pe),ue=[],Me=W&&getBarSizeList({barSize:D,stackGroups:O,totalSize:getCartesianAxisSize(de,V)});if(te){var je,Pe,Fe=isNil(X)?G:X,Ve=(je=(Pe=getBandSizeOfAxis(fe,pe,!0))!==null&&Pe!==void 0?Pe:Fe)!==null&&je!==void 0?je:0;ue=getBarPosition({barGap:q,barCategoryGap:z,bandSize:Ve!==Te?Ve:Te,sizeList:Me[le],maxBarSize:Fe}),Ve!==Te&&(ue=ue.map(function(De){return _objectSpread(_objectSpread({},De),{},{position:_objectSpread(_objectSpread({},De.position),{},{offset:De.position.offset-Ve/2})})}))}var qe=B&&B.type&&B.type.getComposedData;qe&&L.push({props:_objectSpread(_objectSpread({},qe(_objectSpread(_objectSpread({},de),{},{displayedData:K,props:C,dataKey:J,item:B,bandSize:Te,barPosition:ue,offset:I,stackedData:Ee,layout:F,dataStartIndex:M,dataEndIndex:N}))),{},_defineProperty(_defineProperty(_defineProperty({key:B.key||"item-".concat(U)},Y,de[Y]),V,de[V]),"animationId",j)),childIndex:parseChildIndex(B,C.children),item:B})}),L},S=function(C,A){var R=C.props,O=C.dataStartIndex,I=C.dataEndIndex,j=C.updateId;if(!validateWidthHeight({props:R}))return null;var M=R.children,N=R.layout,D=R.stackOffset,F=R.data,q=R.reverseStackOrder,z=getAxisNameByLayout(N),G=z.numericAxisName,ee=z.cateAxisName,Y=findAllByType(M,i),V=getStackGroupsByAxisId(F,Y,"".concat(G,"Id"),"".concat(ee,"Id"),D,q),W=p.reduce(function(H,J){var X="".concat(J.axisType,"Map");return _objectSpread(_objectSpread({},H),{},_defineProperty({},X,getAxisMap(R,_objectSpread(_objectSpread({},J),{},{graphicalItems:Y,stackGroups:J.axisType===G&&V,dataStartIndex:O,dataEndIndex:I}))))},{}),L=calculateOffset(_objectSpread(_objectSpread({},W),{},{props:R,graphicalItems:Y}),A==null?void 0:A.legendBBox);Object.keys(W).forEach(function(H){W[H]=m(R,W[H],L,H.replace("Map",""),n)});var B=W["".concat(ee,"Map")],U=tooltipTicksGenerator(B),K=_(R,_objectSpread(_objectSpread({},W),{},{dataStartIndex:O,dataEndIndex:I,updateId:j,graphicalItems:Y,stackGroups:V,offset:L}));return _objectSpread(_objectSpread({formattedGraphicalItems:K,graphicalItems:Y,offset:L,stackGroups:V},U),W)},E=function(T){function C(A){var R,O,I;return _classCallCheck(this,C),I=_callSuper(this,C,[A]),_defineProperty(I,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_defineProperty(I,"accessibilityManager",new AccessibilityManager),_defineProperty(I,"handleLegendBBoxUpdate",function(j){if(j){var M=I.state,N=M.dataStartIndex,D=M.dataEndIndex,F=M.updateId;I.setState(_objectSpread({legendBBox:j},S({props:I.props,dataStartIndex:N,dataEndIndex:D,updateId:F},_objectSpread(_objectSpread({},I.state),{},{legendBBox:j}))))}}),_defineProperty(I,"handleReceiveSyncEvent",function(j,M,N){if(I.props.syncId===j){if(N===I.eventEmitterSymbol&&typeof I.props.syncMethod!="function")return;I.applySyncEvent(M)}}),_defineProperty(I,"handleBrushChange",function(j){var M=j.startIndex,N=j.endIndex;if(M!==I.state.dataStartIndex||N!==I.state.dataEndIndex){var D=I.state.updateId;I.setState(function(){return _objectSpread({dataStartIndex:M,dataEndIndex:N},S({props:I.props,dataStartIndex:M,dataEndIndex:N,updateId:D},I.state))}),I.triggerSyncEvent({dataStartIndex:M,dataEndIndex:N})}}),_defineProperty(I,"handleMouseEnter",function(j){var M=I.getMouseInfo(j);if(M){var N=_objectSpread(_objectSpread({},M),{},{isTooltipActive:!0});I.setState(N),I.triggerSyncEvent(N);var D=I.props.onMouseEnter;isFunction(D)&&D(N,j)}}),_defineProperty(I,"triggeredAfterMouseMove",function(j){var M=I.getMouseInfo(j),N=M?_objectSpread(_objectSpread({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};I.setState(N),I.triggerSyncEvent(N);var D=I.props.onMouseMove;isFunction(D)&&D(N,j)}),_defineProperty(I,"handleItemMouseEnter",function(j){I.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),_defineProperty(I,"handleItemMouseLeave",function(){I.setState(function(){return{isTooltipActive:!1}})}),_defineProperty(I,"handleMouseMove",function(j){j.persist(),I.throttleTriggeredAfterMouseMove(j)}),_defineProperty(I,"handleMouseLeave",function(j){I.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};I.setState(M),I.triggerSyncEvent(M);var N=I.props.onMouseLeave;isFunction(N)&&N(M,j)}),_defineProperty(I,"handleOuterEvent",function(j){var M=getReactEventByType(j),N=get(I.props,"".concat(M));if(M&&isFunction(N)){var D,F;/.*touch.*/i.test(M)?F=I.getMouseInfo(j.changedTouches[0]):F=I.getMouseInfo(j),N((D=F)!==null&&D!==void 0?D:{},j)}}),_defineProperty(I,"handleClick",function(j){var M=I.getMouseInfo(j);if(M){var N=_objectSpread(_objectSpread({},M),{},{isTooltipActive:!0});I.setState(N),I.triggerSyncEvent(N);var D=I.props.onClick;isFunction(D)&&D(N,j)}}),_defineProperty(I,"handleMouseDown",function(j){var M=I.props.onMouseDown;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"handleMouseUp",function(j){var M=I.props.onMouseUp;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&I.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),_defineProperty(I,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&I.handleMouseDown(j.changedTouches[0])}),_defineProperty(I,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&I.handleMouseUp(j.changedTouches[0])}),_defineProperty(I,"handleDoubleClick",function(j){var M=I.props.onDoubleClick;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"handleContextMenu",function(j){var M=I.props.onContextMenu;if(isFunction(M)){var N=I.getMouseInfo(j);M(N,j)}}),_defineProperty(I,"triggerSyncEvent",function(j){I.props.syncId!==void 0&&eventCenter.emit(SYNC_EVENT,I.props.syncId,j,I.eventEmitterSymbol)}),_defineProperty(I,"applySyncEvent",function(j){var M=I.props,N=M.layout,D=M.syncMethod,F=I.state.updateId,q=j.dataStartIndex,z=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)I.setState(_objectSpread({dataStartIndex:q,dataEndIndex:z},S({props:I.props,dataStartIndex:q,dataEndIndex:z,updateId:F},I.state)));else if(j.activeTooltipIndex!==void 0){var G=j.chartX,ee=j.chartY,Y=j.activeTooltipIndex,V=I.state,W=V.offset,L=V.tooltipTicks;if(!W)return;if(typeof D=="function")Y=D(L,j);else if(D==="value"){Y=-1;for(var B=0;B<L.length;B++)if(L[B].value===j.activeLabel){Y=B;break}}var U=_objectSpread(_objectSpread({},W),{},{x:W.left,y:W.top}),K=Math.min(G,U.x+U.width),H=Math.min(ee,U.y+U.height),J=L[Y]&&L[Y].value,X=getTooltipContent(I.state,I.props.data,Y),Q=L[Y]?{x:N==="horizontal"?L[Y].coordinate:K,y:N==="horizontal"?H:L[Y].coordinate}:originCoordinate;I.setState(_objectSpread(_objectSpread({},j),{},{activeLabel:J,activeCoordinate:Q,activePayload:X,activeTooltipIndex:Y}))}else I.setState(j)}),_defineProperty(I,"renderCursor",function(j){var M,N=I.state,D=N.isTooltipActive,F=N.activeCoordinate,q=N.activePayload,z=N.offset,G=N.activeTooltipIndex,ee=N.tooltipAxisBandSize,Y=I.getTooltipEventType(),V=(M=j.props.active)!==null&&M!==void 0?M:D,W=I.props.layout,L=j.key||"_recharts-cursor";return React.createElement(Cursor,{key:L,activeCoordinate:F,activePayload:q,activeTooltipIndex:G,chartName:n,element:j,isActive:V,layout:W,offset:z,tooltipAxisBandSize:ee,tooltipEventType:Y})}),_defineProperty(I,"renderPolarAxis",function(j,M,N){var D=get(j,"type.axisType"),F=get(I.state,"".concat(D,"Map")),q=j.type.defaultProps,z=q!==void 0?_objectSpread(_objectSpread({},q),j.props):j.props,G=F&&F[z["".concat(D,"Id")]];return React.cloneElement(j,_objectSpread(_objectSpread({},G),{},{className:clsx(D,G.className),key:j.key||"".concat(M,"-").concat(N),ticks:getTicksOfAxis(G,!0)}))}),_defineProperty(I,"renderPolarGrid",function(j){var M=j.props,N=M.radialLines,D=M.polarAngles,F=M.polarRadius,q=I.state,z=q.radiusAxisMap,G=q.angleAxisMap,ee=getAnyElementOfObject(z),Y=getAnyElementOfObject(G),V=Y.cx,W=Y.cy,L=Y.innerRadius,B=Y.outerRadius;return React.cloneElement(j,{polarAngles:Array.isArray(D)?D:getTicksOfAxis(Y,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(F)?F:getTicksOfAxis(ee,!0).map(function(U){return U.coordinate}),cx:V,cy:W,innerRadius:L,outerRadius:B,key:j.key||"polar-grid",radialLines:N})}),_defineProperty(I,"renderLegend",function(){var j=I.state.formattedGraphicalItems,M=I.props,N=M.children,D=M.width,F=M.height,q=I.props.margin||{},z=D-(q.left||0)-(q.right||0),G=getLegendProps({children:N,formattedGraphicalItems:j,legendWidth:z,legendContent:d});if(!G)return null;var ee=G.item,Y=_objectWithoutProperties(G,_excluded);return React.cloneElement(ee,_objectSpread(_objectSpread({},Y),{},{chartWidth:D,chartHeight:F,margin:q,onBBoxUpdate:I.handleLegendBBoxUpdate}))}),_defineProperty(I,"renderTooltip",function(){var j,M=I.props,N=M.children,D=M.accessibilityLayer,F=findChildByType(N,Tooltip);if(!F)return null;var q=I.state,z=q.isTooltipActive,G=q.activeCoordinate,ee=q.activePayload,Y=q.activeLabel,V=q.offset,W=(j=F.props.active)!==null&&j!==void 0?j:z;return React.cloneElement(F,{viewBox:_objectSpread(_objectSpread({},V),{},{x:V.left,y:V.top}),active:W,label:Y,payload:W?ee:[],coordinate:G,accessibilityLayer:D})}),_defineProperty(I,"renderBrush",function(j){var M=I.props,N=M.margin,D=M.data,F=I.state,q=F.offset,z=F.dataStartIndex,G=F.dataEndIndex,ee=F.updateId;return React.cloneElement(j,{key:j.key||"_recharts-brush",onChange:combineEventHandlers(I.handleBrushChange,j.props.onChange),data:D,x:isNumber(j.props.x)?j.props.x:q.left,y:isNumber(j.props.y)?j.props.y:q.top+q.height+q.brushBottom-(N.bottom||0),width:isNumber(j.props.width)?j.props.width:q.width,startIndex:z,endIndex:G,updateId:"brush-".concat(ee)})}),_defineProperty(I,"renderReferenceElement",function(j,M,N){if(!j)return null;var D=I,F=D.clipPathId,q=I.state,z=q.xAxisMap,G=q.yAxisMap,ee=q.offset,Y=j.type.defaultProps||{},V=j.props,W=V.xAxisId,L=W===void 0?Y.xAxisId:W,B=V.yAxisId,U=B===void 0?Y.yAxisId:B;return React.cloneElement(j,{key:j.key||"".concat(M,"-").concat(N),xAxis:z[L],yAxis:G[U],viewBox:{x:ee.left,y:ee.top,width:ee.width,height:ee.height},clipPathId:F})}),_defineProperty(I,"renderActivePoints",function(j){var M=j.item,N=j.activePoint,D=j.basePoint,F=j.childIndex,q=j.isRange,z=[],G=M.props.key,ee=M.item.type.defaultProps!==void 0?_objectSpread(_objectSpread({},M.item.type.defaultProps),M.item.props):M.item.props,Y=ee.activeDot,V=ee.dataKey,W=_objectSpread(_objectSpread({index:F,dataKey:V,cx:N.x,cy:N.y,r:4,fill:getMainColorOfGraphicItem(M.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},filterProps(Y,!1)),adaptEventHandlers(Y));return z.push(C.renderActiveDot(Y,W,"".concat(G,"-activePoint-").concat(F))),D?z.push(C.renderActiveDot(Y,_objectSpread(_objectSpread({},W),{},{cx:D.x,cy:D.y}),"".concat(G,"-basePoint-").concat(F))):q&&z.push(null),z}),_defineProperty(I,"renderGraphicChild",function(j,M,N){var D=I.filterFormatItem(j,M,N);if(!D)return null;var F=I.getTooltipEventType(),q=I.state,z=q.isTooltipActive,G=q.tooltipAxis,ee=q.activeTooltipIndex,Y=q.activeLabel,V=I.props.children,W=findChildByType(V,Tooltip),L=D.props,B=L.points,U=L.isRange,K=L.baseLine,H=D.item.type.defaultProps!==void 0?_objectSpread(_objectSpread({},D.item.type.defaultProps),D.item.props):D.item.props,J=H.activeDot,X=H.hide,Q=H.activeBar,le=H.activeShape,ye=!!(!X&&z&&W&&(J||Q||le)),de={};F!=="axis"&&W&&W.props.trigger==="click"?de={onClick:combineEventHandlers(I.handleItemMouseEnter,j.props.onClick)}:F!=="axis"&&(de={onMouseLeave:combineEventHandlers(I.handleItemMouseLeave,j.props.onMouseLeave),onMouseEnter:combineEventHandlers(I.handleItemMouseEnter,j.props.onMouseEnter)});var fe=React.cloneElement(j,_objectSpread(_objectSpread({},D.props),de));function pe(ke){return typeof G.dataKey=="function"?G.dataKey(ke.payload):null}if(ye)if(ee>=0){var Ee,te;if(G.dataKey&&!G.allowDuplicatedCategory){var Te=typeof G.dataKey=="function"?pe:"payload.".concat(G.dataKey.toString());Ee=findEntryInArray(B,Te,Y),te=U&&K&&findEntryInArray(K,Te,Y)}else Ee=B==null?void 0:B[ee],te=U&&K&&K[ee];if(le||Q){var ue=j.props.activeIndex!==void 0?j.props.activeIndex:ee;return[React.cloneElement(j,_objectSpread(_objectSpread(_objectSpread({},D.props),de),{},{activeIndex:ue})),null,null]}if(!isNil(Ee))return[fe].concat(_toConsumableArray(I.renderActivePoints({item:D,activePoint:Ee,basePoint:te,childIndex:ee,isRange:U})))}else{var Me,je=(Me=I.getItemByXY(I.state.activeCoordinate))!==null&&Me!==void 0?Me:{graphicalItem:fe},Pe=je.graphicalItem,Fe=Pe.item,Ve=Fe===void 0?j:Fe,qe=Pe.childIndex,De=_objectSpread(_objectSpread(_objectSpread({},D.props),de),{},{activeIndex:qe});return[React.cloneElement(Ve,De),null,null]}return U?[fe,null,null]:[fe,null]}),_defineProperty(I,"renderCustomized",function(j,M,N){return React.cloneElement(j,_objectSpread(_objectSpread({key:"recharts-customized-".concat(N)},I.props),I.state))}),_defineProperty(I,"renderMap",{CartesianGrid:{handler:renderAsIs,once:!0},ReferenceArea:{handler:I.renderReferenceElement},ReferenceLine:{handler:renderAsIs},ReferenceDot:{handler:I.renderReferenceElement},XAxis:{handler:renderAsIs},YAxis:{handler:renderAsIs},Brush:{handler:I.renderBrush,once:!0},Bar:{handler:I.renderGraphicChild},Line:{handler:I.renderGraphicChild},Area:{handler:I.renderGraphicChild},Radar:{handler:I.renderGraphicChild},RadialBar:{handler:I.renderGraphicChild},Scatter:{handler:I.renderGraphicChild},Pie:{handler:I.renderGraphicChild},Funnel:{handler:I.renderGraphicChild},Tooltip:{handler:I.renderCursor,once:!0},PolarGrid:{handler:I.renderPolarGrid,once:!0},PolarAngleAxis:{handler:I.renderPolarAxis},PolarRadiusAxis:{handler:I.renderPolarAxis},Customized:{handler:I.renderCustomized}}),I.clipPathId="".concat((R=A.id)!==null&&R!==void 0?R:uniqueId("recharts"),"-clip"),I.throttleTriggeredAfterMouseMove=throttle(I.triggeredAfterMouseMove,(O=A.throttleDelay)!==null&&O!==void 0?O:1e3/60),I.state={},I}return _inherits(C,T),_createClass(C,[{key:"componentDidMount",value:function(){var R,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(R=this.props.margin.left)!==null&&R!==void 0?R:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var R=this.props,O=R.children,I=R.data,j=R.height,M=R.layout,N=findChildByType(O,Tooltip);if(N){var D=N.props.defaultIndex;if(!(typeof D!="number"||D<0||D>this.state.tooltipTicks.length-1)){var F=this.state.tooltipTicks[D]&&this.state.tooltipTicks[D].value,q=getTooltipContent(this.state,I,D,F),z=this.state.tooltipTicks[D].coordinate,G=(this.state.offset.top+j)/2,ee=M==="horizontal",Y=ee?{x:z,y:G}:{y:z,x:G},V=this.state.formattedGraphicalItems.find(function(L){var B=L.item;return B.type.name==="Scatter"});V&&(Y=_objectSpread(_objectSpread({},Y),V.props.points[D].tooltipPosition),q=V.props.points[D].tooltipPayload);var W={activeTooltipIndex:D,isTooltipActive:!0,activeLabel:F,activePayload:q,activeCoordinate:Y};this.setState(W),this.renderCursor(N),this.accessibilityManager.setIndex(D)}}}},{key:"getSnapshotBeforeUpdate",value:function(R,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==R.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==R.margin){var I,j;this.accessibilityManager.setDetails({offset:{left:(I=this.props.margin.left)!==null&&I!==void 0?I:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(R){isChildrenEqual([findChildByType(R.children,Tooltip)],[findChildByType(this.props.children,Tooltip)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var R=findChildByType(this.props.children,Tooltip);if(R&&typeof R.props.shared=="boolean"){var O=R.props.shared?"axis":"item";return f.indexOf(O)>=0?O:l}return l}},{key:"getMouseInfo",value:function(R){if(!this.container)return null;var O=this.container,I=O.getBoundingClientRect(),j=getOffset(I),M={chartX:Math.round(R.pageX-j.left),chartY:Math.round(R.pageY-j.top)},N=I.width/O.offsetWidth||1,D=this.inRange(M.chartX,M.chartY,N);if(!D)return null;var F=this.state,q=F.xAxisMap,z=F.yAxisMap,G=this.getTooltipEventType();if(G!=="axis"&&q&&z){var ee=getAnyElementOfObject(q).scale,Y=getAnyElementOfObject(z).scale,V=ee&&ee.invert?ee.invert(M.chartX):null,W=Y&&Y.invert?Y.invert(M.chartY):null;return _objectSpread(_objectSpread({},M),{},{xValue:V,yValue:W})}var L=getTooltipData(this.state,this.props.data,this.props.layout,D);return L?_objectSpread(_objectSpread({},M),L):null}},{key:"inRange",value:function(R,O){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,M=R/I,N=O/I;if(j==="horizontal"||j==="vertical"){var D=this.state.offset,F=M>=D.left&&M<=D.left+D.width&&N>=D.top&&N<=D.top+D.height;return F?{x:M,y:N}:null}var q=this.state,z=q.angleAxisMap,G=q.radiusAxisMap;if(z&&G){var ee=getAnyElementOfObject(z);return inRangeOfSector({x:M,y:N},ee)}return null}},{key:"parseEventsOfWrapper",value:function(){var R=this.props.children,O=this.getTooltipEventType(),I=findChildByType(R,Tooltip),j={};I&&O==="axis"&&(I.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=adaptEventHandlers(this.props,this.handleOuterEvent);return _objectSpread(_objectSpread({},M),j)}},{key:"addListener",value:function(){eventCenter.on(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){eventCenter.removeListener(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(R,O,I){for(var j=this.state.formattedGraphicalItems,M=0,N=j.length;M<N;M++){var D=j[M];if(D.item===R||D.props.key===R.key||O===getDisplayName(D.item.type)&&I===D.childIndex)return D}return null}},{key:"renderClipPath",value:function(){var R=this.clipPathId,O=this.state.offset,I=O.left,j=O.top,M=O.height,N=O.width;return React.createElement("defs",null,React.createElement("clipPath",{id:R},React.createElement("rect",{x:I,y:j,height:M,width:N})))}},{key:"getXScales",value:function(){var R=this.state.xAxisMap;return R?Object.entries(R).reduce(function(O,I){var j=_slicedToArray(I,2),M=j[0],N=j[1];return _objectSpread(_objectSpread({},O),{},_defineProperty({},M,N.scale))},{}):null}},{key:"getYScales",value:function(){var R=this.state.yAxisMap;return R?Object.entries(R).reduce(function(O,I){var j=_slicedToArray(I,2),M=j[0],N=j[1];return _objectSpread(_objectSpread({},O),{},_defineProperty({},M,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(R){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[R])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(R){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[R])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(R){var O=this.state,I=O.formattedGraphicalItems,j=O.activeItem;if(I&&I.length)for(var M=0,N=I.length;M<N;M++){var D=I[M],F=D.props,q=D.item,z=q.type.defaultProps!==void 0?_objectSpread(_objectSpread({},q.type.defaultProps),q.props):q.props,G=getDisplayName(q.type);if(G==="Bar"){var ee=(F.data||[]).find(function(L){return isInRectangle(R,L)});if(ee)return{graphicalItem:D,payload:ee}}else if(G==="RadialBar"){var Y=(F.data||[]).find(function(L){return inRangeOfSector(R,L)});if(Y)return{graphicalItem:D,payload:Y}}else if(isFunnel(D,j)||isPie(D,j)||isScatter(D,j)){var V=getActiveShapeIndexForTooltip({graphicalItem:D,activeTooltipItem:j,itemData:z.data}),W=z.activeIndex===void 0?V:z.activeIndex;return{graphicalItem:_objectSpread(_objectSpread({},D),{},{childIndex:W}),payload:isScatter(D,j)?z.data[V]:D.props.data[V]}}}return null}},{key:"render",value:function(){var R=this;if(!validateWidthHeight(this))return null;var O=this.props,I=O.children,j=O.className,M=O.width,N=O.height,D=O.style,F=O.compact,q=O.title,z=O.desc,G=_objectWithoutProperties(O,_excluded2),ee=filterProps(G,!1);if(F)return React.createElement(ChartLayoutContextProvider,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},React.createElement(Surface,_extends({},ee,{width:M,height:N,title:q,desc:z}),this.renderClipPath(),renderByOrder(I,this.renderMap)));if(this.props.accessibilityLayer){var Y,V;ee.tabIndex=(Y=this.props.tabIndex)!==null&&Y!==void 0?Y:0,ee.role=(V=this.props.role)!==null&&V!==void 0?V:"application",ee.onKeyDown=function(L){R.accessibilityManager.keyboardEvent(L)},ee.onFocus=function(){R.accessibilityManager.focus()}}var W=this.parseEventsOfWrapper();return React.createElement(ChartLayoutContextProvider,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},React.createElement("div",_extends({className:clsx("recharts-wrapper",j),style:_objectSpread({position:"relative",cursor:"default",width:M,height:N},D)},W,{ref:function(B){R.container=B}}),React.createElement(Surface,_extends({},ee,{width:M,height:N,title:q,desc:z,style:FULL_WIDTH_AND_HEIGHT}),this.renderClipPath(),renderByOrder(I,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(React.Component);_defineProperty(E,"displayName",n),_defineProperty(E,"defaultProps",_objectSpread({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},g)),_defineProperty(E,"getDerivedStateFromProps",function(T,C){var A=T.dataKey,R=T.data,O=T.children,I=T.width,j=T.height,M=T.layout,N=T.stackOffset,D=T.margin,F=C.dataStartIndex,q=C.dataEndIndex;if(C.updateId===void 0){var z=createDefaultState(T);return _objectSpread(_objectSpread(_objectSpread({},z),{},{updateId:0},S(_objectSpread(_objectSpread({props:T},z),{},{updateId:0}),C)),{},{prevDataKey:A,prevData:R,prevWidth:I,prevHeight:j,prevLayout:M,prevStackOffset:N,prevMargin:D,prevChildren:O})}if(A!==C.prevDataKey||R!==C.prevData||I!==C.prevWidth||j!==C.prevHeight||M!==C.prevLayout||N!==C.prevStackOffset||!shallowEqual(D,C.prevMargin)){var G=createDefaultState(T),ee={chartX:C.chartX,chartY:C.chartY,isTooltipActive:C.isTooltipActive},Y=_objectSpread(_objectSpread({},getTooltipData(C,R,M)),{},{updateId:C.updateId+1}),V=_objectSpread(_objectSpread(_objectSpread({},G),ee),Y);return _objectSpread(_objectSpread(_objectSpread({},V),S(_objectSpread({props:T},V),C)),{},{prevDataKey:A,prevData:R,prevWidth:I,prevHeight:j,prevLayout:M,prevStackOffset:N,prevMargin:D,prevChildren:O})}if(!isChildrenEqual(O,C.prevChildren)){var W,L,B,U,K=findChildByType(O,Brush),H=K&&(W=(L=K.props)===null||L===void 0?void 0:L.startIndex)!==null&&W!==void 0?W:F,J=K&&(B=(U=K.props)===null||U===void 0?void 0:U.endIndex)!==null&&B!==void 0?B:q,X=H!==F||J!==q,Q=!isNil(R),le=Q&&!X?C.updateId:C.updateId+1;return _objectSpread(_objectSpread({updateId:le},S(_objectSpread(_objectSpread({props:T},C),{},{updateId:le,dataStartIndex:H,dataEndIndex:J}),C)),{},{prevChildren:O,dataStartIndex:H,dataEndIndex:J})}return null}),_defineProperty(E,"renderActiveDot",function(T,C,A){var R;return React.isValidElement(T)?R=React.cloneElement(T,C):isFunction(T)?R=T(C):R=React.createElement(Dot,C),React.createElement(Layer,{className:"recharts-active-dot",key:A},R)});var b=React.forwardRef(function(C,A){return React.createElement(E,_extends({},C,{ref:A}))});return b.displayName=E.displayName,b},BarChart=generateCategoricalChart({chartName:"BarChart",GraphicalChild:Bar,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:XAxis},{axisType:"yAxis",AxisComp:YAxis}],formatAxisMap}),PieChart=generateCategoricalChart({chartName:"PieChart",GraphicalChild:Pie,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:PolarAngleAxis},{axisType:"radiusAxis",AxisComp:PolarRadiusAxis}],formatAxisMap:formatAxisMap$1,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),ComposedChart=generateCategoricalChart({chartName:"ComposedChart",GraphicalChild:[Line,Area,Bar,Scatter],axisComponents:[{axisType:"xAxis",AxisComp:XAxis},{axisType:"yAxis",AxisComp:YAxis},{axisType:"zAxis",AxisComp:ZAxis}],formatAxisMap});const CEBarChart=({dataKey:e,chartData:t,onBarClick:n,refreshKey:i=0,height:o=300,barColor:l="#64B230"})=>jsxRuntimeExports.jsx(CeBox,{children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:o,children:jsxRuntimeExports.jsxs(BarChart,{data:t,children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"name",angle:-45,textAnchor:"end",height:80}),jsxRuntimeExports.jsx(YAxis,{}),jsxRuntimeExports.jsx(Tooltip,{}),jsxRuntimeExports.jsx(Bar,{dataKey:e,fill:l,onClick:u=>n(u),className:"cursor-pointer"})]})})},i),CEPieChart=({chartData:e,onPieClick:t,refreshKey:n=0,height:i=300})=>jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:i,children:jsxRuntimeExports.jsxs(PieChart,{children:[jsxRuntimeExports.jsx(Pie,{data:e,cx:"50%",cy:"50%",outerRadius:100,innerRadius:0,fill:"#8884d8",dataKey:"value",onClick:t,className:"cursor-pointer",label:({name:o,percentage:l})=>`${o} ${l}%`,labelLine:!0,fontSize:12,children:e.map((o,l)=>jsxRuntimeExports.jsx(Cell,{fill:o.color},`cell-${l}`))}),jsxRuntimeExports.jsx(Tooltip,{formatter:(o,l,u)=>{var f;return[`${o} ${u.payload.type||""} (${(f=u==null?void 0:u.payload)==null?void 0:f.percentage}%)`,u.payload.name]}})]})})},n),CEStackedBarChart=({chartData:e,refreshKey:t=0,statusOrder:n,statusColor:i,height:o=300,onBarClick:l})=>{const u=({active:f,payload:p,label:d})=>{if(f&&p&&p.length){const m=p.reduce((g,_)=>g+(_.value||0),0);return jsxRuntimeExports.jsxs("div",{className:"stacked-barchart-tooltip",children:[jsxRuntimeExports.jsx("p",{className:"fstacked-barchart-tooltip-title",children:`${d}: ${m} total orders`}),p.filter(g=>g.value>0).sort((g,_)=>n.indexOf(g.dataKey)-n.indexOf(_.dataKey)).map((g,_)=>jsxRuntimeExports.jsx("p",{className:"text-sm",style:{color:g.color},children:`${g.dataKey}: ${g.value} orders`},_))]})}return null};return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:o,children:jsxRuntimeExports.jsxs(BarChart,{data:e,children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"name"}),jsxRuntimeExports.jsx(YAxis,{}),jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsx(u,{})}),jsxRuntimeExports.jsx(Legend,{}),n.map(f=>jsxRuntimeExports.jsx(Bar,{dataKey:f,stackId:"age",fill:i[f]||"#6b7280",name:f,onClick:()=>l(f)},f))]})})},t)},LINE_OF_BUSINESS_COLORS={"Waste Disposal & Transportation":"#2F7D32","Lab Pack":"#E91E63","Household Hazardous Waste":"#607D8B","Emergency Response Services":"#1976D2","Electronic Recycling & Data Management Services":"#FF9800","Universal Waste Services":"#9C27B0","DEA Destruction Services":"#795548","Resource Circularity, Sustainability and Recycling Services":"#8BC34A","Onsite Services":"#FF5722","Professional Services":"#3F51B5","Soil Services":"#673AB7","Dredge Services":"#9E9E9E",Remediation:"#009688",PFAS:"#FFC107"},CEStackedBarLineChart=({chartData:e,chartColumns:t,onBarClick:n,refreshKey:i=0,zoomLevel:o=60,height:l=650,showLengend:u=!0,showTootip:f=!0,config:p})=>{const[d,m]=React.useState(t||[]),g=d.length>0?e.filter(C=>d.includes(C.facility)):e,_=C=>{const{x:A,y:R,width:O,height:I,value:j}=C;if(I<20||j<1.5)return null;const M=parseFloat(Number(j).toFixed(1));return jsxRuntimeExports.jsxs("text",{x:A+O/2,y:R+I/2,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:10,fontWeight:"500",children:[M,p==null?void 0:p.unit]})},S=({active:C,payload:A,label:R})=>{if(C&&A&&A.length){const O=A.find(N=>N.dataKey===(p==null?void 0:p.key)),I=A.filter(N=>N.dataKey!==(p==null?void 0:p.key)),j=I.reduce((N,D)=>N+D.value,0),M=parseFloat(j.toFixed(1));return jsxRuntimeExports.jsxs("div",{className:"chart-tooltip",children:[jsxRuntimeExports.jsx("p",{className:"chart-tooltip-title",children:R}),I.map((N,D)=>jsxRuntimeExports.jsxs("div",{className:"chart-tooltip-row",children:[jsxRuntimeExports.jsx("div",{className:"chart-tooltip-color",style:{backgroundColor:N.color}}),jsxRuntimeExports.jsxs("span",{className:"chart-tooltip-label",children:[N.name,":"]}),jsxRuntimeExports.jsxs("span",{className:"chart-tooltip-value",children:[p==null?void 0:p.currencySymbol,N.value,p==null?void 0:p.unit]})]},D)),jsxRuntimeExports.jsxs("div",{className:"chart-tooltip-total",children:["Stack Total: $",M,p==null?void 0:p.unit]}),O&&jsxRuntimeExports.jsxs("div",{className:"chart-tooltip-revenue",children:["Total ",p==null?void 0:p.type,": $",O.value,p==null?void 0:p.unit]})]})}return null},E=C=>{const A=[];for(let R=0;R<=C;R+=(p==null?void 0:p.incrementValue)??10)A.push(R);return A},b=(C,A)=>{m(d.filter(R=>R!==C))},T=E(o);return jsxRuntimeExports.jsxs("div",{children:[d.length>0&&jsxRuntimeExports.jsx("div",{className:"ce-selected-facilities-container",children:d.map(C=>jsxRuntimeExports.jsxs("div",{className:"ce-facility-chip",children:[C,jsxRuntimeExports.jsx("button",{onClick:()=>b(C),className:"ce-remove-btn",children:"×"})]},C))}),jsxRuntimeExports.jsx(ResponsiveContainer,{width:"100%",height:l,children:jsxRuntimeExports.jsxs(ComposedChart,{data:g,margin:{left:60,right:60,top:20,bottom:30},children:[jsxRuntimeExports.jsx(CartesianGrid,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"facility",tick:{fontSize:12,fill:"#6b7280",textAnchor:"end"},axisLine:{stroke:"#d1d5db"},tickLine:{stroke:"#d1d5db"},height:80,angle:-45}),jsxRuntimeExports.jsx(YAxis,{yAxisId:"left",domain:[0,o],ticks:T,tickFormatter:C=>`${C}${p==null?void 0:p.unit}`,tick:{fontSize:11,fill:(p==null?void 0:p.leftAxisColor)??"#6b7280"}}),jsxRuntimeExports.jsx(YAxis,{yAxisId:"right",orientation:"right",tickFormatter:C=>`$${C}${p==null?void 0:p.unit}`,tick:{fontSize:11,fill:(p==null?void 0:p.rightAxisColor)??"#dc2626"}}),f&&jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsx(S,{})}),Object.keys(LINE_OF_BUSINESS_COLORS).map(C=>jsxRuntimeExports.jsx(Bar,{yAxisId:"left",dataKey:C,stackId:"stack",fill:LINE_OF_BUSINESS_COLORS[C],name:C,onClick:n,children:jsxRuntimeExports.jsx(LabelList,{content:_})},C)),jsxRuntimeExports.jsx(Line,{yAxisId:"right",type:"monotone",dataKey:(p==null?void 0:p.key)||"totalRevenue",stroke:"#dc2626",strokeWidth:3,dot:{fill:p.lineCOlor??"#dc2626",strokeWidth:2,r:4},name:"Total Revenue"})]})}),u&&jsxRuntimeExports.jsxs("div",{className:"chart-legend",children:[Object.entries(LINE_OF_BUSINESS_COLORS).map(([C,A])=>jsxRuntimeExports.jsxs("div",{className:"chart-legend-item",children:[jsxRuntimeExports.jsx("div",{className:"chart-legend-color",style:{backgroundColor:A}}),jsxRuntimeExports.jsx("span",{className:"chart-legend-text",children:C})]},C)),jsxRuntimeExports.jsxs("div",{className:"chart-legend-item",children:[jsxRuntimeExports.jsx("div",{className:"chart-legend-line"}),jsxRuntimeExports.jsx("span",{className:"chart-legend-text",children:"Total Revenue"})]})]})]},i)};exports.CEAccordion=CEAccordion;exports.CEAccordionItem=CEAccordionItem;exports.CEAdvAutoSuggestInput=CEAdvancedAutoSuggest;exports.CEAdvancedMultiSelectDropdown=CEAdvancedMultiSelectDropdown;exports.CEAutoCompleteInput=AutoCompleteInput;exports.CEAutoCompleteSelect=CEAutoCompleteSelect;exports.CEAutoSuggestInput=CEAutoSuggestInput;exports.CEAvatarMenu=CEAvatarMenu;exports.CEBadge=CEBadge;exports.CEBarChart=CEBarChart;exports.CEBreadcrumbs=Breadcrumbs;exports.CEButton=CEButton;exports.CEChatbox=CEChatbox;exports.CECheckbox=CECheckBox;exports.CEChipInput=CEChipInput;exports.CEDataGridDynamicTable=CEDataGridDynamicTable;exports.CEDatePicker=CEDatePicker;exports.CEDateRangePicker=CEDateRangePicker;exports.CEDialogBox=CEDialogBox;exports.CEDrawer=CEDrawer;exports.CEDynamicSearchField=CEDynamicSearchField;exports.CEDynamicSelectField=CEDynamicSelectField;exports.CEDynamicTextField=CEDynamicTextField;exports.CEFieldsInput=FieldsInput;exports.CEFileUpload=CEFileUpload;exports.CEFileUploadDocument=CEFileUploadDocument;exports.CEFooter=CEFooter;exports.CEGridItem=CEGridItem;exports.CEGridLayout=CEGridLayout;exports.CEGridMenuButton=CEGridMenuButton;exports.CEHamburgerButton=CEHamburgerButton;exports.CEHeader=CEHeader;exports.CEInputBox=CEInputBox;exports.CEInputDropDown=InputDropDown;exports.CELinearProgressBar=CELinearProgressBar;exports.CELogo=CELogo;exports.CEMenuBar=CEMenuBar;exports.CEMessageModal=CEMessageModal;exports.CEModalPopUp=CECustomModal;exports.CENotificationButton=CENotificationButton;exports.CEOperatingDaysSelector=CEOperatingDaysSelector;exports.CEPagination=CEPagination;exports.CEPieChart=CEPieChart;exports.CERadioButton=CERadioButton;exports.CERadioGroup=CERadioButtonGroup;exports.CERichTextEditor=CERichTextEditor;exports.CERoundTabNav=CERoundTabNav;exports.CESearchBar=CESearchBar;exports.CESearchButton=CESearchButton;exports.CESkeletonTable=CESkeletonTable;exports.CESnackBar=CESnackBar;exports.CEStackedBarChart=CEStackedBarChart;exports.CEStackedLineChart=CEStackedBarLineChart;exports.CEStatusDropdown=CEStatusDropdown;exports.CEStepper=CEStepper;exports.CETabView=CETabView;exports.CETemplate=CETemplate;exports.CETimePicker=CETimePicker;exports.CEToggleSlider=CEToggleSlide;exports.CEToggleYesNo=CEToggleYesNo;exports.CETransferButton=CETransferButton;exports.CETruncatedTextWithTooltip=CETruncatedTextWithTooltip;exports.CEUploadModalWrapper=CEUploadModalWrapper;exports.CEUserInfo=CEUserInfo;exports.CeBox=CeBox;exports.TransferList=TransferList;