@standardbeagle/edit-db 0.3.159

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.
@@ -0,0 +1,506 @@
1
+ (function(Re,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react"),require("@tanstack/react-query")):typeof define=="function"&&define.amd?define(["exports","react","@tanstack/react-query"],h):(Re=typeof globalThis<"u"?globalThis:Re||self,h(Re.editor={},Re.React,Re.ReactQuery))})(this,(function(Re,h,De){"use strict";function Jo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=Jo(h);var Vt={exports:{}},Ot={};var xr;function Xo(){if(xr)return Ot;xr=1;var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(l,c,f){var d,g={},v=null,y=null;f!==void 0&&(v=""+f),c.key!==void 0&&(v=""+c.key),c.ref!==void 0&&(y=c.ref);for(d in c)r.call(c,d)&&!a.hasOwnProperty(d)&&(g[d]=c[d]);if(l&&l.defaultProps)for(d in c=l.defaultProps,c)g[d]===void 0&&(g[d]=c[d]);return{$$typeof:t,type:l,key:v,ref:y,props:g,_owner:o.current}}return Ot.Fragment=n,Ot.jsx=i,Ot.jsxs=i,Ot}var Pt={};var Cr;function Zo(){return Cr||(Cr=1,process.env.NODE_ENV!=="production"&&(function(){var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),R=Symbol.iterator,S="@@iterator";function O(s){if(s===null||typeof s!="object")return null;var m=R&&s[R]||s[S];return typeof m=="function"?m:null}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(s){{for(var m=arguments.length,C=new Array(m>1?m-1:0),$=1;$<m;$++)C[$-1]=arguments[$];P("error",s,C)}}function P(s,m,C){{var $=j.ReactDebugCurrentFrame,L=$.getStackAddendum();L!==""&&(m+="%s",C=C.concat([L]));var V=C.map(function(A){return String(A)});V.unshift("Warning: "+m),Function.prototype.apply.call(console[s],console,V)}}var k=!1,D=!1,x=!1,w=!1,N=!1,J;J=Symbol.for("react.module.reference");function re(s){return!!(typeof s=="string"||typeof s=="function"||s===r||s===a||N||s===o||s===f||s===d||w||s===y||k||D||x||typeof s=="object"&&s!==null&&(s.$$typeof===v||s.$$typeof===g||s.$$typeof===i||s.$$typeof===l||s.$$typeof===c||s.$$typeof===J||s.getModuleId!==void 0))}function ge(s,m,C){var $=s.displayName;if($)return $;var L=m.displayName||m.name||"";return L!==""?C+"("+L+")":C}function me(s){return s.displayName||"Context"}function H(s){if(s==null)return null;if(typeof s.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case f:return"Suspense";case d:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case l:var m=s;return me(m)+".Consumer";case i:var C=s;return me(C._context)+".Provider";case c:return ge(s,s.render,"ForwardRef");case g:var $=s.displayName||null;return $!==null?$:H(s.type)||"Memo";case v:{var L=s,V=L._payload,A=L._init;try{return H(A(V))}catch{return null}}}return null}var ie=Object.assign,be=0,Oe,ye,Ne,se,xe,Ce,G;function Pe(){}Pe.__reactDisabledLog=!0;function ce(){{if(be===0){Oe=console.log,ye=console.info,Ne=console.warn,se=console.error,xe=console.group,Ce=console.groupCollapsed,G=console.groupEnd;var s={configurable:!0,enumerable:!0,value:Pe,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}be++}}function je(){{if(be--,be===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ie({},s,{value:Oe}),info:ie({},s,{value:ye}),warn:ie({},s,{value:Ne}),error:ie({},s,{value:se}),group:ie({},s,{value:xe}),groupCollapsed:ie({},s,{value:Ce}),groupEnd:ie({},s,{value:G})})}be<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var oe=j.ReactCurrentDispatcher,Se;function ue(s,m,C){{if(Se===void 0)try{throw Error()}catch(L){var $=L.stack.trim().match(/\n( *(at )?)/);Se=$&&$[1]||""}return`
2
+ `+Se+s}}var le=!1,Ee;{var de=typeof WeakMap=="function"?WeakMap:Map;Ee=new de}function te(s,m){if(!s||le)return"";{var C=Ee.get(s);if(C!==void 0)return C}var $;le=!0;var L=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var V;V=oe.current,oe.current=null,ce();try{if(m){var A=function(){throw Error()};if(Object.defineProperty(A.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(A,[])}catch(z){$=z}Reflect.construct(s,[],A)}else{try{A.call()}catch(z){$=z}s.call(A.prototype)}}else{try{throw Error()}catch(z){$=z}s()}}catch(z){if(z&&$&&typeof z.stack=="string"){for(var F=z.stack.split(`
3
+ `),X=$.stack.split(`
4
+ `),Y=F.length-1,K=X.length-1;Y>=1&&K>=0&&F[Y]!==X[K];)K--;for(;Y>=1&&K>=0;Y--,K--)if(F[Y]!==X[K]){if(Y!==1||K!==1)do if(Y--,K--,K<0||F[Y]!==X[K]){var he=`
5
+ `+F[Y].replace(" at new "," at ");return s.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",s.displayName)),typeof s=="function"&&Ee.set(s,he),he}while(Y>=1&&K>=0);break}}}finally{le=!1,oe.current=V,je(),Error.prepareStackTrace=L}var Be=s?s.displayName||s.name:"",Me=Be?ue(Be):"";return typeof s=="function"&&Ee.set(s,Me),Me}function bt(s,m,C){return te(s,!1)}function yt(s){var m=s.prototype;return!!(m&&m.isReactComponent)}function We(s,m,C){if(s==null)return"";if(typeof s=="function")return te(s,yt(s));if(typeof s=="string")return ue(s);switch(s){case f:return ue("Suspense");case d:return ue("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case c:return bt(s.render);case g:return We(s.type,m,C);case v:{var $=s,L=$._payload,V=$._init;try{return We(V(L),m,C)}catch{}}}return""}var Fe=Object.prototype.hasOwnProperty,vt={},U=j.ReactDebugCurrentFrame;function wt(s){if(s){var m=s._owner,C=We(s.type,s._source,m?m.type:null);U.setExtraStackFrame(C)}else U.setExtraStackFrame(null)}function xt(s,m,C,$,L){{var V=Function.call.bind(Fe);for(var A in s)if(V(s,A)){var F=void 0;try{if(typeof s[A]!="function"){var X=Error(($||"React class")+": "+C+" type `"+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[A]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw X.name="Invariant Violation",X}F=s[A](m,A,$,C,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Y){F=Y}F&&!(F instanceof Error)&&(wt(L),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",$||"React class",C,A,typeof F),wt(null)),F instanceof Error&&!(F.message in vt)&&(vt[F.message]=!0,wt(L),E("Failed %s type: %s",C,F.message),wt(null))}}}var vn=Array.isArray;function Ct(s){return vn(s)}function wn(s){{var m=typeof Symbol=="function"&&Symbol.toStringTag,C=m&&s[Symbol.toStringTag]||s.constructor.name||"Object";return C}}function xn(s){try{return Cn(s),!1}catch{return!0}}function Cn(s){return""+s}function Sn(s){if(xn(s))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",wn(s)),Cn(s)}var Nt=j.ReactCurrentOwner,Ft={key:!0,ref:!0,__self:!0,__source:!0},En,Rn;function $n(s){if(Fe.call(s,"ref")){var m=Object.getOwnPropertyDescriptor(s,"ref").get;if(m&&m.isReactWarning)return!1}return s.ref!==void 0}function On(s){if(Fe.call(s,"key")){var m=Object.getOwnPropertyDescriptor(s,"key").get;if(m&&m.isReactWarning)return!1}return s.key!==void 0}function dr(s,m){typeof s.ref=="string"&&Nt.current}function pr(s,m){{var C=function(){En||(En=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};C.isReactWarning=!0,Object.defineProperty(s,"key",{get:C,configurable:!0})}}function Pn(s,m){{var C=function(){Rn||(Rn=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};C.isReactWarning=!0,Object.defineProperty(s,"ref",{get:C,configurable:!0})}}var fr=function(s,m,C,$,L,V,A){var F={$$typeof:t,type:s,key:m,ref:C,props:A,_owner:V};return F._store={},Object.defineProperty(F._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(F,"_self",{configurable:!1,enumerable:!1,writable:!1,value:$}),Object.defineProperty(F,"_source",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.freeze&&(Object.freeze(F.props),Object.freeze(F)),F};function gr(s,m,C,$,L){{var V,A={},F=null,X=null;C!==void 0&&(Sn(C),F=""+C),On(m)&&(Sn(m.key),F=""+m.key),$n(m)&&(X=m.ref,dr(m,L));for(V in m)Fe.call(m,V)&&!Ft.hasOwnProperty(V)&&(A[V]=m[V]);if(s&&s.defaultProps){var Y=s.defaultProps;for(V in Y)A[V]===void 0&&(A[V]=Y[V])}if(F||X){var K=typeof s=="function"?s.displayName||s.name||"Unknown":s;F&&pr(A,K),X&&Pn(A,K)}return fr(s,F,X,L,$,Nt.current,A)}}var Mt=j.ReactCurrentOwner,Lt=j.ReactDebugCurrentFrame;function qe(s){if(s){var m=s._owner,C=We(s.type,s._source,m?m.type:null);Lt.setExtraStackFrame(C)}else Lt.setExtraStackFrame(null)}var St;St=!1;function Et(s){return typeof s=="object"&&s!==null&&s.$$typeof===t}function Ve(){{if(Mt.current){var s=H(Mt.current.type);if(s)return`
6
+
7
+ Check the render method of \``+s+"`."}return""}}function hr(s){return""}var jn={};function kn(s){{var m=Ve();if(!m){var C=typeof s=="string"?s:s.displayName||s.name;C&&(m=`
8
+
9
+ Check the top-level render call using <`+C+">.")}return m}}function Ht(s,m){{if(!s._store||s._store.validated||s.key!=null)return;s._store.validated=!0;var C=kn(m);if(jn[C])return;jn[C]=!0;var $="";s&&s._owner&&s._owner!==Mt.current&&($=" It was passed a child from "+H(s._owner.type)+"."),qe(s),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',C,$),qe(null)}}function zt(s,m){{if(typeof s!="object")return;if(Ct(s))for(var C=0;C<s.length;C++){var $=s[C];Et($)&&Ht($,m)}else if(Et(s))s._store&&(s._store.validated=!0);else if(s){var L=O(s);if(typeof L=="function"&&L!==s.entries)for(var V=L.call(s),A;!(A=V.next()).done;)Et(A.value)&&Ht(A.value,m)}}}function Tn(s){{var m=s.type;if(m==null||typeof m=="string")return;var C;if(typeof m=="function")C=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===c||m.$$typeof===g))C=m.propTypes;else return;if(C){var $=H(m);xt(C,s.props,"prop",$,s)}else if(m.PropTypes!==void 0&&!St){St=!0;var L=H(m);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",L||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _n(s){{for(var m=Object.keys(s.props),C=0;C<m.length;C++){var $=m[C];if($!=="children"&&$!=="key"){qe(s),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",$),qe(null);break}}s.ref!==null&&(qe(s),E("Invalid attribute `ref` supplied to `React.Fragment`."),qe(null))}}var Wt={};function qt(s,m,C,$,L,V){{var A=re(s);if(!A){var F="";(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(F+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var X=hr();X?F+=X:F+=Ve();var Y;s===null?Y="null":Ct(s)?Y="array":s!==void 0&&s.$$typeof===t?(Y="<"+(H(s.type)||"Unknown")+" />",F=" Did you accidentally export a JSX literal instead of a component?"):Y=typeof s,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Y,F)}var K=gr(s,m,C,L,V);if(K==null)return K;if(A){var he=m.children;if(he!==void 0)if($)if(Ct(he)){for(var Be=0;Be<he.length;Be++)zt(he[Be],s);Object.freeze&&Object.freeze(he)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else zt(he,s)}if(Fe.call(m,"key")){var Me=H(s),z=Object.keys(m).filter(function(vr){return vr!=="key"}),Le=z.length>0?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}";if(!Wt[Me+Le]){var yr=z.length>0?"{"+z.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
10
+ let props = %s;
11
+ <%s {...props} />
12
+ React keys must be passed directly to JSX without using spread:
13
+ let props = %s;
14
+ <%s key={someKey} {...props} />`,Le,Me,yr,Me),Wt[Me+Le]=!0}}return s===r?_n(K):Tn(K),K}}function mr(s,m,C){return qt(s,m,C,!0)}function br(s,m,C){return qt(s,m,C,!1)}var _e=br,ve=mr;Pt.Fragment=r,Pt.jsx=_e,Pt.jsxs=ve})()),Pt}var Sr;function ea(){return Sr||(Sr=1,process.env.NODE_ENV==="production"?Vt.exports=Xo():Vt.exports=Zo()),Vt.exports}var p=ea(),ae=function(){return ae=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ae.apply(this,arguments)};function nt(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function ta(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var na=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ra=ta(function(e){return na.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),B="-ms-",jt="-moz-",q="-webkit-",Er="comm",Bt="rule",Dn="decl",oa="@import",Rr="@keyframes",aa="@layer",$r=Math.abs,An=String.fromCharCode,In=Object.assign;function ia(e,t){return ne(e,0)^45?(((t<<2^ne(e,0))<<2^ne(e,1))<<2^ne(e,2))<<2^ne(e,3):0}function Or(e){return e.trim()}function Ae(e,t){return(e=t.exec(e))?e[0]:e}function I(e,t,n){return e.replace(t,n)}function Gt(e,t,n){return e.indexOf(t,n)}function ne(e,t){return e.charCodeAt(t)|0}function rt(e,t,n){return e.slice(t,n)}function Te(e){return e.length}function Pr(e){return e.length}function kt(e,t){return t.push(e),e}function sa(e,t){return e.map(t).join("")}function jr(e,t){return e.filter(function(n){return!Ae(n,t)})}var Yt=1,ot=1,kr=0,we=0,Q=0,at="";function Ut(e,t,n,r,o,a,i,l){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Yt,column:ot,length:i,return:"",siblings:l}}function He(e,t){return In(Ut("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function it(e){for(;e.root;)e=He(e.root,{children:[e]});kt(e,e.siblings)}function la(){return Q}function ca(){return Q=we>0?ne(at,--we):0,ot--,Q===10&&(ot=1,Yt--),Q}function $e(){return Q=we<kr?ne(at,we++):0,ot++,Q===10&&(ot=1,Yt++),Q}function Ye(){return ne(at,we)}function Kt(){return we}function Qt(e,t){return rt(at,e,t)}function Nn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ua(e){return Yt=ot=1,kr=Te(at=e),we=0,[]}function da(e){return at="",e}function Fn(e){return Or(Qt(we-1,Mn(e===91?e+2:e===40?e+1:e)))}function pa(e){for(;(Q=Ye())&&Q<33;)$e();return Nn(e)>2||Nn(Q)>3?"":" "}function fa(e,t){for(;--t&&$e()&&!(Q<48||Q>102||Q>57&&Q<65||Q>70&&Q<97););return Qt(e,Kt()+(t<6&&Ye()==32&&$e()==32))}function Mn(e){for(;$e();)switch(Q){case e:return we;case 34:case 39:e!==34&&e!==39&&Mn(Q);break;case 40:e===41&&Mn(e);break;case 92:$e();break}return we}function ga(e,t){for(;$e()&&e+Q!==57;)if(e+Q===84&&Ye()===47)break;return"/*"+Qt(t,we-1)+"*"+An(e===47?e:$e())}function ha(e){for(;!Nn(Ye());)$e();return Qt(e,we)}function ma(e){return da(Jt("",null,null,null,[""],e=ua(e),0,[0],e))}function Jt(e,t,n,r,o,a,i,l,c){for(var f=0,d=0,g=i,v=0,y=0,R=0,S=1,O=1,j=1,E=0,P="",k=o,D=a,x=r,w=P;O;)switch(R=E,E=$e()){case 40:if(R!=108&&ne(w,g-1)==58){Gt(w+=I(Fn(E),"&","&\f"),"&\f",$r(f?l[f-1]:0))!=-1&&(j=-1);break}case 34:case 39:case 91:w+=Fn(E);break;case 9:case 10:case 13:case 32:w+=pa(R);break;case 92:w+=fa(Kt()-1,7);continue;case 47:switch(Ye()){case 42:case 47:kt(ba(ga($e(),Kt()),t,n,c),c);break;default:w+="/"}break;case 123*S:l[f++]=Te(w)*j;case 125*S:case 59:case 0:switch(E){case 0:case 125:O=0;case 59+d:j==-1&&(w=I(w,/\f/g,"")),y>0&&Te(w)-g&&kt(y>32?_r(w+";",r,n,g-1,c):_r(I(w," ","")+";",r,n,g-2,c),c);break;case 59:w+=";";default:if(kt(x=Tr(w,t,n,f,d,o,l,P,k=[],D=[],g,a),a),E===123)if(d===0)Jt(w,t,x,x,k,a,g,l,D);else switch(v===99&&ne(w,3)===110?100:v){case 100:case 108:case 109:case 115:Jt(e,x,x,r&&kt(Tr(e,x,x,0,0,o,l,P,o,k=[],g,D),D),o,D,g,l,r?k:D);break;default:Jt(w,x,x,x,[""],D,0,l,D)}}f=d=y=0,S=j=1,P=w="",g=i;break;case 58:g=1+Te(w),y=R;default:if(S<1){if(E==123)--S;else if(E==125&&S++==0&&ca()==125)continue}switch(w+=An(E),E*S){case 38:j=d>0?1:(w+="\f",-1);break;case 44:l[f++]=(Te(w)-1)*j,j=1;break;case 64:Ye()===45&&(w+=Fn($e())),v=Ye(),d=g=Te(P=w+=ha(Kt())),E++;break;case 45:R===45&&Te(w)==2&&(S=0)}}return a}function Tr(e,t,n,r,o,a,i,l,c,f,d,g){for(var v=o-1,y=o===0?a:[""],R=Pr(y),S=0,O=0,j=0;S<r;++S)for(var E=0,P=rt(e,v+1,v=$r(O=i[S])),k=e;E<R;++E)(k=Or(O>0?y[E]+" "+P:I(P,/&\f/g,y[E])))&&(c[j++]=k);return Ut(e,t,n,o===0?Bt:l,c,f,d,g)}function ba(e,t,n,r){return Ut(e,t,n,Er,An(la()),rt(e,2,-2),0,r)}function _r(e,t,n,r,o){return Ut(e,t,n,Dn,rt(e,0,r),rt(e,r+1,-1),r,o)}function Dr(e,t,n){switch(ia(e,t)){case 5103:return q+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return q+e+e;case 4789:return jt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return q+e+jt+e+B+e+e;case 5936:switch(ne(e,t+11)){case 114:return q+e+B+I(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return q+e+B+I(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return q+e+B+I(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return q+e+B+e+e;case 6165:return q+e+B+"flex-"+e+e;case 5187:return q+e+I(e,/(\w+).+(:[^]+)/,q+"box-$1$2"+B+"flex-$1$2")+e;case 5443:return q+e+B+"flex-item-"+I(e,/flex-|-self/g,"")+(Ae(e,/flex-|baseline/)?"":B+"grid-row-"+I(e,/flex-|-self/g,""))+e;case 4675:return q+e+B+"flex-line-pack"+I(e,/align-content|flex-|-self/g,"")+e;case 5548:return q+e+B+I(e,"shrink","negative")+e;case 5292:return q+e+B+I(e,"basis","preferred-size")+e;case 6060:return q+"box-"+I(e,"-grow","")+q+e+B+I(e,"grow","positive")+e;case 4554:return q+I(e,/([^-])(transform)/g,"$1"+q+"$2")+e;case 6187:return I(I(I(e,/(zoom-|grab)/,q+"$1"),/(image-set)/,q+"$1"),e,"")+e;case 5495:case 3959:return I(e,/(image-set\([^]*)/,q+"$1$`$1");case 4968:return I(I(e,/(.+:)(flex-)?(.*)/,q+"box-pack:$3"+B+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+q+e+e;case 4200:if(!Ae(e,/flex-|baseline/))return B+"grid-column-align"+rt(e,t)+e;break;case 2592:case 3360:return B+I(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Ae(r.props,/grid-\w+-end/)})?~Gt(e+(n=n[t].value),"span",0)?e:B+I(e,"-start","")+e+B+"grid-row-span:"+(~Gt(n,"span",0)?Ae(n,/\d+/):+Ae(n,/\d+/)-+Ae(e,/\d+/))+";":B+I(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Ae(r.props,/grid-\w+-start/)})?e:B+I(I(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return I(e,/(.+)-inline(.+)/,q+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Te(e)-1-t>6)switch(ne(e,t+1)){case 109:if(ne(e,t+4)!==45)break;case 102:return I(e,/(.+:)(.+)-([^]+)/,"$1"+q+"$2-$3$1"+jt+(ne(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gt(e,"stretch",0)?Dr(I(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return I(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,a,i,l,c,f){return B+o+":"+a+f+(i?B+o+"-span:"+(l?c:+c-+a)+f:"")+e});case 4949:if(ne(e,t+6)===121)return I(e,":",":"+q)+e;break;case 6444:switch(ne(e,ne(e,14)===45?18:11)){case 120:return I(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+q+(ne(e,14)===45?"inline-":"")+"box$3$1"+q+"$2$3$1"+B+"$2box$3")+e;case 100:return I(e,":",":"+B)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return I(e,"scroll-","scroll-snap-")+e}return e}function Xt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function ya(e,t,n,r){switch(e.type){case aa:if(e.children.length)break;case oa:case Dn:return e.return=e.return||e.value;case Er:return"";case Rr:return e.return=e.value+"{"+Xt(e.children,r)+"}";case Bt:if(!Te(e.value=e.props.join(",")))return""}return Te(n=Xt(e.children,r))?e.return=e.value+"{"+n+"}":""}function va(e){var t=Pr(e);return function(n,r,o,a){for(var i="",l=0;l<t;l++)i+=e[l](n,r,o,a)||"";return i}}function wa(e){return function(t){t.root||(t=t.return)&&e(t)}}function xa(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Dn:e.return=Dr(e.value,e.length,n);return;case Rr:return Xt([He(e,{value:I(e.value,"@","@"+q)})],r);case Bt:if(e.length)return sa(n=e.props,function(o){switch(Ae(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":it(He(e,{props:[I(o,/:(read-\w+)/,":"+jt+"$1")]})),it(He(e,{props:[o]})),In(e,{props:jr(n,r)});break;case"::placeholder":it(He(e,{props:[I(o,/:(plac\w+)/,":"+q+"input-$1")]})),it(He(e,{props:[I(o,/:(plac\w+)/,":"+jt+"$1")]})),it(He(e,{props:[I(o,/:(plac\w+)/,B+"input-$1")]})),it(He(e,{props:[o]})),In(e,{props:jr(n,r)});break}return""})}}var Ca={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ue=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Ar="active",Ir="data-styled-version",Zt="6.1.11",Ln=`/*!sc*/
15
+ `,Hn=typeof window<"u"&&"HTMLElement"in window,Sa=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),Nr=/invalid hook call/i,en=new Set,Ea=function(e,t){if(process.env.NODE_ENV!=="production"){var n=t?' with the id of "'.concat(t,'"'):"",r="The component ".concat(e).concat(n,` has been created dynamically.
16
+ `)+`You may see this warning because you've called styled inside another component.
17
+ To resolve this only create new StyledComponents outside of any render method and function component.`,o=console.error;try{var a=!0;console.error=function(i){for(var l=[],c=1;c<arguments.length;c++)l[c-1]=arguments[c];Nr.test(i)?(a=!1,en.delete(r)):o.apply(void 0,nt([i],l,!1))},h.useRef(),a&&!en.has(r)&&(console.warn(r),en.add(r))}catch(i){Nr.test(i.message)&&en.delete(r)}finally{console.error=o}}},tn=Object.freeze([]),st=Object.freeze({});function Ra(e,t,n){return n===void 0&&(n=st),e.theme!==n.theme&&e.theme||t||n.theme}var zn=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),$a=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Oa=/(^-|-$)/g;function Fr(e){return e.replace($a,"-").replace(Oa,"")}var Pa=/(a)(d)/gi,nn=52,Mr=function(e){return String.fromCharCode(e+(e>25?39:97))};function Wn(e){var t,n="";for(t=Math.abs(e);t>nn;t=t/nn|0)n=Mr(t%nn)+n;return(Mr(t%nn)+n).replace(Pa,"$1-$2")}var qn,Lr=5381,Ke=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Hr=function(e){return Ke(Lr,e)};function ja(e){return Wn(Hr(e)>>>0)}function zr(e){return process.env.NODE_ENV!=="production"&&typeof e=="string"&&e||e.displayName||e.name||"Component"}function Vn(e){return typeof e=="string"&&(process.env.NODE_ENV==="production"||e.charAt(0)===e.charAt(0).toLowerCase())}var Wr=typeof Symbol=="function"&&Symbol.for,qr=Wr?Symbol.for("react.memo"):60115,ka=Wr?Symbol.for("react.forward_ref"):60112,Ta={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},_a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Da=((qn={})[ka]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},qn[qr]=Vr,qn);function Br(e){return("type"in(t=e)&&t.type.$$typeof)===qr?Vr:"$$typeof"in e?Da[e.$$typeof]:Ta;var t}var Aa=Object.defineProperty,Ia=Object.getOwnPropertyNames,Gr=Object.getOwnPropertySymbols,Na=Object.getOwnPropertyDescriptor,Fa=Object.getPrototypeOf,Yr=Object.prototype;function Ur(e,t,n){if(typeof t!="string"){if(Yr){var r=Fa(t);r&&r!==Yr&&Ur(e,r,n)}var o=Ia(t);Gr&&(o=o.concat(Gr(t)));for(var a=Br(e),i=Br(t),l=0;l<o.length;++l){var c=o[l];if(!(c in _a||n&&n[c]||i&&c in i||a&&c in a)){var f=Na(t,c);try{Aa(e,c,f)}catch{}}}}return e}function Qe(e){return typeof e=="function"}function Bn(e){return typeof e=="object"&&"styledComponentId"in e}function Je(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Kr(e,t){if(e.length===0)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function lt(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Gn(e,t,n){if(n===void 0&&(n=!1),!n&&!lt(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Gn(e[r],t[r]);else if(lt(t))for(var r in t)e[r]=Gn(e[r],t[r]);return e}function Yn(e,t){Object.defineProperty(e,"toString",{value:t})}var Ma=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
18
+
19
+ `,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
20
+
21
+ - Are you trying to reuse it across renders?
22
+ - Are you accidentally calling collectStyles twice?
23
+
24
+ `,3:`Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
25
+
26
+ `,4:`The \`StyleSheetManager\` expects a valid target or sheet prop!
27
+
28
+ - Does this error occur on the client and is your target falsy?
29
+ - Does this error occur on the server and is the sheet falsy?
30
+
31
+ `,5:`The clone method cannot be used on the client!
32
+
33
+ - Are you running in a client-like environment on the server?
34
+ - Are you trying to run SSR on the client?
35
+
36
+ `,6:`Trying to insert a new style tag, but the given Node is unmounted!
37
+
38
+ - Are you using a custom target that isn't mounted?
39
+ - Does your document not have a valid head element?
40
+ - Have you accidentally removed a style tag manually?
41
+
42
+ `,7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:`ThemeProvider: Please make your "theme" prop an object.
43
+
44
+ `,9:"Missing document `<head>`\n\n",10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
45
+
46
+ `,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
47
+
48
+ `,12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:`%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
49
+
50
+ `,14:`ThemeProvider: "theme" prop is required.
51
+
52
+ `,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s.
53
+ You may only create up to 1,073,741,824 components. If you're creating components dynamically,
54
+ as for instance in your render method then you may be running into this limitation.
55
+
56
+ `,17:`CSSStyleSheet could not be found on HTMLStyleElement.
57
+ Has styled-components' style tag been unmounted or altered by another script?
58
+ `,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function La(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,a=e.length;o<a;o+=1)r.push(e[o]);return r.forEach(function(i){n=n.replace(/%[a-z]/,i)}),n}function Ie(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(La.apply(void 0,nt([Ma[e]],t,!1)).trim())}var Ha=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var n=0,r=0;r<t;r++)n+=this.groupSizes[r];return n},e.prototype.insertRules=function(t,n){if(t>=this.groupSizes.length){for(var r=this.groupSizes,o=r.length,a=o;t>=a;)if((a<<=1)<0)throw Ie(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(r),this.length=a;for(var i=o;i<a;i++)this.groupSizes[i]=0}for(var l=this.indexOfGroup(t+1),c=(i=0,n.length);i<c;i++)this.tag.insertRule(l,n[i])&&(this.groupSizes[t]++,l++)},e.prototype.clearGroup=function(t){if(t<this.length){var n=this.groupSizes[t],r=this.indexOfGroup(t),o=r+n;this.groupSizes[t]=0;for(var a=r;a<o;a++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(t){var n="";if(t>=this.length||this.groupSizes[t]===0)return n;for(var r=this.groupSizes[t],o=this.indexOfGroup(t),a=o+r,i=o;i<a;i++)n+="".concat(this.tag.getRule(i)).concat(Ln);return n},e})(),za=1<<30,rn=new Map,on=new Map,an=1,sn=function(e){if(rn.has(e))return rn.get(e);for(;on.has(an);)an++;var t=an++;if(process.env.NODE_ENV!=="production"&&((0|t)<0||t>za))throw Ie(16,"".concat(t));return rn.set(e,t),on.set(t,e),t},Wa=function(e,t){an=t+1,rn.set(e,t),on.set(t,e)},qa="style[".concat(Ue,"][").concat(Ir,'="').concat(Zt,'"]'),Va=new RegExp("^".concat(Ue,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ba=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},Ga=function(e,t){for(var n,r=((n=t.textContent)!==null&&n!==void 0?n:"").split(Ln),o=[],a=0,i=r.length;a<i;a++){var l=r[a].trim();if(l){var c=l.match(Va);if(c){var f=0|parseInt(c[1],10),d=c[2];f!==0&&(Wa(d,f),Ba(e,d,c[3]),e.getTag().insertRules(f,o)),o.length=0}else o.push(l)}}};function Ya(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Qr=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=(function(l){var c=Array.from(l.querySelectorAll("style[".concat(Ue,"]")));return c[c.length-1]})(n),a=o!==void 0?o.nextSibling:null;r.setAttribute(Ue,Ar),r.setAttribute(Ir,Zt);var i=Ya();return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},Ua=(function(){function e(t){this.element=Qr(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,o=0,a=r.length;o<a;o++){var i=r[o];if(i.ownerNode===n)return i}throw Ie(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,n){try{return this.sheet.insertRule(n,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var n=this.sheet.cssRules[t];return n&&n.cssText?n.cssText:""},e})(),Ka=(function(){function e(t){this.element=Qr(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,n){if(t<=this.length&&t>=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),Qa=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,n){return t<=this.length&&(this.rules.splice(t,0,n),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),Jr=Hn,Ja={isServer:!Hn,useCSSOMInjection:!Sa},Xr=(function(){function e(t,n,r){t===void 0&&(t=st),n===void 0&&(n={});var o=this;this.options=ae(ae({},Ja),t),this.gs=n,this.names=new Map(r),this.server=!!t.isServer,!this.server&&Hn&&Jr&&(Jr=!1,(function(a){for(var i=document.querySelectorAll(qa),l=0,c=i.length;l<c;l++){var f=i[l];f&&f.getAttribute(Ue)!==Ar&&(Ga(a,f),f.parentNode&&f.parentNode.removeChild(f))}})(this)),Yn(this,function(){return(function(a){for(var i=a.getTag(),l=i.length,c="",f=function(g){var v=(function(j){return on.get(j)})(g);if(v===void 0)return"continue";var y=a.names.get(v),R=i.getGroup(g);if(y===void 0||R.length===0)return"continue";var S="".concat(Ue,".g").concat(g,'[id="').concat(v,'"]'),O="";y!==void 0&&y.forEach(function(j){j.length>0&&(O+="".concat(j,","))}),c+="".concat(R).concat(S,'{content:"').concat(O,'"}').concat(Ln)},d=0;d<l;d++)f(d);return c})(o)})}return e.registerId=function(t){return sn(t)},e.prototype.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new e(ae(ae({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(n){var r=n.useCSSOMInjection,o=n.target;return n.isServer?new Qa(o):r?new Ua(o):new Ka(o)})(this.options),new Ha(t)));var t},e.prototype.hasNameForId=function(t,n){return this.names.has(t)&&this.names.get(t).has(n)},e.prototype.registerName=function(t,n){if(sn(t),this.names.has(t))this.names.get(t).add(n);else{var r=new Set;r.add(n),this.names.set(t,r)}},e.prototype.insertRules=function(t,n,r){this.registerName(t,n),this.getTag().insertRules(sn(t),r)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(sn(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),Xa=/&/g,Za=/^\s*\/\/.*$/gm;function Zr(e,t){return e.map(function(n){return n.type==="rule"&&(n.value="".concat(t," ").concat(n.value),n.value=n.value.replaceAll(",",",".concat(t," ")),n.props=n.props.map(function(r){return"".concat(t," ").concat(r)})),Array.isArray(n.children)&&n.type!=="@keyframes"&&(n.children=Zr(n.children,t)),n})}function ei(e){var t,n,r,o=st,a=o.options,i=a===void 0?st:a,l=o.plugins,c=l===void 0?tn:l,f=function(v,y,R){return R.startsWith(n)&&R.endsWith(n)&&R.replaceAll(n,"").length>0?".".concat(t):v},d=c.slice();d.push(function(v){v.type===Bt&&v.value.includes("&")&&(v.props[0]=v.props[0].replace(Xa,n).replace(r,f))}),i.prefix&&d.push(xa),d.push(ya);var g=function(v,y,R,S){y===void 0&&(y=""),R===void 0&&(R=""),S===void 0&&(S="&"),t=S,n=y,r=new RegExp("\\".concat(n,"\\b"),"g");var O=v.replace(Za,""),j=ma(R||y?"".concat(R," ").concat(y," { ").concat(O," }"):O);i.namespace&&(j=Zr(j,i.namespace));var E=[];return Xt(j,va(d.concat(wa(function(P){return E.push(P)})))),E};return g.hash=c.length?c.reduce(function(v,y){return y.name||Ie(15),Ke(v,y.name)},Lr).toString():"",g}var ti=new Xr,Un=ei(),eo=h.createContext({shouldForwardProp:void 0,styleSheet:ti,stylis:Un});eo.Consumer,h.createContext(void 0);function to(){return h.useContext(eo)}var no=(function(){function e(t,n){var r=this;this.inject=function(o,a){a===void 0&&(a=Un);var i=r.name+a.hash;o.hasNameForId(r.id,i)||o.insertRules(r.id,i,a(r.rules,i,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=n,Yn(this,function(){throw Ie(12,String(r.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Un),this.name+t.hash},e})(),ni=function(e){return e>="A"&&e<="Z"};function ro(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(n===1&&r==="-"&&e[0]==="-")return e;ni(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var oo=function(e){return e==null||e===!1||e===""},ao=function(e){var t,n,r=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!oo(a)&&(Array.isArray(a)&&a.isCss||Qe(a)?r.push("".concat(ro(o),":"),a,";"):lt(a)?r.push.apply(r,nt(nt(["".concat(o," {")],ao(a),!1),["}"],!1)):r.push("".concat(ro(o),": ").concat((t=o,(n=a)==null||typeof n=="boolean"||n===""?"":typeof n!="number"||n===0||t in Ca||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Xe(e,t,n,r){if(oo(e))return[];if(Bn(e))return[".".concat(e.styledComponentId)];if(Qe(e)){if(!Qe(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return process.env.NODE_ENV==="production"||typeof o!="object"||Array.isArray(o)||o instanceof no||lt(o)||o===null||console.error("".concat(zr(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Xe(o,t,n,r)}var a;return e instanceof no?n?(e.inject(n,r),[e.getName(r)]):[e]:lt(e)?ao(e):Array.isArray(e)?Array.prototype.concat.apply(tn,e.map(function(i){return Xe(i,t,n,r)})):[e.toString()]}function ri(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Qe(n)&&!Bn(n))return!1}return!0}var oi=Hr(Zt),ai=(function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&ri(t),this.componentId=n,this.baseHash=Ke(oi,n),this.baseStyle=r,Xr.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,n,r):"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(this.componentId,this.staticRulesId))o=Je(o,this.staticRulesId);else{var a=Kr(Xe(this.rules,t,n,r)),i=Wn(Ke(this.baseHash,a)>>>0);if(!n.hasNameForId(this.componentId,i)){var l=r(a,".".concat(i),void 0,this.componentId);n.insertRules(this.componentId,i,l)}o=Je(o,i),this.staticRulesId=i}else{for(var c=Ke(this.baseHash,r.hash),f="",d=0;d<this.rules.length;d++){var g=this.rules[d];if(typeof g=="string")f+=g,process.env.NODE_ENV!=="production"&&(c=Ke(c,g));else if(g){var v=Kr(Xe(g,t,n,r));c=Ke(c,v+d),f+=v}}if(f){var y=Wn(c>>>0);n.hasNameForId(this.componentId,y)||n.insertRules(this.componentId,y,r(f,".".concat(y),void 0,this.componentId)),o=Je(o,y)}}return o},e})(),ln=h.createContext(void 0);ln.Consumer;function ii(e){var t=h.useContext(ln),n=h.useMemo(function(){return(function(r,o){if(!r)throw Ie(14);if(Qe(r)){var a=r(o);if(process.env.NODE_ENV!=="production"&&(a===null||Array.isArray(a)||typeof a!="object"))throw Ie(7);return a}if(Array.isArray(r)||typeof r!="object")throw Ie(8);return o?ae(ae({},o),r):r})(e.theme,t)},[e.theme,t]);return e.children?h.createElement(ln.Provider,{value:n},e.children):null}var Kn={},io=new Set;function si(e,t,n){var r=Bn(e),o=e,a=!Vn(e),i=t.attrs,l=i===void 0?tn:i,c=t.componentId,f=c===void 0?(function(k,D){var x=typeof k!="string"?"sc":Fr(k);Kn[x]=(Kn[x]||0)+1;var w="".concat(x,"-").concat(ja(Zt+x+Kn[x]));return D?"".concat(D,"-").concat(w):w})(t.displayName,t.parentComponentId):c,d=t.displayName,g=d===void 0?(function(k){return Vn(k)?"styled.".concat(k):"Styled(".concat(zr(k),")")})(e):d,v=t.displayName&&t.componentId?"".concat(Fr(t.displayName),"-").concat(t.componentId):t.componentId||f,y=r&&o.attrs?o.attrs.concat(l).filter(Boolean):l,R=t.shouldForwardProp;if(r&&o.shouldForwardProp){var S=o.shouldForwardProp;if(t.shouldForwardProp){var O=t.shouldForwardProp;R=function(k,D){return S(k,D)&&O(k,D)}}else R=S}var j=new ai(n,v,r?o.componentStyle:void 0);function E(k,D){return(function(x,w,N){var J=x.attrs,re=x.componentStyle,ge=x.defaultProps,me=x.foldedComponentIds,H=x.styledComponentId,ie=x.target,be=h.useContext(ln),Oe=to(),ye=x.shouldForwardProp||Oe.shouldForwardProp;process.env.NODE_ENV!=="production"&&h.useDebugValue(H);var Ne=Ra(w,be,ge)||st,se=(function(je,oe,Se){for(var ue,le=ae(ae({},oe),{className:void 0,theme:Se}),Ee=0;Ee<je.length;Ee+=1){var de=Qe(ue=je[Ee])?ue(le):ue;for(var te in de)le[te]=te==="className"?Je(le[te],de[te]):te==="style"?ae(ae({},le[te]),de[te]):de[te]}return oe.className&&(le.className=Je(le.className,oe.className)),le})(J,w,Ne),xe=se.as||ie,Ce={};for(var G in se)se[G]===void 0||G[0]==="$"||G==="as"||G==="theme"&&se.theme===Ne||(G==="forwardedAs"?Ce.as=se.forwardedAs:ye&&!ye(G,xe)||(Ce[G]=se[G],ye||process.env.NODE_ENV!=="development"||ra(G)||io.has(G)||!zn.has(xe)||(io.add(G),console.warn('styled-components: it looks like an unknown prop "'.concat(G,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var Pe=(function(je,oe){var Se=to(),ue=je.generateAndInjectStyles(oe,Se.styleSheet,Se.stylis);return process.env.NODE_ENV!=="production"&&h.useDebugValue(ue),ue})(re,se);process.env.NODE_ENV!=="production"&&x.warnTooManyClasses&&x.warnTooManyClasses(Pe);var ce=Je(me,H);return Pe&&(ce+=" "+Pe),se.className&&(ce+=" "+se.className),Ce[Vn(xe)&&!zn.has(xe)?"class":"className"]=ce,Ce.ref=N,h.createElement(xe,Ce)})(P,k,D)}E.displayName=g;var P=h.forwardRef(E);return P.attrs=y,P.componentStyle=j,P.displayName=g,P.shouldForwardProp=R,P.foldedComponentIds=r?Je(o.foldedComponentIds,o.styledComponentId):"",P.styledComponentId=v,P.target=r?o.target:e,Object.defineProperty(P,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(k){this._foldedDefaultProps=r?(function(D){for(var x=[],w=1;w<arguments.length;w++)x[w-1]=arguments[w];for(var N=0,J=x;N<J.length;N++)Gn(D,J[N],!0);return D})({},o.defaultProps,k):k}}),process.env.NODE_ENV!=="production"&&(Ea(g,v),P.warnTooManyClasses=(function(k,D){var x={},w=!1;return function(N){if(!w&&(x[N]=!0,Object.keys(x).length>=200)){var J=D?' with the id of "'.concat(D,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(k).concat(J,`.
59
+ `)+`Consider using the attrs method, together with a style object for frequently changed styles.
60
+ Example:
61
+ const Component = styled.div.attrs(props => ({
62
+ style: {
63
+ background: props.background,
64
+ },
65
+ }))\`width: 100%;\`
66
+
67
+ <Component />`),w=!0,x={}}}})(g,v)),Yn(P,function(){return".".concat(P.styledComponentId)}),a&&Ur(P,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),P}function so(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var lo=function(e){return Object.assign(e,{isCss:!0})};function Z(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Qe(e)||lt(e))return lo(Xe(so(tn,nt([e],t,!0))));var r=e;return t.length===0&&r.length===1&&typeof r[0]=="string"?Xe(r):lo(Xe(so(r,t)))}function Qn(e,t,n){if(n===void 0&&(n=st),!t)throw Ie(1,t);var r=function(o){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];return e(t,n,Z.apply(void 0,nt([o],a,!1)))};return r.attrs=function(o){return Qn(e,t,ae(ae({},n),{attrs:Array.prototype.concat(n.attrs,o).filter(Boolean)}))},r.withConfig=function(o){return Qn(e,t,ae(ae({},n),o))},r}var co=function(e){return Qn(si,e)},M=co;zn.forEach(function(e){M[e]=co(e)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
68
+ Perhaps you're looking to import 'styled-components/native'?
69
+ Read more about this at https://www.styled-components.com/docs/basics#react-native`);var cn="__sc-".concat(Ue,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[cn]||(window[cn]=0),window[cn]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
70
+
71
+ See https://s-c.sh/2BAXzed for more info.`),window[cn]+=1);var ze;function ct(e,t){return e[t]}function li(e=[],t,n=0){return[...e.slice(0,n),t,...e.slice(n)]}function ci(e=[],t,n="id"){const r=e.slice(),o=ct(t,n);return o?r.splice(r.findIndex((a=>ct(a,n)===o)),1):r.splice(r.findIndex((a=>a===t)),1),r}function uo(e){return e.map(((t,n)=>{const r=Object.assign(Object.assign({},t),{sortable:t.sortable||!!t.sortFunction||void 0});return t.id||(r.id=n+1),r}))}function Tt(e,t){return Math.ceil(e/t)}function Jn(e,t){return Math.min(e,t)}(function(e){e.ASC="asc",e.DESC="desc"})(ze||(ze={}));const ee=()=>null;function po(e,t=[],n=[]){let r={},o=[...n];return t.length&&t.forEach((a=>{if(!a.when||typeof a.when!="function")throw new Error('"when" must be defined in the conditional style object and must be function');a.when(e)&&(r=a.style||{},a.classNames&&(o=[...o,...a.classNames]),typeof a.style=="function"&&(r=a.style(e)||{}))})),{conditionalStyle:r,classNames:o.join(" ")}}function un(e,t=[],n="id"){const r=ct(e,n);return r?t.some((o=>ct(o,n)===r)):t.some((o=>o===e))}function dn(e,t){return t?e.findIndex((n=>_t(n.id,t))):-1}function _t(e,t){return e==t}function ui(e,t){const n=!e.toggleOnSelectedRowsChange;switch(t.type){case"SELECT_ALL_ROWS":{const{keyField:r,rows:o,rowCount:a,mergeSelections:i}=t,l=!e.allSelected,c=!e.toggleOnSelectedRowsChange;if(i){const f=l?[...e.selectedRows,...o.filter((d=>!un(d,e.selectedRows,r)))]:e.selectedRows.filter((d=>!un(d,o,r)));return Object.assign(Object.assign({},e),{allSelected:l,selectedCount:f.length,selectedRows:f,toggleOnSelectedRowsChange:c})}return Object.assign(Object.assign({},e),{allSelected:l,selectedCount:l?a:0,selectedRows:l?o:[],toggleOnSelectedRowsChange:c})}case"SELECT_SINGLE_ROW":{const{keyField:r,row:o,isSelected:a,rowCount:i,singleSelect:l}=t;return l?a?Object.assign(Object.assign({},e),{selectedCount:0,allSelected:!1,selectedRows:[],toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:1,allSelected:!1,selectedRows:[o],toggleOnSelectedRowsChange:n}):a?Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length>0?e.selectedRows.length-1:0,allSelected:!1,selectedRows:ci(e.selectedRows,o,r),toggleOnSelectedRowsChange:n}):Object.assign(Object.assign({},e),{selectedCount:e.selectedRows.length+1,allSelected:e.selectedRows.length+1===i,selectedRows:li(e.selectedRows,o),toggleOnSelectedRowsChange:n})}case"SELECT_MULTIPLE_ROWS":{const{keyField:r,selectedRows:o,totalRows:a,mergeSelections:i}=t;if(i){const l=[...e.selectedRows,...o.filter((c=>!un(c,e.selectedRows,r)))];return Object.assign(Object.assign({},e),{selectedCount:l.length,allSelected:!1,selectedRows:l,toggleOnSelectedRowsChange:n})}return Object.assign(Object.assign({},e),{selectedCount:o.length,allSelected:o.length===a,selectedRows:o,toggleOnSelectedRowsChange:n})}case"CLEAR_SELECTED_ROWS":{const{selectedRowsFlag:r}=t;return Object.assign(Object.assign({},e),{allSelected:!1,selectedCount:0,selectedRows:[],selectedRowsFlag:r})}case"SORT_CHANGE":{const{sortDirection:r,selectedColumn:o,clearSelectedOnSort:a}=t;return Object.assign(Object.assign(Object.assign({},e),{selectedColumn:o,sortDirection:r,currentPage:1}),a&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_PAGE":{const{page:r,paginationServer:o,visibleOnly:a,persistSelectedOnPageChange:i}=t,l=o&&i,c=o&&!i||a;return Object.assign(Object.assign(Object.assign(Object.assign({},e),{currentPage:r}),l&&{allSelected:!1}),c&&{allSelected:!1,selectedCount:0,selectedRows:[],toggleOnSelectedRowsChange:n})}case"CHANGE_ROWS_PER_PAGE":{const{rowsPerPage:r,page:o}=t;return Object.assign(Object.assign({},e),{currentPage:o,rowsPerPage:r})}}}const di=Z`
72
+ pointer-events: none;
73
+ opacity: 0.4;
74
+ `,pi=M.div`
75
+ position: relative;
76
+ box-sizing: border-box;
77
+ display: flex;
78
+ flex-direction: column;
79
+ width: 100%;
80
+ height: 100%;
81
+ max-width: 100%;
82
+ ${({disabled:e})=>e&&di};
83
+ ${({theme:e})=>e.table.style};
84
+ `,fi=Z`
85
+ position: sticky;
86
+ position: -webkit-sticky; /* Safari */
87
+ top: 0;
88
+ z-index: 1;
89
+ `,gi=M.div`
90
+ display: flex;
91
+ width: 100%;
92
+ ${({$fixedHeader:e})=>e&&fi};
93
+ ${({theme:e})=>e.head.style};
94
+ `,hi=M.div`
95
+ display: flex;
96
+ align-items: stretch;
97
+ width: 100%;
98
+ ${({theme:e})=>e.headRow.style};
99
+ ${({$dense:e,theme:t})=>e&&t.headRow.denseStyle};
100
+ `,fo=(e,...t)=>Z`
101
+ @media screen and (max-width: ${599}px) {
102
+ ${Z(e,...t)}
103
+ }
104
+ `,mi=(e,...t)=>Z`
105
+ @media screen and (max-width: ${959}px) {
106
+ ${Z(e,...t)}
107
+ }
108
+ `,bi=(e,...t)=>Z`
109
+ @media screen and (max-width: ${1280}px) {
110
+ ${Z(e,...t)}
111
+ }
112
+ `,yi=e=>(t,...n)=>Z`
113
+ @media screen and (max-width: ${e}px) {
114
+ ${Z(t,...n)}
115
+ }
116
+ `,ut=M.div`
117
+ position: relative;
118
+ display: flex;
119
+ align-items: center;
120
+ box-sizing: border-box;
121
+ line-height: normal;
122
+ ${({theme:e,$headCell:t})=>e[t?"headCells":"cells"].style};
123
+ ${({$noPadding:e})=>e&&"padding: 0"};
124
+ `,go=M(ut)`
125
+ flex-grow: ${({button:e,grow:t})=>t===0||e?0:t||1};
126
+ flex-shrink: 0;
127
+ flex-basis: 0;
128
+ max-width: ${({maxWidth:e})=>e||"100%"};
129
+ min-width: ${({minWidth:e})=>e||"100px"};
130
+ ${({width:e})=>e&&Z`
131
+ min-width: ${e};
132
+ max-width: ${e};
133
+ `};
134
+ ${({right:e})=>e&&"justify-content: flex-end"};
135
+ ${({button:e,center:t})=>(t||e)&&"justify-content: center"};
136
+ ${({compact:e,button:t})=>(e||t)&&"padding: 0"};
137
+
138
+ /* handle hiding cells */
139
+ ${({hide:e})=>e&&e==="sm"&&fo`
140
+ display: none;
141
+ `};
142
+ ${({hide:e})=>e&&e==="md"&&mi`
143
+ display: none;
144
+ `};
145
+ ${({hide:e})=>e&&e==="lg"&&bi`
146
+ display: none;
147
+ `};
148
+ ${({hide:e})=>e&&Number.isInteger(e)&&yi(e)`
149
+ display: none;
150
+ `};
151
+ `,vi=Z`
152
+ div:first-child {
153
+ white-space: ${({$wrapCell:e})=>e?"normal":"nowrap"};
154
+ overflow: ${({$allowOverflow:e})=>e?"visible":"hidden"};
155
+ text-overflow: ellipsis;
156
+ }
157
+ `,wi=M(go).attrs((e=>({style:e.style})))`
158
+ ${({$renderAsCell:e})=>!e&&vi};
159
+ ${({theme:e,$isDragging:t})=>t&&e.cells.draggingStyle};
160
+ ${({$cellStyle:e})=>e};
161
+ `;var xi=u.memo((function({id:e,column:t,row:n,rowIndex:r,dataTag:o,isDragging:a,onDragStart:i,onDragOver:l,onDragEnd:c,onDragEnter:f,onDragLeave:d}){const{conditionalStyle:g,classNames:v}=po(n,t.conditionalCellStyles,["rdt_TableCell"]);return u.createElement(wi,{id:e,"data-column-id":t.id,role:"cell",className:v,"data-tag":o,$cellStyle:t.style,$renderAsCell:!!t.cell,$allowOverflow:t.allowOverflow,button:t.button,center:t.center,compact:t.compact,grow:t.grow,hide:t.hide,maxWidth:t.maxWidth,minWidth:t.minWidth,right:t.right,width:t.width,$wrapCell:t.wrap,style:g,$isDragging:a,onDragStart:i,onDragOver:l,onDragEnd:c,onDragEnter:f,onDragLeave:d},!t.cell&&u.createElement("div",{"data-tag":o},(function(y,R,S,O){return R?S&&typeof S=="function"?S(y,O):R(y,O):null})(n,t.selector,t.format,r)),t.cell&&t.cell(n,r,t,e))}));const ho="input";var mo=u.memo((function({name:e,component:t=ho,componentOptions:n={style:{}},indeterminate:r=!1,checked:o=!1,disabled:a=!1,onClick:i=ee}){const l=t,c=l!==ho?n.style:(d=>Object.assign(Object.assign({fontSize:"18px"},!d&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(a),f=u.useMemo((()=>(function(d,...g){let v;return Object.keys(d).map((y=>d[y])).forEach(((y,R)=>{typeof y=="function"&&(v=Object.assign(Object.assign({},d),{[Object.keys(d)[R]]:y(...g)}))})),v||d})(n,r)),[n,r]);return u.createElement(l,Object.assign({type:"checkbox",ref:d=>{d&&(d.indeterminate=r)},style:c,onClick:a?ee:i,name:e,"aria-label":e,checked:o,disabled:a},f,{onChange:ee}))}));const Ci=M(ut)`
162
+ flex: 0 0 48px;
163
+ min-width: 48px;
164
+ justify-content: center;
165
+ align-items: center;
166
+ user-select: none;
167
+ white-space: nowrap;
168
+ `;function Si({name:e,keyField:t,row:n,rowCount:r,selected:o,selectableRowsComponent:a,selectableRowsComponentProps:i,selectableRowsSingle:l,selectableRowDisabled:c,onSelectedRow:f}){const d=!(!c||!c(n));return u.createElement(Ci,{onClick:g=>g.stopPropagation(),className:"rdt_TableCell",$noPadding:!0},u.createElement(mo,{name:e,component:a,componentOptions:i,checked:o,"aria-checked":o,onClick:()=>{f({type:"SELECT_SINGLE_ROW",row:n,isSelected:o,keyField:t,rowCount:r,singleSelect:l})},disabled:d}))}const Ei=M.button`
169
+ display: inline-flex;
170
+ align-items: center;
171
+ user-select: none;
172
+ white-space: nowrap;
173
+ border: none;
174
+ background-color: transparent;
175
+ ${({theme:e})=>e.expanderButton.style};
176
+ `;function Ri({disabled:e=!1,expanded:t=!1,expandableIcon:n,id:r,row:o,onToggled:a}){const i=t?n.expanded:n.collapsed;return u.createElement(Ei,{"aria-disabled":e,onClick:()=>a&&a(o),"data-testid":`expander-button-${r}`,disabled:e,"aria-label":t?"Collapse Row":"Expand Row",role:"button",type:"button"},i)}const $i=M(ut)`
177
+ white-space: nowrap;
178
+ font-weight: 400;
179
+ min-width: 48px;
180
+ ${({theme:e})=>e.expanderCell.style};
181
+ `;function Oi({row:e,expanded:t=!1,expandableIcon:n,id:r,onToggled:o,disabled:a=!1}){return u.createElement($i,{onClick:i=>i.stopPropagation(),$noPadding:!0},u.createElement(Ri,{id:r,row:e,expanded:t,expandableIcon:n,disabled:a,onToggled:o}))}const Pi=M.div`
182
+ width: 100%;
183
+ box-sizing: border-box;
184
+ ${({theme:e})=>e.expanderRow.style};
185
+ ${({$extendedRowStyle:e})=>e};
186
+ `;var ji=u.memo((function({data:e,ExpanderComponent:t,expanderComponentProps:n,extendedRowStyle:r,extendedClassNames:o}){const a=["rdt_ExpanderRow",...o.split(" ").filter((i=>i!=="rdt_TableRow"))].join(" ");return u.createElement(Pi,{className:a,$extendedRowStyle:r},u.createElement(t,Object.assign({data:e},n)))}));const Xn="allowRowEvents";var pn,Zn,bo;(function(e){e.LTR="ltr",e.RTL="rtl",e.AUTO="auto"})(pn||(pn={})),(function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center"})(Zn||(Zn={})),(function(e){e.SM="sm",e.MD="md",e.LG="lg"})(bo||(bo={}));const ki=Z`
187
+ &:hover {
188
+ ${({$highlightOnHover:e,theme:t})=>e&&t.rows.highlightOnHoverStyle};
189
+ }
190
+ `,Ti=Z`
191
+ &:hover {
192
+ cursor: pointer;
193
+ }
194
+ `,_i=M.div.attrs((e=>({style:e.style})))`
195
+ display: flex;
196
+ align-items: stretch;
197
+ align-content: stretch;
198
+ width: 100%;
199
+ box-sizing: border-box;
200
+ ${({theme:e})=>e.rows.style};
201
+ ${({$dense:e,theme:t})=>e&&t.rows.denseStyle};
202
+ ${({$striped:e,theme:t})=>e&&t.rows.stripedStyle};
203
+ ${({$highlightOnHover:e})=>e&&ki};
204
+ ${({$pointerOnHover:e})=>e&&Ti};
205
+ ${({$selected:e,theme:t})=>e&&t.rows.selectedHighlightStyle};
206
+ ${({$conditionalStyle:e})=>e};
207
+ `;function Di({columns:e=[],conditionalRowStyles:t=[],defaultExpanded:n=!1,defaultExpanderDisabled:r=!1,dense:o=!1,expandableIcon:a,expandableRows:i=!1,expandableRowsComponent:l,expandableRowsComponentProps:c,expandableRowsHideExpander:f,expandOnRowClicked:d=!1,expandOnRowDoubleClicked:g=!1,highlightOnHover:v=!1,id:y,expandableInheritConditionalStyles:R,keyField:S,onRowClicked:O=ee,onRowDoubleClicked:j=ee,onRowMouseEnter:E=ee,onRowMouseLeave:P=ee,onRowExpandToggled:k=ee,onSelectedRow:D=ee,pointerOnHover:x=!1,row:w,rowCount:N,rowIndex:J,selectableRowDisabled:re=null,selectableRows:ge=!1,selectableRowsComponent:me,selectableRowsComponentProps:H,selectableRowsHighlight:ie=!1,selectableRowsSingle:be=!1,selected:Oe,striped:ye=!1,draggingColumnId:Ne,onDragStart:se,onDragOver:xe,onDragEnd:Ce,onDragEnter:G,onDragLeave:Pe}){const[ce,je]=u.useState(n);u.useEffect((()=>{je(n)}),[n]);const oe=u.useCallback((()=>{je(!ce),k(!ce,w)}),[ce,k,w]),Se=x||i&&(d||g),ue=u.useCallback((U=>{U.target.getAttribute("data-tag")===Xn&&(O(w,U),!r&&i&&d&&oe())}),[r,d,i,oe,O,w]),le=u.useCallback((U=>{U.target.getAttribute("data-tag")===Xn&&(j(w,U),!r&&i&&g&&oe())}),[r,g,i,oe,j,w]),Ee=u.useCallback((U=>{E(w,U)}),[E,w]),de=u.useCallback((U=>{P(w,U)}),[P,w]),te=ct(w,S),{conditionalStyle:bt,classNames:yt}=po(w,t,["rdt_TableRow"]),We=ie&&Oe,Fe=R?bt:{},vt=ye&&J%2==0;return u.createElement(u.Fragment,null,u.createElement(_i,{id:`row-${y}`,role:"row",$striped:vt,$highlightOnHover:v,$pointerOnHover:!r&&Se,$dense:o,onClick:ue,onDoubleClick:le,onMouseEnter:Ee,onMouseLeave:de,className:yt,$selected:We,$conditionalStyle:bt},ge&&u.createElement(Si,{name:`select-row-${te}`,keyField:S,row:w,rowCount:N,selected:Oe,selectableRowsComponent:me,selectableRowsComponentProps:H,selectableRowDisabled:re,selectableRowsSingle:be,onSelectedRow:D}),i&&!f&&u.createElement(Oi,{id:te,expandableIcon:a,expanded:ce,row:w,onToggled:oe,disabled:r}),e.map((U=>U.omit?null:u.createElement(xi,{id:`cell-${U.id}-${te}`,key:`cell-${U.id}-${te}`,dataTag:U.ignoreRowClick||U.button?null:Xn,column:U,row:w,rowIndex:J,isDragging:_t(Ne,U.id),onDragStart:se,onDragOver:xe,onDragEnd:Ce,onDragEnter:G,onDragLeave:Pe})))),i&&ce&&u.createElement(ji,{key:`expander-${te}`,data:w,extendedRowStyle:Fe,extendedClassNames:yt,ExpanderComponent:l,expanderComponentProps:c}))}const Ai=M.span`
208
+ padding: 2px;
209
+ color: inherit;
210
+ flex-grow: 0;
211
+ flex-shrink: 0;
212
+ ${({$sortActive:e})=>e?"opacity: 1":"opacity: 0"};
213
+ ${({$sortDirection:e})=>e==="desc"&&"transform: rotate(180deg)"};
214
+ `,Ii=({sortActive:e,sortDirection:t})=>h.createElement(Ai,{$sortActive:e,$sortDirection:t},"▲"),Ni=M(go)`
215
+ ${({button:e})=>e&&"text-align: center"};
216
+ ${({theme:e,$isDragging:t})=>t&&e.headCells.draggingStyle};
217
+ `,Fi=Z`
218
+ cursor: pointer;
219
+ span.__rdt_custom_sort_icon__ {
220
+ i,
221
+ svg {
222
+ transform: 'translate3d(0, 0, 0)';
223
+ ${({$sortActive:e})=>e?"opacity: 1":"opacity: 0"};
224
+ color: inherit;
225
+ font-size: 18px;
226
+ height: 18px;
227
+ width: 18px;
228
+ backface-visibility: hidden;
229
+ transform-style: preserve-3d;
230
+ transition-duration: 95ms;
231
+ transition-property: transform;
232
+ }
233
+
234
+ &.asc i,
235
+ &.asc svg {
236
+ transform: rotate(180deg);
237
+ }
238
+ }
239
+
240
+ ${({$sortActive:e})=>!e&&Z`
241
+ &:hover,
242
+ &:focus {
243
+ opacity: 0.7;
244
+
245
+ span,
246
+ span.__rdt_custom_sort_icon__ * {
247
+ opacity: 0.7;
248
+ }
249
+ }
250
+ `};
251
+ `,Mi=M.div`
252
+ display: inline-flex;
253
+ align-items: center;
254
+ justify-content: inherit;
255
+ height: 100%;
256
+ width: 100%;
257
+ outline: none;
258
+ user-select: none;
259
+ overflow: hidden;
260
+ ${({disabled:e})=>!e&&Fi};
261
+ `,Li=M.div`
262
+ overflow: hidden;
263
+ white-space: nowrap;
264
+ text-overflow: ellipsis;
265
+ `;var Hi=u.memo((function({column:e,disabled:t,draggingColumnId:n,selectedColumn:r={},sortDirection:o,sortIcon:a,sortServer:i,pagination:l,paginationServer:c,persistSelectedOnSort:f,selectableRowsVisibleOnly:d,onSort:g,onDragStart:v,onDragOver:y,onDragEnd:R,onDragEnter:S,onDragLeave:O}){u.useEffect((()=>{typeof e.selector=="string"&&console.error(`Warning: ${e.selector} is a string based column selector which has been deprecated as of v7 and will be removed in v8. Instead, use a selector function e.g. row => row[field]...`)}),[]);const[j,E]=u.useState(!1),P=u.useRef(null);if(u.useEffect((()=>{P.current&&E(P.current.scrollWidth>P.current.clientWidth)}),[j]),e.omit)return null;const k=()=>{if(!e.sortable&&!e.selector)return;let H=o;_t(r.id,e.id)&&(H=o===ze.ASC?ze.DESC:ze.ASC),g({type:"SORT_CHANGE",sortDirection:H,selectedColumn:e,clearSelectedOnSort:l&&c&&!f||i||d})},D=H=>u.createElement(Ii,{sortActive:H,sortDirection:o}),x=()=>u.createElement("span",{className:[o,"__rdt_custom_sort_icon__"].join(" ")},a),w=!(!e.sortable||!_t(r.id,e.id)),N=!e.sortable||t,J=e.sortable&&!a&&!e.right,re=e.sortable&&!a&&e.right,ge=e.sortable&&a&&!e.right,me=e.sortable&&a&&e.right;return u.createElement(Ni,{"data-column-id":e.id,className:"rdt_TableCol",$headCell:!0,allowOverflow:e.allowOverflow,button:e.button,compact:e.compact,grow:e.grow,hide:e.hide,maxWidth:e.maxWidth,minWidth:e.minWidth,right:e.right,center:e.center,width:e.width,draggable:e.reorder,$isDragging:_t(e.id,n),onDragStart:v,onDragOver:y,onDragEnd:R,onDragEnter:S,onDragLeave:O},e.name&&u.createElement(Mi,{"data-column-id":e.id,"data-sort-id":e.id,role:"columnheader",tabIndex:0,className:"rdt_TableCol_Sortable",onClick:N?void 0:k,onKeyPress:N?void 0:H=>{H.key==="Enter"&&k()},$sortActive:!N&&w,disabled:N},!N&&me&&x(),!N&&re&&D(w),typeof e.name=="string"?u.createElement(Li,{title:j?e.name:void 0,ref:P,"data-column-id":e.id},e.name):e.name,!N&&ge&&x(),!N&&J&&D(w)))}));const zi=M(ut)`
266
+ flex: 0 0 48px;
267
+ justify-content: center;
268
+ align-items: center;
269
+ user-select: none;
270
+ white-space: nowrap;
271
+ font-size: unset;
272
+ `;function Wi({headCell:e=!0,rowData:t,keyField:n,allSelected:r,mergeSelections:o,selectedRows:a,selectableRowsComponent:i,selectableRowsComponentProps:l,selectableRowDisabled:c,onSelectAllRows:f}){const d=a.length>0&&!r,g=c?t.filter((R=>!c(R))):t,v=g.length===0,y=Math.min(t.length,g.length);return u.createElement(zi,{className:"rdt_TableCol",$headCell:e,$noPadding:!0},u.createElement(mo,{name:"select-all-rows",component:i,componentOptions:l,onClick:()=>{f({type:"SELECT_ALL_ROWS",rows:g,rowCount:y,mergeSelections:o,keyField:n})},checked:r,indeterminate:d,disabled:v}))}function yo(e=pn.AUTO){const t=typeof window=="object",[n,r]=u.useState(!1);return u.useEffect((()=>{if(t)if(e!=="auto")r(e==="rtl");else{const o=!(!window.document||!window.document.createElement),a=document.getElementsByTagName("BODY")[0],i=document.getElementsByTagName("HTML")[0],l=a.dir==="rtl"||i.dir==="rtl";r(o&&l)}}),[e,t]),n}const qi=M.div`
273
+ display: flex;
274
+ align-items: center;
275
+ flex: 1 0 auto;
276
+ height: 100%;
277
+ color: ${({theme:e})=>e.contextMenu.fontColor};
278
+ font-size: ${({theme:e})=>e.contextMenu.fontSize};
279
+ font-weight: 400;
280
+ `,Vi=M.div`
281
+ display: flex;
282
+ align-items: center;
283
+ justify-content: flex-end;
284
+ flex-wrap: wrap;
285
+ `,vo=M.div`
286
+ position: absolute;
287
+ top: 0;
288
+ left: 0;
289
+ width: 100%;
290
+ height: 100%;
291
+ box-sizing: inherit;
292
+ z-index: 1;
293
+ align-items: center;
294
+ justify-content: space-between;
295
+ display: flex;
296
+ ${({$rtl:e})=>e&&"direction: rtl"};
297
+ ${({theme:e})=>e.contextMenu.style};
298
+ ${({theme:e,$visible:t})=>t&&e.contextMenu.activeStyle};
299
+ `;function Bi({contextMessage:e,contextActions:t,contextComponent:n,selectedCount:r,direction:o}){const a=yo(o),i=r>0;return n?u.createElement(vo,{$visible:i},u.cloneElement(n,{selectedCount:r})):u.createElement(vo,{$visible:i,$rtl:a},u.createElement(qi,null,((l,c,f)=>{if(c===0)return null;const d=c===1?l.singular:l.plural;return f?`${c} ${l.message||""} ${d}`:`${c} ${d} ${l.message||""}`})(e,r,a)),u.createElement(Vi,null,t))}const Gi=M.div`
300
+ position: relative;
301
+ box-sizing: border-box;
302
+ overflow: hidden;
303
+ display: flex;
304
+ flex: 1 1 auto;
305
+ align-items: center;
306
+ justify-content: space-between;
307
+ width: 100%;
308
+ flex-wrap: wrap;
309
+ ${({theme:e})=>e.header.style}
310
+ `,Yi=M.div`
311
+ flex: 1 0 auto;
312
+ color: ${({theme:e})=>e.header.fontColor};
313
+ font-size: ${({theme:e})=>e.header.fontSize};
314
+ font-weight: 400;
315
+ `,Ui=M.div`
316
+ flex: 1 0 auto;
317
+ display: flex;
318
+ align-items: center;
319
+ justify-content: flex-end;
320
+
321
+ > * {
322
+ margin-left: 5px;
323
+ }
324
+ `,Ki=({title:e,actions:t=null,contextMessage:n,contextActions:r,contextComponent:o,selectedCount:a,direction:i,showMenu:l=!0})=>u.createElement(Gi,{className:"rdt_TableHeader",role:"heading","aria-level":1},u.createElement(Yi,null,e),t&&u.createElement(Ui,null,t),l&&u.createElement(Bi,{contextMessage:n,contextActions:r,contextComponent:o,direction:i,selectedCount:a}));function wo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}typeof SuppressedError=="function"&&SuppressedError;const Qi={left:"flex-start",right:"flex-end",center:"center"},Ji=M.header`
325
+ position: relative;
326
+ display: flex;
327
+ flex: 1 1 auto;
328
+ box-sizing: border-box;
329
+ align-items: center;
330
+ padding: 4px 16px 4px 24px;
331
+ width: 100%;
332
+ justify-content: ${({align:e})=>Qi[e]};
333
+ flex-wrap: ${({$wrapContent:e})=>e?"wrap":"nowrap"};
334
+ ${({theme:e})=>e.subHeader.style}
335
+ `,Xi=e=>{var{align:t="right",wrapContent:n=!0}=e,r=wo(e,["align","wrapContent"]);return u.createElement(Ji,Object.assign({align:t,$wrapContent:n},r))},Zi=M.div`
336
+ display: flex;
337
+ flex-direction: column;
338
+ `,es=M.div`
339
+ position: relative;
340
+ width: 100%;
341
+ border-radius: inherit;
342
+ ${({$responsive:e,$fixedHeader:t})=>e&&Z`
343
+ overflow-x: auto;
344
+
345
+ // hidden prevents vertical scrolling in firefox when fixedHeader is disabled
346
+ overflow-y: ${t?"auto":"hidden"};
347
+ min-height: 0;
348
+ `};
349
+
350
+ ${({$fixedHeader:e=!1,$fixedHeaderScrollHeight:t="100vh"})=>e&&Z`
351
+ max-height: ${t};
352
+ -webkit-overflow-scrolling: touch;
353
+ `};
354
+
355
+ ${({theme:e})=>e.responsiveWrapper.style};
356
+ `,xo=M.div`
357
+ position: relative;
358
+ box-sizing: border-box;
359
+ width: 100%;
360
+ height: 100%;
361
+ ${e=>e.theme.progress.style};
362
+ `,ts=M.div`
363
+ position: relative;
364
+ width: 100%;
365
+ ${({theme:e})=>e.tableWrapper.style};
366
+ `,ns=M(ut)`
367
+ white-space: nowrap;
368
+ ${({theme:e})=>e.expanderCell.style};
369
+ `,rs=M.div`
370
+ box-sizing: border-box;
371
+ width: 100%;
372
+ height: 100%;
373
+ ${({theme:e})=>e.noData.style};
374
+ `,os=()=>h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},h.createElement("path",{d:"M7 10l5 5 5-5z"}),h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),as=M.select`
375
+ cursor: pointer;
376
+ height: 24px;
377
+ max-width: 100%;
378
+ user-select: none;
379
+ padding-left: 8px;
380
+ padding-right: 24px;
381
+ box-sizing: content-box;
382
+ font-size: inherit;
383
+ color: inherit;
384
+ border: none;
385
+ background-color: transparent;
386
+ appearance: none;
387
+ direction: ltr;
388
+ flex-shrink: 0;
389
+
390
+ &::-ms-expand {
391
+ display: none;
392
+ }
393
+
394
+ &:disabled::-ms-expand {
395
+ background: #f60;
396
+ }
397
+
398
+ option {
399
+ color: initial;
400
+ }
401
+ `,is=M.div`
402
+ position: relative;
403
+ flex-shrink: 0;
404
+ font-size: inherit;
405
+ color: inherit;
406
+ margin-top: 1px;
407
+
408
+ svg {
409
+ top: 0;
410
+ right: 0;
411
+ color: inherit;
412
+ position: absolute;
413
+ fill: currentColor;
414
+ width: 24px;
415
+ height: 24px;
416
+ display: inline-block;
417
+ user-select: none;
418
+ pointer-events: none;
419
+ }
420
+ `,ss=e=>{var{defaultValue:t,onChange:n}=e,r=wo(e,["defaultValue","onChange"]);return u.createElement(is,null,u.createElement(as,Object.assign({onChange:n,defaultValue:t},r)),u.createElement(os,null))},b={columns:[],data:[],title:"",keyField:"id",selectableRows:!1,selectableRowsHighlight:!1,selectableRowsNoSelectAll:!1,selectableRowSelected:null,selectableRowDisabled:null,selectableRowsComponent:"input",selectableRowsComponentProps:{},selectableRowsVisibleOnly:!1,selectableRowsSingle:!1,clearSelectedRows:!1,expandableRows:!1,expandableRowDisabled:null,expandableRowExpanded:null,expandOnRowClicked:!1,expandableRowsHideExpander:!1,expandOnRowDoubleClicked:!1,expandableInheritConditionalStyles:!1,expandableRowsComponent:function(){return h.createElement("div",null,"To add an expander pass in a component instance via ",h.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:h.createElement((()=>h.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),h.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"}))),null),expanded:h.createElement((()=>h.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},h.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),h.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:h.createElement("div",{style:{fontSize:"24px",fontWeight:700,padding:"24px"}},"Loading..."),persistTableHead:!1,sortIcon:null,sortFunction:null,sortServer:!1,striped:!1,highlightOnHover:!1,pointerOnHover:!1,noContextMenu:!1,contextMessage:{singular:"item",plural:"items",message:"selected"},actions:null,contextActions:null,contextComponent:null,defaultSortFieldId:null,defaultSortAsc:!0,responsive:!0,noDataComponent:h.createElement("div",{style:{padding:"24px"}},"There are no records to display"),disabled:!1,noTableHead:!1,noHeader:!1,subHeader:!1,subHeaderAlign:Zn.RIGHT,subHeaderWrap:!0,subHeaderComponent:null,fixedHeader:!1,fixedHeaderScrollHeight:"100vh",pagination:!1,paginationServer:!1,paginationServerOptions:{persistSelectedOnSort:!1,persistSelectedOnPageChange:!1},paginationDefaultPage:1,paginationResetDefaultPage:!1,paginationTotalRows:0,paginationPerPage:10,paginationRowsPerPageOptions:[10,15,20,25,30],paginationComponent:null,paginationComponentOptions:{},paginationIconFirstPage:h.createElement((()=>h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},h.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),h.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"}))),null),paginationIconLastPage:h.createElement((()=>h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},h.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))),null),paginationIconNext:h.createElement((()=>h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},h.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),paginationIconPrevious:h.createElement((()=>h.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},h.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),h.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:pn.AUTO,onChangePage:ee,onChangeRowsPerPage:ee,onRowClicked:ee,onRowDoubleClicked:ee,onRowMouseEnter:ee,onRowMouseLeave:ee,onRowExpandToggled:ee,onSelectedRowsChange:ee,onSort:ee,onColumnOrderChange:ee},ls={rowsPerPageText:"Rows per page:",rangeSeparatorText:"of",noRowsPerPage:!1,selectAllRowsItem:!1,selectAllRowsItemText:"All"},cs=M.nav`
421
+ display: flex;
422
+ flex: 1 1 auto;
423
+ justify-content: flex-end;
424
+ align-items: center;
425
+ box-sizing: border-box;
426
+ padding-right: 8px;
427
+ padding-left: 8px;
428
+ width: 100%;
429
+ ${({theme:e})=>e.pagination.style};
430
+ `,fn=M.button`
431
+ position: relative;
432
+ display: block;
433
+ user-select: none;
434
+ border: none;
435
+ ${({theme:e})=>e.pagination.pageButtonsStyle};
436
+ ${({$isRTL:e})=>e&&"transform: scale(-1, -1)"};
437
+ `,us=M.div`
438
+ display: flex;
439
+ align-items: center;
440
+ border-radius: 4px;
441
+ white-space: nowrap;
442
+ ${fo`
443
+ width: 100%;
444
+ justify-content: space-around;
445
+ `};
446
+ `,Co=M.span`
447
+ flex-shrink: 1;
448
+ user-select: none;
449
+ `,ds=M(Co)`
450
+ margin: 0 24px;
451
+ `,ps=M(Co)`
452
+ margin: 0 4px;
453
+ `;var fs=u.memo((function({rowsPerPage:e,rowCount:t,currentPage:n,direction:r=b.direction,paginationRowsPerPageOptions:o=b.paginationRowsPerPageOptions,paginationIconLastPage:a=b.paginationIconLastPage,paginationIconFirstPage:i=b.paginationIconFirstPage,paginationIconNext:l=b.paginationIconNext,paginationIconPrevious:c=b.paginationIconPrevious,paginationComponentOptions:f=b.paginationComponentOptions,onChangeRowsPerPage:d=b.onChangeRowsPerPage,onChangePage:g=b.onChangePage}){const v=(()=>{const H=typeof window=="object";function ie(){return{width:H?window.innerWidth:void 0,height:H?window.innerHeight:void 0}}const[be,Oe]=u.useState(ie);return u.useEffect((()=>{if(!H)return()=>null;function ye(){Oe(ie())}return window.addEventListener("resize",ye),()=>window.removeEventListener("resize",ye)}),[]),be})(),y=yo(r),R=v.width&&v.width>599,S=Tt(t,e),O=n*e,j=O-e+1,E=n===1,P=n===S,k=Object.assign(Object.assign({},ls),f),D=n===S?`${j}-${t} ${k.rangeSeparatorText} ${t}`:`${j}-${O} ${k.rangeSeparatorText} ${t}`,x=u.useCallback((()=>g(n-1)),[n,g]),w=u.useCallback((()=>g(n+1)),[n,g]),N=u.useCallback((()=>g(1)),[g]),J=u.useCallback((()=>g(Tt(t,e))),[g,t,e]),re=u.useCallback((H=>d(Number(H.target.value),n)),[n,d]),ge=o.map((H=>u.createElement("option",{key:H,value:H},H)));k.selectAllRowsItem&&ge.push(u.createElement("option",{key:-1,value:t},k.selectAllRowsItemText));const me=u.createElement(ss,{onChange:re,defaultValue:e,"aria-label":k.rowsPerPageText},ge);return u.createElement(cs,{className:"rdt_Pagination"},!k.noRowsPerPage&&R&&u.createElement(u.Fragment,null,u.createElement(ps,null,k.rowsPerPageText),me),R&&u.createElement(ds,null,D),u.createElement(us,null,u.createElement(fn,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":E,onClick:N,disabled:E,$isRTL:y},i),u.createElement(fn,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":E,onClick:x,disabled:E,$isRTL:y},c),!k.noRowsPerPage&&!R&&me,u.createElement(fn,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":P,onClick:w,disabled:P,$isRTL:y},l),u.createElement(fn,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":P,onClick:J,disabled:P,$isRTL:y},a)))}));const Ze=(e,t)=>{const n=u.useRef(!0);u.useEffect((()=>{n.current?n.current=!1:e()}),t)};function gs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hs=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===ms})(t)})(e)},ms=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Dt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?dt((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function bs(e,t,n){return e.concat(t).map((function(r){return Dt(r,n)}))}function So(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function Eo(e,t){try{return t in e}catch{return!1}}function ys(e,t,n){var r={};return n.isMergeableObject(e)&&So(e).forEach((function(o){r[o]=Dt(e[o],n)})),So(t).forEach((function(o){(function(a,i){return Eo(a,i)&&!(Object.hasOwnProperty.call(a,i)&&Object.propertyIsEnumerable.call(a,i))})(e,o)||(Eo(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,i){if(!i.customMerge)return dt;var l=i.customMerge(a);return typeof l=="function"?l:dt})(o,n)(e[o],t[o],n):r[o]=Dt(t[o],n))})),r}function dt(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||bs,n.isMergeableObject=n.isMergeableObject||hs,n.cloneUnlessOtherwiseSpecified=Dt;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):ys(e,t,n):Dt(t,n)}dt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return dt(n,r,t)}),{})};var vs=gs(dt);const Ro={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},$o={default:Ro,light:Ro,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function ws(e,t,n,r){const[o,a]=u.useState((()=>uo(e))),[i,l]=u.useState(""),c=u.useRef("");Ze((()=>{a(uo(e))}),[e]);const f=u.useCallback((O=>{var j,E,P;const{attributes:k}=O.target,D=(j=k.getNamedItem("data-column-id"))===null||j===void 0?void 0:j.value;D&&(c.current=((P=(E=o[dn(o,D)])===null||E===void 0?void 0:E.id)===null||P===void 0?void 0:P.toString())||"",l(c.current))}),[o]),d=u.useCallback((O=>{var j;const{attributes:E}=O.target,P=(j=E.getNamedItem("data-column-id"))===null||j===void 0?void 0:j.value;if(P&&c.current&&P!==c.current){const k=dn(o,c.current),D=dn(o,P),x=[...o];x[k]=o[D],x[D]=o[k],a(x),t(x)}}),[t,o]),g=u.useCallback((O=>{O.preventDefault()}),[]),v=u.useCallback((O=>{O.preventDefault()}),[]),y=u.useCallback((O=>{O.preventDefault(),c.current="",l("")}),[]),R=(function(O=!1){return O?ze.ASC:ze.DESC})(r),S=u.useMemo((()=>o[dn(o,n?.toString())]||{}),[n,o]);return{tableColumns:o,draggingColumnId:i,handleDragStart:f,handleDragEnter:d,handleDragOver:g,handleDragLeave:v,handleDragEnd:y,defaultSortDirection:R,defaultSortColumn:S}}var Oo=u.memo((function(e){const{data:t=b.data,columns:n=b.columns,title:r=b.title,actions:o=b.actions,keyField:a=b.keyField,striped:i=b.striped,highlightOnHover:l=b.highlightOnHover,pointerOnHover:c=b.pointerOnHover,dense:f=b.dense,selectableRows:d=b.selectableRows,selectableRowsSingle:g=b.selectableRowsSingle,selectableRowsHighlight:v=b.selectableRowsHighlight,selectableRowsNoSelectAll:y=b.selectableRowsNoSelectAll,selectableRowsVisibleOnly:R=b.selectableRowsVisibleOnly,selectableRowSelected:S=b.selectableRowSelected,selectableRowDisabled:O=b.selectableRowDisabled,selectableRowsComponent:j=b.selectableRowsComponent,selectableRowsComponentProps:E=b.selectableRowsComponentProps,onRowExpandToggled:P=b.onRowExpandToggled,onSelectedRowsChange:k=b.onSelectedRowsChange,expandableIcon:D=b.expandableIcon,onChangeRowsPerPage:x=b.onChangeRowsPerPage,onChangePage:w=b.onChangePage,paginationServer:N=b.paginationServer,paginationServerOptions:J=b.paginationServerOptions,paginationTotalRows:re=b.paginationTotalRows,paginationDefaultPage:ge=b.paginationDefaultPage,paginationResetDefaultPage:me=b.paginationResetDefaultPage,paginationPerPage:H=b.paginationPerPage,paginationRowsPerPageOptions:ie=b.paginationRowsPerPageOptions,paginationIconLastPage:be=b.paginationIconLastPage,paginationIconFirstPage:Oe=b.paginationIconFirstPage,paginationIconNext:ye=b.paginationIconNext,paginationIconPrevious:Ne=b.paginationIconPrevious,paginationComponent:se=b.paginationComponent,paginationComponentOptions:xe=b.paginationComponentOptions,responsive:Ce=b.responsive,progressPending:G=b.progressPending,progressComponent:Pe=b.progressComponent,persistTableHead:ce=b.persistTableHead,noDataComponent:je=b.noDataComponent,disabled:oe=b.disabled,noTableHead:Se=b.noTableHead,noHeader:ue=b.noHeader,fixedHeader:le=b.fixedHeader,fixedHeaderScrollHeight:Ee=b.fixedHeaderScrollHeight,pagination:de=b.pagination,subHeader:te=b.subHeader,subHeaderAlign:bt=b.subHeaderAlign,subHeaderWrap:yt=b.subHeaderWrap,subHeaderComponent:We=b.subHeaderComponent,noContextMenu:Fe=b.noContextMenu,contextMessage:vt=b.contextMessage,contextActions:U=b.contextActions,contextComponent:wt=b.contextComponent,expandableRows:xt=b.expandableRows,onRowClicked:vn=b.onRowClicked,onRowDoubleClicked:Ct=b.onRowDoubleClicked,onRowMouseEnter:wn=b.onRowMouseEnter,onRowMouseLeave:xn=b.onRowMouseLeave,sortIcon:Cn=b.sortIcon,onSort:Sn=b.onSort,sortFunction:Nt=b.sortFunction,sortServer:Ft=b.sortServer,expandableRowsComponent:En=b.expandableRowsComponent,expandableRowsComponentProps:Rn=b.expandableRowsComponentProps,expandableRowDisabled:$n=b.expandableRowDisabled,expandableRowsHideExpander:On=b.expandableRowsHideExpander,expandOnRowClicked:dr=b.expandOnRowClicked,expandOnRowDoubleClicked:pr=b.expandOnRowDoubleClicked,expandableRowExpanded:Pn=b.expandableRowExpanded,expandableInheritConditionalStyles:fr=b.expandableInheritConditionalStyles,defaultSortFieldId:gr=b.defaultSortFieldId,defaultSortAsc:Mt=b.defaultSortAsc,clearSelectedRows:Lt=b.clearSelectedRows,conditionalRowStyles:qe=b.conditionalRowStyles,theme:St=b.theme,customStyles:Et=b.customStyles,direction:Ve=b.direction,onColumnOrderChange:hr=b.onColumnOrderChange,className:jn}=e,{tableColumns:kn,draggingColumnId:Ht,handleDragStart:zt,handleDragEnter:Tn,handleDragOver:_n,handleDragLeave:Wt,handleDragEnd:qt,defaultSortDirection:mr,defaultSortColumn:br}=ws(n,hr,gr,Mt),[{rowsPerPage:_e,currentPage:ve,selectedRows:s,allSelected:m,selectedCount:C,selectedColumn:$,sortDirection:L,toggleOnSelectedRowsChange:V},A]=u.useReducer(ui,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:br,toggleOnSelectedRowsChange:!1,sortDirection:mr,currentPage:ge,rowsPerPage:H,selectedRowsFlag:!1,contextMessage:b.contextMessage}),{persistSelectedOnSort:F=!1,persistSelectedOnPageChange:X=!1}=J,Y=!(!N||!X&&!F),K=de&&!G&&t.length>0,he=se||fs,Be=u.useMemo((()=>((T={},W="default",pe="default")=>{const ke=$o[W]?W:pe;return vs({table:{style:{color:(_=$o[ke]).text.primary,backgroundColor:_.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:_.text.primary,backgroundColor:_.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:_.background.default,minHeight:"52px"}},head:{style:{color:_.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:_.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:_.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:_.context.background,fontSize:"18px",fontWeight:400,color:_.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:_.text.primary,backgroundColor:_.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:_.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:_.selected.text,backgroundColor:_.selected.default,borderBottomColor:_.background.default}},highlightOnHoverStyle:{color:_.highlightOnHover.text,backgroundColor:_.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:_.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:_.background.default},stripedStyle:{color:_.striped.text,backgroundColor:_.striped.default}},expanderRow:{style:{color:_.text.primary,backgroundColor:_.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:_.button.default,fill:_.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:_.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:_.button.hover},"&:focus":{outline:"none",backgroundColor:_.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:_.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:_.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:_.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:_.button.default,fill:_.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:_.button.disabled,fill:_.button.disabled},"&:hover:not(:disabled)":{backgroundColor:_.button.hover},"&:focus":{outline:"none",backgroundColor:_.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:_.text.primary,backgroundColor:_.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:_.text.primary,backgroundColor:_.background.default}}},T);var _})(Et,St)),[Et,St]),Me=u.useMemo((()=>Object.assign({},Ve!=="auto"&&{dir:Ve})),[Ve]),z=u.useMemo((()=>{if(Ft)return t;if($?.sortFunction&&typeof $.sortFunction=="function"){const T=$.sortFunction,W=L===ze.ASC?T:(pe,ke)=>-1*T(pe,ke);return[...t].sort(W)}return(function(T,W,pe,ke){return W?ke&&typeof ke=="function"?ke(T.slice(0),W,pe):T.slice(0).sort(((_,wr)=>{const $t=W(_),Ge=W(wr);if(pe==="asc"){if($t<Ge)return-1;if($t>Ge)return 1}if(pe==="desc"){if($t>Ge)return-1;if($t<Ge)return 1}return 0})):T})(t,$?.selector,L,Nt)}),[Ft,$,L,t,Nt]),Le=u.useMemo((()=>{if(de&&!N){const T=ve*_e,W=T-_e;return z.slice(W,T)}return z}),[ve,de,N,_e,z]),yr=u.useCallback((T=>{A(T)}),[]),vr=u.useCallback((T=>{A(T)}),[]),jl=u.useCallback((T=>{A(T)}),[]),kl=u.useCallback(((T,W)=>vn(T,W)),[vn]),Tl=u.useCallback(((T,W)=>Ct(T,W)),[Ct]),_l=u.useCallback(((T,W)=>wn(T,W)),[wn]),Dl=u.useCallback(((T,W)=>xn(T,W)),[xn]),Rt=u.useCallback((T=>A({type:"CHANGE_PAGE",page:T,paginationServer:N,visibleOnly:R,persistSelectedOnPageChange:X})),[N,X,R]),Al=u.useCallback((T=>{const W=Tt(re||Le.length,T),pe=Jn(ve,W);N||Rt(pe),A({type:"CHANGE_ROWS_PER_PAGE",page:pe,rowsPerPage:T})}),[ve,Rt,N,re,Le.length]);if(de&&!N&&z.length>0&&Le.length===0){const T=Tt(z.length,_e),W=Jn(ve,T);Rt(W)}Ze((()=>{k({allSelected:m,selectedCount:C,selectedRows:s.slice(0)})}),[V]),Ze((()=>{Sn($,L,z.slice(0))}),[$,L]),Ze((()=>{w(ve,re||z.length)}),[ve]),Ze((()=>{x(_e,ve)}),[_e]),Ze((()=>{Rt(ge)}),[ge,me]),Ze((()=>{if(de&&N&&re>0){const T=Tt(re,_e),W=Jn(ve,T);ve!==W&&Rt(W)}}),[re]),u.useEffect((()=>{A({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:Lt})}),[g,Lt]),u.useEffect((()=>{if(!S)return;const T=z.filter((pe=>S(pe))),W=g?T.slice(0,1):T;A({type:"SELECT_MULTIPLE_ROWS",keyField:a,selectedRows:W,totalRows:z.length,mergeSelections:Y})}),[t,S]);const Il=R?Le:z,Nl=X||g||y;return u.createElement(ii,{theme:Be},!ue&&(!!r||!!o)&&u.createElement(Ki,{title:r,actions:o,showMenu:!Fe,selectedCount:C,direction:Ve,contextActions:U,contextComponent:wt,contextMessage:vt}),te&&u.createElement(Xi,{align:bt,wrapContent:yt},We),u.createElement(es,Object.assign({$responsive:Ce,$fixedHeader:le,$fixedHeaderScrollHeight:Ee,className:jn},Me),u.createElement(ts,null,G&&!ce&&u.createElement(xo,null,Pe),u.createElement(pi,{disabled:oe,className:"rdt_Table",role:"table"},!Se&&(!!ce||z.length>0&&!G)&&u.createElement(gi,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:le},u.createElement(hi,{className:"rdt_TableHeadRow",role:"row",$dense:f},d&&(Nl?u.createElement(ut,{style:{flex:"0 0 48px"}}):u.createElement(Wi,{allSelected:m,selectedRows:s,selectableRowsComponent:j,selectableRowsComponentProps:E,selectableRowDisabled:O,rowData:Il,keyField:a,mergeSelections:Y,onSelectAllRows:vr})),xt&&!On&&u.createElement(ns,null),kn.map((T=>u.createElement(Hi,{key:T.id,column:T,selectedColumn:$,disabled:G||z.length===0,pagination:de,paginationServer:N,persistSelectedOnSort:F,selectableRowsVisibleOnly:R,sortDirection:L,sortIcon:Cn,sortServer:Ft,onSort:yr,onDragStart:zt,onDragOver:_n,onDragEnd:qt,onDragEnter:Tn,onDragLeave:Wt,draggingColumnId:Ht}))))),!z.length&&!G&&u.createElement(rs,null,je),G&&ce&&u.createElement(xo,null,Pe),!G&&z.length>0&&u.createElement(Zi,{className:"rdt_TableBody",role:"rowgroup"},Le.map(((T,W)=>{const pe=ct(T,a),ke=(function(Ge=""){return typeof Ge!="number"&&(!Ge||Ge.length===0)})(pe)?W:pe,_=un(T,s,a),wr=!!(xt&&Pn&&Pn(T)),$t=!!(xt&&$n&&$n(T));return u.createElement(Di,{id:ke,key:ke,keyField:a,"data-row-id":ke,columns:kn,row:T,rowCount:z.length,rowIndex:W,selectableRows:d,expandableRows:xt,expandableIcon:D,highlightOnHover:l,pointerOnHover:c,dense:f,expandOnRowClicked:dr,expandOnRowDoubleClicked:pr,expandableRowsComponent:En,expandableRowsComponentProps:Rn,expandableRowsHideExpander:On,defaultExpanderDisabled:$t,defaultExpanded:wr,expandableInheritConditionalStyles:fr,conditionalRowStyles:qe,selected:_,selectableRowsHighlight:v,selectableRowsComponent:j,selectableRowsComponentProps:E,selectableRowDisabled:O,selectableRowsSingle:g,striped:i,onRowExpandToggled:P,onRowClicked:kl,onRowDoubleClicked:Tl,onRowMouseEnter:_l,onRowMouseLeave:Dl,onSelectedRow:jl,draggingColumnId:Ht,onDragStart:zt,onDragOver:_n,onDragEnd:qt,onDragEnter:Tn,onDragLeave:Wt})})))))),K&&u.createElement("div",null,u.createElement(he,{onChangePage:Rt,onChangeRowsPerPage:Al,rowCount:re||z.length,currentPage:ve,rowsPerPage:_e,direction:Ve,paginationRowsPerPageOptions:ie,paginationIconLastPage:be,paginationIconFirstPage:Oe,paginationIconNext:ye,paginationIconPrevious:Ne,paginationComponentOptions:xe})))}));function pt(e,t,...n){if(!e){let r;if(t===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let o=0;r=new Error(t.replace(/%s/g,function(){return n[o++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}const et=e=>typeof e=="function",xs=e=>e.length===0,Po=e=>e.toString(),er=e=>typeof e=="string",tr="/",gn="||",tt=e=>e,jo=e=>e===null;function ko(e,t=tt,n){pt(et(t)||jo(t),"Expected payloadCreator to be a function, undefined or null");const r=jo(t)||t===tt?tt:(l,...c)=>l instanceof Error?l:t(l,...c),o=et(n),a=e.toString(),i=(...l)=>{const c=r(...l),f={type:e};return c instanceof Error&&(f.error=!0),c!==void 0&&(f.payload=c),o&&(f.meta=n(...l)),f};return i.toString=()=>a,i}const ft=e=>{if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},To=e=>Array.isArray(e),_o=e=>e==null,Cs=e=>e[e.length-1],Ss=/\s/,Es=/([-.:_])/,Rs=/([a-z][A-Z]|[A-Z][a-z])/,nr="/",$s=/[\W_]+(.|$)/g,Os=e=>e.replace($s,(t,n)=>n?" "+n:""),Ps=/(.)([A-Z]+)/g,js=e=>e.replace(Ps,(t,n,r)=>n+" "+r.toLowerCase().split("").join(" ")),ks=e=>Ss.test(e)?e.toLowerCase():Es.test(e)?(Os(e)||e).toLowerCase():Rs.test(e)?js(e).toLowerCase():e.toLowerCase(),Ts=e=>ks(e).replace(/[\W_]+(.|$)/g,(t,n)=>n?" "+n:"").trim(),Do=e=>Ts(e).replace(/\s(\w)/g,(t,n)=>n.toUpperCase()),Ao=e=>e.includes(nr)?e.split(nr).map(Do).join(nr):Do(e),rr=(e,t)=>e.reduce((n,r)=>t(n,r),{}),hn=e=>typeof Map<"u"&&e instanceof Map;function or(e){if(hn(e))return Array.from(e.keys());if(typeof Reflect<"u"&&typeof Reflect.ownKeys=="function")return Reflect.ownKeys(e);let t=Object.getOwnPropertyNames(e);return typeof Object.getOwnPropertySymbols=="function"&&(t=t.concat(Object.getOwnPropertySymbols(e))),t}function Io(e,t){return hn(t)?t.get(e):t[e]}const No=e=>function t(n,{namespace:r=tr,prefix:o}={},a={},i=""){function l(f){if(!i)return f;const d=f.toString().split(gn),g=i.split(gn);return[].concat(...g.map(v=>d.map(y=>`${v}${r}${y}`))).join(gn)}function c(f){return i||!o||o&&new RegExp(`^${o}${r}`).test(f)?f:`${o}${r}${f}`}return or(n).forEach(f=>{const d=c(l(f)),g=Io(f,n);e(g)?t(g,{namespace:r,prefix:o},a,d):a[d]=g}),a},_s=No(ft);function Ds(e,{namespace:t=tr,prefix:n}={}){function r(a,i,l){const c=Ao(l.shift());xs(l)?i[c]=e[a]:(i[c]||(i[c]={}),r(a,i[c],l))}const o={};return Object.getOwnPropertyNames(e).forEach(a=>{const i=n?a.replace(`${n}${t}`,""):a;return r(a,o,i.split(t))}),o}function As(e,...t){const n=ft(Cs(t))?t.pop():{};return pt(t.every(er)&&(er(e)||ft(e)),"Expected optional object followed by string action types"),er(e)?Mo([e,...t],n):{...Is(e,n),...Mo(t,n)}}function Is(e,t){const n=_s(e,t),r=Fo(n);return Ds(r,t)}function Fo(e,{prefix:t,namespace:n=tr}={}){function r(o){if(et(o)||_o(o))return!0;if(To(o)){const[a=tt,i]=o;return et(a)&&et(i)}return!1}return rr(Object.keys(e),(o,a)=>{const i=e[a];pt(r(i),`Expected function, undefined, null, or array with payload and meta functions for ${a}`);const l=t?`${t}${n}${a}`:a,c=To(i)?ko(l,...i):ko(l,i);return{...o,[a]:c}})}function Mo(e,t){const n=rr(e,(o,a)=>({...o,[a]:tt})),r=Fo(n,t);return rr(Object.keys(r),(o,a)=>({...o,[Ao(a)]:r[a]}))}const Ns=e=>e===void 0;function Fs(e,t=tt,n){const r=Po(e).split(gn);pt(!Ns(n),`defaultState for reducer handling ${r.join(", ")} should be defined`),pt(et(t)||ft(t),"Expected reducer to be a function or object with next and throw reducers");const[o,a]=et(t)?[t,t]:[t.next,t.throw].map(i=>_o(i)?tt:i);return(i=n,l)=>{const{type:c}=l;return!c||!r.includes(Po(c))?i:(l.error===!0?a:o)(i,l)}}const Ms=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=typeof t[0]!="function"&&t.shift(),o=t;if(typeof r>"u")throw new TypeError("The initial state may not be undefined. If you do not want to set a value for this reducer, you can use null instead of undefined.");return function(a,i){for(var l=arguments.length,c=Array(l>2?l-2:0),f=2;f<l;f++)c[f-2]=arguments[f];var d=typeof a>"u",g=typeof i>"u";return d&&g&&r?r:o.reduce(function(v,y,R){if(typeof y>"u")throw new TypeError("An undefined reducer was passed in at index "+R);return y.apply(void 0,[v,i].concat(c))},d&&!g&&r?r:a)}};function Ls(e){const t=or(e),n=t.every(r=>r==="next"||r==="throw");return t.length>0&&t.length<=2&&n}const Hs=No(e=>(ft(e)||hn(e))&&!Ls(e));function zs(e,t,n={}){pt(ft(e)||hn(e),"Expected handlers to be a plain object.");const r=Hs(e,n),o=or(r).map(i=>Fs(i,Io(i,r),t)),a=Ms(t,...o);return(i=t,l)=>a(i,l)}const ar={path:"/",history:[],location:0},Lo={path:"*",data:{},hash:"",query:""},mn=h.createContext(ar),ir=h.createContext(null),At=h.createContext(Lo),{navigate:Ho,back:Ws,forward:qs}=As({NAVIGATE:e=>e,BACK:(e=1)=>e,FORWARD:(e=1)=>e}),Vs=zs({NAVIGATE:(e,t)=>{let{history:n,location:r}=e;return r>0&&(n=n.slice(r)),{path:Ks(e.path,t.payload),history:[t.payload,...n],location:0}},BACK:(e,t)=>{const n=e.location+t.payload,r=e.history.at(n);return r?{path:r,history:e.history,location:n}:e},FORWARD:(e,t)=>{const n=e.location-t.payload,r=e.history.at(n);return r?{path:r,history:e.history,location:n}:e}},ar);function Bs(){return h.useContext(mn).path}function sr(){const e=h.useContext(ir);return t=>e?.(Ho(t))}function Gs(){const e=h.useContext(ir),t=h.useContext(mn);return{navigate:n=>e?.(Ho(n)),back:(n=1)=>e?.(Ws(n)),forward:(n=1)=>e?.(qs(n)),hasBack:t.location<t.history.length-1,...t}}function lr(){return h.useContext(At).data}function Ys(){const{query:e,hash:t}=h.useContext(At);return{search:new URLSearchParams(e),hash:t}}function Us({path:e,children:t}){const n=e?{path:e,history:[],location:0}:ar,[r,o]=h.useReducer(Vs,n);return p.jsx(mn.Provider,{value:r,children:p.jsx(ir.Provider,{value:o,children:p.jsx(At.Provider,{value:Lo,children:t})})})}const gt=h.forwardRef(({to:e,children:t,...n},r)=>{const o=sr(),a=i=>{i.defaultPrevented||i.preventDefault(),o(e)};return p.jsx("a",{...n,href:e,ref:r,onClick:a,children:t})});function cr({children:e}){const t=h.useContext(At),n=h.useContext(mn),r=zo(e,t.path).map(o=>[o,Xs(o.route,n.path)]).filter(([,o])=>o.isMatch);return p.jsx(p.Fragment,{children:r.map(([o,a],i)=>p.jsx(At.Provider,{value:{...a},children:o.element},i))})}function fe({path:e,element:t}){return p.jsx(p.Fragment,{})}function zo(e,t){const n=[];return h.Children.map(e,r=>{if(!h.isValidElement(r))return;if(r.type===h.Fragment){n.push.apply(n,zo(r.props.children,t));return}const o=r.props;return n.push({route:Js(t,o.path),element:o.element}),r}),n}const Ks=(e,t)=>{if(t.startsWith("/"))return t;if(t.startsWith("?")){const[o]=e?.split("?")??[""];return o+t}let n=0;const r=t.split("/").filter(o=>o!=="");for(;r.length>0&&(r[0]==="."||r[0]==="..");)r.shift()==".."&&++n;return Qs(e,r.join("/"),n)},Qs=(e,t,n)=>{const r=e.split("/").filter(a=>a!==""),o=t.split("/").filter(a=>a!=="");return n===0?`/${r.join("/")}/${o.join("/")}`:`/${r.slice(0,-n).join("/")}/${o.join("/")}`},Js=(e,t)=>{const n=e.split("/").filter(o=>o!==""),r=t.split("/").filter(o=>o!=="");return n.length>0&&n.at(-1)==="*"&&n.pop(),n.length===0?`/${r.join("/")}`:`/${n.join("/")}/${r.join("/")}`},Xs=(e,t)=>{const n=e.split("/");let r=t.split("/");if(r.at(-1)===""&&(r=r.slice(0,-1)),n.length>r.length)return{isMatch:!1,remainer:"",data:{},query:"",hash:"",path:""};if(n.length<r.length&&n.at(-1)!=="*")return{isMatch:!1,remainer:"",data:{},query:"",hash:"",path:""};let o={},a="",i="";for(let l=0;l<n.length;++l){const c=n[l],d=[...r[l].matchAll(/([?#]?)((?:(?![?#]).)*)/g)],g=d?.find(v=>v[1]==="")?.[2]??"";if(a=d?.find(v=>v[1]==="?")?.[2]??"",i=d?.find(v=>v[1]==="#")?.[2]??"",c.startsWith(":")&&g&&g!==""){o[c.substring(1)]=g;continue}if(c==="*")return{isMatch:!0,data:o,remainer:r.splice(0,l).join("/"),query:a,hash:i,path:r.slice(0,l).join("/")};if(c!==g)return{isMatch:!1,data:{},remainer:"",query:"",hash:"",path:""}}return{isMatch:!0,remainer:"",data:o,query:a,hash:i,path:t?.split("?")?.[0]??""}},Zs=`
454
+ query dbSchema {
455
+ _dbSchema {
456
+ dbName
457
+ graphQlName
458
+ labelColumn
459
+ primaryKeys
460
+ isEditable
461
+ metadata {
462
+ key
463
+ value
464
+ }
465
+ columns {
466
+ dbName
467
+ graphQlName
468
+ paramType
469
+ isPrimaryKey
470
+ isIdentity
471
+ isNullable
472
+ isReadOnly
473
+ metadata {
474
+ key
475
+ value
476
+ }
477
+ }
478
+ multiJoins {
479
+ name
480
+ sourceColumnNames
481
+ destinationTable
482
+ destinationColumnNames
483
+ }
484
+ singleJoins {
485
+ name
486
+ sourceColumnNames
487
+ destinationTable
488
+ destinationColumnNames
489
+ }
490
+ }
491
+ }`;class el extends Error{constructor(t,n){super(t.map(r=>r.message).join("; ")),this.errors=t,this.data=n,this.name="GraphQLRequestError"}}class Wo{constructor(t){this.uri=t}async query(t,n){const r=await fetch(this.uri,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:t,variables:n})});if(!r.ok)throw new Error(`GraphQL request failed: ${r.status} ${r.statusText}`);const o=await r.json();if(o.errors?.length)throw new el(o.errors,o.data);return o.data}}const qo=h.createContext(null),tl=qo.Provider;function It(){const e=h.useContext(qo);if(!e)throw new Error("useFetcher must be used within a FetcherProvider");return e}const Vo=h.createContext({loading:!0,error:null,data:[],findTable:()=>{}}),nl=({children:e})=>{const t=rl();return p.jsx(Vo.Provider,{value:t,children:e})};function ht(){return h.useContext(Vo)}function rl(){const e=It(),{isLoading:t,error:n,data:r}=De.useQuery({queryKey:["dbSchema"],queryFn:()=>e.query(Zs),staleTime:1/0});return h.useMemo(()=>{if(t)return{loading:!0,error:null,data:[],findTable:()=>{}};if(n)return{loading:!1,error:{message:n.message},data:[],findTable:()=>{}};if(!r)return{loading:!1,error:null,data:[],findTable:()=>{}};const o=r._dbSchema.map(i=>({...i,name:i.graphQlName,label:i.dbName,metadata:Bo(i.metadata),columns:i.columns.map(l=>({...l,name:l.graphQlName,label:l.dbName,metadata:Bo(l.metadata)}))}));return{loading:!1,error:null,data:o,findTable:i=>o.find(l=>l.graphQlName===i)}},[t,n,r])}function Bo(e){return e.reduce((t,n)=>({...t,[n.key]:ol(n)}),{})}function ol({key:e,value:t}){return e==="type"?al(t):t}function al(e){const t=e.match(/lookup\s*\(\s*(?<id>\w+)\s*,\s*(?<label>\w+)\s*\)/m);if(t?.groups?.id&&t?.groups?.label)return{type:"lookup",id:t.groups.id,label:t.groups.label}}const il=[{name:"Table",cell:e=>p.jsx(gt,{to:`/${e.name}`,className:"plain-link",children:e.label})}];function sl(){const{loading:e,error:t,data:n}=ht();return e?p.jsx("div",{children:"Loading..."}):t?p.jsxs("div",{children:["Error: ",t.message]}):p.jsx("div",{children:p.jsx(Oo,{columns:il,data:n})})}const Go=e=>{try{if(!e)return{variables:{},param:"",filterText:""};const[t,n,r,o]=JSON.parse(e);return{variables:{filter:r},param:`, $filter: ${o}`,filterText:`{${t}: {${n}: $filter} }`}}catch{return{variables:{},param:"",filterText:""}}},ll=e=>{if(!e)return"";const t=new Date(e);return t.toString()==="Invalid Date"||t<new Date("1973-01-01")?"":t.toLocaleString()},cl=(e,t)=>{if(!e||!t)return[];const n=e.columns.map(o=>{const a={name:o.label,reorder:!0,sortable:!0,sortField:o.name},i=e.singleJoins.find(l=>l.sourceColumnNames?.[0]===o.name);if(i){const l=i.destinationTable,c=t.findTable(i.destinationTable);return{cell:f=>!!f&&p.jsx(gt,{to:"/"+c?.name+"/"+f?.[l]?.id,children:f?.[l]?.label}),...a}}return o?.joinTable?{cell:l=>!!l&&p.jsx(gt,{to:"/"+o.name+"/"+l?.[o.name]?.id,children:o.name}),...a}:o?.paramType==="DateTime"?{selector:l=>!!o?.name&&ll(l?.[o?.name])||"",...a}:{selector:l=>o?.name?String(l?.[o?.name]??""):"",...a}}),r=e.multiJoins.map(o=>{const a=t.findTable(o.destinationTable);return{name:a?.name,cell:i=>!!i&&p.jsx(gt,{to:"/"+a?.name+"/from/"+e.name+"/"+i?.id,children:a?.name}),reorder:!1,sortable:!1,sortField:o.sourceColumnNames?.[0]}});return e.isEditable===!1?[...n,...r]:[{name:"edit",cell:o=>p.jsx(gt,{to:`/${e.graphQlName}/edit/${o?.id}`,children:"edit"})},...n,...r]},ul=(e,t,n,r,o)=>{if(!e||!t?.data)return null;const a=t.findTable(e.graphQlName);if(!a)return null;const i=a?.primaryKeys?.[0]??"id";let{param:l,filterText:c}=Go(n);const f=e.columns.filter(d=>d?.joinTable===void 0).map(d=>{const g=a.singleJoins.find(R=>R.sourceColumnNames?.[0]===d.name);if(!g)return d;const y=t.findTable(g.destinationTable)?.labelColumn??"id";return{...d,joinTable:g,joinLabelColumn:y}}).map(d=>d?.joinTable?d.name+` ${d.joinTable.destinationTable} { id: ${d.joinTable.destinationColumnNames?.[0]} label: ${d.joinLabelColumn} }`:d.name).join(" ");return r&&!o&&(l=", $id: Int",c=`{ ${i}: { _eq: $id}}`),r&&o&&(l=", $id: Int"+l,c?c=`{and: [${c}, { ${o}: { ${i}: { _eq: $id}}} ]}`:c=`{ ${o}: { ${i}: { _eq: $id}}}`),c&&(c=`filter: ${c}`),`query Get${e.name}($sort: [${e.graphQlName}SortEnum!], $limit: Int, $offset: Int ${l}) { ${e.name}(sort: $sort limit: $limit offset: $offset ${c}) { total offset limit data {${f}}}}`};function dl(e,t,n){const{search:r}=Ys(),o=r.get("filter")??"",{variables:a}=Go(o),i=ht(),l=It(),[c,f]=h.useState(null),[d,g]=h.useState(0),[v,y]=h.useState(10),R=c?[`${c.columnName}_${c.order}`]:e?[`${e.columns.at(0)?.name??"id"}_asc`]:[],S=h.useMemo(()=>ul(e,i,o,t,n),[e,i,o,t,n]),O=h.useMemo(()=>({sort:R,limit:v,offset:d,...t?{id:+t}:{},...a}),[R,v,d,t,a]),{isLoading:j,error:E,data:P}=De.useQuery({queryKey:["tableData",e?.name,O],queryFn:()=>l.query(S,O),enabled:!!S&&!!e&&R.length>0}),k=h.useMemo(()=>e?cl(e,i):[],[e,i]),D=h.useCallback((N,J)=>{f({columnName:N.sortField??"id",order:J})},[]),x=h.useCallback(N=>{g((N-1)*v)},[v]),w=h.useCallback(N=>{y(N)},[]);return{tableColumns:k,offset:d,limit:v,handleSort:D,handlePage:x,handlePageSize:w,loading:j,error:E,data:P}}function pl({table:e,id:t,tableFilter:n}){const{limit:r,tableColumns:o,handleSort:a,handlePage:i,handlePageSize:l,loading:c,error:f,data:d}=dl(e,t,n),g=h.useRef(e.name),v=h.useRef(0),y=h.useMemo(()=>(g.current!==e.name&&(g.current=e.name,v.current+=1),v.current%2===1),[e.name]);return f?p.jsxs("div",{children:["Error: ",f.message]}):p.jsx(Oo,{columns:o,data:d?.[e.name]?.data??[],progressPending:c,sortServer:!0,onSort:a,pagination:!0,paginationServer:!0,paginationTotalRows:d?.[e.name]?.total??0,paginationPerPage:r,paginationDefaultPage:1,paginationResetDefaultPage:y,onChangePage:i,onChangeRowsPerPage:l})}function fl(e,t){return e.find(r=>r.name==t)}function mt(){const e=lr(),{table:t,id:n,filterTable:r}=e,{loading:o,error:a,data:i}=ht();return t?o?p.jsx("div",{children:"Loading..."}):a?p.jsxs("div",{children:["Error: ",a.message]}):p.jsx(pl,{table:fl(i,t),id:n,tableFilter:r}):p.jsx("div",{children:"Table missing"})}function ur(){const e=lr(),{loading:t,error:n,data:r}=ht(),[o,a]=h.useState(""),i=sr(),{back:l,hasBack:c}=Gs(),f=e?.table,d=h.useMemo(()=>r?.find(S=>S.graphQlName===f),[r,f]),g=h.useMemo(()=>d?.columns?.map(S=>({key:S.name,value:`${S.name},${S.paramType}`,label:S.label})),[d]),[v,y]=h.useState(g?.at(0)?.value??"");h.useEffect(()=>{a(""),y(g?.at(0)?.value??"")},[g]);const R=()=>{if(!o)return;const[S,O]=v.split(",");(O==="Int"||O==="Int!"||O==="Float"||O==="Float!")&&i(`?filter=["${S}", "_eq", ${o}, "${O}"]`),(O==="String"||O==="String!")&&i(`?filter=["${S}", "_contains", "${o}", "${O}"]`)};return t?p.jsx("div",{children:"Loading..."}):n?p.jsxs("div",{children:["Error: ",n.message]}):p.jsxs("header",{className:"editdb-header",children:[p.jsxs("div",{children:[c&&p.jsx("button",{onClick:()=>l(),children:"‹"}),!c&&p.jsx("span",{children:"‹"})]}),p.jsxs("h3",{children:["Table: ",d?.dbName??e?.table??"(Select)"]}),g&&p.jsxs(p.Fragment,{children:[p.jsx("select",{onChange:S=>y(S.target.value),children:g.map(S=>p.jsx("option",{value:S.value,children:S.label},S.key))}),p.jsx("input",{type:"search",value:o,onChange:S=>a(S.target.value)}),p.jsx("button",{onClick:R,children:"filter"}),p.jsx("button",{onClick:()=>i("/"),children:"clear"}),d?.isEditable&&p.jsx("button",{onClick:()=>i("edit/"),children:"add"})]})]})}function gl(e,t,n){const r=It(),o=h.useMemo(()=>e?.data?.find(f=>f.graphQlName===t),[e,t]),a=h.useMemo(()=>e.loading||e.error||!o?null:`query Get_${t}_Ref {
492
+ values: ${t}(limit: -1) {
493
+ data {
494
+ key: ${n}
495
+ label: ${o.labelColumn??"id"}
496
+ }
497
+ }
498
+ }`,[n,o,e.loading,e.error,t]),{isLoading:i,error:l,data:c}=De.useQuery({queryKey:["tableRef",t,n],queryFn:()=>r.query(a),enabled:!!a});return{loading:i||e.loading,error:l||e.error,data:c?.values?.data??[]}}const hl=["Int","Int!","Float","Float!"],ml=["Boolean","Boolean!"];function Yo(e,t,n,r,o){const a={...e};for(const{column:i}of t){if(hl.some(l=>l===i.paramType)){const l=a[i.name];a[i.name]=l!=null?+l:void 0}ml.some(l=>l===i.paramType)&&(a[i.name]=!!a[i.name])}if(!o)for(const i of n)a[i.name]=i.paramType.startsWith("Int")?+(r??0):r;return a}function Uo(e,t,n,r){const o=It(),a=De.useQueryClient(),i=h.useMemo(()=>`mutation updateSingle($detail: Update_${e.name}){
499
+ ${e.name}(update: $detail)
500
+ }`,[e]),l=h.useMemo(()=>`mutation insertSingle($detail: Insert_${e.name}){
501
+ ${e.name}(insert: $detail)
502
+ }`,[e]),c=De.useMutation({mutationFn:y=>o.query(i,{detail:y}),onSuccess:()=>a.invalidateQueries({queryKey:["tableData",e.name]})}),f=De.useMutation({mutationFn:y=>o.query(l,{detail:y}),onSuccess:()=>a.invalidateQueries({queryKey:["tableData",e.name]})}),d=y=>{const R=Yo(y,t,n,r,!1);return c.mutateAsync(R)},g=y=>{const R=Yo(y,t,n,r,!0);return f.mutateAsync(R)},v=c.error??f.error;return{update:d,insert:g,isPending:c.isPending||f.isPending,error:v}}const bl=["Boolean","Boolean!"],Ko=["DateTime","DateTime!"];function yl(e,t){return h.useMemo(()=>{const n=e?.data?.find(a=>a.graphQlName==t),o=n.columns.filter(a=>!a.isReadOnly&&!a.isIdentity).map(a=>({column:a,join:n.singleJoins.find(i=>i.sourceColumnNames[0]===a.graphQlName)}));return[n,o,n.columns.filter(a=>a.isIdentity)]},[e,t])}function vl({table:e,schema:t,editid:n}){const r=sr(),o=It(),a=n===void 0||n==="",[i,l,c]=yl(t,e),f=i.labelColumn,d=i.label,g=h.useRef(null),v=h.useRef({}),y=Uo(i,l,c,n),R=h.useMemo(()=>`query GetSingleEdit_${i.name}($id: Int){
503
+ value: ${i.name}(filter: {id: { _eq: $id}}) {
504
+ data { ${l.map(({column:x})=>x.name).join(" ")} }
505
+ }
506
+ }`,[i,l]),{isLoading:S,error:O,data:j}=De.useQuery({queryKey:["editRecord",i.name,n],queryFn:()=>o.query(R,{id:+n}),enabled:!!i&&!a}),E=h.useMemo(()=>j?.value?.data?.at(0)??{},[j]);if(h.useEffect(()=>{v.current=Object.fromEntries(l.map(({column:x})=>{if(Ko.some(w=>w===x.paramType)){const w=E[x.name]?.split("T")?.[0];return[x.name,w==="0001-01-01"?"":w]}return[x.name,E[x.name]]}))},[E,l]),h.useEffect(()=>{const x=g.current;return x?.showModal(),()=>x?.close()},[]),S&&!a)return p.jsx("div",{children:"Loading..."});if(O)return p.jsxs("div",{children:["Error: ",O.message]});if(y.error)return p.jsxs("div",{children:["Error: ",y.error.message]});const P=x=>{(a?y.insert:y.update)({...v.current}).then(()=>{r("../..")})},k=E?.[f]??n,D=l.map(({column:x,join:w})=>({paramType:x.paramType,isReadOnly:x.isReadOnly,name:x.name,required:x.isNullable?{}:{required:!0},value:v.current[x.name]??(a?void 0:E[x.name]),join:w}));return p.jsx("dialog",{className:"editdb-dialog-edit",ref:g,children:p.jsxs("form",{method:"dialog",onSubmit:P,children:[c.map(x=>p.jsx("input",{type:"hidden",name:x.name,defaultValue:n},x.name)),p.jsxs("h3",{className:"editdb-dialog-edit__heading",children:[d,":",k]}),p.jsx(wl,{fields:D,detailRef:v}),p.jsxs("div",{className:"button-row",children:[p.jsx(gt,{className:"editdb-dialog-edit__cancel",to:"../..",children:"Cancel"}),p.jsx("button",{type:"submit",className:`editdb-dialog-edit__submit ${y.isPending?"editdb-dialog-edit__submit--loading":""}`,disabled:y.isPending,children:"Save"})]})]})})}function bn(){const{table:e,editid:t}=lr(),n=ht();return e?n.loading?p.jsx("div",{children:"Loading..."}):n.error?p.jsxs("div",{children:["Error: ",n.error.message]}):p.jsx(vl,{table:e,schema:n,editid:t??""}):p.jsx("div",{children:"Table missing"})}function wl({fields:e,detailRef:t}){return p.jsx("ul",{className:"editdb-dialog-edit__input-list",children:e.map(n=>p.jsx(xl,{field:n,detailRef:t},n.name))})}function xl({field:e,detailRef:t}){let n=Sl;return e.join?n=Rl:bl.some(r=>r===e.paramType)?n=Cl:Ko.some(r=>r===e.paramType)&&(n=El),p.jsxs("li",{className:"editdb-dialog-edit__input-item",children:[p.jsx("label",{children:e.name}),p.jsx(n,{field:e,detailRef:t})]})}function Cl({field:e,detailRef:t}){return p.jsx("input",{type:"checkbox",defaultChecked:e.value,onChange:n=>{t.current[e.name]=n.target.checked}})}function Sl({field:e,detailRef:t}){return p.jsx("input",{type:"text",defaultValue:e.value,...e.required,onChange:n=>{t.current[e.name]=n.target.value}})}function El({field:e,detailRef:t}){return p.jsx("input",{type:"date",defaultValue:e.value,...e.required,onChange:n=>{t.current[e.name]=n.target.value}})}function Rl({field:e,detailRef:t}){const n=ht(),r=gl(n,e.join.destinationTable,e.join.destinationColumnNames[0]);return p.jsx("select",{defaultValue:e.value,onChange:o=>{t.current[e.name]=o.target.value},children:r.data.map(o=>p.jsx("option",{value:o.key,children:o.label},o.key))})}class yn extends h.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){const{onError:r,section:o}=this.props;console.error(`Error in ${o??"component"}:`,t,n),r?.(t,n)}handleRetry=()=>{this.setState({hasError:!1,error:null})};render(){const{hasError:t,error:n}=this.state,{children:r,fallback:o,section:a}=this.props;return t?o||p.jsx("div",{className:"editdb-error-boundary",children:p.jsxs("div",{className:"editdb-error-boundary__content",children:[p.jsxs("h3",{className:"editdb-error-boundary__title",children:["Something went wrong",a?` in ${a}`:""]}),p.jsx("p",{className:"editdb-error-boundary__message",children:n?.message??"An unexpected error occurred"}),p.jsx("button",{className:"editdb-error-boundary__retry",onClick:this.handleRetry,children:"Try Again"})]})}):r}}const $l=()=>p.jsx("p",{className:"editdb-message",children:"Select a Table"}),Ol=()=>p.jsxs("div",{className:"editdb-frame-layout",children:[p.jsx("div",{className:"editdb-frame-layout-header",children:p.jsx(yn,{section:"Header",children:p.jsxs(cr,{children:[p.jsx(fe,{path:"/:table/*",element:p.jsx(ur,{})}),p.jsx(fe,{path:"/:table",element:p.jsx(ur,{})}),p.jsx(fe,{path:"/",element:p.jsx(ur,{})})]})})}),p.jsx("div",{className:"editdb-frame-layout-nav",children:p.jsx(yn,{section:"Table List",children:p.jsx(sl,{})})}),p.jsxs("div",{className:"editdb-frame-layout-body",children:[p.jsx(yn,{section:"Data Panel",children:p.jsxs(cr,{children:[p.jsx(fe,{path:"/:table/from/:filterTable/:id/edit/:editid",element:p.jsx(mt,{})}),p.jsx(fe,{path:"/:table/from/:filterTable/:id",element:p.jsx(mt,{})}),p.jsx(fe,{path:"/:table/:id/edit/:editid",element:p.jsx(mt,{})}),p.jsx(fe,{path:"/:table/:id",element:p.jsx(mt,{})}),p.jsx(fe,{path:"/:table/edit/:editid",element:p.jsx(mt,{})}),p.jsx(fe,{path:"/:table",element:p.jsx(mt,{})}),p.jsx(fe,{path:"/",element:p.jsx($l,{})})]})}),p.jsx(yn,{section:"Data Edit",children:p.jsxs(cr,{children:[p.jsx(fe,{path:"/:table/from/:filterTable/:id/edit/:editid",element:p.jsx(bn,{})}),p.jsx(fe,{path:"/:table/:id/edit/:editid",element:p.jsx(bn,{})}),p.jsx(fe,{path:"/:table/edit/:editid",element:p.jsx(bn,{})}),p.jsx(fe,{path:"/:table/edit",element:p.jsx(bn,{})})]})})]})]});function Pl({onLocate:e}){const t=Bs();return h.useEffect(()=>{e?.(t)},[t,e]),p.jsx(Ol,{})}function Qo({uri:e,fetcher:t,uiPath:n,onLocate:r}){const o=h.useMemo(()=>t||(e?new Wo(e):null),[e,t]),a=h.useMemo(()=>new De.QueryClient({defaultOptions:{queries:{staleTime:300*1e3,retry:1}}}),[]);return o?p.jsx(De.QueryClientProvider,{client:a,children:p.jsx(tl,{value:o,children:p.jsx(Us,{path:n||"/",children:p.jsx(nl,{children:p.jsx("div",{children:p.jsx(Pl,{onLocate:r})})})})})}):p.jsx("section",{children:"CONFIG MISSING..."})}Re.Editor=Qo,Re.HttpGraphQLFetcher=Wo,Re.default=Qo,Re.useTableMutation=Uo,Object.defineProperties(Re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));