@objectql/studio 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -413,4 +413,4 @@ For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else o=`AG
|
|
|
413
413
|
`),U_=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,mw=new Map;function ms(e){var t=mw.get(e);if(t===void 0){if(!U_.test(e))throw Error(ae(65,e));t=z("<"+e),mw.set(e,t)}return t}var z_=z("<!DOCTYPE html>");function $_(e,t,i,s,n){switch(t){case"select":e.push(ms("select"));var r=null,o=null;for(d in i)if(Zt.call(i,d)){var l=i[d];if(l!=null)switch(d){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;case"defaultValue":case"value":break;default:fi(e,s,d,l)}}return e.push(an),Md(e,o,r),r;case"option":o=n.selectedValue,e.push(ms("option"));var a=l=null,u=null,d=null;for(r in i)if(Zt.call(i,r)){var c=i[r];if(c!=null)switch(r){case"children":l=c;break;case"selected":u=c;break;case"dangerouslySetInnerHTML":d=c;break;case"value":a=c;default:fi(e,s,r,c)}}if(o!=null)if(i=a!==null?""+a:W_(l),xf(o)){for(s=0;s<o.length;s++)if(""+o[s]===i){e.push(zp);break}}else""+o===i&&e.push(zp);else u&&e.push(zp);return e.push(an),Md(e,d,l),l;case"textarea":e.push(ms("textarea")),d=o=r=null;for(l in i)if(Zt.call(i,l)&&(a=i[l],a!=null))switch(l){case"children":d=a;break;case"value":r=a;break;case"defaultValue":o=a;break;case"dangerouslySetInnerHTML":throw Error(ae(91));default:fi(e,s,l,a)}if(r===null&&o!==null&&(r=o),e.push(an),d!=null){if(r!=null)throw Error(ae(92));if(xf(d)&&1<d.length)throw Error(ae(93));r=""+d}return typeof r=="string"&&r[0]===`
|
|
414
414
|
`&&e.push(jp),r!==null&&e.push(de(Et(""+r))),null;case"input":e.push(ms("input")),a=d=l=r=null;for(o in i)if(Zt.call(i,o)&&(u=i[o],u!=null))switch(o){case"children":case"dangerouslySetInnerHTML":throw Error(ae(399,"input"));case"defaultChecked":a=u;break;case"defaultValue":l=u;break;case"checked":d=u;break;case"value":r=u;break;default:fi(e,s,o,u)}return d!==null?fi(e,s,"checked",d):a!==null&&fi(e,s,"checked",a),r!==null?fi(e,s,"value",r):l!==null&&fi(e,s,"value",l),e.push(fw),null;case"menuitem":e.push(ms("menuitem"));for(var p in i)if(Zt.call(i,p)&&(r=i[p],r!=null))switch(p){case"children":case"dangerouslySetInnerHTML":throw Error(ae(400));default:fi(e,s,p,r)}return e.push(an),null;case"title":e.push(ms("title")),r=null;for(c in i)if(Zt.call(i,c)&&(o=i[c],o!=null))switch(c){case"children":r=o;break;case"dangerouslySetInnerHTML":throw Error(ae(434));default:fi(e,s,c,o)}return e.push(an),r;case"listing":case"pre":e.push(ms(t)),o=r=null;for(a in i)if(Zt.call(i,a)&&(l=i[a],l!=null))switch(a){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;default:fi(e,s,a,l)}if(e.push(an),o!=null){if(r!=null)throw Error(ae(60));if(typeof o!="object"||!("__html"in o))throw Error(ae(61));i=o.__html,i!=null&&(typeof i=="string"&&0<i.length&&i[0]===`
|
|
415
415
|
`?e.push(jp,de(i)):e.push(de(""+i)))}return typeof r=="string"&&r[0]===`
|
|
416
|
-
`&&e.push(jp),r;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":e.push(ms(t));for(var C in i)if(Zt.call(i,C)&&(r=i[C],r!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(ae(399,t));default:fi(e,s,C,r)}return e.push(fw),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return $p(e,i,t,s);case"html":return n.insertionMode===0&&e.push(z_),$p(e,i,t,s);default:if(t.indexOf("-")===-1&&typeof i.is!="string")return $p(e,i,t,s);e.push(ms(t)),o=r=null;for(u in i)if(Zt.call(i,u)&&(l=i[u],l!=null))switch(u){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;case"style":IP(e,s,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:MP(u)&&typeof l!="function"&&typeof l!="symbol"&&e.push(ln,de(u),oo,de(Et(l)),nr)}return e.push(an),Md(e,o,r),r}}var j_=z("</"),K_=z(">"),Y_=z('<template id="'),Q_=z('"></template>'),q_=z("<!--$-->"),X_=z('<!--$?--><template id="'),Z_=z('"></template>'),J_=z("<!--$!-->"),eO=z("<!--/$-->"),tO=z("<template"),iO=z('"'),sO=z(' data-dgst="');z(' data-msg="');z(' data-stck="');var nO=z("></template>");function Cw(e,t,i){if(q(e,X_),i===null)throw Error(ae(395));return q(e,i),Ge(e,Z_)}var rO=z('<div hidden id="'),oO=z('">'),lO=z("</div>"),aO=z('<svg aria-hidden="true" style="display:none" id="'),uO=z('">'),dO=z("</svg>"),cO=z('<math aria-hidden="true" style="display:none" id="'),hO=z('">'),pO=z("</math>"),gO=z('<table hidden id="'),fO=z('">'),mO=z("</table>"),CO=z('<table hidden><tbody id="'),vO=z('">'),yO=z("</tbody></table>"),wO=z('<table hidden><tr id="'),SO=z('">'),EO=z("</tr></table>"),RO=z('<table hidden><colgroup id="'),TO=z('">'),DO=z("</colgroup></table>");function PO(e,t,i,s){switch(i.insertionMode){case 0:case 1:return q(e,rO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,oO);case 2:return q(e,aO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,uO);case 3:return q(e,cO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,hO);case 4:return q(e,gO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,fO);case 5:return q(e,CO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,vO);case 6:return q(e,wO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,SO);case 7:return q(e,RO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,TO);default:throw Error(ae(397))}}function bO(e,t){switch(t.insertionMode){case 0:case 1:return Ge(e,lO);case 2:return Ge(e,dO);case 3:return Ge(e,pO);case 4:return Ge(e,mO);case 5:return Ge(e,yO);case 6:return Ge(e,EO);case 7:return Ge(e,DO);default:throw Error(ae(397))}}var FO=z('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),AO=z('$RS("'),xO=z('","'),LO=z('")<\/script>'),MO=z('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),IO=z('$RC("'),NO=z('","'),_O=z('")<\/script>'),OO=z('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),GO=z('$RX("'),kO=z('"'),VO=z(")<\/script>"),Kp=z(","),HO=/[<\u2028\u2029]/g;function Yp(e){return JSON.stringify(e).replace(HO,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var ua=Object.assign,BO=Symbol.for("react.element"),NP=Symbol.for("react.portal"),_P=Symbol.for("react.fragment"),OP=Symbol.for("react.strict_mode"),GP=Symbol.for("react.profiler"),kP=Symbol.for("react.provider"),VP=Symbol.for("react.context"),HP=Symbol.for("react.forward_ref"),BP=Symbol.for("react.suspense"),WP=Symbol.for("react.suspense_list"),UP=Symbol.for("react.memo"),jC=Symbol.for("react.lazy"),WO=Symbol.for("react.scope"),UO=Symbol.for("react.debug_trace_mode"),zO=Symbol.for("react.legacy_hidden"),$O=Symbol.for("react.default_value"),vw=Symbol.iterator;function Lf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _P:return"Fragment";case NP:return"Portal";case GP:return"Profiler";case OP:return"StrictMode";case BP:return"Suspense";case WP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VP:return(e.displayName||"Context")+".Consumer";case kP:return(e._context.displayName||"Context")+".Provider";case HP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case UP:return t=e.displayName||null,t!==null?t:Lf(e.type)||"Memo";case jC:t=e._payload,e=e._init;try{return Lf(e(t))}catch{}}return null}var zP={};function yw(e,t){if(e=e.contextTypes,!e)return zP;var i={},s;for(s in e)i[s]=t[s];return i}var pr=null;function zh(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var i=t.parent;if(e===null){if(i!==null)throw Error(ae(401))}else{if(i===null)throw Error(ae(401));zh(e,i)}t.context._currentValue=t.value}}function $P(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&$P(e)}function jP(e){var t=e.parent;t!==null&&jP(t),e.context._currentValue=e.value}function KP(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(ae(402));e.depth===t.depth?zh(e,t):KP(e,t)}function YP(e,t){var i=t.parent;if(i===null)throw Error(ae(402));e.depth===i.depth?zh(e,i):YP(e,i),t.context._currentValue=t.value}function Oc(e){var t=pr;t!==e&&(t===null?jP(e):e===null?$P(t):t.depth===e.depth?zh(t,e):t.depth>e.depth?KP(t,e):YP(t,e),pr=e)}var ww={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Sw(e,t,i,s){var n=e.state!==void 0?e.state:null;e.updater=ww,e.props=i,e.state=n;var r={queue:[],replace:!1};e._reactInternals=r;var o=t.contextType;if(e.context=typeof o=="object"&&o!==null?o._currentValue:s,o=t.getDerivedStateFromProps,typeof o=="function"&&(o=o(i,n),n=o==null?n:ua({},n,o),e.state=n),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&ww.enqueueReplaceState(e,e.state,null),r.queue!==null&&0<r.queue.length)if(t=r.queue,o=r.replace,r.queue=null,r.replace=!1,o&&t.length===1)e.state=t[0];else{for(r=o?t[0]:e.state,n=!0,o=o?1:0;o<t.length;o++){var l=t[o];l=typeof l=="function"?l.call(e,r,i,s):l,l!=null&&(n?(n=!1,r=ua({},r,l)):ua(r,l))}e.state=r}else r.queue=null}var jO={id:1,overflow:""};function Mf(e,t,i){var s=e.id;e=e.overflow;var n=32-Id(s)-1;s&=~(1<<n),i+=1;var r=32-Id(t)+n;if(30<r){var o=n-n%5;return r=(s&(1<<o)-1).toString(32),s>>=o,n-=o,{id:1<<32-Id(t)+n|i<<n|s,overflow:r+e}}return{id:1<<r|i<<n|s,overflow:e}}var Id=Math.clz32?Math.clz32:QO,KO=Math.log,YO=Math.LN2;function QO(e){return e>>>=0,e===0?32:31-(KO(e)/YO|0)|0}function qO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XO=typeof Object.is=="function"?Object.is:qO,js=null,KC=null,Nd=null,Le=null,ql=!1,Gc=!1,ou=0,vn=null,$h=0;function rr(){if(js===null)throw Error(ae(321));return js}function Ew(){if(0<$h)throw Error(ae(312));return{memoizedState:null,queue:null,next:null}}function YC(){return Le===null?Nd===null?(ql=!1,Nd=Le=Ew()):(ql=!0,Le=Nd):Le.next===null?(ql=!1,Le=Le.next=Ew()):(ql=!0,Le=Le.next),Le}function QC(){KC=js=null,Gc=!1,Nd=null,$h=0,Le=vn=null}function QP(e,t){return typeof t=="function"?t(e):t}function Rw(e,t,i){if(js=rr(),Le=YC(),ql){var s=Le.queue;if(t=s.dispatch,vn!==null&&(i=vn.get(s),i!==void 0)){vn.delete(s),s=Le.memoizedState;do s=e(s,i.action),i=i.next;while(i!==null);return Le.memoizedState=s,[s,t]}return[Le.memoizedState,t]}return e=e===QP?typeof t=="function"?t():t:i!==void 0?i(t):t,Le.memoizedState=e,e=Le.queue={last:null,dispatch:null},e=e.dispatch=ZO.bind(null,js,e),[Le.memoizedState,e]}function Tw(e,t){if(js=rr(),Le=YC(),t=t===void 0?null:t,Le!==null){var i=Le.memoizedState;if(i!==null&&t!==null){var s=i[1];e:if(s===null)s=!1;else{for(var n=0;n<s.length&&n<t.length;n++)if(!XO(t[n],s[n])){s=!1;break e}s=!0}if(s)return i[0]}}return e=e(),Le.memoizedState=[e,t],e}function ZO(e,t,i){if(25<=$h)throw Error(ae(301));if(e===js)if(Gc=!0,e={action:i,next:null},vn===null&&(vn=new Map),i=vn.get(t),i===void 0)vn.set(t,e);else{for(t=i;t.next!==null;)t=t.next;t.next=e}}function JO(){throw Error(ae(394))}function nd(){}var Dw={readContext:function(e){return e._currentValue},useContext:function(e){return rr(),e._currentValue},useMemo:Tw,useReducer:Rw,useRef:function(e){js=rr(),Le=YC();var t=Le.memoizedState;return t===null?(e={current:e},Le.memoizedState=e):t},useState:function(e){return Rw(QP,e)},useInsertionEffect:nd,useLayoutEffect:function(){},useCallback:function(e,t){return Tw(function(){return e},t)},useImperativeHandle:nd,useEffect:nd,useDebugValue:nd,useDeferredValue:function(e){return rr(),e},useTransition:function(){return rr(),[!1,JO]},useId:function(){var e=KC.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-Id(e)-1)).toString(32)+t;var i=_d;if(i===null)throw Error(ae(404));return t=ou++,e=":"+i.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return rr(),t(e._source)},useSyncExternalStore:function(e,t,i){if(i===void 0)throw Error(ae(407));return i()}},_d=null,Qp=AP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function e0(e){return console.error(e),null}function Xl(){}function t0(e,t,i,s,n,r,o,l,a){var u=[],d=new Set;return t={destination:null,responseState:t,progressiveChunkSize:s===void 0?12800:s,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:d,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:n===void 0?e0:n,onAllReady:r===void 0?Xl:r,onShellReady:o===void 0?Xl:o,onShellError:l===void 0?Xl:l,onFatalError:a===void 0?Xl:a},i=kc(t,0,null,i,!1,!1),i.parentFlushed=!0,e=qC(t,e,null,i,d,zP,null,jO),u.push(e),t}function qC(e,t,i,s,n,r,o,l){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++;var a={node:t,ping:function(){var u=e.pingedTasks;u.push(a),u.length===1&&ZP(e)},blockedBoundary:i,blockedSegment:s,abortSet:n,legacyContext:r,context:o,treeContext:l};return n.add(a),a}function kc(e,t,i,s,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:s,boundary:i,lastPushedText:n,textEmbedded:r}}function lu(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function Vc(e,t){var i=e.onShellError;i(t),i=e.onFatalError,i(t),e.destination!==null?(e.status=2,LP(e.destination,t)):(e.status=1,e.fatalError=t)}function Pw(e,t,i,s,n){for(js={},KC=t,ou=0,e=i(s,n);Gc;)Gc=!1,ou=0,$h+=1,Le=null,e=i(s,n);return QC(),e}function bw(e,t,i,s){var n=i.render(),r=s.childContextTypes;if(r!=null){var o=t.legacyContext;if(typeof i.getChildContext!="function")s=o;else{i=i.getChildContext();for(var l in i)if(!(l in r))throw Error(ae(108,Lf(s)||"Unknown",l));s=ua({},o,i)}t.legacyContext=s,wi(e,t,n),t.legacyContext=o}else wi(e,t,n)}function Fw(e,t){if(e&&e.defaultProps){t=ua({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function If(e,t,i,s,n){if(typeof i=="function")if(i.prototype&&i.prototype.isReactComponent){n=yw(i,t.legacyContext);var r=i.contextType;r=new i(s,typeof r=="object"&&r!==null?r._currentValue:n),Sw(r,i,s,n),bw(e,t,r,i)}else{r=yw(i,t.legacyContext),n=Pw(e,t,i,s,r);var o=ou!==0;if(typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0)Sw(n,i,s,r),bw(e,t,n,i);else if(o){s=t.treeContext,t.treeContext=Mf(s,1,0);try{wi(e,t,n)}finally{t.treeContext=s}}else wi(e,t,n)}else if(typeof i=="string"){switch(n=t.blockedSegment,r=$_(n.chunks,i,s,e.responseState,n.formatContext),n.lastPushedText=!1,o=n.formatContext,n.formatContext=V_(o,i,s),Nf(e,t,r),n.formatContext=o,i){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:n.chunks.push(j_,de(i),K_)}n.lastPushedText=!1}else{switch(i){case zO:case UO:case OP:case GP:case _P:wi(e,t,s.children);return;case WP:wi(e,t,s.children);return;case WO:throw Error(ae(343));case BP:e:{i=t.blockedBoundary,n=t.blockedSegment,r=s.fallback,s=s.children,o=new Set;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o,errorDigest:null},a=kc(e,n.chunks.length,l,n.formatContext,!1,!1);n.children.push(a),n.lastPushedText=!1;var u=kc(e,0,null,n.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=u;try{if(Nf(e,t,s),u.lastPushedText&&u.textEmbedded&&u.chunks.push($C),u.status=1,Hc(l,u),l.pendingTasks===0)break e}catch(d){u.status=4,l.forceClientRender=!0,l.errorDigest=lu(e,d)}finally{t.blockedBoundary=i,t.blockedSegment=n}t=qC(e,r,i,a,o,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof i=="object"&&i!==null)switch(i.$$typeof){case HP:if(s=Pw(e,t,i.render,s,n),ou!==0){i=t.treeContext,t.treeContext=Mf(i,1,0);try{wi(e,t,s)}finally{t.treeContext=i}}else wi(e,t,s);return;case UP:i=i.type,s=Fw(i,s),If(e,t,i,s,n);return;case kP:if(n=s.children,i=i._context,s=s.value,r=i._currentValue,i._currentValue=s,o=pr,pr=s={parent:o,depth:o===null?0:o.depth+1,context:i,parentValue:r,value:s},t.context=s,wi(e,t,n),e=pr,e===null)throw Error(ae(403));s=e.parentValue,e.context._currentValue=s===$O?e.context._defaultValue:s,e=pr=e.parent,t.context=e;return;case VP:s=s.children,s=s(i._currentValue),wi(e,t,s);return;case jC:n=i._init,i=n(i._payload),s=Fw(i,s),If(e,t,i,s,void 0);return}throw Error(ae(130,i==null?i:typeof i,""))}}function wi(e,t,i){if(t.node=i,typeof i=="object"&&i!==null){switch(i.$$typeof){case BO:If(e,t,i.type,i.props,i.ref);return;case NP:throw Error(ae(257));case jC:var s=i._init;i=s(i._payload),wi(e,t,i);return}if(xf(i)){Aw(e,t,i);return}if(i===null||typeof i!="object"?s=null:(s=vw&&i[vw]||i["@@iterator"],s=typeof s=="function"?s:null),s&&(s=s.call(i))){if(i=s.next(),!i.done){var n=[];do n.push(i.value),i=s.next();while(!i.done);Aw(e,t,n)}return}throw e=Object.prototype.toString.call(i),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e))}typeof i=="string"?(s=t.blockedSegment,s.lastPushedText=cw(t.blockedSegment.chunks,i,e.responseState,s.lastPushedText)):typeof i=="number"&&(s=t.blockedSegment,s.lastPushedText=cw(t.blockedSegment.chunks,""+i,e.responseState,s.lastPushedText))}function Aw(e,t,i){for(var s=i.length,n=0;n<s;n++){var r=t.treeContext;t.treeContext=Mf(r,s,n);try{Nf(e,t,i[n])}finally{t.treeContext=r}}}function Nf(e,t,i){var s=t.blockedSegment.formatContext,n=t.legacyContext,r=t.context;try{return wi(e,t,i)}catch(a){if(QC(),typeof a=="object"&&a!==null&&typeof a.then=="function"){i=a;var o=t.blockedSegment,l=kc(e,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(l),o.lastPushedText=!1,e=qC(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,i.then(e,e),t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Oc(r)}else throw t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Oc(r),a}}function i0(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,XP(this,t,e)}function qP(e,t,i){var s=e.blockedBoundary;e.blockedSegment.status=3,s===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.close())):(s.pendingTasks--,s.forceClientRender||(s.forceClientRender=!0,e=i===void 0?Error(ae(432)):i,s.errorDigest=t.onError(e),s.parentFlushed&&t.clientRenderedBoundaries.push(s)),s.fallbackAbortableTasks.forEach(function(n){return qP(n,t,i)}),s.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(s=t.onAllReady,s()))}function Hc(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var i=t.children[0];i.id=t.id,i.parentFlushed=!0,i.status===1&&Hc(e,i)}else e.completedSegments.push(t)}function XP(e,t,i){if(t===null){if(i.parentFlushed){if(e.completedRootSegment!==null)throw Error(ae(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=Xl,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(i.parentFlushed&&i.status===1&&Hc(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(i0,e),t.fallbackAbortableTasks.clear()):i.parentFlushed&&i.status===1&&(Hc(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function ZP(e){if(e.status!==2){var t=pr,i=Qp.current;Qp.current=Dw;var s=_d;_d=e.responseState;try{var n=e.pingedTasks,r;for(r=0;r<n.length;r++){var o=n[r],l=e,a=o.blockedSegment;if(a.status===0){Oc(o.context);try{wi(l,o,o.node),a.lastPushedText&&a.textEmbedded&&a.chunks.push($C),o.abortSet.delete(o),a.status=1,XP(l,o.blockedBoundary,a)}catch(v){if(QC(),typeof v=="object"&&v!==null&&typeof v.then=="function"){var u=o.ping;v.then(u,u)}else{o.abortSet.delete(o),a.status=4;var d=o.blockedBoundary,c=v,p=lu(l,c);if(d===null?Vc(l,c):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=p,d.parentFlushed&&l.clientRenderedBoundaries.push(d))),l.allPendingTasks--,l.allPendingTasks===0){var C=l.onAllReady;C()}}}finally{}}}n.splice(0,r),e.destination!==null&&XC(e,e.destination)}catch(v){lu(e,v),Vc(e,v)}finally{_d=s,Qp.current=i,i===Dw&&Oc(t)}}}function rd(e,t,i){switch(i.parentFlushed=!0,i.status){case 0:var s=i.id=e.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,e=e.responseState,q(t,Y_),q(t,e.placeholderPrefix),e=de(s.toString(16)),q(t,e),Ge(t,Q_);case 1:i.status=2;var n=!0;s=i.chunks;var r=0;i=i.children;for(var o=0;o<i.length;o++){for(n=i[o];r<n.index;r++)q(t,s[r]);n=jh(e,t,n)}for(;r<s.length-1;r++)q(t,s[r]);return r<s.length&&(n=Ge(t,s[r])),n;default:throw Error(ae(390))}}function jh(e,t,i){var s=i.boundary;if(s===null)return rd(e,t,i);if(s.parentFlushed=!0,s.forceClientRender)s=s.errorDigest,Ge(t,J_),q(t,tO),s&&(q(t,sO),q(t,de(Et(s))),q(t,iO)),Ge(t,nO),rd(e,t,i);else if(0<s.pendingTasks){s.rootSegmentID=e.nextSegmentId++,0<s.completedSegments.length&&e.partialBoundaries.push(s);var n=e.responseState,r=n.nextSuspenseID++;n=z(n.boundaryPrefix+r.toString(16)),s=s.id=n,Cw(t,e.responseState,s),rd(e,t,i)}else if(s.byteSize>e.progressiveChunkSize)s.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(s),Cw(t,e.responseState,s.id),rd(e,t,i);else{if(Ge(t,q_),i=s.completedSegments,i.length!==1)throw Error(ae(391));jh(e,t,i[0])}return Ge(t,eO)}function xw(e,t,i){return PO(t,e.responseState,i.formatContext,i.id),jh(e,t,i),bO(t,i.formatContext)}function Lw(e,t,i){for(var s=i.completedSegments,n=0;n<s.length;n++)JP(e,t,i,s[n]);if(s.length=0,e=e.responseState,s=i.id,i=i.rootSegmentID,q(t,e.startInlineScript),e.sentCompleteBoundaryFunction?q(t,IO):(e.sentCompleteBoundaryFunction=!0,q(t,MO)),s===null)throw Error(ae(395));return i=de(i.toString(16)),q(t,s),q(t,NO),q(t,e.segmentPrefix),q(t,i),Ge(t,_O)}function JP(e,t,i,s){if(s.status===2)return!0;var n=s.id;if(n===-1){if((s.id=i.rootSegmentID)===-1)throw Error(ae(392));return xw(e,t,s)}return xw(e,t,s),e=e.responseState,q(t,e.startInlineScript),e.sentCompleteSegmentFunction?q(t,AO):(e.sentCompleteSegmentFunction=!0,q(t,FO)),q(t,e.segmentPrefix),n=de(n.toString(16)),q(t,n),q(t,xO),q(t,e.placeholderPrefix),q(t,n),Ge(t,LO)}function XC(e,t){vi=new Uint8Array(512),yi=0;try{var i=e.completedRootSegment;if(i!==null&&e.pendingRootTasks===0){jh(e,t,i),e.completedRootSegment=null;var s=e.responseState.bootstrapChunks;for(i=0;i<s.length-1;i++)q(t,s[i]);i<s.length&&Ge(t,s[i])}var n=e.clientRenderedBoundaries,r;for(r=0;r<n.length;r++){var o=n[r];s=t;var l=e.responseState,a=o.id,u=o.errorDigest,d=o.errorMessage,c=o.errorComponentStack;if(q(s,l.startInlineScript),l.sentClientRenderFunction?q(s,GO):(l.sentClientRenderFunction=!0,q(s,OO)),a===null)throw Error(ae(395));q(s,a),q(s,kO),(u||d||c)&&(q(s,Kp),q(s,de(Yp(u||"")))),(d||c)&&(q(s,Kp),q(s,de(Yp(d||"")))),c&&(q(s,Kp),q(s,de(Yp(c)))),Ge(s,VO)}n.splice(0,r);var p=e.completedBoundaries;for(r=0;r<p.length;r++)Lw(e,t,p[r]);p.splice(0,r),lw(t),vi=new Uint8Array(512),yi=0;var C=e.partialBoundaries;for(r=0;r<C.length;r++){var v=C[r];e:{n=e,o=t;var S=v.completedSegments;for(l=0;l<S.length;l++)if(!JP(n,o,v,S[l])){l++,S.splice(0,l);var E=!1;break e}S.splice(0,l),E=!0}if(!E){e.destination=null,r++,C.splice(0,r);return}}C.splice(0,r);var w=e.completedBoundaries;for(r=0;r<w.length;r++)Lw(e,t,w[r]);w.splice(0,r)}finally{lw(t),e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.close()}}function Mw(e,t){try{var i=e.abortableTasks;i.forEach(function(s){return qP(s,e,t)}),i.clear(),e.destination!==null&&XC(e,e.destination)}catch(s){lu(e,s),Vc(e,s)}}WC.renderToReadableStream=function(e,t){return new Promise(function(i,s){var n,r,o=new Promise(function(d,c){r=d,n=c}),l=t0(e,G_(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),k_(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,r,function(){var d=new ReadableStream({type:"bytes",pull:function(c){if(l.status===1)l.status=2,LP(c,l.fatalError);else if(l.status!==2&&l.destination===null){l.destination=c;try{XC(l,c)}catch(p){lu(l,p),Vc(l,p)}}},cancel:function(){Mw(l)}},{highWaterMark:0});d.allReady=o,i(d)},function(d){o.catch(function(){}),s(d)},n);if(t&&t.signal){var a=t.signal,u=function(){Mw(l,a.reason),a.removeEventListener("abort",u)};a.addEventListener("abort",u)}ZP(l)})};WC.version="18.3.1";var Rl,eb;Rl=El,eb=WC;Rl.version;Rl.renderToString;var s0=Rl.renderToStaticMarkup;Rl.renderToNodeStream;Rl.renderToStaticNodeStream;eb.renderToReadableStream;var n0=Object.defineProperty,r0=Object.defineProperties,o0=Object.getOwnPropertyDescriptors,Iw=Object.getOwnPropertySymbols,l0=Object.prototype.hasOwnProperty,a0=Object.prototype.propertyIsEnumerable,Nw=(e,t,i)=>t in e?n0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,He=(e,t)=>{for(var i in t||(t={}))l0.call(t,i)&&Nw(e,i,t[i]);if(Iw)for(var i of Iw(t))a0.call(t,i)&&Nw(e,i,t[i]);return e},Wt=(e,t)=>r0(e,o0(t)),ZC=y.createContext({setMethods:()=>{}}),u0=e=>{const{initialProps:t,addUpdateCallback:i,CustomComponentClass:s,setMethods:n}=e,[r,o]=y.useState(t);return y.useEffect(()=>{i(l=>o(l))},[]),O.createElement(ZC.Provider,{value:{setMethods:n}},O.createElement(s,He({},r)))},d0=y.memo(u0),c0=0;function _w(){return`agPortalKey_${++c0}`}var tb=class{constructor(e,t,i,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=_w(),this.portalKey=_w(),this.instanceCreated=this.isStatelessComponent()?it.resolve(!1):new it(n=>{this.resolveInstanceCreated=n})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){return this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(Z.warnOnce('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&(Z.warnOnce('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i){setTimeout(()=>this.callMethod(e,t));return}const s=i[e];if(s)return s.apply(i,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new it(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{var i;this.componentInstance=t,this.addParentContainerStyleAndClasses(),(i=this.resolveInstanceCreated)==null||i.call(this,!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,Wt(He({},e),{key:this.key})),this.portal=sh.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return y.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,t=>{e(t)})}isNullValue(){return this.valueRenderedIsNull(this.params)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}valueRenderedIsNull(e){if(!this.componentType.cellRenderer)return!1;const t=console.error;try{return console.error=()=>{},s0(y.createElement(this.reactComponent,e))===""}catch{}finally{console.error=t}return!1}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function JC(e,t,i){e.forEach(s=>{const n=t[s];n&&(i[s]=n)})}var qn=class extends tb{constructor(){super(...arguments),this.awaitUpdateCallback=new it(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=d0}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:i=>this.setMethods(i),addUpdateCallback:i=>{this.updateCallback=()=>(i(this.getProps()),new it(s=>{setTimeout(()=>{s()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,JC(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return Wt(He({},this.sourceParams),{key:this.key,ref:this.ref})}refreshProps(){return this.updateCallback?this.updateCallback():new it(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},h0=class extends qn{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},p0=class extends qn{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback()}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.model=e,this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}updateModel(e){this.setModel(e).then(()=>this.sourceParams.filterChangedCallback())}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}};function ib(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||it.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var g0=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=i=>this.updateModel(i)}getProps(){return Wt(He({},this.floatingFilterParams),{model:this.model,onModelChange:this.onModelChange})}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){JC(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),ib(this.floatingFilterParams,e)}},f0=class extends qn{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),ib(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},m0=class extends qn{refresh(e){this.sourceParams=e,this.refreshProps()}},C0=class extends qn{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},v0=class extends qn{refresh(e){this.sourceParams=e,this.refreshProps()}},y0=class extends qn{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},w0=class extends qn{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}},sb=class nb{constructor(t,i,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=i||"div",this.refresher=t,this.maxComponentCreationTimeMs=s||nb.MAX_COMPONENT_CREATION_TIME_IN_MS}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(t){this.portals=this.portals.filter(i=>i!==t),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(t,i,s){this.portals=[...this.portals,t],this.waitForInstance(i,s),this.batchUpdate()}updateReactPortal(t,i){this.portals[this.portals.indexOf(t)]=i,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(t,i,s=Date.now()){if(this.destroyed){i(null);return}if(t.rendered())i(t);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){if(t.isNullValue()){i(t);return}console.error(`AG Grid: React Component '${t.getReactComponentName()}' not created within ${this.maxComponentCreationTimeMs}ms.`),console.error(" If the component is using `forwardRef` but not `useImperativeHandle`, add the following: `useImperativeHandle(ref, () => ({}));`");return}window.setTimeout(()=>{this.waitForInstance(t,i,s)})}}};sb.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3;var S0=sb,qt=O.createContext({}),Zi=(...e)=>e.filter(i=>i!=null&&i!=="").join(" "),Oi=class rb{constructor(...t){this.classesMap={},t.forEach(i=>{this.classesMap[i]=!0})}setClass(t,i){if(!!this.classesMap[t]==i)return this;const n=new rb;return n.classesMap=He({},this.classesMap),n.classesMap[t]=i,n}toString(){return Object.keys(this.classesMap).filter(i=>this.classesMap[i]).join(" ")}},Tl=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,i=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===i()},E0=zg.createRoot!=null&&zg.flushSync!=null,Od=!1;function R0(e){return Od||setTimeout(()=>Od=!1,0),Od=!0,e()}var ev=(e,t)=>{E0&&e&&!Od?zg.flushSync(t):t()};function tv(e,t,i){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(i||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const s=[],n=[],r=new Map,o=new Map;for(let l=0;l<t.length;l++){const a=t[l];o.set(a.getInstanceId(),a)}for(let l=0;l<e.length;l++){const a=e[l];r.set(a.getInstanceId(),a),o.has(a.getInstanceId())&&s.push(a)}for(let l=0;l<t.length;l++){const a=t[l],u=a.getInstanceId();r.has(u)||n.push(a)}return s.length===e.length&&n.length===0?e:s.length===0&&n.length===t.length?t:s.length===0?n:n.length===0?s:[...s,...n]}var Nu=(e,t,i,s)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const r=e.newAgStackInstance();if(!r)return;let o,l,a=!1;return r.then(u=>{if(a){t.destroyBean(u);return}o=u,l=o.getGui(),i.appendChild(l),Ow(s,o)}),()=>{a=!0,o&&(l&&l.parentElement&&l.parentElement.removeChild(l),t.destroyBean(o),s&&Ow(s,void 0))}},Ow=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const i=e;i.current=t}},T0=e=>{const t=e.newAgStackInstance();if(t)return t.resolveNow(null,i=>i)},ob=y.forwardRef((e,t)=>{var i;const s=y.useContext(qt).context,n=y.useRef(null),r=y.useRef(null),o=y.useRef(null),l=y.useRef(null),a=y.useRef(null),u=y.useRef(),[d,c]=y.useState(),[p,C]=y.useState(),[v,S]=y.useState(),[E,w]=y.useState(()=>new Oi),[m,R]=y.useState(()=>new Oi("ag-hidden")),[T,P]=y.useState(()=>new Oi("ag-hidden")),[F,b]=y.useState(()=>new Oi("ag-invisible"));y.useImperativeHandle(t,()=>({refresh(){return!1}})),y.useLayoutEffect(()=>Nu(d,s,r.current),[d]);const M=y.useCallback(ge=>{if(n.current=ge,!n.current){s.destroyBean(u.current),u.current=null;return}const G={setInnerRenderer:(H,W)=>{c(H),S(W)},setChildCount:H=>C(H),addOrRemoveCssClass:(H,W)=>w(X=>X.setClass(H,W)),setContractedDisplayed:H=>P(W=>W.setClass("ag-hidden",!H)),setExpandedDisplayed:H=>R(W=>W.setClass("ag-hidden",!H)),setCheckboxVisible:H=>b(W=>W.setClass("ag-invisible",!H))};u.current=s.createBean(new $r),u.current.init(G,n.current,o.current,l.current,a.current,ob,e)},[]),N=y.useMemo(()=>`ag-cell-wrapper ${E.toString()}`,[E]),k=y.useMemo(()=>`ag-group-expanded ${m.toString()}`,[m]),$=y.useMemo(()=>`ag-group-contracted ${T.toString()}`,[T]),U=y.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),Q=d&&d.componentFromFramework,he=Q?d.componentClass:void 0,we=d==null&&v!=null,fe=Z.escapeString(v,!0);return O.createElement("span",He({className:N,ref:M},e.colDef?{}:{role:(i=u.current)==null?void 0:i.getCellAriaRole()}),O.createElement("span",{className:k,ref:l}),O.createElement("span",{className:$,ref:a}),O.createElement("span",{className:U,ref:o}),O.createElement("span",{className:"ag-group-value",ref:r},we&&O.createElement(O.Fragment,null,fe),Q&&O.createElement(he,He({},d.params))),O.createElement("span",{className:"ag-group-child-count"},p))}),Gw=ob,D0=e=>{const{ctrl:t}=e,i=t.isAlive(),{context:s}=y.useContext(qt),n=i?t.getColId():void 0,[r,o]=y.useState(),l=y.useRef(null),a=y.useRef(null),u=y.useRef(null),d=y.useRef();let c=y.useRef();i&&!c.current&&(c.current=new wu(()=>l.current));const p=y.useCallback(E=>{var w;if(l.current=E,!l.current||!i)return;const m={setWidth:T=>{l.current&&(l.current.style.width=T)},addOrRemoveCssClass:(T,P)=>c.current.addOrRemoveCssClass(T,P),setAriaSort:T=>{l.current&&(T?Z.setAriaSort(l.current,T):Z.removeAriaSort(l.current))},setUserCompDetails:T=>o(T),getUserCompInstance:()=>d.current||void 0};t.setComp(m,l.current,a.current,u.current);const R=t.getSelectAllGui();(w=a.current)==null||w.insertAdjacentElement("afterend",R)},[]);y.useLayoutEffect(()=>Nu(r,s,u.current,d),[r]),y.useEffect(()=>{t.setDragSource(l.current)},[r]);const C=y.useMemo(()=>!!((r==null?void 0:r.componentFromFramework)&&Tl(r.componentClass)),[r]),v=r&&r.componentFromFramework,S=r&&r.componentClass;return O.createElement("div",{ref:p,className:"ag-header-cell","col-id":n,role:"columnheader"},O.createElement("div",{ref:a,className:"ag-header-cell-resize",role:"presentation"}),O.createElement("div",{ref:u,className:"ag-header-cell-comp-wrapper",role:"presentation"},v&&C&&O.createElement(S,He({},r.params)),v&&!C&&O.createElement(S,Wt(He({},r.params),{ref:d}))))},P0=y.memo(D0),b0=e=>{const{context:t}=y.useContext(qt),{ctrl:i}=e,[s,n]=y.useState(()=>new Oi),[r,o]=y.useState(()=>new Oi),[l,a]=y.useState("false"),[u,d]=y.useState(),[c,p]=y.useState(),C=y.useMemo(()=>i.getColId(),[]),v=y.useRef(null),S=y.useRef(null),E=y.useRef(),w=y.useCallback(b=>{if(v.current=b,!v.current)return;const M={setWidth:N=>{v.current&&(v.current.style.width=N)},addOrRemoveCssClass:(N,k)=>n($=>$.setClass(N,k)),setUserCompDetails:N=>p(N),setResizableDisplayed:N=>{o(k=>k.setClass("ag-hidden",!N)),a(N?"false":"true")},setAriaExpanded:N=>d(N),getUserCompInstance:()=>E.current||void 0};i.setComp(M,v.current,S.current)},[]);y.useLayoutEffect(()=>Nu(c,t,v.current),[c]),y.useEffect(()=>{v.current&&i.setDragSource(v.current)},[c]);const m=y.useMemo(()=>!!((c==null?void 0:c.componentFromFramework)&&Tl(c.componentClass)),[c]),R=y.useMemo(()=>"ag-header-group-cell "+s.toString(),[s]),T=y.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),P=c&&c.componentFromFramework,F=c&&c.componentClass;return O.createElement("div",{ref:w,className:R,"col-id":C,role:"columnheader","aria-expanded":u},P&&m&&O.createElement(F,He({},c.params)),P&&!m&&O.createElement(F,Wt(He({},c.params),{ref:E})),O.createElement("div",{ref:S,"aria-hidden":l,className:T}))},F0=y.memo(b0);function iv(){Z.warnOnce("Using custom components without `reactiveCustomComponents = true` is deprecated.")}var A0=e=>{const{context:t,gos:i}=y.useContext(qt),[s,n]=y.useState(()=>new Oi("ag-header-cell","ag-floating-filter")),[r,o]=y.useState(()=>new Oi),[l,a]=y.useState(()=>new Oi("ag-floating-filter-button","ag-hidden")),[u,d]=y.useState("false"),[c,p]=y.useState(),[C,v]=y.useState(1),S=y.useRef(null),E=y.useRef(null),w=y.useRef(null),m=y.useRef(null),R=y.useRef(),T=y.useRef(),P=ge=>{ge!=null&&R.current&&R.current(ge)},{ctrl:F}=e,b=y.useCallback(ge=>{if(S.current=ge,!S.current)return;T.current=new it(H=>{R.current=H});const G={addOrRemoveCssClass:(H,W)=>n(X=>X.setClass(H,W)),addOrRemoveBodyCssClass:(H,W)=>o(X=>X.setClass(H,W)),setButtonWrapperDisplayed:H=>{a(W=>W.setClass("ag-hidden",!H)),d(H?"false":"true")},setWidth:H=>{S.current&&(S.current.style.width=H)},setCompDetails:H=>p(H),getFloatingFilterComp:()=>T.current?T.current:null,setMenuIcon:H=>{var W;return(W=m.current)==null?void 0:W.appendChild(H)}};F.setComp(G,S.current,m.current,E.current)},[]);y.useLayoutEffect(()=>Nu(c,t,E.current,P),[c]);const M=y.useMemo(()=>s.toString(),[s]),N=y.useMemo(()=>r.toString(),[r]),k=y.useMemo(()=>l.toString(),[l]),$=y.useMemo(()=>!!(c&&c.componentFromFramework&&Tl(c.componentClass)),[c]),U=y.useMemo(()=>i.get("reactiveCustomComponents"),[]),Q=y.useMemo(()=>{if(c)if(U){const ge=new g0(c.params,()=>v(G=>G+1));return P(ge),ge}else c.componentFromFramework&&iv()},[c]),he=Q==null?void 0:Q.getProps(),we=c&&c.componentFromFramework,fe=c&&c.componentClass;return O.createElement("div",{ref:b,className:M,role:"gridcell"},O.createElement("div",{ref:E,className:N,role:"presentation"},we&&!U&&O.createElement(fe,Wt(He({},c.params),{ref:$?()=>{}:P})),we&&U&&O.createElement(ZC.Provider,{value:{setMethods:ge=>Q.setMethods(ge)}},O.createElement(fe,He({},he)))),O.createElement("div",{ref:w,"aria-hidden":u,className:k,role:"presentation"},O.createElement("button",{ref:m,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},x0=y.memo(A0),L0=e=>{const{ctrl:t}=e,{topOffset:i,rowHeight:s}=y.useMemo(()=>t.getTopAndHeight(),[]),n=t.getAriaRowIndex(),r=t.getHeaderRowClass(),[o,l]=y.useState(()=>s+"px"),[a,u]=y.useState(()=>i+"px"),d=y.useRef(null),c=y.useRef(null),[p,C]=y.useState(()=>t.getHeaderCtrls()),v=y.useRef(null),S=y.useCallback(m=>{if(v.current=m,!m)return;const R={setHeight:T=>l(T),setTop:T=>u(T),setHeaderCtrls:(T,P,F)=>{c.current=d.current,d.current=T;const b=tv(c.current,T,P);b!==c.current&&ev(F,()=>C(b))},setWidth:T=>{v.current&&(v.current.style.width=T)}};t.setComp(R,!1)},[]),E=y.useMemo(()=>({height:o,top:a}),[o,a]),w=y.useCallback(m=>{switch(t.getType()){case gf.COLUMN_GROUP:return O.createElement(F0,{ctrl:m,key:m.getInstanceId()});case gf.FLOATING_FILTER:return O.createElement(x0,{ctrl:m,key:m.getInstanceId()});default:return O.createElement(P0,{ctrl:m,key:m.getInstanceId()})}},[]);return O.createElement("div",{ref:S,className:r,role:"row",style:E,"aria-rowindex":n},p.map(w))},M0=y.memo(L0),I0=e=>{const[t,i]=y.useState(!0),[s,n]=y.useState([]),{context:r}=y.useContext(qt),o=y.useRef(null),l=y.useRef(null),a=y.useRef(null),u=e.pinned==="left",d=e.pinned==="right",c=!u&&!d,p=y.useCallback(S=>{if(o.current=S,!o.current){r.destroyBean(a.current),a.current=null;return}const E={setDisplayed:i,setCtrls:w=>n(w),setCenterWidth:w=>{l.current&&(l.current.style.width=w)},setViewportScrollLeft:w=>{o.current&&(o.current.scrollLeft=w)},setPinnedContainerWidth:w=>{o.current&&(o.current.style.width=w,o.current.style.minWidth=w,o.current.style.maxWidth=w)}};a.current=r.createBean(new zn(e.pinned)),a.current.setComp(E,o.current)},[]),C=t?"":"ag-hidden",v=()=>s.map(S=>O.createElement(M0,{ctrl:S,key:S.getInstanceId()}));return O.createElement(O.Fragment,null,u&&O.createElement("div",{ref:p,className:"ag-pinned-left-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),d&&O.createElement("div",{ref:p,className:"ag-pinned-right-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),c&&O.createElement("div",{ref:p,className:"ag-header-viewport "+C,role:"presentation"},O.createElement("div",{ref:l,className:"ag-header-container",role:"rowgroup"},v())))},qp=y.memo(I0),N0=()=>{const[e,t]=y.useState(()=>new Oi),[i,s]=y.useState(),{context:n}=y.useContext(qt),r=y.useRef(null),o=y.useRef(null),l=y.useCallback(d=>{if(r.current=d,!d){n.destroyBean(o.current),o.current=null;return}const c={addOrRemoveCssClass:(p,C)=>t(v=>v.setClass(p,C)),setHeightAndMinHeight:p=>s(p)};o.current=n.createBean(new $n),o.current.setComp(c,r.current,r.current)},[]),a=y.useMemo(()=>"ag-header "+e.toString(),[e]),u=y.useMemo(()=>({height:i,minHeight:i}),[i]);return O.createElement("div",{ref:l,className:a,style:u,role:"presentation"},O.createElement(qp,{pinned:"left"}),O.createElement(qp,{pinned:null}),O.createElement(qp,{pinned:"right"}))},_0=y.memo(N0),O0=(e,t)=>{y.useEffect(()=>{const i=t.current;if(i){const s=i.parentElement;if(s){const n=document.createComment(e);return s.insertBefore(n,i),()=>{s.removeChild(n)}}}},[e])},or=O0,G0=e=>{const t=y.useRef(e),i=y.useRef(),s=y.useRef(!1),n=y.useRef(!1),[,r]=y.useState(0);s.current&&(n.current=!0),y.useEffect(()=>(s.current||(i.current=t.current(),s.current=!0),r(o=>o+1),()=>{n.current&&i.current&&i.current()}),[])},k0=e=>{const[t,i]=y.useState(),{context:s,popupService:n,localeService:r,gos:o}=y.useContext(qt);return G0(()=>{const{editDetails:l,cellCtrl:a,eParentCell:u}=e,{compDetails:d}=l,c=o.get("stopEditingWhenCellsLoseFocus"),p=s.createBean(new VD(d.params)),C=p.getGui();if(e.jsChildComp){const R=e.jsChildComp.getGui();R&&C.appendChild(R)}const v={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:u,ePopup:C,position:l.popupPosition,keepWithinBounds:!0},S=n.positionPopupByComponent.bind(n,v),E=r.getLocaleTextFunc(),w=n.addPopup({modal:c,eChild:C,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:u,positionCallback:S,ariaLabel:E("ariaLabelCellEditor","Cell Editor")}),m=w?w.hideFunc:void 0;return i(p),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),()=>{m!=null&&m(),s.destroyBean(p)}}),O.createElement(O.Fragment,null,t&&e.wrappedContent&&sh.createPortal(e.wrappedContent,t.getGui()))},kw=y.memo(k0),V0=(e,t,i,s,n,r)=>{const{context:o}=y.useContext(qt),l=y.useCallback(()=>{const a=n.current;if(!a)return;const u=a.getGui();u&&u.parentElement&&u.parentElement.removeChild(u),o.destroyBean(a),n.current=void 0},[]);y.useEffect(()=>{const a=e!=null,u=e&&e.compDetails&&!e.compDetails.componentFromFramework,d=t&&i==null;if(!(a&&u&&!d)){l();return}const p=e.compDetails;if(n.current){const w=n.current,R=w.refresh!=null&&e.force==!1?w.refresh(p.params):!1;if(R===!0||R===void 0)return;l()}const C=p.newAgStackInstance();if(!C)return;const v=C.resolveNow(null,w=>w);if(!v)return;const S=v.getGui();if(!S)return;(t?i:r.current).appendChild(S),n.current=v},[e,t,s]),y.useEffect(()=>l,[])},H0=V0,B0=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new it(i=>{this.resolveInstanceCreated=i}),this.onValueChange=i=>this.updateValue(i),this.value=e.value}getProps(){return Wt(He({},this.cellEditorParams),{initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange})}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){JC(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){var t;this.componentInstance=e,(t=this.resolveInstanceCreated)==null||t.call(this),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},W0=(e,t,i)=>{const s=i.getColumn();if(!e&&t.isPopup&&t.isPopup()){const n=`AG Grid: Found an issue in column ${s.getColId()}. If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.`;Z.doOnce(()=>console.warn(n),"jsEditorComp-isPopup-"+i.getColumn().getColId())}if(e&&t.getPopupPosition&&t.getPopupPosition()!=null){const n=`AG Grid: Found an issue in column ${s.getColId()}. If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.`;Z.doOnce(()=>console.warn(n),"jsEditorComp-getPopupPosition-"+i.getColumn().getColId())}},U0=(e,t,i)=>{const{compProxy:s}=e;i(s);const n=s.getProps(),r=Tl(t);return O.createElement(ZC.Provider,{value:{setMethods:o=>s.setMethods(o)}},r&&O.createElement(t,He({},n)),!r&&O.createElement(t,Wt(He({},n),{ref:o=>s.setRef(o)})))},Vw=(e,t,i)=>{const s=e.compProxy;return O.createElement(O.Fragment,null,!s&&O.createElement(t,Wt(He({},e.compDetails.params),{ref:i})),s&&U0(e,t,i))},z0=(e,t,i,s,n,r)=>{const o=e.compDetails,l=o.componentClass,a=o.componentFromFramework&&!e.popup,u=o.componentFromFramework&&e.popup,d=!o.componentFromFramework&&e.popup;return O.createElement(O.Fragment,null,a&&Vw(e,l,t),u&&O.createElement(kw,{editDetails:e,cellCtrl:n,eParentCell:s,wrappedContent:Vw(e,l,i)}),d&&r&&O.createElement(kw,{editDetails:e,cellCtrl:n,eParentCell:s,jsChildComp:r}))},$0=(e,t,i,s,n,r,o)=>{const{compDetails:l,value:a}=e,u=!l,d=l&&l.componentFromFramework,c=l&&l.componentClass,p=a!=null&&a.toString?a.toString():a,C=()=>O.createElement(O.Fragment,null,u&&O.createElement(O.Fragment,null,p),d&&!r&&O.createElement(c,Wt(He({},l.params),{key:t,ref:s})),d&&r&&O.createElement(c,Wt(He({},l.params),{key:t})));return O.createElement(O.Fragment,null,n?O.createElement("span",{role:"presentation",id:`cell-${i}`,className:"ag-cell-value",ref:o},C()):C())},j0=e=>{const{context:t}=y.useContext(qt),{cellCtrl:i,printLayout:s,editingRow:n}=e,r=i.getTabIndex(),o=i.getColumnIdSanitised(),l=i.getInstanceId(),[a,u]=y.useState(()=>i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1}),[d,c]=y.useState(),[p,C]=y.useState(1),[v,S]=y.useState(),[E,w]=y.useState(!1),[m,R]=y.useState(!1),[T,P]=y.useState(!1),[F,b]=y.useState(),M=y.useMemo(()=>i.isForceWrapper(),[i]),N=y.useMemo(()=>i.getCellAriaRole(),[i]),k=y.useRef(null),$=y.useRef(null),U=y.useRef(),Q=y.useRef(),he=y.useRef(),we=y.useRef([]),fe=y.useRef(),[ge,G]=y.useState(0),H=y.useCallback(Ye=>{fe.current=Ye,G(Ze=>Ze+1)},[]),W=a!=null&&(E||T||m),X=M||W,ee=y.useCallback((Ye,Ze)=>{Q.current=Ze,Ze&&(W0(Ye,Ze,i),Ze.isCancelBeforeStart&&Ze.isCancelBeforeStart()&&setTimeout(()=>{i.stopEditing(!0),i.focusCell(!0)}))},[i]),Ee=y.useCallback(Ye=>ee(!0,Ye),[ee]),gt=y.useCallback(Ye=>ee(!1,Ye),[ee]);let Re=y.useRef();Re.current||(Re.current=new wu(()=>k.current)),H0(a,X,fe.current,ge,U,k);const nt=y.useRef();y.useLayoutEffect(()=>{const Ye=nt.current,Ze=a;if(nt.current=a,Ye==null||Ye.compDetails==null||Ze==null||Ze.compDetails==null)return;const at=Ye.compDetails,me=Ze.compDetails;if(at.componentClass!=me.componentClass||$.current==null||$.current.refresh==null)return;$.current.refresh(me.params)!=!0&&C(ji=>ji+1)},[a]),y.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework))return;const Ze=d.compDetails,at=d.popup===!0,me=T0(Ze);if(!me)return;const ut=me.getGui();if(ee(at,me),!at){const ji=(M?he:k).current;ji==null||ji.appendChild(ut),me.afterGuiAttached&&me.afterGuiAttached()}return b(me),()=>{t.destroyBean(me),ee(at,void 0),b(void 0),ut&&ut.parentElement&&ut.parentElement.removeChild(ut)}},[d]);const Ke=y.useCallback(Ye=>{if(he.current=Ye,!he.current){we.current.forEach(at=>at()),we.current=[];return}const Ze=at=>{var me;if(at){const ut=at.getGui();(me=he.current)==null||me.insertAdjacentElement("afterbegin",ut),we.current.push(()=>{t.destroyBean(at),Z.removeFromParent(ut)})}return at};if(E){const at=i.createSelectionCheckbox();Ze(at)}T&&Ze(i.createDndSource()),m&&Ze(i.createRowDragComp())},[i,t,T,m,E]),As=y.useCallback(Ye=>{if(k.current=Ye,!k.current||!i)return;const Ze={addOrRemoveCssClass:(me,ut)=>Re.current.addOrRemoveCssClass(me,ut),setUserStyles:me=>S(me),getFocusableElement:()=>k.current,setIncludeSelection:me=>w(me),setIncludeRowDrag:me=>R(me),setIncludeDndSource:me=>P(me),getCellEditor:()=>Q.current||null,getCellRenderer:()=>$.current?$.current:U.current,getParentOfValue:()=>fe.current?fe.current:he.current?he.current:k.current,setRenderDetails:(me,ut,ji)=>{u(Ki=>(Ki==null?void 0:Ki.compDetails)!==me||(Ki==null?void 0:Ki.value)!==ut||(Ki==null?void 0:Ki.force)!==ji?{value:ut,compDetails:me,force:ji}:Ki)},setEditDetails:(me,ut,ji,Ki)=>{if(me){let Xn;Ki?Xn=new B0(me.params,()=>C(Kh=>Kh+1)):me.componentFromFramework&&iv(),c({compDetails:me,popup:ut,popupPosition:ji,compProxy:Xn}),ut||u(void 0)}else c(Xn=>{Xn!=null&&Xn.compProxy&&(Q.current=void 0)})}},at=he.current||void 0;i.setComp(Ze,k.current,at,s,n)},[]),Jr=y.useMemo(()=>!!(a&&a.compDetails&&a.compDetails.componentFromFramework&&Tl(a.compDetails.componentClass)),[a]);y.useLayoutEffect(()=>{var Ye;k.current&&(Re.current.addOrRemoveCssClass("ag-cell-value",!X),Re.current.addOrRemoveCssClass("ag-cell-inline-editing",!!d&&!d.popup),Re.current.addOrRemoveCssClass("ag-cell-popup-editing",!!d&&!!d.popup),Re.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!d||!!d.popup),(Ye=i.getRowCtrl())==null||Ye.setInlineEditingCss(!!d),i.shouldRestoreFocus()&&!i.isEditing()&&k.current.focus({preventScroll:!0}))});const _u=()=>O.createElement(O.Fragment,null,a!=null&&$0(a,p,l,$,X,Jr,H),d!=null&&z0(d,gt,Ee,k.current,i,F));return O.createElement("div",{ref:As,style:v,tabIndex:r,role:N,"col-id":o},X?O.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Ke},_u()):_u())},K0=y.memo(j0),Y0=e=>{const{context:t,gos:i}=y.useContext(qt),{rowCtrl:s,containerType:n}=e,r=s.getTabIndex(),o=y.useRef(s.getDomOrder()),l=s.isFullWidth(),a=s.getRowNode().displayed,[u,d]=y.useState(()=>a?s.getRowIndex():null),[c,p]=y.useState(()=>s.getRowId()),[C,v]=y.useState(()=>s.getBusinessKey()),[S,E]=y.useState(()=>s.getRowStyles()),w=y.useRef(null),m=y.useRef(null),[R,T]=y.useState(()=>null),[P,F]=y.useState(),[b,M]=y.useState(()=>a?s.getInitialRowTop(n):void 0),[N,k]=y.useState(()=>a?s.getInitialTransform(n):void 0),$=y.useRef(null),U=y.useRef(),Q=y.useRef(!1),[he,we]=y.useState(0);y.useEffect(()=>{var Re;if(Q.current||!P||he>10)return;const nt=(Re=$.current)==null?void 0:Re.firstChild;nt?(s.setupDetailRowAutoHeight(nt),Q.current=!0):we(Ke=>Ke+1)},[P,he]);let fe=y.useRef();fe.current||(fe.current=new wu(()=>$.current));const ge=y.useCallback(Re=>{if($.current=Re,!$.current){s.unsetComp(n);return}if(!s.isAlive())return;const nt={setTop:M,setTransform:k,addOrRemoveCssClass:(Ke,As)=>fe.current.addOrRemoveCssClass(Ke,As),setDomOrder:Ke=>o.current=Ke,setRowIndex:d,setRowId:p,setRowBusinessKey:v,setUserStyles:E,setCellCtrls:(Ke,As)=>{m.current=w.current,w.current=Ke;const Jr=tv(m.current,Ke,o.current);Jr!==m.current&&ev(As,()=>T(Jr))},showFullWidth:Ke=>F(Ke),getFullWidthCellRenderer:()=>U.current,refreshFullWidth:Ke=>ee.current?(F(As=>Wt(He({},As),{params:Ke()})),!0):!U.current||!U.current.refresh?!1:U.current.refresh(Ke())};s.setComp(nt,$.current,n)},[]);y.useLayoutEffect(()=>Nu(P,t,$.current,U),[P]);const G=y.useMemo(()=>{const Re={top:b,transform:N};return Object.assign(Re,S),Re},[b,N,S]),H=l&&P&&P.componentFromFramework,W=!l&&R!=null,X=y.useMemo(()=>!!((P==null?void 0:P.componentFromFramework)&&Tl(P.componentClass)),[P]),ee=y.useRef(!1);y.useEffect(()=>{ee.current=X&&!!P&&!!i.get("reactiveCustomComponents")},[X,P]);const Ee=()=>R==null?void 0:R.map(Re=>O.createElement(K0,{cellCtrl:Re,editingRow:s.isEditing(),printLayout:s.isPrintLayout(),key:Re.getInstanceId()})),gt=()=>{const Re=P.componentClass;return O.createElement(O.Fragment,null,X&&O.createElement(Re,He({},P.params)),!X&&O.createElement(Re,Wt(He({},P.params),{ref:U})))};return O.createElement("div",{ref:ge,role:"row",style:G,"row-index":u,"row-id":c,"row-business-key":C,tabIndex:r},W&&Ee(),H&>())},Q0=y.memo(Y0),q0=e=>{const{context:t}=y.useContext(qt),{name:i}=e,s=y.useMemo(()=>OD(i),[i]),n=y.useRef(null),r=y.useRef(null),o=y.useRef([]),l=y.useRef([]),[a,u]=y.useState(()=>[]),d=y.useRef(!1),c=y.useRef(),p=y.useMemo(()=>Sc.getRowContainerCssClasses(i),[i]),C=y.useMemo(()=>Zi(p.viewport),[p]),v=y.useMemo(()=>Zi(p.container),[p]),S=i===Ae.CENTER||i===Ae.TOP_CENTER||i===Ae.BOTTOM_CENTER||i===Ae.STICKY_TOP_CENTER||i===Ae.STICKY_BOTTOM_CENTER,E=S?n:r;or(" AG Row Container "+i+" ",E);const w=y.useCallback(()=>S?n.current!=null&&r.current!=null:r.current!=null,[]),m=y.useCallback(()=>S?n.current==null&&r.current==null:r.current==null,[]),R=y.useCallback(()=>{if(m()&&(t.destroyBean(c.current),c.current=null),w()){const b=N=>{const k=tv(l.current,o.current,d.current);k!==l.current&&(l.current=k,ev(N,()=>u(k)))},M={setViewportHeight:N=>{n.current&&(n.current.style.height=N)},setRowCtrls:({rowCtrls:N,useFlushSync:k})=>{const $=!!k&&o.current.length>0&&N.length>0;o.current=N,b($)},setDomOrder:N=>{d.current!=N&&(d.current=N,b(!1))},setContainerWidth:N=>{r.current&&(r.current.style.width=N)}};c.current=t.createBean(new Sc(i)),c.current.setComp(M,r.current,n.current)}},[w,m]),T=y.useCallback(b=>{r.current=b,R()},[R]),P=y.useCallback(b=>{n.current=b,R()},[R]),F=()=>O.createElement("div",{className:v,ref:T,role:"rowgroup"},a.map(b=>O.createElement(Q0,{rowCtrl:b,containerType:s,key:b.getInstanceId()})));return O.createElement(O.Fragment,null,S?O.createElement("div",{className:C,ref:P,role:"presentation"},F()):F())},X0=y.memo(q0),Z0=()=>{const{context:e,agStackComponentsRegistry:t,resizeObserverService:i}=y.useContext(qt),[s,n]=y.useState(""),[r,o]=y.useState(0),[l,a]=y.useState(0),[u,d]=y.useState("0px"),[c,p]=y.useState("0px"),[C,v]=y.useState("100%"),[S,E]=y.useState("0px"),[w,m]=y.useState("0px"),[R,T]=y.useState("100%"),[P,F]=y.useState(""),[b,M]=y.useState(""),[N,k]=y.useState(null),[$,U]=y.useState(""),[Q,he]=y.useState(null),[we,fe]=y.useState("ag-layout-normal");let ge=y.useRef();ge.current||(ge.current=new wu(()=>G.current));const G=y.useRef(null),H=y.useRef(null),W=y.useRef(null),X=y.useRef(null),ee=y.useRef(null),Ee=y.useRef(null),gt=y.useRef(null),Re=y.useRef([]),nt=y.useRef([]);or(" AG Grid Body ",G),or(" AG Pinned Top ",H),or(" AG Sticky Top ",W),or(" AG Middle ",Ee),or(" AG Pinned Bottom ",gt);const Ke=y.useCallback(eo=>{if(G.current=eo,!G.current){e.destroyBeans(Re.current),nt.current.forEach(ft=>ft()),Re.current=[],nt.current=[];return}if(!e)return;const Pl=ft=>{const ds=t.getComponentClass(ft),nv=e.createBean(new ds);return Re.current.push(nv),nv},tn=(ft,ds)=>{ft.appendChild(ds),nt.current.push(()=>ft.removeChild(ds))};tn(G.current,document.createComment(" AG Fake Horizontal Scroll ")),tn(G.current,Pl("AG-FAKE-HORIZONTAL-SCROLL").getGui()),tn(G.current,document.createComment(" AG Overlay Wrapper ")),tn(G.current,Pl("AG-OVERLAY-WRAPPER").getGui()),ee.current&&(tn(ee.current,document.createComment(" AG Fake Vertical Scroll ")),tn(ee.current,Pl("AG-FAKE-VERTICAL-SCROLL").getGui()));const Yh={setRowAnimationCssOnBodyViewport:n,setColumnCount:ft=>{G.current&&Z.setAriaColCount(G.current,ft)},setRowCount:ft=>{G.current&&Z.setAriaRowCount(G.current,ft)},setTopHeight:o,setBottomHeight:a,setStickyTopHeight:d,setStickyTopTop:p,setStickyTopWidth:v,setTopDisplay:F,setBottomDisplay:M,setColumnMovingCss:(ft,ds)=>ge.current.addOrRemoveCssClass(ft,ds),updateLayoutClasses:fe,setAlwaysVerticalScrollClass:k,setPinnedTopBottomOverflowY:U,setCellSelectableCss:(ft,ds)=>he(ds?ft:null),setBodyViewportWidth:ft=>{Ee.current&&(Ee.current.style.width=ft)},registerBodyViewportResizeListener:ft=>{if(Ee.current){const ds=i.observeResize(Ee.current,ft);nt.current.push(()=>ds())}},setStickyBottomHeight:E,setStickyBottomBottom:m,setStickyBottomWidth:T},sv=e.createBean(new _t);Re.current.push(sv),sv.setComp(Yh,G.current,Ee.current,H.current,gt.current,W.current,X.current)},[]),As=y.useMemo(()=>Zi("ag-root","ag-unselectable",we),[we]),Jr=y.useMemo(()=>Zi("ag-body-viewport",s,we,N,Q),[s,we,N,Q]),_u=y.useMemo(()=>Zi("ag-body",we),[we]),Ye=y.useMemo(()=>Zi("ag-floating-top",Q),[Q]),Ze=y.useMemo(()=>Zi("ag-sticky-top",Q),[Q]),at=y.useMemo(()=>Zi("ag-sticky-bottom",Q),[Q]),me=y.useMemo(()=>Zi("ag-floating-bottom",Q),[Q]),ut=y.useMemo(()=>({height:r,minHeight:r,display:P,overflowY:$}),[r,P,$]),ji=y.useMemo(()=>({height:u,top:c,width:C}),[u,c,C]),Ki=y.useMemo(()=>({height:S,bottom:w,width:R}),[S,w,R]),Xn=y.useMemo(()=>({height:l,minHeight:l,display:b,overflowY:$}),[l,b,$]),Kh=eo=>O.createElement(X0,{name:eo,key:`${eo}-container`}),Dl=({section:eo,children:Pl,className:tn,style:Yh})=>O.createElement("div",{ref:eo,className:tn,role:"presentation",style:Yh},Pl.map(Kh));return O.createElement("div",{ref:Ke,className:As,role:"treegrid"},O.createElement(_0,null),Dl({section:H,className:Ye,style:ut,children:[Ae.TOP_LEFT,Ae.TOP_CENTER,Ae.TOP_RIGHT,Ae.TOP_FULL_WIDTH]}),O.createElement("div",{className:_u,ref:ee,role:"presentation"},Dl({section:Ee,className:Jr,children:[Ae.LEFT,Ae.CENTER,Ae.RIGHT,Ae.FULL_WIDTH]})),Dl({section:W,className:Ze,style:ji,children:[Ae.STICKY_TOP_LEFT,Ae.STICKY_TOP_CENTER,Ae.STICKY_TOP_RIGHT,Ae.STICKY_TOP_FULL_WIDTH]}),Dl({section:X,className:at,style:Ki,children:[Ae.STICKY_BOTTOM_LEFT,Ae.STICKY_BOTTOM_CENTER,Ae.STICKY_BOTTOM_RIGHT,Ae.STICKY_BOTTOM_FULL_WIDTH]}),Dl({section:gt,className:me,style:Xn,children:[Ae.BOTTOM_LEFT,Ae.BOTTOM_CENTER,Ae.BOTTOM_RIGHT,Ae.BOTTOM_FULL_WIDTH]}))},J0=y.memo(Z0),eG=(e,t)=>{const{children:i,eFocusableElement:s,onTabKeyDown:n,gridCtrl:r,forceFocusOutWhenTabGuardsAreEmpty:o}=e,{context:l}=y.useContext(qt),a=y.useRef(null),u=y.useRef(null),d=y.useRef(),c=E=>{const w=E==null?void 0:parseInt(E,10).toString();[a,u].forEach(m=>{var R,T;w===void 0?(R=m.current)==null||R.removeAttribute("tabindex"):(T=m.current)==null||T.setAttribute("tabindex",w)})};y.useImperativeHandle(t,()=>({forceFocusOutOfContainer(E){var w;(w=d.current)==null||w.forceFocusOutOfContainer(E)}}));const p=y.useCallback(()=>{if(!a.current&&!u.current){l.destroyBean(d.current),d.current=null;return}if(a.current&&u.current){const E={setTabIndex:c};d.current=l.createBean(new Oh({comp:E,eTopGuard:a.current,eBottomGuard:u.current,eFocusableElement:s,onTabKeyDown:n,forceFocusOutWhenTabGuardsAreEmpty:o,focusInnerElement:w=>r.focusInnerElement(w)}))}},[]),C=y.useCallback(E=>{a.current=E,p()},[p]),v=y.useCallback(E=>{u.current=E,p()},[p]),S=E=>{const w=E==="top"?Td.TAB_GUARD_TOP:Td.TAB_GUARD_BOTTOM;return O.createElement("div",{className:`${Td.TAB_GUARD} ${w}`,role:"presentation",ref:E==="top"?C:v})};return O.createElement(O.Fragment,null,S("top"),i,S("bottom"))},tG=y.forwardRef(eG),iG=y.memo(tG),sG=({context:e})=>{const[t,i]=y.useState(""),[s,n]=y.useState(""),[r,o]=y.useState(""),[l,a]=y.useState(null),[u,d]=y.useState(null),[c,p]=y.useState(!1),[C,v]=y.useState(),S=y.useRef(null),E=y.useRef(null),w=y.useRef(),[m,R]=y.useState(null),T=y.useRef(()=>{}),P=y.useCallback(()=>{},[]),F=y.useMemo(()=>e.isDestroyed()?null:e.getBean("beans"),[e]);or(" AG Grid ",E);const b=y.useCallback(U=>{if(E.current=U,!E.current){e.destroyBean(S.current),S.current=null;return}if(e.isDestroyed())return;S.current=e.createBean(new Qn);const Q=S.current;T.current=Q.focusInnerElement.bind(Q);const he={destroyGridUi:()=>{},setRtlClass:i,forceFocusOutOfContainer:we=>{var fe;(fe=w.current)==null||fe.forceFocusOutOfContainer(we)},updateLayoutClasses:o,getFocusableContainers:()=>{var we,fe;const ge=[],G=(we=E.current)==null?void 0:we.querySelector(".ag-root"),H=(fe=E.current)==null?void 0:fe.querySelector(".ag-side-bar:not(.ag-hidden)");return G&&ge.push(G),H&&ge.push(H),ge},setCursor:a,setUserSelect:d};Q.setComp(he,E.current,E.current),p(!0)},[]);y.useEffect(()=>{if(!C||!F||!S.current||!m||!E.current)return;const U=S.current,Q=[],{agStackComponentsRegistry:he}=F,we=he.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),fe=he.getComponentClass("AG-SIDE-BAR"),ge=he.getComponentClass("AG-STATUS-BAR"),G=he.getComponentClass("AG-WATERMARK"),H=he.getComponentClass("AG-PAGINATION"),W=[],X=E.current;if(U.showDropZones()&&we){const ee=e.createBean(new we),Ee=ee.getGui();X.insertAdjacentElement("afterbegin",Ee),W.push(Ee),Q.push(ee)}if(U.showSideBar()&&fe){const ee=e.createBean(new fe),Ee=ee.getGui(),gt=m.querySelector(".ag-tab-guard-bottom");gt&&(gt.insertAdjacentElement("beforebegin",Ee),W.push(Ee)),Q.push(ee)}if(U.showStatusBar()&&ge){const ee=e.createBean(new ge),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}if(H){const ee=e.createBean(new H),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}if(U.showWatermark()&&G){const ee=e.createBean(new G),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}return()=>{e.destroyBeans(Q),W.forEach(ee=>{ee.parentElement&&ee.parentElement.removeChild(ee)})}},[C,m,F]);const M=y.useMemo(()=>Zi("ag-root-wrapper",t,s,r),[t,s,r]),N=y.useMemo(()=>Zi("ag-root-wrapper-body","ag-focus-managed",r),[r]),k=y.useMemo(()=>({userSelect:u??"",WebkitUserSelect:u??"",cursor:l??""}),[u,l]),$=y.useCallback(U=>{w.current=U,v(U!==null)},[]);return O.createElement("div",{ref:b,className:M,style:k,role:"presentation"},O.createElement("div",{className:N,ref:R,role:"presentation"},c&&m&&F&&O.createElement(qt.Provider,{value:F},O.createElement(iG,{ref:$,eFocusableElement:m,onTabKeyDown:P,gridCtrl:S.current,forceFocusOutWhenTabGuardsAreEmpty:!0},O.createElement(J0,null)))))},nG=y.memo(sG),lb=e=>{var t,i;const s=y.useRef(),n=y.useRef(null),r=y.useRef(null),o=y.useRef([]),l=y.useRef([]),a=y.useRef(e),u=y.useRef(!1),[d,c]=y.useState(void 0),[,p]=y.useState(0),C=y.useCallback(E=>{if(n.current=E,!n.current){o.current.forEach(b=>b()),o.current.length=0;return}const w=e.modules||[];r.current||(r.current=new S0(()=>p(b=>b+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),o.current.push(()=>{var b;(b=r.current)==null||b.destroy(),r.current=null}));const m=mc.combineAttributesAndGridOptions(e.gridOptions,e),R={providedBeanInstances:{frameworkComponentWrapper:new oG(r.current,!!m.reactiveCustomComponents)},modules:w,frameworkOverrides:new aG},T=b=>{c(b),o.current.push(()=>{b.destroy()}),b.getBean(Er.NAME).whenReady(()=>{if(b.isDestroyed())return;const N=s.current;N&&e.setGridApi&&e.setGridApi(N,new Qo(N))})},P=b=>{b.getBean(Er.NAME).whenReady(()=>{l.current.forEach(N=>N()),l.current.length=0,u.current=!0})},F=new xN;s.current=F.create(n.current,m,T,P,R)},[]),v=y.useMemo(()=>He({height:"100%"},e.containerStyle||{}),[e.containerStyle]),S=y.useCallback(E=>{u.current?E():l.current.push(E)},[]);return y.useEffect(()=>{const E=rG(a.current,e);a.current=e,S(()=>{s.current&&mc.processOnChange(E,s.current)})},[e]),O.createElement("div",{style:v,className:e.className,ref:C},d&&!d.isDestroyed()?O.createElement(nG,{context:d}):null,(i=(t=r.current)==null?void 0:t.getPortals())!=null?i:null)};function rG(e,t){const i={};return Object.keys(t).forEach(s=>{const n=t[s];e[s]!==n&&(i[s]=n)}),i}var oG=class extends LN{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const n=(r=>{switch(r){case"filter":return p0;case"floatingFilterComponent":return f0;case"dateComponent":return h0;case"loadingOverlayComponent":return m0;case"noRowsOverlayComponent":return v0;case"statusPanel":return y0;case"toolPanel":return w0;case"menuItem":return C0}})(t.propertyName);if(n)return new n(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":iv();break}const i=!t.cellRenderer&&t.propertyName!=="toolPanel";return new tb(e,this.parent,t,i)}},lG=y.forwardRef((e,t)=>{const{ctrlsFactory:i,context:s,gos:n,resizeObserverService:r,clientSideRowModel:o,serverSideRowModel:l}=y.useContext(qt),[a,u]=y.useState(()=>new Oi),[d,c]=y.useState(()=>new Oi),[p,C]=y.useState(),[v,S]=y.useState(),E=y.useRef(),w=y.useRef(null),m=y.useRef(),R=y.useMemo(()=>Ce.__getGridRegisteredModules(e.api.getGridId()),[e]),T=y.useMemo(()=>a.toString()+" ag-details-row",[a]),P=y.useMemo(()=>d.toString()+" ag-details-grid",[d]);t&&y.useImperativeHandle(t,()=>({refresh(){var M,N;return(N=(M=E.current)==null?void 0:M.refresh())!=null?N:!1}})),e.template&&Z.warnOnce("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const F=y.useCallback(M=>{if(w.current=M,!w.current){s.destroyBean(E.current),m.current&&m.current();return}const N={addOrRemoveCssClass:($,U)=>u(Q=>Q.setClass($,U)),addOrRemoveDetailGridCssClass:($,U)=>c(Q=>Q.setClass($,U)),setDetailGrid:$=>C($),setRowData:$=>S($),getGui:()=>w.current},k=i.getInstance("detailCellRenderer");if(k&&(s.createBean(k),k.init(N,e),E.current=k,n.get("detailRowAutoHeight"))){const $=()=>{if(w.current==null)return;const U=w.current.clientHeight;U!=null&&U>0&&setTimeout(()=>{e.node.setRowHeight(U),o?o.onRowHeightChanged():l&&l.onRowHeightChanged()},0)};m.current=r.observeResize(w.current,$),$()}},[]),b=y.useCallback((M,N)=>{var k;(k=E.current)==null||k.registerDetailWithMaster(M,N)},[]);return O.createElement("div",{className:T,ref:F},p&&O.createElement(lb,Wt(He({className:P},p),{modules:R,rowData:v,setGridApi:b})))}),aG=class extends ZD{constructor(){super("react"),this.frameworkComponents={agGroupCellRenderer:Gw,agGroupRowRenderer:Gw,agDetailCellRenderer:lG},this.wrapIncoming=(e,t)=>t==="ensureVisible"?R0(e):e(),this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}},uG=class extends y.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=(e,t)=>{this.api=e,this.columnApi=t,this.apiListeners.forEach(i=>i(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return O.createElement(lb,Wt(He({},this.props),{setGridApi:this.setGridApi}))}};const Hw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bw=CR,dG=(e,t)=>i=>{var s;if((t==null?void 0:t.variants)==null)return Bw(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:r}=t,o=Object.keys(n).map(u=>{const d=i==null?void 0:i[u],c=r==null?void 0:r[u];if(d===null)return null;const p=Hw(d)||Hw(c);return n[u][p]}),l=i&&Object.entries(i).reduce((u,d)=>{let[c,p]=d;return p===void 0||(u[c]=p),u},{}),a=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:c,className:p,...C}=d;return Object.entries(C).every(v=>{let[S,E]=v;return Array.isArray(E)?E.includes({...r,...l}[S]):{...r,...l}[S]===E})?[...u,c,p]:u},[]);return Bw(e,o,a,i==null?void 0:i.class,i==null?void 0:i.className)},cG=dG("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),au=y.forwardRef(({className:e,variant:t,size:i,asChild:s=!1,...n},r)=>x.jsx("button",{className:ui(cG({variant:t,size:i,className:e})),ref:r,...n}));au.displayName="Button";function ab({filePath:e,className:t,onSaveSuccess:i}){const[s,n]=y.useState(""),[r,o]=y.useState(!1),[l,a]=y.useState(!1),[u,d]=y.useState(null),[c,p]=y.useState(null);y.useEffect(()=>{e&&C(e)},[e]);const C=async S=>{o(!0),d(null);try{const E=await fetch(`/api/schema/content?file=${encodeURIComponent(S)}`);if(!E.ok)throw new Error("Failed to load file");const w=await E.text();n(w)}catch(E){console.error(E),d("Failed to read file content")}finally{o(!1)}},v=async()=>{if(e){a(!0),p(null);try{if(!(await fetch(`/api/schema/content?file=${encodeURIComponent(e)}`,{method:"POST",body:s})).ok)throw new Error("Failed to save");p("File saved successfully!"),setTimeout(()=>p(null),3e3),i&&i()}catch{d("Failed to save file")}finally{a(!1)}}};return x.jsxs(Ho,{className:`flex flex-col h-full ${t}`,children:[x.jsxs(Aa,{className:"py-2 px-4 flex flex-row items-center justify-between border-b space-y-0 min-h-[50px]",children:[x.jsx(xa,{className:"text-sm font-mono text-muted-foreground flex items-center",children:e}),x.jsxs("div",{className:"flex items-center gap-2",children:[c&&x.jsx("span",{className:"text-xs text-green-600 font-medium animate-fade-in",children:c}),u&&x.jsx("span",{className:"text-xs text-red-600 font-medium",children:u}),x.jsx(au,{size:"sm",onClick:v,disabled:l||r,children:l?"Saving...":x.jsxs(x.Fragment,{children:[x.jsx(Qx,{className:"mr-2 h-3 w-3"})," Save"]})})]})]}),x.jsxs(La,{className:"flex-1 p-0 relative min-h-[400px]",children:[r&&x.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10 transition-all backdrop-blur-sm",children:x.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),x.jsx("textarea",{className:"w-full h-full p-4 font-mono text-sm resize-none focus:outline-none bg-muted/10 leading-normal",value:s,onChange:S=>n(S.target.value),spellCheck:!1,disabled:r})]})]})}function hG({objectName:e}){const[t,i]=y.useState([]),[s,n]=y.useState([]),[r,o]=y.useState(!1),[l,a]=y.useState("data"),[u,d]=y.useState(null),c=async()=>{o(!0);try{const S=await(await fetch("/api/metadata")).json(),w=(Array.isArray(S)?S:S.objects).find(T=>T.name===e);if(w){const T=[{field:"id",headerName:"ID",width:100,pinned:"left"}];Object.entries(w.fields).forEach(([P,F])=>{T.push({field:P,headerName:F.label||P,flex:1,filter:!0})}),T.find(P=>P.field==="createdAt")||T.push({field:"createdAt",hide:!0}),T.find(P=>P.field==="updatedAt")||T.push({field:"updatedAt",hide:!0}),n(T)}const R=await(await fetch(`/api/objectql/${e}`)).json();i(Array.isArray(R)?R:[])}catch(v){console.error(v)}finally{o(!1)}},p=async()=>{try{const v=await fetch(`/api/schema/find?object=${e}`);if(v.ok){const S=await v.json();d(S.file)}else d(null),console.error("Failed to find schema file")}catch(v){console.error(v)}};y.useEffect(()=>{a("data")},[e]),y.useEffect(()=>{l==="data"?c():p()},[e,l]);const C=y.useMemo(()=>({sortable:!0,filter:!0,resizable:!0}),[]);return x.jsxs("div",{className:"flex h-full flex-col",children:[x.jsxs("div",{className:"border-b px-6 py-4 flex items-center justify-between bg-card text-card-foreground",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("h1",{className:"text-2xl font-bold tracking-tight capitalize",children:e}),x.jsxs("div",{className:"flex space-x-1",children:[x.jsxs("button",{onClick:()=>a("data"),className:ui("flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",l==="data"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[x.jsx(fR,{className:"h-4 w-4"}),x.jsx("span",{children:"Data"})]}),x.jsxs("button",{onClick:()=>a("schema"),className:ui("flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",l==="schema"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[x.jsx(xm,{className:"h-4 w-4"}),x.jsx("span",{children:"Schema"})]})]})]}),l==="data"&&x.jsxs("div",{className:"flex items-center space-x-2",children:[x.jsxs(au,{variant:"outline",size:"sm",onClick:c,disabled:r,children:[x.jsx(gR,{className:ui("mr-2 h-4 w-4",r&&"animate-spin")}),"Refresh"]}),x.jsxs(au,{size:"sm",children:[x.jsx(Yx,{className:"mr-2 h-4 w-4"}),"New Record"]})]})]}),x.jsx("div",{className:"flex-1 overflow-hidden p-6 bg-muted/20",children:l==="data"?x.jsx("div",{className:"border rounded-md overflow-hidden bg-card h-full",style:{opacity:r?.6:1},children:x.jsx("div",{className:"ag-theme-quartz h-full w-full",children:x.jsx(uG,{rowData:t,columnDefs:s,defaultColDef:C,pagination:!0,paginationPageSize:20,rowSelection:"multiple"})})}):x.jsx("div",{className:"h-full bg-card rounded-md border",children:u?x.jsx(ab,{filePath:u,className:"h-full border-0"}):x.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:r?"Loading schema...":"Could not find definition file for this object."})})})]})}function pG(){const[e,t]=y.useState([]),[i,s]=y.useState(null),[n,r]=y.useState(null);y.useEffect(()=>{o()},[]);const o=async()=>{try{const l=await fetch("/api/schema/files");if(!l.ok)throw new Error("Failed to fetch files");const a=await l.json();t(a.files||[])}catch(l){console.error(l),r("Failed to load file list")}};return x.jsxs("div",{className:"flex h-full flex-col p-6 space-y-6",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Schema Editor"}),n&&x.jsx("p",{className:"text-sm text-red-500",children:n})]}),x.jsxs(au,{variant:"outline",size:"sm",onClick:o,children:[x.jsx(gR,{className:"mr-2 h-4 w-4"})," Refresh"]})]}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 h-full min-h-[500px]",children:[x.jsxs(Ho,{className:"md:col-span-1 flex flex-col",children:[x.jsxs(Aa,{className:"py-4",children:[x.jsx(xa,{className:"text-lg",children:"Files"}),x.jsx(uc,{children:"Select a schema file to edit"})]}),x.jsx(La,{className:"flex-1 overflow-auto p-2",children:x.jsxs("div",{className:"space-y-1",children:[e.map(l=>x.jsxs("button",{onClick:()=>s(l),className:ui("w-full text-left px-3 py-2 text-sm rounded-md transition-colors flex items-center",i===l?"bg-primary text-primary-foreground font-medium":"hover:bg-muted"),children:[x.jsx(xm,{className:"mr-2 h-4 w-4 opacity-70"}),l]},l)),e.length===0&&x.jsx("div",{className:"text-sm text-muted-foreground p-2",children:"No schema files found"})]})})]}),x.jsx("div",{className:"md:col-span-3 h-full",children:i?x.jsx(ab,{filePath:i}):x.jsx(Ho,{className:"h-full flex items-center justify-center",children:x.jsx("div",{className:"text-muted-foreground",children:"Select a file to view content"})})})]})]})}function gG(){const{name:e}=cx();return e?x.jsx(hG,{objectName:e}):null}function fG(){return x.jsx(_x,{basename:"/studio",children:x.jsxs("div",{className:"flex h-screen bg-background text-foreground overflow-hidden font-sans antialiased",children:[x.jsx(FL,{}),x.jsx("main",{className:"flex-1 overflow-auto bg-muted/20",children:x.jsxs(bx,{children:[x.jsx(vd,{path:"/",element:x.jsx(xL,{})}),x.jsx(vd,{path:"/schema",element:x.jsx(pG,{})}),x.jsx(vd,{path:"/object/:name",element:x.jsx(gG,{})})]})})]})})}Xp.createRoot(document.getElementById("root")).render(x.jsx(O.StrictMode,{children:x.jsx(fG,{})}));
|
|
416
|
+
`&&e.push(jp),r;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":e.push(ms(t));for(var C in i)if(Zt.call(i,C)&&(r=i[C],r!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(ae(399,t));default:fi(e,s,C,r)}return e.push(fw),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return $p(e,i,t,s);case"html":return n.insertionMode===0&&e.push(z_),$p(e,i,t,s);default:if(t.indexOf("-")===-1&&typeof i.is!="string")return $p(e,i,t,s);e.push(ms(t)),o=r=null;for(u in i)if(Zt.call(i,u)&&(l=i[u],l!=null))switch(u){case"children":r=l;break;case"dangerouslySetInnerHTML":o=l;break;case"style":IP(e,s,l);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:MP(u)&&typeof l!="function"&&typeof l!="symbol"&&e.push(ln,de(u),oo,de(Et(l)),nr)}return e.push(an),Md(e,o,r),r}}var j_=z("</"),K_=z(">"),Y_=z('<template id="'),Q_=z('"></template>'),q_=z("<!--$-->"),X_=z('<!--$?--><template id="'),Z_=z('"></template>'),J_=z("<!--$!-->"),eO=z("<!--/$-->"),tO=z("<template"),iO=z('"'),sO=z(' data-dgst="');z(' data-msg="');z(' data-stck="');var nO=z("></template>");function Cw(e,t,i){if(q(e,X_),i===null)throw Error(ae(395));return q(e,i),Ge(e,Z_)}var rO=z('<div hidden id="'),oO=z('">'),lO=z("</div>"),aO=z('<svg aria-hidden="true" style="display:none" id="'),uO=z('">'),dO=z("</svg>"),cO=z('<math aria-hidden="true" style="display:none" id="'),hO=z('">'),pO=z("</math>"),gO=z('<table hidden id="'),fO=z('">'),mO=z("</table>"),CO=z('<table hidden><tbody id="'),vO=z('">'),yO=z("</tbody></table>"),wO=z('<table hidden><tr id="'),SO=z('">'),EO=z("</tr></table>"),RO=z('<table hidden><colgroup id="'),TO=z('">'),DO=z("</colgroup></table>");function PO(e,t,i,s){switch(i.insertionMode){case 0:case 1:return q(e,rO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,oO);case 2:return q(e,aO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,uO);case 3:return q(e,cO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,hO);case 4:return q(e,gO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,fO);case 5:return q(e,CO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,vO);case 6:return q(e,wO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,SO);case 7:return q(e,RO),q(e,t.segmentPrefix),q(e,de(s.toString(16))),Ge(e,TO);default:throw Error(ae(397))}}function bO(e,t){switch(t.insertionMode){case 0:case 1:return Ge(e,lO);case 2:return Ge(e,dO);case 3:return Ge(e,pO);case 4:return Ge(e,mO);case 5:return Ge(e,yO);case 6:return Ge(e,EO);case 7:return Ge(e,DO);default:throw Error(ae(397))}}var FO=z('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),AO=z('$RS("'),xO=z('","'),LO=z('")<\/script>'),MO=z('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),IO=z('$RC("'),NO=z('","'),_O=z('")<\/script>'),OO=z('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),GO=z('$RX("'),kO=z('"'),VO=z(")<\/script>"),Kp=z(","),HO=/[<\u2028\u2029]/g;function Yp(e){return JSON.stringify(e).replace(HO,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var ua=Object.assign,BO=Symbol.for("react.element"),NP=Symbol.for("react.portal"),_P=Symbol.for("react.fragment"),OP=Symbol.for("react.strict_mode"),GP=Symbol.for("react.profiler"),kP=Symbol.for("react.provider"),VP=Symbol.for("react.context"),HP=Symbol.for("react.forward_ref"),BP=Symbol.for("react.suspense"),WP=Symbol.for("react.suspense_list"),UP=Symbol.for("react.memo"),jC=Symbol.for("react.lazy"),WO=Symbol.for("react.scope"),UO=Symbol.for("react.debug_trace_mode"),zO=Symbol.for("react.legacy_hidden"),$O=Symbol.for("react.default_value"),vw=Symbol.iterator;function Lf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _P:return"Fragment";case NP:return"Portal";case GP:return"Profiler";case OP:return"StrictMode";case BP:return"Suspense";case WP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VP:return(e.displayName||"Context")+".Consumer";case kP:return(e._context.displayName||"Context")+".Provider";case HP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case UP:return t=e.displayName||null,t!==null?t:Lf(e.type)||"Memo";case jC:t=e._payload,e=e._init;try{return Lf(e(t))}catch{}}return null}var zP={};function yw(e,t){if(e=e.contextTypes,!e)return zP;var i={},s;for(s in e)i[s]=t[s];return i}var pr=null;function zh(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var i=t.parent;if(e===null){if(i!==null)throw Error(ae(401))}else{if(i===null)throw Error(ae(401));zh(e,i)}t.context._currentValue=t.value}}function $P(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&$P(e)}function jP(e){var t=e.parent;t!==null&&jP(t),e.context._currentValue=e.value}function KP(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(ae(402));e.depth===t.depth?zh(e,t):KP(e,t)}function YP(e,t){var i=t.parent;if(i===null)throw Error(ae(402));e.depth===i.depth?zh(e,i):YP(e,i),t.context._currentValue=t.value}function Oc(e){var t=pr;t!==e&&(t===null?jP(e):e===null?$P(t):t.depth===e.depth?zh(t,e):t.depth>e.depth?KP(t,e):YP(t,e),pr=e)}var ww={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Sw(e,t,i,s){var n=e.state!==void 0?e.state:null;e.updater=ww,e.props=i,e.state=n;var r={queue:[],replace:!1};e._reactInternals=r;var o=t.contextType;if(e.context=typeof o=="object"&&o!==null?o._currentValue:s,o=t.getDerivedStateFromProps,typeof o=="function"&&(o=o(i,n),n=o==null?n:ua({},n,o),e.state=n),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&ww.enqueueReplaceState(e,e.state,null),r.queue!==null&&0<r.queue.length)if(t=r.queue,o=r.replace,r.queue=null,r.replace=!1,o&&t.length===1)e.state=t[0];else{for(r=o?t[0]:e.state,n=!0,o=o?1:0;o<t.length;o++){var l=t[o];l=typeof l=="function"?l.call(e,r,i,s):l,l!=null&&(n?(n=!1,r=ua({},r,l)):ua(r,l))}e.state=r}else r.queue=null}var jO={id:1,overflow:""};function Mf(e,t,i){var s=e.id;e=e.overflow;var n=32-Id(s)-1;s&=~(1<<n),i+=1;var r=32-Id(t)+n;if(30<r){var o=n-n%5;return r=(s&(1<<o)-1).toString(32),s>>=o,n-=o,{id:1<<32-Id(t)+n|i<<n|s,overflow:r+e}}return{id:1<<r|i<<n|s,overflow:e}}var Id=Math.clz32?Math.clz32:QO,KO=Math.log,YO=Math.LN2;function QO(e){return e>>>=0,e===0?32:31-(KO(e)/YO|0)|0}function qO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XO=typeof Object.is=="function"?Object.is:qO,js=null,KC=null,Nd=null,Le=null,ql=!1,Gc=!1,ou=0,vn=null,$h=0;function rr(){if(js===null)throw Error(ae(321));return js}function Ew(){if(0<$h)throw Error(ae(312));return{memoizedState:null,queue:null,next:null}}function YC(){return Le===null?Nd===null?(ql=!1,Nd=Le=Ew()):(ql=!0,Le=Nd):Le.next===null?(ql=!1,Le=Le.next=Ew()):(ql=!0,Le=Le.next),Le}function QC(){KC=js=null,Gc=!1,Nd=null,$h=0,Le=vn=null}function QP(e,t){return typeof t=="function"?t(e):t}function Rw(e,t,i){if(js=rr(),Le=YC(),ql){var s=Le.queue;if(t=s.dispatch,vn!==null&&(i=vn.get(s),i!==void 0)){vn.delete(s),s=Le.memoizedState;do s=e(s,i.action),i=i.next;while(i!==null);return Le.memoizedState=s,[s,t]}return[Le.memoizedState,t]}return e=e===QP?typeof t=="function"?t():t:i!==void 0?i(t):t,Le.memoizedState=e,e=Le.queue={last:null,dispatch:null},e=e.dispatch=ZO.bind(null,js,e),[Le.memoizedState,e]}function Tw(e,t){if(js=rr(),Le=YC(),t=t===void 0?null:t,Le!==null){var i=Le.memoizedState;if(i!==null&&t!==null){var s=i[1];e:if(s===null)s=!1;else{for(var n=0;n<s.length&&n<t.length;n++)if(!XO(t[n],s[n])){s=!1;break e}s=!0}if(s)return i[0]}}return e=e(),Le.memoizedState=[e,t],e}function ZO(e,t,i){if(25<=$h)throw Error(ae(301));if(e===js)if(Gc=!0,e={action:i,next:null},vn===null&&(vn=new Map),i=vn.get(t),i===void 0)vn.set(t,e);else{for(t=i;t.next!==null;)t=t.next;t.next=e}}function JO(){throw Error(ae(394))}function nd(){}var Dw={readContext:function(e){return e._currentValue},useContext:function(e){return rr(),e._currentValue},useMemo:Tw,useReducer:Rw,useRef:function(e){js=rr(),Le=YC();var t=Le.memoizedState;return t===null?(e={current:e},Le.memoizedState=e):t},useState:function(e){return Rw(QP,e)},useInsertionEffect:nd,useLayoutEffect:function(){},useCallback:function(e,t){return Tw(function(){return e},t)},useImperativeHandle:nd,useEffect:nd,useDebugValue:nd,useDeferredValue:function(e){return rr(),e},useTransition:function(){return rr(),[!1,JO]},useId:function(){var e=KC.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-Id(e)-1)).toString(32)+t;var i=_d;if(i===null)throw Error(ae(404));return t=ou++,e=":"+i.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return rr(),t(e._source)},useSyncExternalStore:function(e,t,i){if(i===void 0)throw Error(ae(407));return i()}},_d=null,Qp=AP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function e0(e){return console.error(e),null}function Xl(){}function t0(e,t,i,s,n,r,o,l,a){var u=[],d=new Set;return t={destination:null,responseState:t,progressiveChunkSize:s===void 0?12800:s,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:d,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:n===void 0?e0:n,onAllReady:r===void 0?Xl:r,onShellReady:o===void 0?Xl:o,onShellError:l===void 0?Xl:l,onFatalError:a===void 0?Xl:a},i=kc(t,0,null,i,!1,!1),i.parentFlushed=!0,e=qC(t,e,null,i,d,zP,null,jO),u.push(e),t}function qC(e,t,i,s,n,r,o,l){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++;var a={node:t,ping:function(){var u=e.pingedTasks;u.push(a),u.length===1&&ZP(e)},blockedBoundary:i,blockedSegment:s,abortSet:n,legacyContext:r,context:o,treeContext:l};return n.add(a),a}function kc(e,t,i,s,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:s,boundary:i,lastPushedText:n,textEmbedded:r}}function lu(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function Vc(e,t){var i=e.onShellError;i(t),i=e.onFatalError,i(t),e.destination!==null?(e.status=2,LP(e.destination,t)):(e.status=1,e.fatalError=t)}function Pw(e,t,i,s,n){for(js={},KC=t,ou=0,e=i(s,n);Gc;)Gc=!1,ou=0,$h+=1,Le=null,e=i(s,n);return QC(),e}function bw(e,t,i,s){var n=i.render(),r=s.childContextTypes;if(r!=null){var o=t.legacyContext;if(typeof i.getChildContext!="function")s=o;else{i=i.getChildContext();for(var l in i)if(!(l in r))throw Error(ae(108,Lf(s)||"Unknown",l));s=ua({},o,i)}t.legacyContext=s,wi(e,t,n),t.legacyContext=o}else wi(e,t,n)}function Fw(e,t){if(e&&e.defaultProps){t=ua({},t),e=e.defaultProps;for(var i in e)t[i]===void 0&&(t[i]=e[i]);return t}return t}function If(e,t,i,s,n){if(typeof i=="function")if(i.prototype&&i.prototype.isReactComponent){n=yw(i,t.legacyContext);var r=i.contextType;r=new i(s,typeof r=="object"&&r!==null?r._currentValue:n),Sw(r,i,s,n),bw(e,t,r,i)}else{r=yw(i,t.legacyContext),n=Pw(e,t,i,s,r);var o=ou!==0;if(typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0)Sw(n,i,s,r),bw(e,t,n,i);else if(o){s=t.treeContext,t.treeContext=Mf(s,1,0);try{wi(e,t,n)}finally{t.treeContext=s}}else wi(e,t,n)}else if(typeof i=="string"){switch(n=t.blockedSegment,r=$_(n.chunks,i,s,e.responseState,n.formatContext),n.lastPushedText=!1,o=n.formatContext,n.formatContext=V_(o,i,s),Nf(e,t,r),n.formatContext=o,i){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:n.chunks.push(j_,de(i),K_)}n.lastPushedText=!1}else{switch(i){case zO:case UO:case OP:case GP:case _P:wi(e,t,s.children);return;case WP:wi(e,t,s.children);return;case WO:throw Error(ae(343));case BP:e:{i=t.blockedBoundary,n=t.blockedSegment,r=s.fallback,s=s.children,o=new Set;var l={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o,errorDigest:null},a=kc(e,n.chunks.length,l,n.formatContext,!1,!1);n.children.push(a),n.lastPushedText=!1;var u=kc(e,0,null,n.formatContext,!1,!1);u.parentFlushed=!0,t.blockedBoundary=l,t.blockedSegment=u;try{if(Nf(e,t,s),u.lastPushedText&&u.textEmbedded&&u.chunks.push($C),u.status=1,Hc(l,u),l.pendingTasks===0)break e}catch(d){u.status=4,l.forceClientRender=!0,l.errorDigest=lu(e,d)}finally{t.blockedBoundary=i,t.blockedSegment=n}t=qC(e,r,i,a,o,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof i=="object"&&i!==null)switch(i.$$typeof){case HP:if(s=Pw(e,t,i.render,s,n),ou!==0){i=t.treeContext,t.treeContext=Mf(i,1,0);try{wi(e,t,s)}finally{t.treeContext=i}}else wi(e,t,s);return;case UP:i=i.type,s=Fw(i,s),If(e,t,i,s,n);return;case kP:if(n=s.children,i=i._context,s=s.value,r=i._currentValue,i._currentValue=s,o=pr,pr=s={parent:o,depth:o===null?0:o.depth+1,context:i,parentValue:r,value:s},t.context=s,wi(e,t,n),e=pr,e===null)throw Error(ae(403));s=e.parentValue,e.context._currentValue=s===$O?e.context._defaultValue:s,e=pr=e.parent,t.context=e;return;case VP:s=s.children,s=s(i._currentValue),wi(e,t,s);return;case jC:n=i._init,i=n(i._payload),s=Fw(i,s),If(e,t,i,s,void 0);return}throw Error(ae(130,i==null?i:typeof i,""))}}function wi(e,t,i){if(t.node=i,typeof i=="object"&&i!==null){switch(i.$$typeof){case BO:If(e,t,i.type,i.props,i.ref);return;case NP:throw Error(ae(257));case jC:var s=i._init;i=s(i._payload),wi(e,t,i);return}if(xf(i)){Aw(e,t,i);return}if(i===null||typeof i!="object"?s=null:(s=vw&&i[vw]||i["@@iterator"],s=typeof s=="function"?s:null),s&&(s=s.call(i))){if(i=s.next(),!i.done){var n=[];do n.push(i.value),i=s.next();while(!i.done);Aw(e,t,n)}return}throw e=Object.prototype.toString.call(i),Error(ae(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e))}typeof i=="string"?(s=t.blockedSegment,s.lastPushedText=cw(t.blockedSegment.chunks,i,e.responseState,s.lastPushedText)):typeof i=="number"&&(s=t.blockedSegment,s.lastPushedText=cw(t.blockedSegment.chunks,""+i,e.responseState,s.lastPushedText))}function Aw(e,t,i){for(var s=i.length,n=0;n<s;n++){var r=t.treeContext;t.treeContext=Mf(r,s,n);try{Nf(e,t,i[n])}finally{t.treeContext=r}}}function Nf(e,t,i){var s=t.blockedSegment.formatContext,n=t.legacyContext,r=t.context;try{return wi(e,t,i)}catch(a){if(QC(),typeof a=="object"&&a!==null&&typeof a.then=="function"){i=a;var o=t.blockedSegment,l=kc(e,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(l),o.lastPushedText=!1,e=qC(e,t.node,t.blockedBoundary,l,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,i.then(e,e),t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Oc(r)}else throw t.blockedSegment.formatContext=s,t.legacyContext=n,t.context=r,Oc(r),a}}function i0(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,XP(this,t,e)}function qP(e,t,i){var s=e.blockedBoundary;e.blockedSegment.status=3,s===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.close())):(s.pendingTasks--,s.forceClientRender||(s.forceClientRender=!0,e=i===void 0?Error(ae(432)):i,s.errorDigest=t.onError(e),s.parentFlushed&&t.clientRenderedBoundaries.push(s)),s.fallbackAbortableTasks.forEach(function(n){return qP(n,t,i)}),s.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(s=t.onAllReady,s()))}function Hc(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var i=t.children[0];i.id=t.id,i.parentFlushed=!0,i.status===1&&Hc(e,i)}else e.completedSegments.push(t)}function XP(e,t,i){if(t===null){if(i.parentFlushed){if(e.completedRootSegment!==null)throw Error(ae(389));e.completedRootSegment=i}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=Xl,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(i.parentFlushed&&i.status===1&&Hc(t,i),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(i0,e),t.fallbackAbortableTasks.clear()):i.parentFlushed&&i.status===1&&(Hc(t,i),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function ZP(e){if(e.status!==2){var t=pr,i=Qp.current;Qp.current=Dw;var s=_d;_d=e.responseState;try{var n=e.pingedTasks,r;for(r=0;r<n.length;r++){var o=n[r],l=e,a=o.blockedSegment;if(a.status===0){Oc(o.context);try{wi(l,o,o.node),a.lastPushedText&&a.textEmbedded&&a.chunks.push($C),o.abortSet.delete(o),a.status=1,XP(l,o.blockedBoundary,a)}catch(v){if(QC(),typeof v=="object"&&v!==null&&typeof v.then=="function"){var u=o.ping;v.then(u,u)}else{o.abortSet.delete(o),a.status=4;var d=o.blockedBoundary,c=v,p=lu(l,c);if(d===null?Vc(l,c):(d.pendingTasks--,d.forceClientRender||(d.forceClientRender=!0,d.errorDigest=p,d.parentFlushed&&l.clientRenderedBoundaries.push(d))),l.allPendingTasks--,l.allPendingTasks===0){var C=l.onAllReady;C()}}}finally{}}}n.splice(0,r),e.destination!==null&&XC(e,e.destination)}catch(v){lu(e,v),Vc(e,v)}finally{_d=s,Qp.current=i,i===Dw&&Oc(t)}}}function rd(e,t,i){switch(i.parentFlushed=!0,i.status){case 0:var s=i.id=e.nextSegmentId++;return i.lastPushedText=!1,i.textEmbedded=!1,e=e.responseState,q(t,Y_),q(t,e.placeholderPrefix),e=de(s.toString(16)),q(t,e),Ge(t,Q_);case 1:i.status=2;var n=!0;s=i.chunks;var r=0;i=i.children;for(var o=0;o<i.length;o++){for(n=i[o];r<n.index;r++)q(t,s[r]);n=jh(e,t,n)}for(;r<s.length-1;r++)q(t,s[r]);return r<s.length&&(n=Ge(t,s[r])),n;default:throw Error(ae(390))}}function jh(e,t,i){var s=i.boundary;if(s===null)return rd(e,t,i);if(s.parentFlushed=!0,s.forceClientRender)s=s.errorDigest,Ge(t,J_),q(t,tO),s&&(q(t,sO),q(t,de(Et(s))),q(t,iO)),Ge(t,nO),rd(e,t,i);else if(0<s.pendingTasks){s.rootSegmentID=e.nextSegmentId++,0<s.completedSegments.length&&e.partialBoundaries.push(s);var n=e.responseState,r=n.nextSuspenseID++;n=z(n.boundaryPrefix+r.toString(16)),s=s.id=n,Cw(t,e.responseState,s),rd(e,t,i)}else if(s.byteSize>e.progressiveChunkSize)s.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(s),Cw(t,e.responseState,s.id),rd(e,t,i);else{if(Ge(t,q_),i=s.completedSegments,i.length!==1)throw Error(ae(391));jh(e,t,i[0])}return Ge(t,eO)}function xw(e,t,i){return PO(t,e.responseState,i.formatContext,i.id),jh(e,t,i),bO(t,i.formatContext)}function Lw(e,t,i){for(var s=i.completedSegments,n=0;n<s.length;n++)JP(e,t,i,s[n]);if(s.length=0,e=e.responseState,s=i.id,i=i.rootSegmentID,q(t,e.startInlineScript),e.sentCompleteBoundaryFunction?q(t,IO):(e.sentCompleteBoundaryFunction=!0,q(t,MO)),s===null)throw Error(ae(395));return i=de(i.toString(16)),q(t,s),q(t,NO),q(t,e.segmentPrefix),q(t,i),Ge(t,_O)}function JP(e,t,i,s){if(s.status===2)return!0;var n=s.id;if(n===-1){if((s.id=i.rootSegmentID)===-1)throw Error(ae(392));return xw(e,t,s)}return xw(e,t,s),e=e.responseState,q(t,e.startInlineScript),e.sentCompleteSegmentFunction?q(t,AO):(e.sentCompleteSegmentFunction=!0,q(t,FO)),q(t,e.segmentPrefix),n=de(n.toString(16)),q(t,n),q(t,xO),q(t,e.placeholderPrefix),q(t,n),Ge(t,LO)}function XC(e,t){vi=new Uint8Array(512),yi=0;try{var i=e.completedRootSegment;if(i!==null&&e.pendingRootTasks===0){jh(e,t,i),e.completedRootSegment=null;var s=e.responseState.bootstrapChunks;for(i=0;i<s.length-1;i++)q(t,s[i]);i<s.length&&Ge(t,s[i])}var n=e.clientRenderedBoundaries,r;for(r=0;r<n.length;r++){var o=n[r];s=t;var l=e.responseState,a=o.id,u=o.errorDigest,d=o.errorMessage,c=o.errorComponentStack;if(q(s,l.startInlineScript),l.sentClientRenderFunction?q(s,GO):(l.sentClientRenderFunction=!0,q(s,OO)),a===null)throw Error(ae(395));q(s,a),q(s,kO),(u||d||c)&&(q(s,Kp),q(s,de(Yp(u||"")))),(d||c)&&(q(s,Kp),q(s,de(Yp(d||"")))),c&&(q(s,Kp),q(s,de(Yp(c)))),Ge(s,VO)}n.splice(0,r);var p=e.completedBoundaries;for(r=0;r<p.length;r++)Lw(e,t,p[r]);p.splice(0,r),lw(t),vi=new Uint8Array(512),yi=0;var C=e.partialBoundaries;for(r=0;r<C.length;r++){var v=C[r];e:{n=e,o=t;var S=v.completedSegments;for(l=0;l<S.length;l++)if(!JP(n,o,v,S[l])){l++,S.splice(0,l);var E=!1;break e}S.splice(0,l),E=!0}if(!E){e.destination=null,r++,C.splice(0,r);return}}C.splice(0,r);var w=e.completedBoundaries;for(r=0;r<w.length;r++)Lw(e,t,w[r]);w.splice(0,r)}finally{lw(t),e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.close()}}function Mw(e,t){try{var i=e.abortableTasks;i.forEach(function(s){return qP(s,e,t)}),i.clear(),e.destination!==null&&XC(e,e.destination)}catch(s){lu(e,s),Vc(e,s)}}WC.renderToReadableStream=function(e,t){return new Promise(function(i,s){var n,r,o=new Promise(function(d,c){r=d,n=c}),l=t0(e,G_(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),k_(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,r,function(){var d=new ReadableStream({type:"bytes",pull:function(c){if(l.status===1)l.status=2,LP(c,l.fatalError);else if(l.status!==2&&l.destination===null){l.destination=c;try{XC(l,c)}catch(p){lu(l,p),Vc(l,p)}}},cancel:function(){Mw(l)}},{highWaterMark:0});d.allReady=o,i(d)},function(d){o.catch(function(){}),s(d)},n);if(t&&t.signal){var a=t.signal,u=function(){Mw(l,a.reason),a.removeEventListener("abort",u)};a.addEventListener("abort",u)}ZP(l)})};WC.version="18.3.1";var Rl,eb;Rl=El,eb=WC;Rl.version;Rl.renderToString;var s0=Rl.renderToStaticMarkup;Rl.renderToNodeStream;Rl.renderToStaticNodeStream;eb.renderToReadableStream;var n0=Object.defineProperty,r0=Object.defineProperties,o0=Object.getOwnPropertyDescriptors,Iw=Object.getOwnPropertySymbols,l0=Object.prototype.hasOwnProperty,a0=Object.prototype.propertyIsEnumerable,Nw=(e,t,i)=>t in e?n0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,He=(e,t)=>{for(var i in t||(t={}))l0.call(t,i)&&Nw(e,i,t[i]);if(Iw)for(var i of Iw(t))a0.call(t,i)&&Nw(e,i,t[i]);return e},Wt=(e,t)=>r0(e,o0(t)),ZC=y.createContext({setMethods:()=>{}}),u0=e=>{const{initialProps:t,addUpdateCallback:i,CustomComponentClass:s,setMethods:n}=e,[r,o]=y.useState(t);return y.useEffect(()=>{i(l=>o(l))},[]),O.createElement(ZC.Provider,{value:{setMethods:n}},O.createElement(s,He({},r)))},d0=y.memo(u0),c0=0;function _w(){return`agPortalKey_${++c0}`}var tb=class{constructor(e,t,i,s){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!s,this.statelessComponent=this.isStateless(this.reactComponent),this.key=_w(),this.portalKey=_w(),this.instanceCreated=this.isStatelessComponent()?it.resolve(!1):new it(n=>{this.resolveInstanceCreated=n})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){return this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy(),this.portalManager.destroyPortal(this.portal)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}addParentContainerStyleAndClasses(){this.componentInstance&&(this.componentInstance.getReactContainerStyle&&this.componentInstance.getReactContainerStyle()&&(Z.warnOnce('Since v31.1 "getReactContainerStyle" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),Object.assign(this.eParentElement.style,this.componentInstance.getReactContainerStyle())),this.componentInstance.getReactContainerClasses&&this.componentInstance.getReactContainerClasses()&&(Z.warnOnce('Since v31.1 "getReactContainerClasses" is deprecated. Apply styling directly to ".ag-react-container" if needed.'),this.componentInstance.getReactContainerClasses().forEach(t=>this.eParentElement.classList.add(t))))}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i){setTimeout(()=>this.callMethod(e,t));return}const s=i[e];if(s)return s.apply(i,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.params=e,this.createOrUpdatePortal(e),new it(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{var i;this.componentInstance=t,this.addParentContainerStyleAndClasses(),(i=this.resolveInstanceCreated)==null||i.call(this,!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,Wt(He({},e),{key:this.key})),this.portal=sh.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return y.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,t=>{e(t)})}isNullValue(){return this.valueRenderedIsNull(this.params)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}valueRenderedIsNull(e){if(!this.componentType.cellRenderer)return!1;const t=console.error;try{return console.error=()=>{},s0(y.createElement(this.reactComponent,e))===""}catch{}finally{console.error=t}return!1}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function JC(e,t,i){e.forEach(s=>{const n=t[s];n&&(i[s]=n)})}var qn=class extends tb{constructor(){super(...arguments),this.awaitUpdateCallback=new it(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=d0}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:i=>this.setMethods(i),addUpdateCallback:i=>{this.updateCallback=()=>(i(this.getProps()),new it(s=>{setTimeout(()=>{s()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,JC(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return Wt(He({},this.sourceParams),{key:this.key,ref:this.ref})}refreshProps(){return this.updateCallback?this.updateCallback():new it(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},h0=class extends qn{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},p0=class extends qn{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterChangedCallback()}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.model=e,this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getOptionalMethods(){return["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}updateModel(e){this.setModel(e).then(()=>this.sourceParams.filterChangedCallback())}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,delete e.filterModifiedCallback,delete e.valueGetter,e}};function ib(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||it.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var g0=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=i=>this.updateModel(i)}getProps(){return Wt(He({},this.floatingFilterParams),{model:this.model,onModelChange:this.onModelChange})}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){JC(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),ib(this.floatingFilterParams,e)}},f0=class extends qn{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),ib(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},m0=class extends qn{refresh(e){this.sourceParams=e,this.refreshProps()}},C0=class extends qn{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},v0=class extends qn{refresh(e){this.sourceParams=e,this.refreshProps()}},y0=class extends qn{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},w0=class extends qn{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}},sb=class nb{constructor(t,i,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=i||"div",this.refresher=t,this.maxComponentCreationTimeMs=s||nb.MAX_COMPONENT_CREATION_TIME_IN_MS}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(t){this.portals=this.portals.filter(i=>i!==t),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(t,i,s){this.portals=[...this.portals,t],this.waitForInstance(i,s),this.batchUpdate()}updateReactPortal(t,i){this.portals[this.portals.indexOf(t)]=i,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(t,i,s=Date.now()){if(this.destroyed){i(null);return}if(t.rendered())i(t);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){if(t.isNullValue()){i(t);return}console.error(`AG Grid: React Component '${t.getReactComponentName()}' not created within ${this.maxComponentCreationTimeMs}ms.`),console.error(" If the component is using `forwardRef` but not `useImperativeHandle`, add the following: `useImperativeHandle(ref, () => ({}));`");return}window.setTimeout(()=>{this.waitForInstance(t,i,s)})}}};sb.MAX_COMPONENT_CREATION_TIME_IN_MS=1e3;var S0=sb,qt=O.createContext({}),Zi=(...e)=>e.filter(i=>i!=null&&i!=="").join(" "),Oi=class rb{constructor(...t){this.classesMap={},t.forEach(i=>{this.classesMap[i]=!0})}setClass(t,i){if(!!this.classesMap[t]==i)return this;const n=new rb;return n.classesMap=He({},this.classesMap),n.classesMap[t]=i,n}toString(){return Object.keys(this.classesMap).filter(i=>this.classesMap[i]).join(" ")}},Tl=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,i=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===i()},E0=zg.createRoot!=null&&zg.flushSync!=null,Od=!1;function R0(e){return Od||setTimeout(()=>Od=!1,0),Od=!0,e()}var ev=(e,t)=>{E0&&e&&!Od?zg.flushSync(t):t()};function tv(e,t,i){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(i||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const s=[],n=[],r=new Map,o=new Map;for(let l=0;l<t.length;l++){const a=t[l];o.set(a.getInstanceId(),a)}for(let l=0;l<e.length;l++){const a=e[l];r.set(a.getInstanceId(),a),o.has(a.getInstanceId())&&s.push(a)}for(let l=0;l<t.length;l++){const a=t[l],u=a.getInstanceId();r.has(u)||n.push(a)}return s.length===e.length&&n.length===0?e:s.length===0&&n.length===t.length?t:s.length===0?n:n.length===0?s:[...s,...n]}var Nu=(e,t,i,s)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const r=e.newAgStackInstance();if(!r)return;let o,l,a=!1;return r.then(u=>{if(a){t.destroyBean(u);return}o=u,l=o.getGui(),i.appendChild(l),Ow(s,o)}),()=>{a=!0,o&&(l&&l.parentElement&&l.parentElement.removeChild(l),t.destroyBean(o),s&&Ow(s,void 0))}},Ow=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const i=e;i.current=t}},T0=e=>{const t=e.newAgStackInstance();if(t)return t.resolveNow(null,i=>i)},ob=y.forwardRef((e,t)=>{var i;const s=y.useContext(qt).context,n=y.useRef(null),r=y.useRef(null),o=y.useRef(null),l=y.useRef(null),a=y.useRef(null),u=y.useRef(),[d,c]=y.useState(),[p,C]=y.useState(),[v,S]=y.useState(),[E,w]=y.useState(()=>new Oi),[m,R]=y.useState(()=>new Oi("ag-hidden")),[T,P]=y.useState(()=>new Oi("ag-hidden")),[F,b]=y.useState(()=>new Oi("ag-invisible"));y.useImperativeHandle(t,()=>({refresh(){return!1}})),y.useLayoutEffect(()=>Nu(d,s,r.current),[d]);const M=y.useCallback(ge=>{if(n.current=ge,!n.current){s.destroyBean(u.current),u.current=null;return}const G={setInnerRenderer:(H,W)=>{c(H),S(W)},setChildCount:H=>C(H),addOrRemoveCssClass:(H,W)=>w(X=>X.setClass(H,W)),setContractedDisplayed:H=>P(W=>W.setClass("ag-hidden",!H)),setExpandedDisplayed:H=>R(W=>W.setClass("ag-hidden",!H)),setCheckboxVisible:H=>b(W=>W.setClass("ag-invisible",!H))};u.current=s.createBean(new $r),u.current.init(G,n.current,o.current,l.current,a.current,ob,e)},[]),N=y.useMemo(()=>`ag-cell-wrapper ${E.toString()}`,[E]),k=y.useMemo(()=>`ag-group-expanded ${m.toString()}`,[m]),$=y.useMemo(()=>`ag-group-contracted ${T.toString()}`,[T]),U=y.useMemo(()=>`ag-group-checkbox ${F.toString()}`,[F]),Q=d&&d.componentFromFramework,he=Q?d.componentClass:void 0,we=d==null&&v!=null,fe=Z.escapeString(v,!0);return O.createElement("span",He({className:N,ref:M},e.colDef?{}:{role:(i=u.current)==null?void 0:i.getCellAriaRole()}),O.createElement("span",{className:k,ref:l}),O.createElement("span",{className:$,ref:a}),O.createElement("span",{className:U,ref:o}),O.createElement("span",{className:"ag-group-value",ref:r},we&&O.createElement(O.Fragment,null,fe),Q&&O.createElement(he,He({},d.params))),O.createElement("span",{className:"ag-group-child-count"},p))}),Gw=ob,D0=e=>{const{ctrl:t}=e,i=t.isAlive(),{context:s}=y.useContext(qt),n=i?t.getColId():void 0,[r,o]=y.useState(),l=y.useRef(null),a=y.useRef(null),u=y.useRef(null),d=y.useRef();let c=y.useRef();i&&!c.current&&(c.current=new wu(()=>l.current));const p=y.useCallback(E=>{var w;if(l.current=E,!l.current||!i)return;const m={setWidth:T=>{l.current&&(l.current.style.width=T)},addOrRemoveCssClass:(T,P)=>c.current.addOrRemoveCssClass(T,P),setAriaSort:T=>{l.current&&(T?Z.setAriaSort(l.current,T):Z.removeAriaSort(l.current))},setUserCompDetails:T=>o(T),getUserCompInstance:()=>d.current||void 0};t.setComp(m,l.current,a.current,u.current);const R=t.getSelectAllGui();(w=a.current)==null||w.insertAdjacentElement("afterend",R)},[]);y.useLayoutEffect(()=>Nu(r,s,u.current,d),[r]),y.useEffect(()=>{t.setDragSource(l.current)},[r]);const C=y.useMemo(()=>!!((r==null?void 0:r.componentFromFramework)&&Tl(r.componentClass)),[r]),v=r&&r.componentFromFramework,S=r&&r.componentClass;return O.createElement("div",{ref:p,className:"ag-header-cell","col-id":n,role:"columnheader"},O.createElement("div",{ref:a,className:"ag-header-cell-resize",role:"presentation"}),O.createElement("div",{ref:u,className:"ag-header-cell-comp-wrapper",role:"presentation"},v&&C&&O.createElement(S,He({},r.params)),v&&!C&&O.createElement(S,Wt(He({},r.params),{ref:d}))))},P0=y.memo(D0),b0=e=>{const{context:t}=y.useContext(qt),{ctrl:i}=e,[s,n]=y.useState(()=>new Oi),[r,o]=y.useState(()=>new Oi),[l,a]=y.useState("false"),[u,d]=y.useState(),[c,p]=y.useState(),C=y.useMemo(()=>i.getColId(),[]),v=y.useRef(null),S=y.useRef(null),E=y.useRef(),w=y.useCallback(b=>{if(v.current=b,!v.current)return;const M={setWidth:N=>{v.current&&(v.current.style.width=N)},addOrRemoveCssClass:(N,k)=>n($=>$.setClass(N,k)),setUserCompDetails:N=>p(N),setResizableDisplayed:N=>{o(k=>k.setClass("ag-hidden",!N)),a(N?"false":"true")},setAriaExpanded:N=>d(N),getUserCompInstance:()=>E.current||void 0};i.setComp(M,v.current,S.current)},[]);y.useLayoutEffect(()=>Nu(c,t,v.current),[c]),y.useEffect(()=>{v.current&&i.setDragSource(v.current)},[c]);const m=y.useMemo(()=>!!((c==null?void 0:c.componentFromFramework)&&Tl(c.componentClass)),[c]),R=y.useMemo(()=>"ag-header-group-cell "+s.toString(),[s]),T=y.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),P=c&&c.componentFromFramework,F=c&&c.componentClass;return O.createElement("div",{ref:w,className:R,"col-id":C,role:"columnheader","aria-expanded":u},P&&m&&O.createElement(F,He({},c.params)),P&&!m&&O.createElement(F,Wt(He({},c.params),{ref:E})),O.createElement("div",{ref:S,"aria-hidden":l,className:T}))},F0=y.memo(b0);function iv(){Z.warnOnce("Using custom components without `reactiveCustomComponents = true` is deprecated.")}var A0=e=>{const{context:t,gos:i}=y.useContext(qt),[s,n]=y.useState(()=>new Oi("ag-header-cell","ag-floating-filter")),[r,o]=y.useState(()=>new Oi),[l,a]=y.useState(()=>new Oi("ag-floating-filter-button","ag-hidden")),[u,d]=y.useState("false"),[c,p]=y.useState(),[C,v]=y.useState(1),S=y.useRef(null),E=y.useRef(null),w=y.useRef(null),m=y.useRef(null),R=y.useRef(),T=y.useRef(),P=ge=>{ge!=null&&R.current&&R.current(ge)},{ctrl:F}=e,b=y.useCallback(ge=>{if(S.current=ge,!S.current)return;T.current=new it(H=>{R.current=H});const G={addOrRemoveCssClass:(H,W)=>n(X=>X.setClass(H,W)),addOrRemoveBodyCssClass:(H,W)=>o(X=>X.setClass(H,W)),setButtonWrapperDisplayed:H=>{a(W=>W.setClass("ag-hidden",!H)),d(H?"false":"true")},setWidth:H=>{S.current&&(S.current.style.width=H)},setCompDetails:H=>p(H),getFloatingFilterComp:()=>T.current?T.current:null,setMenuIcon:H=>{var W;return(W=m.current)==null?void 0:W.appendChild(H)}};F.setComp(G,S.current,m.current,E.current)},[]);y.useLayoutEffect(()=>Nu(c,t,E.current,P),[c]);const M=y.useMemo(()=>s.toString(),[s]),N=y.useMemo(()=>r.toString(),[r]),k=y.useMemo(()=>l.toString(),[l]),$=y.useMemo(()=>!!(c&&c.componentFromFramework&&Tl(c.componentClass)),[c]),U=y.useMemo(()=>i.get("reactiveCustomComponents"),[]),Q=y.useMemo(()=>{if(c)if(U){const ge=new g0(c.params,()=>v(G=>G+1));return P(ge),ge}else c.componentFromFramework&&iv()},[c]),he=Q==null?void 0:Q.getProps(),we=c&&c.componentFromFramework,fe=c&&c.componentClass;return O.createElement("div",{ref:b,className:M,role:"gridcell"},O.createElement("div",{ref:E,className:N,role:"presentation"},we&&!U&&O.createElement(fe,Wt(He({},c.params),{ref:$?()=>{}:P})),we&&U&&O.createElement(ZC.Provider,{value:{setMethods:ge=>Q.setMethods(ge)}},O.createElement(fe,He({},he)))),O.createElement("div",{ref:w,"aria-hidden":u,className:k,role:"presentation"},O.createElement("button",{ref:m,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},x0=y.memo(A0),L0=e=>{const{ctrl:t}=e,{topOffset:i,rowHeight:s}=y.useMemo(()=>t.getTopAndHeight(),[]),n=t.getAriaRowIndex(),r=t.getHeaderRowClass(),[o,l]=y.useState(()=>s+"px"),[a,u]=y.useState(()=>i+"px"),d=y.useRef(null),c=y.useRef(null),[p,C]=y.useState(()=>t.getHeaderCtrls()),v=y.useRef(null),S=y.useCallback(m=>{if(v.current=m,!m)return;const R={setHeight:T=>l(T),setTop:T=>u(T),setHeaderCtrls:(T,P,F)=>{c.current=d.current,d.current=T;const b=tv(c.current,T,P);b!==c.current&&ev(F,()=>C(b))},setWidth:T=>{v.current&&(v.current.style.width=T)}};t.setComp(R,!1)},[]),E=y.useMemo(()=>({height:o,top:a}),[o,a]),w=y.useCallback(m=>{switch(t.getType()){case gf.COLUMN_GROUP:return O.createElement(F0,{ctrl:m,key:m.getInstanceId()});case gf.FLOATING_FILTER:return O.createElement(x0,{ctrl:m,key:m.getInstanceId()});default:return O.createElement(P0,{ctrl:m,key:m.getInstanceId()})}},[]);return O.createElement("div",{ref:S,className:r,role:"row",style:E,"aria-rowindex":n},p.map(w))},M0=y.memo(L0),I0=e=>{const[t,i]=y.useState(!0),[s,n]=y.useState([]),{context:r}=y.useContext(qt),o=y.useRef(null),l=y.useRef(null),a=y.useRef(null),u=e.pinned==="left",d=e.pinned==="right",c=!u&&!d,p=y.useCallback(S=>{if(o.current=S,!o.current){r.destroyBean(a.current),a.current=null;return}const E={setDisplayed:i,setCtrls:w=>n(w),setCenterWidth:w=>{l.current&&(l.current.style.width=w)},setViewportScrollLeft:w=>{o.current&&(o.current.scrollLeft=w)},setPinnedContainerWidth:w=>{o.current&&(o.current.style.width=w,o.current.style.minWidth=w,o.current.style.maxWidth=w)}};a.current=r.createBean(new zn(e.pinned)),a.current.setComp(E,o.current)},[]),C=t?"":"ag-hidden",v=()=>s.map(S=>O.createElement(M0,{ctrl:S,key:S.getInstanceId()}));return O.createElement(O.Fragment,null,u&&O.createElement("div",{ref:p,className:"ag-pinned-left-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),d&&O.createElement("div",{ref:p,className:"ag-pinned-right-header "+C,"aria-hidden":!t,role:"rowgroup"},v()),c&&O.createElement("div",{ref:p,className:"ag-header-viewport "+C,role:"presentation"},O.createElement("div",{ref:l,className:"ag-header-container",role:"rowgroup"},v())))},qp=y.memo(I0),N0=()=>{const[e,t]=y.useState(()=>new Oi),[i,s]=y.useState(),{context:n}=y.useContext(qt),r=y.useRef(null),o=y.useRef(null),l=y.useCallback(d=>{if(r.current=d,!d){n.destroyBean(o.current),o.current=null;return}const c={addOrRemoveCssClass:(p,C)=>t(v=>v.setClass(p,C)),setHeightAndMinHeight:p=>s(p)};o.current=n.createBean(new $n),o.current.setComp(c,r.current,r.current)},[]),a=y.useMemo(()=>"ag-header "+e.toString(),[e]),u=y.useMemo(()=>({height:i,minHeight:i}),[i]);return O.createElement("div",{ref:l,className:a,style:u,role:"presentation"},O.createElement(qp,{pinned:"left"}),O.createElement(qp,{pinned:null}),O.createElement(qp,{pinned:"right"}))},_0=y.memo(N0),O0=(e,t)=>{y.useEffect(()=>{const i=t.current;if(i){const s=i.parentElement;if(s){const n=document.createComment(e);return s.insertBefore(n,i),()=>{s.removeChild(n)}}}},[e])},or=O0,G0=e=>{const t=y.useRef(e),i=y.useRef(),s=y.useRef(!1),n=y.useRef(!1),[,r]=y.useState(0);s.current&&(n.current=!0),y.useEffect(()=>(s.current||(i.current=t.current(),s.current=!0),r(o=>o+1),()=>{n.current&&i.current&&i.current()}),[])},k0=e=>{const[t,i]=y.useState(),{context:s,popupService:n,localeService:r,gos:o}=y.useContext(qt);return G0(()=>{const{editDetails:l,cellCtrl:a,eParentCell:u}=e,{compDetails:d}=l,c=o.get("stopEditingWhenCellsLoseFocus"),p=s.createBean(new VD(d.params)),C=p.getGui();if(e.jsChildComp){const R=e.jsChildComp.getGui();R&&C.appendChild(R)}const v={column:a.getColumn(),rowNode:a.getRowNode(),type:"popupCellEditor",eventSource:u,ePopup:C,position:l.popupPosition,keepWithinBounds:!0},S=n.positionPopupByComponent.bind(n,v),E=r.getLocaleTextFunc(),w=n.addPopup({modal:c,eChild:C,closeOnEsc:!0,closedCallback:()=>{a.onPopupEditorClosed()},anchorToElement:u,positionCallback:S,ariaLabel:E("ariaLabelCellEditor","Cell Editor")}),m=w?w.hideFunc:void 0;return i(p),e.jsChildComp&&e.jsChildComp.afterGuiAttached&&e.jsChildComp.afterGuiAttached(),()=>{m!=null&&m(),s.destroyBean(p)}}),O.createElement(O.Fragment,null,t&&e.wrappedContent&&sh.createPortal(e.wrappedContent,t.getGui()))},kw=y.memo(k0),V0=(e,t,i,s,n,r)=>{const{context:o}=y.useContext(qt),l=y.useCallback(()=>{const a=n.current;if(!a)return;const u=a.getGui();u&&u.parentElement&&u.parentElement.removeChild(u),o.destroyBean(a),n.current=void 0},[]);y.useEffect(()=>{const a=e!=null,u=e&&e.compDetails&&!e.compDetails.componentFromFramework,d=t&&i==null;if(!(a&&u&&!d)){l();return}const p=e.compDetails;if(n.current){const w=n.current,R=w.refresh!=null&&e.force==!1?w.refresh(p.params):!1;if(R===!0||R===void 0)return;l()}const C=p.newAgStackInstance();if(!C)return;const v=C.resolveNow(null,w=>w);if(!v)return;const S=v.getGui();if(!S)return;(t?i:r.current).appendChild(S),n.current=v},[e,t,s]),y.useEffect(()=>l,[])},H0=V0,B0=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new it(i=>{this.resolveInstanceCreated=i}),this.onValueChange=i=>this.updateValue(i),this.value=e.value}getProps(){return Wt(He({},this.cellEditorParams),{initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange})}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){JC(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){var t;this.componentInstance=e,(t=this.resolveInstanceCreated)==null||t.call(this),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]}updateValue(e){this.value=e,this.refreshProps()}},W0=(e,t,i)=>{const s=i.getColumn();if(!e&&t.isPopup&&t.isPopup()){const n=`AG Grid: Found an issue in column ${s.getColId()}. If using React, specify an editor is a popup using colDef.cellEditorPopup=true. AG Grid React cannot depend on the editor component specifying if it's in a popup (via the isPopup() method on the editor), as React needs to know this information BEFORE the component is created.`;Z.doOnce(()=>console.warn(n),"jsEditorComp-isPopup-"+i.getColumn().getColId())}if(e&&t.getPopupPosition&&t.getPopupPosition()!=null){const n=`AG Grid: Found an issue in column ${s.getColId()}. If using React, specify an editor popup position using colDef.cellEditorPopupPosition=true. AG Grid React cannot depend on the editor component specifying it's position (via the getPopupPosition() method on the editor), as React needs to know this information BEFORE the component is created.`;Z.doOnce(()=>console.warn(n),"jsEditorComp-getPopupPosition-"+i.getColumn().getColId())}},U0=(e,t,i)=>{const{compProxy:s}=e;i(s);const n=s.getProps(),r=Tl(t);return O.createElement(ZC.Provider,{value:{setMethods:o=>s.setMethods(o)}},r&&O.createElement(t,He({},n)),!r&&O.createElement(t,Wt(He({},n),{ref:o=>s.setRef(o)})))},Vw=(e,t,i)=>{const s=e.compProxy;return O.createElement(O.Fragment,null,!s&&O.createElement(t,Wt(He({},e.compDetails.params),{ref:i})),s&&U0(e,t,i))},z0=(e,t,i,s,n,r)=>{const o=e.compDetails,l=o.componentClass,a=o.componentFromFramework&&!e.popup,u=o.componentFromFramework&&e.popup,d=!o.componentFromFramework&&e.popup;return O.createElement(O.Fragment,null,a&&Vw(e,l,t),u&&O.createElement(kw,{editDetails:e,cellCtrl:n,eParentCell:s,wrappedContent:Vw(e,l,i)}),d&&r&&O.createElement(kw,{editDetails:e,cellCtrl:n,eParentCell:s,jsChildComp:r}))},$0=(e,t,i,s,n,r,o)=>{const{compDetails:l,value:a}=e,u=!l,d=l&&l.componentFromFramework,c=l&&l.componentClass,p=a!=null&&a.toString?a.toString():a,C=()=>O.createElement(O.Fragment,null,u&&O.createElement(O.Fragment,null,p),d&&!r&&O.createElement(c,Wt(He({},l.params),{key:t,ref:s})),d&&r&&O.createElement(c,Wt(He({},l.params),{key:t})));return O.createElement(O.Fragment,null,n?O.createElement("span",{role:"presentation",id:`cell-${i}`,className:"ag-cell-value",ref:o},C()):C())},j0=e=>{const{context:t}=y.useContext(qt),{cellCtrl:i,printLayout:s,editingRow:n}=e,r=i.getTabIndex(),o=i.getColumnIdSanitised(),l=i.getInstanceId(),[a,u]=y.useState(()=>i.isCellRenderer()?void 0:{compDetails:void 0,value:i.getValueToDisplay(),force:!1}),[d,c]=y.useState(),[p,C]=y.useState(1),[v,S]=y.useState(),[E,w]=y.useState(!1),[m,R]=y.useState(!1),[T,P]=y.useState(!1),[F,b]=y.useState(),M=y.useMemo(()=>i.isForceWrapper(),[i]),N=y.useMemo(()=>i.getCellAriaRole(),[i]),k=y.useRef(null),$=y.useRef(null),U=y.useRef(),Q=y.useRef(),he=y.useRef(),we=y.useRef([]),fe=y.useRef(),[ge,G]=y.useState(0),H=y.useCallback(Ye=>{fe.current=Ye,G(Ze=>Ze+1)},[]),W=a!=null&&(E||T||m),X=M||W,ee=y.useCallback((Ye,Ze)=>{Q.current=Ze,Ze&&(W0(Ye,Ze,i),Ze.isCancelBeforeStart&&Ze.isCancelBeforeStart()&&setTimeout(()=>{i.stopEditing(!0),i.focusCell(!0)}))},[i]),Ee=y.useCallback(Ye=>ee(!0,Ye),[ee]),gt=y.useCallback(Ye=>ee(!1,Ye),[ee]);let Re=y.useRef();Re.current||(Re.current=new wu(()=>k.current)),H0(a,X,fe.current,ge,U,k);const nt=y.useRef();y.useLayoutEffect(()=>{const Ye=nt.current,Ze=a;if(nt.current=a,Ye==null||Ye.compDetails==null||Ze==null||Ze.compDetails==null)return;const at=Ye.compDetails,me=Ze.compDetails;if(at.componentClass!=me.componentClass||$.current==null||$.current.refresh==null)return;$.current.refresh(me.params)!=!0&&C(ji=>ji+1)},[a]),y.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework))return;const Ze=d.compDetails,at=d.popup===!0,me=T0(Ze);if(!me)return;const ut=me.getGui();if(ee(at,me),!at){const ji=(M?he:k).current;ji==null||ji.appendChild(ut),me.afterGuiAttached&&me.afterGuiAttached()}return b(me),()=>{t.destroyBean(me),ee(at,void 0),b(void 0),ut&&ut.parentElement&&ut.parentElement.removeChild(ut)}},[d]);const Ke=y.useCallback(Ye=>{if(he.current=Ye,!he.current){we.current.forEach(at=>at()),we.current=[];return}const Ze=at=>{var me;if(at){const ut=at.getGui();(me=he.current)==null||me.insertAdjacentElement("afterbegin",ut),we.current.push(()=>{t.destroyBean(at),Z.removeFromParent(ut)})}return at};if(E){const at=i.createSelectionCheckbox();Ze(at)}T&&Ze(i.createDndSource()),m&&Ze(i.createRowDragComp())},[i,t,T,m,E]),As=y.useCallback(Ye=>{if(k.current=Ye,!k.current||!i)return;const Ze={addOrRemoveCssClass:(me,ut)=>Re.current.addOrRemoveCssClass(me,ut),setUserStyles:me=>S(me),getFocusableElement:()=>k.current,setIncludeSelection:me=>w(me),setIncludeRowDrag:me=>R(me),setIncludeDndSource:me=>P(me),getCellEditor:()=>Q.current||null,getCellRenderer:()=>$.current?$.current:U.current,getParentOfValue:()=>fe.current?fe.current:he.current?he.current:k.current,setRenderDetails:(me,ut,ji)=>{u(Ki=>(Ki==null?void 0:Ki.compDetails)!==me||(Ki==null?void 0:Ki.value)!==ut||(Ki==null?void 0:Ki.force)!==ji?{value:ut,compDetails:me,force:ji}:Ki)},setEditDetails:(me,ut,ji,Ki)=>{if(me){let Xn;Ki?Xn=new B0(me.params,()=>C(Kh=>Kh+1)):me.componentFromFramework&&iv(),c({compDetails:me,popup:ut,popupPosition:ji,compProxy:Xn}),ut||u(void 0)}else c(Xn=>{Xn!=null&&Xn.compProxy&&(Q.current=void 0)})}},at=he.current||void 0;i.setComp(Ze,k.current,at,s,n)},[]),Jr=y.useMemo(()=>!!(a&&a.compDetails&&a.compDetails.componentFromFramework&&Tl(a.compDetails.componentClass)),[a]);y.useLayoutEffect(()=>{var Ye;k.current&&(Re.current.addOrRemoveCssClass("ag-cell-value",!X),Re.current.addOrRemoveCssClass("ag-cell-inline-editing",!!d&&!d.popup),Re.current.addOrRemoveCssClass("ag-cell-popup-editing",!!d&&!!d.popup),Re.current.addOrRemoveCssClass("ag-cell-not-inline-editing",!d||!!d.popup),(Ye=i.getRowCtrl())==null||Ye.setInlineEditingCss(!!d),i.shouldRestoreFocus()&&!i.isEditing()&&k.current.focus({preventScroll:!0}))});const _u=()=>O.createElement(O.Fragment,null,a!=null&&$0(a,p,l,$,X,Jr,H),d!=null&&z0(d,gt,Ee,k.current,i,F));return O.createElement("div",{ref:As,style:v,tabIndex:r,role:N,"col-id":o},X?O.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:Ke},_u()):_u())},K0=y.memo(j0),Y0=e=>{const{context:t,gos:i}=y.useContext(qt),{rowCtrl:s,containerType:n}=e,r=s.getTabIndex(),o=y.useRef(s.getDomOrder()),l=s.isFullWidth(),a=s.getRowNode().displayed,[u,d]=y.useState(()=>a?s.getRowIndex():null),[c,p]=y.useState(()=>s.getRowId()),[C,v]=y.useState(()=>s.getBusinessKey()),[S,E]=y.useState(()=>s.getRowStyles()),w=y.useRef(null),m=y.useRef(null),[R,T]=y.useState(()=>null),[P,F]=y.useState(),[b,M]=y.useState(()=>a?s.getInitialRowTop(n):void 0),[N,k]=y.useState(()=>a?s.getInitialTransform(n):void 0),$=y.useRef(null),U=y.useRef(),Q=y.useRef(!1),[he,we]=y.useState(0);y.useEffect(()=>{var Re;if(Q.current||!P||he>10)return;const nt=(Re=$.current)==null?void 0:Re.firstChild;nt?(s.setupDetailRowAutoHeight(nt),Q.current=!0):we(Ke=>Ke+1)},[P,he]);let fe=y.useRef();fe.current||(fe.current=new wu(()=>$.current));const ge=y.useCallback(Re=>{if($.current=Re,!$.current){s.unsetComp(n);return}if(!s.isAlive())return;const nt={setTop:M,setTransform:k,addOrRemoveCssClass:(Ke,As)=>fe.current.addOrRemoveCssClass(Ke,As),setDomOrder:Ke=>o.current=Ke,setRowIndex:d,setRowId:p,setRowBusinessKey:v,setUserStyles:E,setCellCtrls:(Ke,As)=>{m.current=w.current,w.current=Ke;const Jr=tv(m.current,Ke,o.current);Jr!==m.current&&ev(As,()=>T(Jr))},showFullWidth:Ke=>F(Ke),getFullWidthCellRenderer:()=>U.current,refreshFullWidth:Ke=>ee.current?(F(As=>Wt(He({},As),{params:Ke()})),!0):!U.current||!U.current.refresh?!1:U.current.refresh(Ke())};s.setComp(nt,$.current,n)},[]);y.useLayoutEffect(()=>Nu(P,t,$.current,U),[P]);const G=y.useMemo(()=>{const Re={top:b,transform:N};return Object.assign(Re,S),Re},[b,N,S]),H=l&&P&&P.componentFromFramework,W=!l&&R!=null,X=y.useMemo(()=>!!((P==null?void 0:P.componentFromFramework)&&Tl(P.componentClass)),[P]),ee=y.useRef(!1);y.useEffect(()=>{ee.current=X&&!!P&&!!i.get("reactiveCustomComponents")},[X,P]);const Ee=()=>R==null?void 0:R.map(Re=>O.createElement(K0,{cellCtrl:Re,editingRow:s.isEditing(),printLayout:s.isPrintLayout(),key:Re.getInstanceId()})),gt=()=>{const Re=P.componentClass;return O.createElement(O.Fragment,null,X&&O.createElement(Re,He({},P.params)),!X&&O.createElement(Re,Wt(He({},P.params),{ref:U})))};return O.createElement("div",{ref:ge,role:"row",style:G,"row-index":u,"row-id":c,"row-business-key":C,tabIndex:r},W&&Ee(),H&>())},Q0=y.memo(Y0),q0=e=>{const{context:t}=y.useContext(qt),{name:i}=e,s=y.useMemo(()=>OD(i),[i]),n=y.useRef(null),r=y.useRef(null),o=y.useRef([]),l=y.useRef([]),[a,u]=y.useState(()=>[]),d=y.useRef(!1),c=y.useRef(),p=y.useMemo(()=>Sc.getRowContainerCssClasses(i),[i]),C=y.useMemo(()=>Zi(p.viewport),[p]),v=y.useMemo(()=>Zi(p.container),[p]),S=i===Ae.CENTER||i===Ae.TOP_CENTER||i===Ae.BOTTOM_CENTER||i===Ae.STICKY_TOP_CENTER||i===Ae.STICKY_BOTTOM_CENTER,E=S?n:r;or(" AG Row Container "+i+" ",E);const w=y.useCallback(()=>S?n.current!=null&&r.current!=null:r.current!=null,[]),m=y.useCallback(()=>S?n.current==null&&r.current==null:r.current==null,[]),R=y.useCallback(()=>{if(m()&&(t.destroyBean(c.current),c.current=null),w()){const b=N=>{const k=tv(l.current,o.current,d.current);k!==l.current&&(l.current=k,ev(N,()=>u(k)))},M={setViewportHeight:N=>{n.current&&(n.current.style.height=N)},setRowCtrls:({rowCtrls:N,useFlushSync:k})=>{const $=!!k&&o.current.length>0&&N.length>0;o.current=N,b($)},setDomOrder:N=>{d.current!=N&&(d.current=N,b(!1))},setContainerWidth:N=>{r.current&&(r.current.style.width=N)}};c.current=t.createBean(new Sc(i)),c.current.setComp(M,r.current,n.current)}},[w,m]),T=y.useCallback(b=>{r.current=b,R()},[R]),P=y.useCallback(b=>{n.current=b,R()},[R]),F=()=>O.createElement("div",{className:v,ref:T,role:"rowgroup"},a.map(b=>O.createElement(Q0,{rowCtrl:b,containerType:s,key:b.getInstanceId()})));return O.createElement(O.Fragment,null,S?O.createElement("div",{className:C,ref:P,role:"presentation"},F()):F())},X0=y.memo(q0),Z0=()=>{const{context:e,agStackComponentsRegistry:t,resizeObserverService:i}=y.useContext(qt),[s,n]=y.useState(""),[r,o]=y.useState(0),[l,a]=y.useState(0),[u,d]=y.useState("0px"),[c,p]=y.useState("0px"),[C,v]=y.useState("100%"),[S,E]=y.useState("0px"),[w,m]=y.useState("0px"),[R,T]=y.useState("100%"),[P,F]=y.useState(""),[b,M]=y.useState(""),[N,k]=y.useState(null),[$,U]=y.useState(""),[Q,he]=y.useState(null),[we,fe]=y.useState("ag-layout-normal");let ge=y.useRef();ge.current||(ge.current=new wu(()=>G.current));const G=y.useRef(null),H=y.useRef(null),W=y.useRef(null),X=y.useRef(null),ee=y.useRef(null),Ee=y.useRef(null),gt=y.useRef(null),Re=y.useRef([]),nt=y.useRef([]);or(" AG Grid Body ",G),or(" AG Pinned Top ",H),or(" AG Sticky Top ",W),or(" AG Middle ",Ee),or(" AG Pinned Bottom ",gt);const Ke=y.useCallback(eo=>{if(G.current=eo,!G.current){e.destroyBeans(Re.current),nt.current.forEach(ft=>ft()),Re.current=[],nt.current=[];return}if(!e)return;const Pl=ft=>{const ds=t.getComponentClass(ft),nv=e.createBean(new ds);return Re.current.push(nv),nv},tn=(ft,ds)=>{ft.appendChild(ds),nt.current.push(()=>ft.removeChild(ds))};tn(G.current,document.createComment(" AG Fake Horizontal Scroll ")),tn(G.current,Pl("AG-FAKE-HORIZONTAL-SCROLL").getGui()),tn(G.current,document.createComment(" AG Overlay Wrapper ")),tn(G.current,Pl("AG-OVERLAY-WRAPPER").getGui()),ee.current&&(tn(ee.current,document.createComment(" AG Fake Vertical Scroll ")),tn(ee.current,Pl("AG-FAKE-VERTICAL-SCROLL").getGui()));const Yh={setRowAnimationCssOnBodyViewport:n,setColumnCount:ft=>{G.current&&Z.setAriaColCount(G.current,ft)},setRowCount:ft=>{G.current&&Z.setAriaRowCount(G.current,ft)},setTopHeight:o,setBottomHeight:a,setStickyTopHeight:d,setStickyTopTop:p,setStickyTopWidth:v,setTopDisplay:F,setBottomDisplay:M,setColumnMovingCss:(ft,ds)=>ge.current.addOrRemoveCssClass(ft,ds),updateLayoutClasses:fe,setAlwaysVerticalScrollClass:k,setPinnedTopBottomOverflowY:U,setCellSelectableCss:(ft,ds)=>he(ds?ft:null),setBodyViewportWidth:ft=>{Ee.current&&(Ee.current.style.width=ft)},registerBodyViewportResizeListener:ft=>{if(Ee.current){const ds=i.observeResize(Ee.current,ft);nt.current.push(()=>ds())}},setStickyBottomHeight:E,setStickyBottomBottom:m,setStickyBottomWidth:T},sv=e.createBean(new _t);Re.current.push(sv),sv.setComp(Yh,G.current,Ee.current,H.current,gt.current,W.current,X.current)},[]),As=y.useMemo(()=>Zi("ag-root","ag-unselectable",we),[we]),Jr=y.useMemo(()=>Zi("ag-body-viewport",s,we,N,Q),[s,we,N,Q]),_u=y.useMemo(()=>Zi("ag-body",we),[we]),Ye=y.useMemo(()=>Zi("ag-floating-top",Q),[Q]),Ze=y.useMemo(()=>Zi("ag-sticky-top",Q),[Q]),at=y.useMemo(()=>Zi("ag-sticky-bottom",Q),[Q]),me=y.useMemo(()=>Zi("ag-floating-bottom",Q),[Q]),ut=y.useMemo(()=>({height:r,minHeight:r,display:P,overflowY:$}),[r,P,$]),ji=y.useMemo(()=>({height:u,top:c,width:C}),[u,c,C]),Ki=y.useMemo(()=>({height:S,bottom:w,width:R}),[S,w,R]),Xn=y.useMemo(()=>({height:l,minHeight:l,display:b,overflowY:$}),[l,b,$]),Kh=eo=>O.createElement(X0,{name:eo,key:`${eo}-container`}),Dl=({section:eo,children:Pl,className:tn,style:Yh})=>O.createElement("div",{ref:eo,className:tn,role:"presentation",style:Yh},Pl.map(Kh));return O.createElement("div",{ref:Ke,className:As,role:"treegrid"},O.createElement(_0,null),Dl({section:H,className:Ye,style:ut,children:[Ae.TOP_LEFT,Ae.TOP_CENTER,Ae.TOP_RIGHT,Ae.TOP_FULL_WIDTH]}),O.createElement("div",{className:_u,ref:ee,role:"presentation"},Dl({section:Ee,className:Jr,children:[Ae.LEFT,Ae.CENTER,Ae.RIGHT,Ae.FULL_WIDTH]})),Dl({section:W,className:Ze,style:ji,children:[Ae.STICKY_TOP_LEFT,Ae.STICKY_TOP_CENTER,Ae.STICKY_TOP_RIGHT,Ae.STICKY_TOP_FULL_WIDTH]}),Dl({section:X,className:at,style:Ki,children:[Ae.STICKY_BOTTOM_LEFT,Ae.STICKY_BOTTOM_CENTER,Ae.STICKY_BOTTOM_RIGHT,Ae.STICKY_BOTTOM_FULL_WIDTH]}),Dl({section:gt,className:me,style:Xn,children:[Ae.BOTTOM_LEFT,Ae.BOTTOM_CENTER,Ae.BOTTOM_RIGHT,Ae.BOTTOM_FULL_WIDTH]}))},J0=y.memo(Z0),eG=(e,t)=>{const{children:i,eFocusableElement:s,onTabKeyDown:n,gridCtrl:r,forceFocusOutWhenTabGuardsAreEmpty:o}=e,{context:l}=y.useContext(qt),a=y.useRef(null),u=y.useRef(null),d=y.useRef(),c=E=>{const w=E==null?void 0:parseInt(E,10).toString();[a,u].forEach(m=>{var R,T;w===void 0?(R=m.current)==null||R.removeAttribute("tabindex"):(T=m.current)==null||T.setAttribute("tabindex",w)})};y.useImperativeHandle(t,()=>({forceFocusOutOfContainer(E){var w;(w=d.current)==null||w.forceFocusOutOfContainer(E)}}));const p=y.useCallback(()=>{if(!a.current&&!u.current){l.destroyBean(d.current),d.current=null;return}if(a.current&&u.current){const E={setTabIndex:c};d.current=l.createBean(new Oh({comp:E,eTopGuard:a.current,eBottomGuard:u.current,eFocusableElement:s,onTabKeyDown:n,forceFocusOutWhenTabGuardsAreEmpty:o,focusInnerElement:w=>r.focusInnerElement(w)}))}},[]),C=y.useCallback(E=>{a.current=E,p()},[p]),v=y.useCallback(E=>{u.current=E,p()},[p]),S=E=>{const w=E==="top"?Td.TAB_GUARD_TOP:Td.TAB_GUARD_BOTTOM;return O.createElement("div",{className:`${Td.TAB_GUARD} ${w}`,role:"presentation",ref:E==="top"?C:v})};return O.createElement(O.Fragment,null,S("top"),i,S("bottom"))},tG=y.forwardRef(eG),iG=y.memo(tG),sG=({context:e})=>{const[t,i]=y.useState(""),[s,n]=y.useState(""),[r,o]=y.useState(""),[l,a]=y.useState(null),[u,d]=y.useState(null),[c,p]=y.useState(!1),[C,v]=y.useState(),S=y.useRef(null),E=y.useRef(null),w=y.useRef(),[m,R]=y.useState(null),T=y.useRef(()=>{}),P=y.useCallback(()=>{},[]),F=y.useMemo(()=>e.isDestroyed()?null:e.getBean("beans"),[e]);or(" AG Grid ",E);const b=y.useCallback(U=>{if(E.current=U,!E.current){e.destroyBean(S.current),S.current=null;return}if(e.isDestroyed())return;S.current=e.createBean(new Qn);const Q=S.current;T.current=Q.focusInnerElement.bind(Q);const he={destroyGridUi:()=>{},setRtlClass:i,forceFocusOutOfContainer:we=>{var fe;(fe=w.current)==null||fe.forceFocusOutOfContainer(we)},updateLayoutClasses:o,getFocusableContainers:()=>{var we,fe;const ge=[],G=(we=E.current)==null?void 0:we.querySelector(".ag-root"),H=(fe=E.current)==null?void 0:fe.querySelector(".ag-side-bar:not(.ag-hidden)");return G&&ge.push(G),H&&ge.push(H),ge},setCursor:a,setUserSelect:d};Q.setComp(he,E.current,E.current),p(!0)},[]);y.useEffect(()=>{if(!C||!F||!S.current||!m||!E.current)return;const U=S.current,Q=[],{agStackComponentsRegistry:he}=F,we=he.getComponentClass("AG-GRID-HEADER-DROP-ZONES"),fe=he.getComponentClass("AG-SIDE-BAR"),ge=he.getComponentClass("AG-STATUS-BAR"),G=he.getComponentClass("AG-WATERMARK"),H=he.getComponentClass("AG-PAGINATION"),W=[],X=E.current;if(U.showDropZones()&&we){const ee=e.createBean(new we),Ee=ee.getGui();X.insertAdjacentElement("afterbegin",Ee),W.push(Ee),Q.push(ee)}if(U.showSideBar()&&fe){const ee=e.createBean(new fe),Ee=ee.getGui(),gt=m.querySelector(".ag-tab-guard-bottom");gt&&(gt.insertAdjacentElement("beforebegin",Ee),W.push(Ee)),Q.push(ee)}if(U.showStatusBar()&&ge){const ee=e.createBean(new ge),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}if(H){const ee=e.createBean(new H),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}if(U.showWatermark()&&G){const ee=e.createBean(new G),Ee=ee.getGui();X.insertAdjacentElement("beforeend",Ee),W.push(Ee),Q.push(ee)}return()=>{e.destroyBeans(Q),W.forEach(ee=>{ee.parentElement&&ee.parentElement.removeChild(ee)})}},[C,m,F]);const M=y.useMemo(()=>Zi("ag-root-wrapper",t,s,r),[t,s,r]),N=y.useMemo(()=>Zi("ag-root-wrapper-body","ag-focus-managed",r),[r]),k=y.useMemo(()=>({userSelect:u??"",WebkitUserSelect:u??"",cursor:l??""}),[u,l]),$=y.useCallback(U=>{w.current=U,v(U!==null)},[]);return O.createElement("div",{ref:b,className:M,style:k,role:"presentation"},O.createElement("div",{className:N,ref:R,role:"presentation"},c&&m&&F&&O.createElement(qt.Provider,{value:F},O.createElement(iG,{ref:$,eFocusableElement:m,onTabKeyDown:P,gridCtrl:S.current,forceFocusOutWhenTabGuardsAreEmpty:!0},O.createElement(J0,null)))))},nG=y.memo(sG),lb=e=>{var t,i;const s=y.useRef(),n=y.useRef(null),r=y.useRef(null),o=y.useRef([]),l=y.useRef([]),a=y.useRef(e),u=y.useRef(!1),[d,c]=y.useState(void 0),[,p]=y.useState(0),C=y.useCallback(E=>{if(n.current=E,!n.current){o.current.forEach(b=>b()),o.current.length=0;return}const w=e.modules||[];r.current||(r.current=new S0(()=>p(b=>b+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),o.current.push(()=>{var b;(b=r.current)==null||b.destroy(),r.current=null}));const m=mc.combineAttributesAndGridOptions(e.gridOptions,e),R={providedBeanInstances:{frameworkComponentWrapper:new oG(r.current,!!m.reactiveCustomComponents)},modules:w,frameworkOverrides:new aG},T=b=>{c(b),o.current.push(()=>{b.destroy()}),b.getBean(Er.NAME).whenReady(()=>{if(b.isDestroyed())return;const N=s.current;N&&e.setGridApi&&e.setGridApi(N,new Qo(N))})},P=b=>{b.getBean(Er.NAME).whenReady(()=>{l.current.forEach(N=>N()),l.current.length=0,u.current=!0})},F=new xN;s.current=F.create(n.current,m,T,P,R)},[]),v=y.useMemo(()=>He({height:"100%"},e.containerStyle||{}),[e.containerStyle]),S=y.useCallback(E=>{u.current?E():l.current.push(E)},[]);return y.useEffect(()=>{const E=rG(a.current,e);a.current=e,S(()=>{s.current&&mc.processOnChange(E,s.current)})},[e]),O.createElement("div",{style:v,className:e.className,ref:C},d&&!d.isDestroyed()?O.createElement(nG,{context:d}):null,(i=(t=r.current)==null?void 0:t.getPortals())!=null?i:null)};function rG(e,t){const i={};return Object.keys(t).forEach(s=>{const n=t[s];e[s]!==n&&(i[s]=n)}),i}var oG=class extends LN{constructor(e,t){super(),this.parent=e,this.reactiveCustomComponents=t}createWrapper(e,t){if(this.reactiveCustomComponents){const n=(r=>{switch(r){case"filter":return p0;case"floatingFilterComponent":return f0;case"dateComponent":return h0;case"loadingOverlayComponent":return m0;case"noRowsOverlayComponent":return v0;case"statusPanel":return y0;case"toolPanel":return w0;case"menuItem":return C0}})(t.propertyName);if(n)return new n(e,this.parent,t)}else switch(t.propertyName){case"filter":case"floatingFilterComponent":case"dateComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"statusPanel":case"toolPanel":case"menuItem":iv();break}const i=!t.cellRenderer&&t.propertyName!=="toolPanel";return new tb(e,this.parent,t,i)}},lG=y.forwardRef((e,t)=>{const{ctrlsFactory:i,context:s,gos:n,resizeObserverService:r,clientSideRowModel:o,serverSideRowModel:l}=y.useContext(qt),[a,u]=y.useState(()=>new Oi),[d,c]=y.useState(()=>new Oi),[p,C]=y.useState(),[v,S]=y.useState(),E=y.useRef(),w=y.useRef(null),m=y.useRef(),R=y.useMemo(()=>Ce.__getGridRegisteredModules(e.api.getGridId()),[e]),T=y.useMemo(()=>a.toString()+" ag-details-row",[a]),P=y.useMemo(()=>d.toString()+" ag-details-grid",[d]);t&&y.useImperativeHandle(t,()=>({refresh(){var M,N;return(N=(M=E.current)==null?void 0:M.refresh())!=null?N:!1}})),e.template&&Z.warnOnce("detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://ag-grid.com/react-data-grid/master-detail-custom-detail/");const F=y.useCallback(M=>{if(w.current=M,!w.current){s.destroyBean(E.current),m.current&&m.current();return}const N={addOrRemoveCssClass:($,U)=>u(Q=>Q.setClass($,U)),addOrRemoveDetailGridCssClass:($,U)=>c(Q=>Q.setClass($,U)),setDetailGrid:$=>C($),setRowData:$=>S($),getGui:()=>w.current},k=i.getInstance("detailCellRenderer");if(k&&(s.createBean(k),k.init(N,e),E.current=k,n.get("detailRowAutoHeight"))){const $=()=>{if(w.current==null)return;const U=w.current.clientHeight;U!=null&&U>0&&setTimeout(()=>{e.node.setRowHeight(U),o?o.onRowHeightChanged():l&&l.onRowHeightChanged()},0)};m.current=r.observeResize(w.current,$),$()}},[]),b=y.useCallback((M,N)=>{var k;(k=E.current)==null||k.registerDetailWithMaster(M,N)},[]);return O.createElement("div",{className:T,ref:F},p&&O.createElement(lb,Wt(He({className:P},p),{modules:R,rowData:v,setGridApi:b})))}),aG=class extends ZD{constructor(){super("react"),this.frameworkComponents={agGroupCellRenderer:Gw,agGroupRowRenderer:Gw,agDetailCellRenderer:lG},this.wrapIncoming=(e,t)=>t==="ensureVisible"?R0(e):e(),this.renderingEngine="react"}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}},uG=class extends y.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=(e,t)=>{this.api=e,this.columnApi=t,this.apiListeners.forEach(i=>i(e))}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return O.createElement(lb,Wt(He({},this.props),{setGridApi:this.setGridApi}))}};const Hw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Bw=CR,dG=(e,t)=>i=>{var s;if((t==null?void 0:t.variants)==null)return Bw(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:n,defaultVariants:r}=t,o=Object.keys(n).map(u=>{const d=i==null?void 0:i[u],c=r==null?void 0:r[u];if(d===null)return null;const p=Hw(d)||Hw(c);return n[u][p]}),l=i&&Object.entries(i).reduce((u,d)=>{let[c,p]=d;return p===void 0||(u[c]=p),u},{}),a=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:c,className:p,...C}=d;return Object.entries(C).every(v=>{let[S,E]=v;return Array.isArray(E)?E.includes({...r,...l}[S]):{...r,...l}[S]===E})?[...u,c,p]:u},[]);return Bw(e,o,a,i==null?void 0:i.class,i==null?void 0:i.className)},cG=dG("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),au=y.forwardRef(({className:e,variant:t,size:i,asChild:s=!1,...n},r)=>x.jsx("button",{className:ui(cG({variant:t,size:i,className:e})),ref:r,...n}));au.displayName="Button";function ab({filePath:e,className:t,onSaveSuccess:i}){const[s,n]=y.useState(""),[r,o]=y.useState(!1),[l,a]=y.useState(!1),[u,d]=y.useState(null),[c,p]=y.useState(null);y.useEffect(()=>{e&&C(e)},[e]);const C=async S=>{o(!0),d(null);try{const E=await fetch(`/api/schema/content?file=${encodeURIComponent(S)}`);if(!E.ok)throw new Error("Failed to load file");const w=await E.text();n(w)}catch(E){console.error(E),d("Failed to read file content")}finally{o(!1)}},v=async()=>{if(e){a(!0),p(null);try{if(!(await fetch(`/api/schema/content?file=${encodeURIComponent(e)}`,{method:"POST",body:s})).ok)throw new Error("Failed to save");p("File saved successfully!"),setTimeout(()=>p(null),3e3),i&&i()}catch{d("Failed to save file")}finally{a(!1)}}};return x.jsxs(Ho,{className:`flex flex-col h-full ${t}`,children:[x.jsxs(Aa,{className:"py-2 px-4 flex flex-row items-center justify-between border-b space-y-0 min-h-[50px]",children:[x.jsx(xa,{className:"text-sm font-mono text-muted-foreground flex items-center",children:e}),x.jsxs("div",{className:"flex items-center gap-2",children:[c&&x.jsx("span",{className:"text-xs text-green-600 font-medium animate-fade-in",children:c}),u&&x.jsx("span",{className:"text-xs text-red-600 font-medium",children:u}),x.jsx(au,{size:"sm",onClick:v,disabled:l||r,children:l?"Saving...":x.jsxs(x.Fragment,{children:[x.jsx(Qx,{className:"mr-2 h-3 w-3"})," Save"]})})]})]}),x.jsxs(La,{className:"flex-1 p-0 relative min-h-[400px]",children:[r&&x.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50 z-10 transition-all backdrop-blur-sm",children:x.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}),x.jsx("textarea",{className:"w-full h-full p-4 font-mono text-sm resize-none focus:outline-none bg-muted/10 leading-normal",value:s,onChange:S=>n(S.target.value),spellCheck:!1,disabled:r})]})]})}function hG({objectName:e}){const[t,i]=y.useState([]),[s,n]=y.useState([]),[r,o]=y.useState(!1),[l,a]=y.useState("data"),[u,d]=y.useState(null),c=async()=>{o(!0);try{const S=await(await fetch("/api/metadata")).json(),w=(Array.isArray(S)?S:S.objects).find(T=>T.name===e);if(w){const T=[{field:"id",headerName:"ID",width:100,pinned:"left"}];Object.entries(w.fields).forEach(([P,F])=>{T.push({field:P,headerName:F.label||P,flex:1,filter:!0})}),T.find(P=>P.field==="createdAt")||T.push({field:"createdAt",hide:!0}),T.find(P=>P.field==="updatedAt")||T.push({field:"updatedAt",hide:!0}),n(T)}const R=await(await fetch(`/api/objectql/${e}`)).json();i(Array.isArray(R)?R:[])}catch(v){console.error(v)}finally{o(!1)}},p=async()=>{try{const v=await fetch(`/api/schema/find?object=${e}`);if(v.ok){const S=await v.json();d(S.file)}else d(null),console.error("Failed to find schema file")}catch(v){console.error(v)}};y.useEffect(()=>{a("data")},[e]),y.useEffect(()=>{l==="data"?c():p()},[e,l]);const C=y.useMemo(()=>({sortable:!0,filter:!0,resizable:!0}),[]);return x.jsxs("div",{className:"flex h-full flex-col",children:[x.jsxs("div",{className:"border-b px-6 py-4 flex items-center justify-between bg-card text-card-foreground",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("h1",{className:"text-2xl font-bold tracking-tight capitalize",children:e}),x.jsxs("div",{className:"flex space-x-1",children:[x.jsxs("button",{onClick:()=>a("data"),className:ui("flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",l==="data"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[x.jsx(fR,{className:"h-4 w-4"}),x.jsx("span",{children:"Data"})]}),x.jsxs("button",{onClick:()=>a("schema"),className:ui("flex items-center space-x-2 px-3 py-1.5 text-sm font-medium rounded-md transition-colors",l==="schema"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[x.jsx(xm,{className:"h-4 w-4"}),x.jsx("span",{children:"Schema"})]})]})]}),l==="data"&&x.jsxs("div",{className:"flex items-center space-x-2",children:[x.jsxs(au,{variant:"outline",size:"sm",onClick:c,disabled:r,children:[x.jsx(gR,{className:ui("mr-2 h-4 w-4",r&&"animate-spin")}),"Refresh"]}),x.jsxs(au,{size:"sm",children:[x.jsx(Yx,{className:"mr-2 h-4 w-4"}),"New Record"]})]})]}),x.jsx("div",{className:"flex-1 overflow-hidden p-6 bg-muted/20",children:l==="data"?x.jsx("div",{className:"rounded-md overflow-hidden bg-card h-full",style:{opacity:r?.6:1},children:x.jsx("div",{className:"ag-theme-quartz h-full w-full",children:x.jsx(uG,{rowData:t,columnDefs:s,defaultColDef:C,pagination:!0,paginationPageSize:20,rowSelection:"multiple"})})}):x.jsx("div",{className:"h-full bg-card rounded-md border",children:u?x.jsx(ab,{filePath:u,className:"h-full border-0"}):x.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:r?"Loading schema...":"Could not find definition file for this object."})})})]})}function pG(){const[e,t]=y.useState([]),[i,s]=y.useState(null),[n,r]=y.useState(null);y.useEffect(()=>{o()},[]);const o=async()=>{try{const l=await fetch("/api/schema/files");if(!l.ok)throw new Error("Failed to fetch files");const a=await l.json();t(a.files||[])}catch(l){console.error(l),r("Failed to load file list")}};return x.jsxs("div",{className:"flex h-full flex-col p-6 space-y-6",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Schema Editor"}),n&&x.jsx("p",{className:"text-sm text-red-500",children:n})]}),x.jsxs(au,{variant:"outline",size:"sm",onClick:o,children:[x.jsx(gR,{className:"mr-2 h-4 w-4"})," Refresh"]})]}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 h-full min-h-[500px]",children:[x.jsxs(Ho,{className:"md:col-span-1 flex flex-col",children:[x.jsxs(Aa,{className:"py-4",children:[x.jsx(xa,{className:"text-lg",children:"Files"}),x.jsx(uc,{children:"Select a schema file to edit"})]}),x.jsx(La,{className:"flex-1 overflow-auto p-2",children:x.jsxs("div",{className:"space-y-1",children:[e.map(l=>x.jsxs("button",{onClick:()=>s(l),className:ui("w-full text-left px-3 py-2 text-sm rounded-md transition-colors flex items-center",i===l?"bg-primary text-primary-foreground font-medium":"hover:bg-muted"),children:[x.jsx(xm,{className:"mr-2 h-4 w-4 opacity-70"}),l]},l)),e.length===0&&x.jsx("div",{className:"text-sm text-muted-foreground p-2",children:"No schema files found"})]})})]}),x.jsx("div",{className:"md:col-span-3 h-full",children:i?x.jsx(ab,{filePath:i}):x.jsx(Ho,{className:"h-full flex items-center justify-center",children:x.jsx("div",{className:"text-muted-foreground",children:"Select a file to view content"})})})]})]})}function gG(){const{name:e}=cx();return e?x.jsx(hG,{objectName:e}):null}function fG(){return x.jsx(_x,{basename:"/studio",children:x.jsxs("div",{className:"flex h-screen bg-background text-foreground overflow-hidden font-sans antialiased",children:[x.jsx(FL,{}),x.jsx("main",{className:"flex-1 overflow-auto bg-muted/20",children:x.jsxs(bx,{children:[x.jsx(vd,{path:"/",element:x.jsx(xL,{})}),x.jsx(vd,{path:"/schema",element:x.jsx(pG,{})}),x.jsx(vd,{path:"/object/:name",element:x.jsx(gG,{})})]})})]})})}Xp.createRoot(document.getElementById("root")).render(x.jsx(O.StrictMode,{children:x.jsx(fG,{})}));
|
package/dist/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>ObjectQL Console</title>
|
|
7
|
-
<script type="module" crossorigin src="/studio/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/studio/assets/index-CQ64O3eC.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/studio/assets/index-ClGKK4W3.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
package/src/pages/ObjectView.tsx
CHANGED
|
@@ -150,7 +150,7 @@ export function ObjectView({ objectName }: ObjectViewProps) {
|
|
|
150
150
|
{/* Content */}
|
|
151
151
|
<div className="flex-1 overflow-hidden p-6 bg-muted/20">
|
|
152
152
|
{activeTab === 'data' ? (
|
|
153
|
-
<div className="
|
|
153
|
+
<div className="rounded-md overflow-hidden bg-card h-full" style={{opacity: loading ? 0.6 : 1}}>
|
|
154
154
|
<div className="ag-theme-quartz h-full w-full">
|
|
155
155
|
<AgGridReact
|
|
156
156
|
rowData={rowData}
|