asma-ui-table 1.0.52-beta → 1.0.52-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asma-ui-table.es.js +1 -1
- package/package.json +1 -1
package/dist/asma-ui-table.es.js
CHANGED
|
@@ -38,4 +38,4 @@ import*as e from"react";import t,{Fragment as n,useMemo as o,useLayoutEffect as
|
|
|
38
38
|
*
|
|
39
39
|
* @license MIT
|
|
40
40
|
*/
|
|
41
|
-
function Fe(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const Pe={"asma-ui-table-styled-table":"_asma-ui-table-styled-table_f1odr_1","table-wrapper":"_table-wrapper_f1odr_10","table-wrapper-fetching":"_table-wrapper-fetching_f1odr_15","styled-table":"_styled-table_f1odr_18",tbody:"_tbody_f1odr_27","loading-icon":"_loading-icon_f1odr_32","t-row":"_t-row_f1odr_39","action-cell":"_action-cell_f1odr_55","fixed-cell":"_fixed-cell_f1odr_58","t-cell":"_t-cell_f1odr_73",expanded_row:"_expanded_row_f1odr_87",selected:"_selected_f1odr_111",shadowed:"_shadowed_f1odr_114","is-loading":"_is-loading_f1odr_132","action-cell-default-background":"_action-cell-default-background_f1odr_135","fixed-cell-default-background":"_fixed-cell-default-background_f1odr_138","no-rows-overlay":"_no-rows-overlay_f1odr_141","sortable-column":"_sortable-column_f1odr_150",resizer:"_resizer_f1odr_154",isResizing:"_isResizing_f1odr_166","hide-table-header":"_hide-table-header_f1odr_178","show-table-header":"_show-table-header_f1odr_182","table-header":"_table-header_f1odr_187","hide-header":"_hide-header_f1odr_207","t-cell__actions":"_t-cell__actions_f1odr_210","t-cell__fixed":"_t-cell__fixed_f1odr_220","sort-icon":"_sort-icon_f1odr_227","table-footer":"_table-footer_f1odr_230"};function Ae(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ae(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ve(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=Ae(e))&&(o&&(o+=" "),o+=t);return o}const je=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Te(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function ze(e){return"nodeType"in e}function Le(e){var t,n;return e?Te(e)?e:ze(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function He(e){const{Document:t}=Le(e);return e instanceof t}function $e(e){return!Te(e)&&e instanceof Le(e).HTMLElement}function Ge(e){return e instanceof Le(e).SVGElement}function Be(e){return e?Te(e)?e.document:ze(e)?He(e)?e:$e(e)||Ge(e)?e.ownerDocument:document:document:document}const Ue=je?r:i;function We(e){const t=l(e);return Ue((()=>{t.current=e})),a((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function qe(e,t){void 0===t&&(t=[e]);const n=l(e);return Ue((()=>{n.current!==e&&(n.current=e)}),t),n}function Ke(e,t){const n=l();return o((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function Xe(e){const t=We(e),n=l(null),o=a((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function Ye(e){const t=l();return i((()=>{t.current=e}),[e]),t.current}let Je={};function Ze(e,t){return o((()=>{if(t)return t;const n=null==Je[e]?0:Je[e]+1;return Je[e]=n,e+"-"+n}),[e,t])}function Qe(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t}),{...t})}}const et=Qe(1),tt=Qe(-1);function nt(e){if(!e)return!1;const{KeyboardEvent:t}=Le(e.target);return t&&e instanceof t}function ot(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Le(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const rt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[rt.Translate.toString(e),rt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),it="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function lt(e){return e.matches(it)?e:e.querySelector(it)}const at={display:"none"};function st(e){let{id:n,value:o}=e;return t.createElement("div",{id:n,style:at},o)}function ut(e){let{id:n,announcement:o,ariaLiveType:r="assertive"}=e;return t.createElement("div",{id:n,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},o)}const dt=u(null);const ct={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},gt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function pt(e){let{announcements:n=gt,container:r,hiddenTextDescribedById:l,screenReaderInstructions:u=ct}=e;const{announce:c,announcement:g}=function(){const[e,t]=s("");return{announce:a((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=Ze("DndLiveRegion"),[f,h]=s(!1);if(i((()=>{h(!0)}),[]),function(e){const t=d(dt);i((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(o((()=>({onDragStart(e){let{active:t}=e;c(n.onDragStart({active:t}))},onDragMove(e){let{active:t,over:o}=e;n.onDragMove&&c(n.onDragMove({active:t,over:o}))},onDragOver(e){let{active:t,over:o}=e;c(n.onDragOver({active:t,over:o}))},onDragEnd(e){let{active:t,over:o}=e;c(n.onDragEnd({active:t,over:o}))},onDragCancel(e){let{active:t,over:o}=e;c(n.onDragCancel({active:t,over:o}))}})),[c,n])),!f)return null;const m=t.createElement(t.Fragment,null,t.createElement(st,{id:l,value:u.draggable}),t.createElement(ut,{id:p,announcement:g}));return r?w(m,r):m}var ft,ht;function mt(){}(ht=ft||(ft={})).DragStart="dragStart",ht.DragMove="dragMove",ht.DragEnd="dragEnd",ht.DragCancel="dragCancel",ht.DragOver="dragOver",ht.RegisterDroppable="registerDroppable",ht.SetDroppableDisabled="setDroppableDisabled",ht.UnregisterDroppable="unregisterDroppable";const vt=Object.freeze({x:0,y:0});function bt(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function yt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function wt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function xt(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const St=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=xt(t,t.left,t.top),i=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=bt(xt(o),r);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(yt)};function Ct(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=r-o,a=i-n;if(o<r&&n<i){const n=t.width*t.height,o=e.width*e.height,r=l*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const Rt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,i=n.get(o);if(i){const n=Ct(i,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(wt)};function Et(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:vt}function _t(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const Dt=_t(1);const Ot={ignoreTransform:!1};function Nt(e,t){void 0===t&&(t=Ot);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=Le(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:i,x:l,y:a}=o,s=e.left-l-(1-r)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?e.width/r:e.width,c=i?e.height/i:e.height;return{width:d,height:c,top:u,right:s+d,bottom:u+c,left:s}}(n,t,o))}const{top:o,left:r,width:i,height:l,bottom:a,right:s}=n;return{top:o,left:r,width:i,height:l,bottom:a,right:s}}function It(e){return Nt(e,{ignoreTransform:!0})}function Mt(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t||!r)return n;if(He(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!$e(r)||Ge(r)||n.includes(r))return n;const i=Le(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Le(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(r,i)&&n.push(r),function(e,t){return void 0===t&&(t=Le(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?n:o(r.parentNode)}(e):n}function kt(e){const[t]=Mt(e,1);return t??null}function Ft(e){return je&&e?Te(e)?e:ze(e)?He(e)||e===Be(e).scrollingElement?window:$e(e)?e:null:null:null}function Pt(e){return Te(e)?e.scrollX:e.scrollLeft}function At(e){return Te(e)?e.scrollY:e.scrollTop}function Vt(e){return{x:Pt(e),y:At(e)}}var jt;function Tt(e){return!(!je||!e)&&e===document.scrollingElement}function zt(e){const t={x:0,y:0},n=Tt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(jt||(jt={}));const Lt={x:.2,y:.2};function Ht(e,t,n,o,r){let{top:i,left:l,right:a,bottom:s}=n;void 0===o&&(o=10),void 0===r&&(r=Lt);const{isTop:u,isBottom:d,isLeft:c,isRight:g}=zt(e),p={x:0,y:0},f={x:0,y:0},h=t.height*r.y,m=t.width*r.x;return!u&&i<=t.top+h?(p.y=jt.Backward,f.y=o*Math.abs((t.top+h-i)/h)):!d&&s>=t.bottom-h&&(p.y=jt.Forward,f.y=o*Math.abs((t.bottom-h-s)/h)),!g&&a>=t.right-m?(p.x=jt.Forward,f.x=o*Math.abs((t.right-m-a)/m)):!c&&l<=t.left+m&&(p.x=jt.Backward,f.x=o*Math.abs((t.left+m-l)/m)),{direction:p,speed:f}}function $t(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Gt(e){return e.reduce(((e,t)=>et(e,Vt(t))),vt)}const Bt=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Pt(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+At(t)),0)}]];class Ut{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Mt(t),o=Gt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Bt)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=r(n),l=o[e]-t;return this.rect[i]+l},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Wt{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function qt(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Kt,Xt;function Yt(e){e.preventDefault()}function Jt(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Kt||(Kt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(Xt||(Xt={}));const Zt={start:[Xt.Space,Xt.Enter],cancel:[Xt.Esc],end:[Xt.Space,Xt.Enter]},Qt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Xt.Right:return{...n,x:n.x+25};case Xt.Left:return{...n,x:n.x-25};case Xt.Down:return{...n,y:n.y+25};case Xt.Up:return{...n,y:n.y-25}}};class en{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Wt(Be(t)),this.windowListeners=new Wt(Le(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kt.Resize,this.handleCancel),this.windowListeners.add(Kt.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Kt.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Nt),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);kt(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(vt)}handleKeyDown(e){if(nt(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=Zt,coordinateGetter:i=Qt,scrollBehavior:l="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:s}=n.current,u=s?{x:s.left,y:s.top}:vt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=tt(d,u),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:u,maxScroll:c,minScroll:g}=zt(n),p=$t(n),f={x:Math.min(r===Xt.Right?p.right-p.width/2:p.right,Math.max(r===Xt.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(r===Xt.Down?p.bottom-p.height/2:p.bottom,Math.max(r===Xt.Down?p.top:p.top+p.height/2,d.y))},h=r===Xt.Right&&!a||r===Xt.Left&&!s,m=r===Xt.Down&&!u||r===Xt.Up&&!i;if(h&&f.x!==d.x){const e=n.scrollLeft+t.x,i=r===Xt.Right&&e<=c.x||r===Xt.Left&&e>=g.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});o.x=i?n.scrollLeft-e:r===Xt.Right?n.scrollLeft-c.x:n.scrollLeft-g.x,o.x&&n.scrollBy({left:-o.x,behavior:l});break}if(m&&f.y!==d.y){const e=n.scrollTop+t.y,i=r===Xt.Down&&e<=c.y||r===Xt.Up&&e>=g.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});o.y=i?n.scrollTop-e:r===Xt.Down?n.scrollTop-c.y:n.scrollTop-g.y,o.y&&n.scrollBy({top:-o.y,behavior:l});break}}this.handleMove(e,et(tt(d,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function tn(e){return!(!e||!("distance"in e))}function nn(e){return!(!e||!("delay"in e))}en.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Zt,onActivation:r}=t,{active:i}=n;const{code:l}=e.nativeEvent;if(o.start.includes(l)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class on{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=Le(e);return e instanceof t?e:Be(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Be(i),this.documentListeners=new Wt(this.document),this.listeners=new Wt(n),this.windowListeners=new Wt(Le(i)),this.initialCoordinates=null!=(o=ot(r))?o:vt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Kt.Resize,this.handleCancel),this.windowListeners.add(Kt.DragStart,Yt),this.windowListeners.add(Kt.VisibilityChange,this.handleCancel),this.windowListeners.add(Kt.ContextMenu,Yt),this.documentListeners.add(Kt.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(nn(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(tn(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Kt.Click,Jt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kt.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:i,options:{activationConstraint:l}}=r;if(!o)return;const a=null!=(t=ot(e))?t:vt,s=tt(o,a);if(!n&&l){if(tn(l)){if(null!=l.tolerance&&qt(s,l.tolerance))return this.handleCancel();if(qt(s,l.distance))return this.handleStart()}return nn(l)&&qt(s,l.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Xt.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const rn={move:{name:"pointermove"},end:{name:"pointerup"}};class ln extends on{constructor(e){const{event:t}=e,n=Be(t.target);super(e,rn,n)}}ln.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const an={move:{name:"mousemove"},end:{name:"mouseup"}};var sn;!function(e){e[e.RightClick=2]="RightClick"}(sn||(sn={}));(class extends on{constructor(e){super(e,an,Be(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==sn.RightClick&&(null==o||o({event:n}),!0)}}];const un={move:{name:"touchmove"},end:{name:"touchend"}};var dn,cn;function gn(e){let{acceleration:t,activator:n=dn.Pointer,canScroll:r,draggingRect:s,enabled:u,interval:d=5,order:c=cn.TreeOrder,pointerCoordinates:g,scrollableAncestors:p,scrollableAncestorRects:f,delta:h,threshold:m}=e;const v=function(e){let{delta:t,disabled:n}=e;const o=Ye(t);return Ke((e=>{if(n||!o||!e)return pn;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[jt.Backward]:e.x[jt.Backward]||-1===r.x,[jt.Forward]:e.x[jt.Forward]||1===r.x},y:{[jt.Backward]:e.y[jt.Backward]||-1===r.y,[jt.Forward]:e.y[jt.Forward]||1===r.y}}}),[n,t,o])}({delta:h,disabled:!u}),[b,y]=function(){const e=l(null);return[a(((t,n)=>{e.current=setInterval(t,n)}),[]),a((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),w=l({x:0,y:0}),x=l({x:0,y:0}),S=o((()=>{switch(n){case dn.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case dn.DraggableRect:return s}}),[n,s,g]),C=l(null),R=a((()=>{const e=C.current;if(!e)return;const t=w.current.x*x.current.x,n=w.current.y*x.current.y;e.scrollBy(t,n)}),[]),E=o((()=>c===cn.TreeOrder?[...p].reverse():p),[c,p]);i((()=>{if(u&&p.length&&S){for(const e of E){if(!1===(null==r?void 0:r(e)))continue;const n=p.indexOf(e),o=f[n];if(!o)continue;const{direction:i,speed:l}=Ht(e,o,S,t,m);for(const e of["x","y"])v[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return y(),C.current=e,b(R,d),w.current=l,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()}),[t,R,r,y,u,d,JSON.stringify(S),JSON.stringify(v),b,p,E,f,JSON.stringify(m)])}(class extends on{constructor(e){super(e,un)}static setup(){return window.addEventListener(un.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(un.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(dn||(dn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(cn||(cn={}));const pn={x:{[jt.Backward]:!1,[jt.Forward]:!1},y:{[jt.Backward]:!1,[jt.Forward]:!1}};var fn,hn;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(fn||(fn={})),(hn||(hn={})).Optimized="optimized";const mn=new Map;function vn(e,t){return Ke((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function bn(e){let{callback:t,disabled:n}=e;const r=We(t),l=o((()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return i((()=>()=>null==l?void 0:l.disconnect()),[l]),l}function yn(e){return new Ut(Nt(e),e)}function wn(e,t,n){void 0===t&&(t=yn);const[r,l]=g((function(o){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=o??n)?r:null;const i=t(e);return JSON.stringify(o)===JSON.stringify(i)?o:i}),null),a=function(e){let{callback:t,disabled:n}=e;const r=We(t),l=o((()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return i((()=>()=>null==l?void 0:l.disconnect()),[l]),l}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){l();break}}}}),s=bn({callback:l});return Ue((()=>{l(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),r}const xn=[];function Sn(e,t){void 0===t&&(t=[]);const n=l(null);return i((()=>{n.current=null}),t),i((()=>{const t=e!==vt;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?tt(e,n.current):vt}function Cn(e){return o((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Rn=[];function En(e){let{measure:t}=e;const[n,r]=s(null),i=bn({callback:a((e=>{for(const{target:n}of e)if($e(n)){r((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),l=a((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return $e(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[u,d]=Xe(l);return o((()=>({nodeRef:u,rect:n,setRef:d})),[n,u,d])}const _n=[{sensor:ln,options:{}},{sensor:en,options:{}}],Dn={current:{}},On={draggable:{measure:It},droppable:{measure:It,strategy:fn.WhileDragging,frequency:hn.Optimized},dragOverlay:{measure:Nt}};class Nn extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const In={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:mt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:On,measureDroppableContainers:mt,windowRect:null,measuringScheduled:!1},Mn=u({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:mt,draggableNodes:new Map,over:null,measureDroppableContainers:mt}),kn=u(In);function Fn(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nn}}}function Pn(e,t){switch(t.type){case ft.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ft.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case ft.DragEnd:case ft.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ft.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new Nn(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case ft.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const l=new Nn(e.droppable.containers);return l.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:l}}}case ft.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new Nn(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function An(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=d(Mn),l=Ye(o),a=Ye(null==n?void 0:n.id);return i((()=>{if(!t&&!o&&l&&null!=a){if(!nt(l)||document.activeElement===l.target)return;const e=r.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=lt(e);if(t){t.focus();break}}}))}}),[o,t,r,a,l]),null}const Vn=u({...vt,scaleX:1,scaleY:1});var jn;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(jn||(jn={}));const Tn=c((function(e){var n,r,u,d;let{id:c,accessibility:p,autoScroll:f=!0,children:h,sensors:m=_n,collisionDetection:v=Rt,measuring:b,modifiers:w,...x}=e;const S=g(Pn,void 0,Fn),[C,R]=S,[E,_]=function(){const[e]=s((()=>new Set)),t=a((t=>(e.add(t),()=>e.delete(t))),[e]);return[a((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[D,O]=s(jn.Uninitialized),N=D===jn.Initialized,{draggable:{active:I,nodes:M,translate:k},droppable:{containers:F}}=C,P=I?M.get(I):null,A=l({initial:null,translated:null}),V=o((()=>{var e;return null!=I?{id:I,data:null!=(e=null==P?void 0:P.data)?e:Dn,rect:A}:null}),[I,P]),j=l(null),[T,z]=s(null),[L,H]=s(null),$=qe(x,Object.values(x)),G=Ze("DndDescribedBy",c),B=o((()=>F.getEnabled()),[F]),U=function(e){return o((()=>({draggable:{...On.draggable,...null==e?void 0:e.draggable},droppable:{...On.droppable,...null==e?void 0:e.droppable},dragOverlay:{...On.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(b),{droppableRects:W,measureDroppableContainers:q,measuringScheduled:K}=function(e,t){let{dragging:n,dependencies:o,config:r}=t;const[u,d]=s(null),{frequency:c,measure:g,strategy:p}=r,f=l(e),h=function(){switch(p){case fn.Always:return!1;case fn.BeforeDragging:return n;default:return!n}}(),m=qe(h),v=a((function(e){void 0===e&&(e=[]),!m.current&&d((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),b=l(null),y=Ke((t=>{if(h&&!n)return mn;if(!t||t===mn||f.current!==e||null!=u){const t=new Map;for(let n of e){if(!n)continue;if(u&&u.length>0&&!u.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Ut(g(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,u,n,h,g]);return i((()=>{f.current=e}),[e]),i((()=>{h||v()}),[n,h]),i((()=>{u&&u.length>0&&d(null)}),[JSON.stringify(u)]),i((()=>{h||"number"!=typeof c||null!==b.current||(b.current=setTimeout((()=>{v(),b.current=null}),c))}),[c,h,v,...o]),{droppableRects:y,measureDroppableContainers:v,measuringScheduled:null!=u}}(B,{dragging:N,dependencies:[k.x,k.y],config:U.droppable}),X=function(e,t){const n=null!==t?e.get(t):void 0,o=n?n.node.current:null;return Ke((e=>{var n;return null===t?null:null!=(n=o??e)?n:null}),[o,t])}(M,I),Y=o((()=>L?ot(L):null),[L]),J=function(){const e=!1===(null==T?void 0:T.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=N&&!e&&!t;return"object"==typeof f?{...f,enabled:n}:{enabled:n}}(),Z=function(e,t){return vn(e,t)}(X,U.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=l(!1),{x:a,y:s}="boolean"==typeof r?{x:r,y:r}:r;Ue((()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Et(n(e),o);if(a||(r.x=0),s||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=kt(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,a,s,o,n])}({activeNode:I?M.get(I):null,config:J.layoutShiftCompensation,initialRect:Z,measure:U.draggable.measure});const Q=wn(X,U.draggable.measure,Z),ee=wn(X?X.parentElement:null),te=l({activatorEvent:null,active:null,activeNode:X,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=F.getNodeFor(null==(n=te.current.over)?void 0:n.id),oe=En({measure:U.dragOverlay.measure}),re=null!=(r=oe.nodeRef.current)?r:X,ie=N?null!=(u=oe.rect)?u:Q:null,le=!(!oe.nodeRef.current||!oe.rect),ae=function(e){return Et(e,vn(e))}(le?null:Q),se=Cn(re?Le(re):null),ue=function(e){const t=l(e),n=Ke((n=>e?n&&n!==xn&&e&&t.current&&e.parentNode===t.current.parentNode?n:Mt(e):xn),[e]);return i((()=>{t.current=e}),[e]),n}(N?ne??X:null),de=function(e,t){void 0===t&&(t=Nt);const[n]=e,o=Cn(n?Le(n):null),[r,i]=g((function(){return e.length?e.map((e=>Tt(e)?o:new Ut(t(e),e))):Rn}),Rn),l=bn({callback:i});return e.length>0&&r===Rn&&i(),Ue((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),i())}),[e]),r}(ue),ce=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(w,{transform:{x:k.x-ae.x,y:k.y-ae.y,scaleX:1,scaleY:1},activatorEvent:L,active:V,activeNodeRect:Q,containerNodeRect:ee,draggingNodeRect:ie,over:te.current.over,overlayNodeRect:oe.rect,scrollableAncestors:ue,scrollableAncestorRects:de,windowRect:se}),ge=Y?et(Y,k):null,pe=function(e){const[t,n]=s(null),r=l(e),u=a((e=>{const t=Ft(e.target);t&&n((e=>e?(e.set(t,Vt(t)),new Map(e)):null))}),[]);return i((()=>{const t=r.current;if(e!==t){o(t);const i=e.map((e=>{const t=Ft(e);return t?(t.addEventListener("scroll",u,{passive:!0}),[t,Vt(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach((e=>{const t=Ft(e);null==t||t.removeEventListener("scroll",u)}))}}),[u,e]),o((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>et(e,t)),vt):Gt(e):vt),[e,t])}(ue),fe=Sn(pe),he=Sn(pe,[Q]),me=et(ce,fe),ve=ie?Dt(ie,ce):null,be=V&&ve?v({active:V,collisionRect:ve,droppableRects:W,droppableContainers:B,pointerCoordinates:ge}):null,ye=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(be,"id"),[we,xe]=s(null),Se=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(le?ce:et(ce,he),null!=(d=null==we?void 0:we.rect)?d:null,Q),Ce=a(((e,t)=>{let{sensor:n,options:o}=t;if(null==j.current)return;const r=M.get(j.current);if(!r)return;const i=e.nativeEvent,l=new n({active:j.current,activeNode:r,event:i,options:o,context:te,onStart(e){const t=j.current;if(null==t)return;const n=M.get(t);if(!n)return;const{onDragStart:o}=$.current,r={active:{id:t,data:n.data,rect:A}};y((()=>{null==o||o(r),O(jn.Initializing),R({type:ft.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:r})}))},onMove(e){R({type:ft.DragMove,coordinates:e})},onEnd:a(ft.DragEnd),onCancel:a(ft.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=te.current;let l=null;if(t&&r){const{cancelDrop:a}=$.current;l={activatorEvent:i,active:t,collisions:n,delta:r,over:o},e===ft.DragEnd&&"function"==typeof a&&await Promise.resolve(a(l))&&(e=ft.DragCancel)}j.current=null,y((()=>{R({type:e}),O(jn.Uninitialized),xe(null),z(null),H(null);const t=e===ft.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=$.current[t];null==e||e(l),E({type:t,event:l})}}))}}y((()=>{z(l),H(e.nativeEvent)}))}),[M]),Re=function(e,t){return o((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,a(((e,t)=>(n,o)=>{const r=n.nativeEvent,i=M.get(o);if(null!==j.current||!i||r.dndKit||r.defaultPrevented)return;const l={active:i};!0===e(n,t.options,l)&&(r.dndKit={capturedBy:t.sensor},j.current=o,Ce(n,t))}),[M,Ce]));(function(e){i((()=>{if(!je)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))})(m),Ue((()=>{Q&&D===jn.Initializing&&O(jn.Initialized)}),[Q,D]),i((()=>{const{onDragMove:e}=$.current,{active:t,activatorEvent:n,collisions:o,over:r}=te.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:o,delta:{x:me.x,y:me.y},over:r};y((()=>{null==e||e(i),E({type:"onDragMove",event:i})}))}),[me.x,me.y]),i((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=te.current;if(!e||null==j.current||!t||!r)return;const{onDragOver:i}=$.current,l=o.get(ye),a=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};y((()=>{xe(a),null==i||i(s),E({type:"onDragOver",event:s})}))}),[ye]),Ue((()=>{te.current={activatorEvent:L,active:V,activeNode:X,collisionRect:ve,collisions:be,droppableRects:W,draggableNodes:M,draggingNode:re,draggingNodeRect:ie,droppableContainers:F,over:we,scrollableAncestors:ue,scrollAdjustedTranslate:me},A.current={initial:ie,translated:ve}}),[V,X,be,ve,M,re,ie,W,F,we,ue,me]),gn({...J,delta:k,draggingRect:ve,pointerCoordinates:ge,scrollableAncestors:ue,scrollableAncestorRects:de});const Ee=o((()=>({active:V,activeNode:X,activeNodeRect:Q,activatorEvent:L,collisions:be,containerNodeRect:ee,dragOverlay:oe,draggableNodes:M,droppableContainers:F,droppableRects:W,over:we,measureDroppableContainers:q,scrollableAncestors:ue,scrollableAncestorRects:de,measuringConfiguration:U,measuringScheduled:K,windowRect:se})),[V,X,Q,L,be,ee,oe,M,F,W,we,q,ue,de,U,K,se]),_e=o((()=>({activatorEvent:L,activators:Re,active:V,activeNodeRect:Q,ariaDescribedById:{draggable:G},dispatch:R,draggableNodes:M,over:we,measureDroppableContainers:q})),[L,Re,V,Q,R,G,M,we,q]);return t.createElement(dt.Provider,{value:_},t.createElement(Mn.Provider,{value:_e},t.createElement(kn.Provider,{value:Ee},t.createElement(Vn.Provider,{value:Se},h)),t.createElement(An,{disabled:!1===(null==p?void 0:p.restoreFocus)})),t.createElement(pt,{...p,hiddenTextDescribedById:G}))})),zn=u(null),Ln="button",Hn="Droppable";function $n(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const l=Ze(Hn),{activators:a,activatorEvent:s,active:u,activeNodeRect:c,ariaDescribedById:g,draggableNodes:p,over:f}=d(Mn),{role:h=Ln,roleDescription:m="draggable",tabIndex:v=0}=i??{},b=(null==u?void 0:u.id)===t,y=d(b?Vn:zn),[w,x]=Xe(),[S,C]=Xe(),R=function(e,t){return o((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(a,t),E=qe(n);Ue((()=>(p.set(t,{id:t,key:l,node:w,activatorNode:S,data:E}),()=>{const e=p.get(t);e&&e.key===l&&p.delete(t)})),[p,t]);return{active:u,activatorEvent:s,activeNodeRect:c,attributes:o((()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||h!==Ln)||void 0,"aria-roledescription":m,"aria-describedby":g.draggable})),[r,h,v,b,m,g.draggable]),isDragging:b,listeners:r?void 0:R,node:w,over:f,setNodeRef:x,setActivatorNodeRef:C,transform:y}}const Gn="Droppable",Bn={timeout:25};function Un(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Wn(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function qn(e){return null!==e&&e>=0}const Kn=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=Un(t,o,n),l=t[r],a=i[r];return a&&l?{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}:null},Xn={scaleX:1,scaleY:1},Yn=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:l}=e;const a=null!=(t=i[n])?t:o;if(!a)return null;if(r===n){const e=i[l];return e?{x:0,y:n<l?e.top+e.height-(a.top+a.height):e.top-a.top,...Xn}:null}const s=function(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];return o?n<t?r?o.top-(r.top+r.height):i?i.top-(o.top+o.height):0:i?i.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}(i,r,n);return r>n&&r<=l?{x:0,y:-a.height-s,...Xn}:r<n&&r>=l?{x:0,y:a.height+s,...Xn}:{x:0,y:0,...Xn}};const Jn="Sortable",Zn=t.createContext({activeIndex:-1,containerId:Jn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Kn,disabled:{draggable:!1,droppable:!1}});function Qn(e){let{children:n,id:r,items:a,strategy:s=Kn,disabled:u=!1}=e;const{active:c,dragOverlay:g,droppableRects:p,over:f,measureDroppableContainers:h}=d(kn),m=Ze(Jn,r),v=null!==g.rect,b=o((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),y=null!=c,w=c?b.indexOf(c.id):-1,x=f?b.indexOf(f.id):-1,S=l(b),C=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(b,S.current),R=-1!==x&&-1===w||C,E=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);Ue((()=>{C&&y&&h(b)}),[C,b,y,h]),i((()=>{S.current=b}),[b]);const _=o((()=>({activeIndex:w,containerId:m,disabled:E,disableTransforms:R,items:b,overIndex:x,useDragOverlay:v,sortedRects:Wn(b,p),strategy:s})),[w,m,E.draggable,E.droppable,R,b,x,p,v,s]);return t.createElement(Zn.Provider,{value:_},n)}const eo=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return Un(n,o,r).indexOf(t)},to=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:l,previousItems:a,previousContainerId:s,transition:u}=e;return!(!u||!o||a!==i&&r===l)&&(!!n||l!==r&&t===s)},no={duration:200,easing:"ease"},oo="transform",ro=rt.Transition.toString({property:oo,duration:0,easing:"linear"}),io={roleDescription:"sortable"};function lo(e){let{animateLayoutChanges:t=to,attributes:n,disabled:r,data:u,getNewIndex:c=eo,id:g,strategy:p,resizeObserverConfig:f,transition:h=no}=e;const{items:m,containerId:v,activeIndex:b,disabled:y,disableTransforms:w,sortedRects:x,overIndex:S,useDragOverlay:C,strategy:R}=d(Zn),E=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(r,y),_=m.indexOf(g),D=o((()=>({sortable:{containerId:v,index:_,items:m},...u})),[v,u,_,m]),O=o((()=>m.slice(m.indexOf(g))),[m,g]),{rect:N,node:I,isOver:M,setNodeRef:k}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const s=Ze(Gn),{active:u,dispatch:c,over:g,measureDroppableContainers:p}=d(Mn),f=l({disabled:n}),h=l(!1),m=l(null),v=l(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...Bn,...r},x=qe(y??o),S=bn({callback:a((()=>{h.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),v.current=null}),w)):h.current=!0}),[w]),disabled:b||!u}),C=a(((e,t)=>{S&&(t&&(S.unobserve(t),h.current=!1),e&&S.observe(e))}),[S]),[R,E]=Xe(C),_=qe(t);return i((()=>{!S||!R.current||(S.disconnect(),h.current=!1,S.observe(R.current))}),[R,S]),Ue((()=>(c({type:ft.RegisterDroppable,element:{id:o,key:s,disabled:n,node:R,rect:m,data:_}}),()=>c({type:ft.UnregisterDroppable,key:s,id:o}))),[o]),i((()=>{n!==f.current.disabled&&(c({type:ft.SetDroppableDisabled,id:o,key:s,disabled:n}),f.current.disabled=n)}),[o,s,n,c]),{active:u,rect:m,isOver:(null==g?void 0:g.id)===o,node:R,over:g,setNodeRef:E}}({id:g,data:D,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...f}}),{active:F,activatorEvent:P,activeNodeRect:A,attributes:V,setNodeRef:j,listeners:T,isDragging:z,over:L,setActivatorNodeRef:H,transform:$}=$n({id:g,data:D,attributes:{...io,...n},disabled:E.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o((()=>e=>{t.forEach((t=>t(e)))}),t)}(k,j),B=!!F,U=B&&!w&&qn(b)&&qn(S),W=!C&&z,q=U?(W&&U?$:null)??(p??R)({rects:x,activeNodeRect:A,activeIndex:b,overIndex:S,index:_}):null,K=qn(b)&&qn(S)?c({id:g,items:m,activeIndex:b,overIndex:S}):_,X=null==F?void 0:F.id,Y=l({activeId:X,items:m,newIndex:K,containerId:v}),J=m!==Y.current.items,Z=t({active:F,containerId:v,isDragging:z,isSorting:B,id:g,index:_,items:m,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:h,wasDragging:null!=Y.current.activeId}),Q=function(e){let{disabled:t,index:n,node:o,rect:r}=e;const[a,u]=s(null),d=l(n);return Ue((()=>{if(!t&&n!==d.current&&o.current){const e=r.current;if(e){const t=Nt(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&u(n)}}n!==d.current&&(d.current=n)}),[t,n,o,r]),i((()=>{a&&u(null)}),[a]),a}({disabled:!Z,index:_,node:I,rect:N});return i((()=>{B&&Y.current.newIndex!==K&&(Y.current.newIndex=K),v!==Y.current.containerId&&(Y.current.containerId=v),m!==Y.current.items&&(Y.current.items=m)}),[B,K,v,m]),i((()=>{if(X===Y.current.activeId)return;if(X&&!Y.current.activeId)return void(Y.current.activeId=X);const e=setTimeout((()=>{Y.current.activeId=X}),50);return()=>clearTimeout(e)}),[X]),{active:F,activeIndex:b,attributes:V,data:D,rect:N,index:_,newIndex:K,items:m,isOver:M,isSorting:B,isDragging:z,listeners:T,node:I,overIndex:S,over:L,setNodeRef:G,setActivatorNodeRef:H,setDroppableNodeRef:k,setDraggableNodeRef:j,transform:Q??q,transition:function(){if(Q||J&&Y.current.newIndex===_)return ro;if((!W||nt(P))&&h&&(B||Z))return rt.Transition.toString({...h,property:oo})}()}}Xt.Down,Xt.Right,Xt.Up,Xt.Left;const ao=u(void 0),so=({children:e})=>{const[t,n]=s(new Set),[o,r]=s(!1);return V.jsx(ao.Provider,{value:{expandedRows:t,toggleExpand:e=>{n((t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))},enableResizingFlag:()=>r(!0),disableResizingFlag:()=>r(!1),isResizing:o},children:e})},uo=()=>{const e=d(ao);if(void 0===e)throw new Error("useRootContext must be used within a RootContextProvider");return e};function co({styledTableProps:e,row:t,index:r}){const{focusable:l,loading:a,getRowClassName:s,rowHeight:u,onRowClick:d,expandArrow:c,enableDnd:g,disableDndForRow:p,tdClassName:f,customSubRowData:h,renderSubRows:m,defaultExpanded:v,actions:b}=e,y=null==p?void 0:p(t),{transform:w,transition:x,setNodeRef:S,isDragging:C}=lo({id:t.original.id,disabled:!g||y}),R={transform:rt.Transform.toString(w),transition:x,opacity:C?.8:1,zIndex:C?1:0,position:"relative"},{expandedRows:E,isResizing:_,disableResizingFlag:O,toggleExpand:N}=uo();i((()=>{v&&t.getCanExpand()&&!t.getIsExpanded()&&N(t.id)}),[]);const I=t.getVisibleCells().map(((e,t,n)=>({...e,left:n.slice(0,t).reduce(((e,t)=>e+(t.column.getSize()||0)),0)}))),M=o((()=>I.filter((({column:e})=>e.columnDef.fixedLeft))),[I]);return V.jsxs(n,{children:[V.jsx("tr",{"data-index":r,"data-test":t.id,id:t.id,tabIndex:l?-1:void 0,className:Ve(Pe["t-row"],a&&Pe["is-loading"],t.getIsSelected()&&Pe.selected,null==s?void 0:s(t)),style:{height:u?`${u}px`:"inherit",...g&&R},ref:y?void 0:S,onMouseUp:e=>{var n,o;if(e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName)return;t.getCanExpand()&&!c&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r="Range"===(null==(o=window.getSelection())?void 0:o.type);d&&!r&&!_&&d(e,t),O()},children:I.map((e=>{var n;const o=e.column.id===D,r=e.column.columnDef.fixedLeft,i=e.id===(null==(n=M.at(-1))?void 0:n.id),l=E.has(t.original.id.toString());return V.jsx("td",{className:Ve(Pe["t-cell"],f,o&&Pe["action-cell"],o&&!!b&&M.length&&Pe.shadowed,o&&t.getIsSelected()&&Pe.selected,o&&(null!=s&&s(t)?null==s?void 0:s(t):Pe["action-cell-default-background"]),r&&Pe["fixed-cell"],i&&Pe.shadowed,r&&t.getIsSelected()&&Pe.selected,r&&(null!=s&&s(t)?null==s?void 0:s(t):Pe["fixed-cell-default-background"]),l&&Pe.expanded_row),style:{left:r?e.left:void 0},children:Fe(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&V.jsx(V.Fragment,{children:h&&m&&m({rows:h.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function go({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return V.jsx(V.Fragment,{children:n.map(((t,n)=>V.jsx(co,{styledTableProps:e,row:t,index:n},t.id)))})}const po=({colSpan:e,noRowsOverlay:t})=>V.jsx("tr",{className:Pe["no-rows-overlay"],children:V.jsx("td",{colSpan:e,children:t})});function fo({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:i,enableDnd:l,rowHeight:a}=t;return V.jsx("tbody",{className:Pe.tbody,children:0===o.length&&r?V.jsx(T,{colSpan:n.length,rowHeight:a}):o.length>0?V.jsx(V.Fragment,{children:l?V.jsx(Qn,{items:o,strategy:Yn,children:V.jsx(go,{table:e,styledTableProps:t})}):V.jsx(go,{table:e,styledTableProps:t})}):V.jsx(po,{colSpan:n.length,noRowsOverlay:i})})}const ho=()=>{const[e,t]=s(null),[n,o]=s(!1),r=a((e=>{t(e.currentTarget),o(!0)}),[]);return{open:n,handleClose:a((()=>{o(!1)}),[]),handleOpen:r,anchorEl:e}};function mo(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}function vo(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const bo={"table-pagination":"_table-pagination_k2a41_1","table-pagination__pages-list":"_table-pagination__pages-list_k2a41_13","table-pagination__pages-list__page":"_table-pagination__pages-list__page_k2a41_18","page-selected":"_page-selected_k2a41_29","check-icon":"_check-icon_k2a41_32"};function yo(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}const wo="_asma-core-ui-button_1r2np_1",xo={contained:"_contained_1r2np_27",outlined:"_outlined_1r2np_141",text:"_text_1r2np_255",textGray:"_textGray_1r2np_369",textWhite:"_textWhite_1r2np_426",large:"_large_1r2np_79",small:"_small_1r2np_74",medium:"_medium_1r2np_69",error:"_error_1r2np_84",common:"_common_1r2np_27"},So=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const d="large"===n||"medium"===n,c=s?"error":"common";return V.jsxs("button",{...u,className:Ve(wo,xo[e],xo[c],xo[n],t),ref:r,"data-test":a,children:[i,o&&V.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:d?"8px":"4px",paddingLeft:d?"8px":"4px",paddingRight:d?"8px":"4px"},children:o}),l]})};function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Co.apply(this,arguments)}function Ro(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function Eo(e,t){return(Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const _o=!1;var Do="production"!==process.env.NODE_ENV?x.oneOfType([x.number,x.shape({enter:x.number,exit:x.number,appear:x.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&x.oneOfType([x.string,x.shape({enter:x.string,exit:x.string,active:x.string}),x.shape({enter:x.string,enterDone:x.string,enterActive:x.string,exit:x.string,exitDone:x.string,exitActive:x.string})]);const Oo=t.createContext(null);var No="unmounted",Io="exited",Mo="entering",ko="entered",Fo="exiting",Po=function(e){function n(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=Io,o.appearStatus=Mo):r=ko:r=t.unmountOnExit||t.mountOnEnter?No:Io,o.state={status:r},o.nextCallback=null,o}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Eo(e,t)}(n,e),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===No?{status:Io}:null};var o=n.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Mo&&n!==ko&&(t=Mo):(n===Mo||n===ko)&&(t=Fo)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Mo){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Io&&this.setState({status:No})},o.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[b.findDOMNode(this),o],i=r[0],l=r[1],a=this.getTimeouts(),s=o?a.appear:a.enter;!e&&!n||_o?this.safeSetState({status:ko},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,l),this.safeSetState({status:Mo},(function(){t.props.onEntering(i,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:ko},(function(){t.props.onEntered(i,l)}))}))})))},o.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:b.findDOMNode(this);t&&!_o?(this.props.onExit(o),this.safeSetState({status:Fo},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Io},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:Io},(function(){e.props.onExited(o)}))},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],l=r[1];this.props.addEndListener(i,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===No)return null;var n=this.props,o=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var r=Ro(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return t.createElement(Oo.Provider,{value:null},"function"==typeof o?o(e,r):t.cloneElement(t.Children.only(o),r))},n}(t.Component);function Ao(){}Po.contextType=Oo,Po.propTypes="production"!==process.env.NODE_ENV?{nodeRef:x.shape({current:typeof Element>"u"?x.any:function(e,t,n,o,r,i){var l=e[t];return x.instanceOf(l&&"ownerDocument"in l?l.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:x.oneOfType([x.func.isRequired,x.element.isRequired]).isRequired,in:x.bool,mountOnEnter:x.bool,unmountOnExit:x.bool,appear:x.bool,enter:x.bool,exit:x.bool,timeout:function(e){var t=Do;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.apply(void 0,[e].concat(o))},addEndListener:x.func,onEnter:x.func,onEntering:x.func,onEntered:x.func,onExit:x.func,onExiting:x.func,onExited:x.func}:{},Po.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ao,onEntering:Ao,onEntered:Ao,onExit:Ao,onExiting:Ao,onExited:Ao},Po.UNMOUNTED=No,Po.EXITED=Io,Po.ENTERING=Mo,Po.ENTERED=ko,Po.EXITING=Fo;const Vo=Po;function jo(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}function To(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function zo(e){if(!To(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=zo(e[n])})),t}function Lo(e,t,n={clone:!0}){const o=n.clone?Co({},e):e;return To(e)&&To(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(To(t[r])&&r in e&&To(e[r])?o[r]=Lo(e[r],t[r],n):n.clone?o[r]=To(t[r])?zo(t[r]):t[r]:o[r]=t[r])})),o}function Ho(e,t,n,o,r){const i=e[t],l=r||t;if(null==i||typeof window>"u")return null;let a;const s=i.type;return"function"==typeof s&&!function(e){const{prototype:t={}}=e;return!!t.isReactComponent}(s)&&(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${o} \`${l}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const $o=jo(x.element,Ho);$o.isRequired=jo(x.element.isRequired,Ho);const Go=$o;function Bo(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Uo(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Bo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Wo=e=>e,qo=(()=>{let e=Wo;return{configure(t){e=t},generate:t=>e(t),reset(){e=Wo}}})(),Ko=qo,Xo={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Yo(e,t,n="Mui"){const o=Xo[t];return o?`${n}-${o}`:`${Ko.generate(e)}-${t}`}const Jo=["values","unit","step"],Zo=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Co({},e,{[t.key]:t.val})),{})};const Qo={borderRadius:4},er="production"!==process.env.NODE_ENV?x.oneOfType([x.number,x.string,x.object,x.array]):{};function tr(e,t){return t?Lo(e,t,{clone:!1}):e}const nr={xs:0,sm:600,md:900,lg:1200,xl:1536},or={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${nr[e]}px)`};function rr(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||or;return t.reduce(((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o)),{})}if("object"==typeof t){const e=o.breakpoints||or;return Object.keys(t).reduce(((o,r)=>{if(-1!==Object.keys(e.values||nr).indexOf(r)){o[e.up(r)]=n(t[r],r)}else{const e=r;o[e]=t[e]}return o}),{})}return n(t)}function ir(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function lr(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:ir(e,n)||o,t&&(r=t(r,o,e)),r}function ar(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:r}=e,i=e=>{if(null==e[t])return null;const i=e[t],l=ir(e.theme,o)||{};return rr(e,i,(e=>{let o=lr(l,r,e);return e===o&&"string"==typeof e&&(o=lr(l,r,`${t}${"default"===e?"":Uo(e)}`,e)),!1===n?o:{[n]:o}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:er}:{},i.filterProps=[t],i}const sr={m:"margin",p:"padding"},ur={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},dr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!dr[e])return[e];e=dr[e]}const[t,n]=e.split(""),o=sr[t],r=ur[n]||"";return Array.isArray(r)?r.map((e=>o+e)):[o+r]})),gr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],pr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],fr=[...gr,...pr];function hr(e,t,n,o){var r;const i=null!=(r=ir(e,t,!1))?r:n;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function mr(e){return hr(e,"spacing",8,"spacing")}function vr(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function br(e,t,n,o){if(-1===t.indexOf(n))return null;const r=function(e,t){return n=>e.reduce(((e,o)=>(e[o]=vr(t,n),e)),{})}(cr(n),o);return rr(e,e[n],r)}function yr(e,t){const n=mr(e.theme);return Object.keys(e).map((o=>br(e,t,o,n))).reduce(tr,{})}function wr(e){return yr(e,gr)}function xr(e){return yr(e,pr)}function Sr(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,o)=>t[o]?tr(n,t[o](e)):n),{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function Cr(e){return"number"!=typeof e?e:`${e}px solid`}wr.propTypes="production"!==process.env.NODE_ENV?gr.reduce(((e,t)=>(e[t]=er,e)),{}):{},wr.filterProps=gr,xr.propTypes="production"!==process.env.NODE_ENV?pr.reduce(((e,t)=>(e[t]=er,e)),{}):{},xr.filterProps=pr,"production"!==process.env.NODE_ENV&&fr.reduce(((e,t)=>(e[t]=er,e)),{});const Rr=ar({prop:"border",themeKey:"borders",transform:Cr}),Er=ar({prop:"borderTop",themeKey:"borders",transform:Cr}),_r=ar({prop:"borderRight",themeKey:"borders",transform:Cr}),Dr=ar({prop:"borderBottom",themeKey:"borders",transform:Cr}),Or=ar({prop:"borderLeft",themeKey:"borders",transform:Cr}),Nr=ar({prop:"borderColor",themeKey:"palette"}),Ir=ar({prop:"borderTopColor",themeKey:"palette"}),Mr=ar({prop:"borderRightColor",themeKey:"palette"}),kr=ar({prop:"borderBottomColor",themeKey:"palette"}),Fr=ar({prop:"borderLeftColor",themeKey:"palette"}),Pr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=hr(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:vr(t,e)});return rr(e,e.borderRadius,n)}return null};Pr.propTypes="production"!==process.env.NODE_ENV?{borderRadius:er}:{},Pr.filterProps=["borderRadius"],Sr(Rr,Er,_r,Dr,Or,Nr,Ir,Mr,kr,Fr,Pr);const Ar=e=>{if(void 0!==e.gap&&null!==e.gap){const t=hr(e.theme,"spacing",8,"gap"),n=e=>({gap:vr(t,e)});return rr(e,e.gap,n)}return null};Ar.propTypes="production"!==process.env.NODE_ENV?{gap:er}:{},Ar.filterProps=["gap"];const Vr=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=hr(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:vr(t,e)});return rr(e,e.columnGap,n)}return null};Vr.propTypes="production"!==process.env.NODE_ENV?{columnGap:er}:{},Vr.filterProps=["columnGap"];const jr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=hr(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:vr(t,e)});return rr(e,e.rowGap,n)}return null};jr.propTypes="production"!==process.env.NODE_ENV?{rowGap:er}:{},jr.filterProps=["rowGap"];function Tr(e,t){return"grey"===t?t:e}Sr(Ar,Vr,jr,ar({prop:"gridColumn"}),ar({prop:"gridRow"}),ar({prop:"gridAutoFlow"}),ar({prop:"gridAutoColumns"}),ar({prop:"gridAutoRows"}),ar({prop:"gridTemplateColumns"}),ar({prop:"gridTemplateRows"}),ar({prop:"gridTemplateAreas"}),ar({prop:"gridArea"}));function zr(e){return e<=1&&0!==e?100*e+"%":e}Sr(ar({prop:"color",themeKey:"palette",transform:Tr}),ar({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Tr}),ar({prop:"backgroundColor",themeKey:"palette",transform:Tr}));const Lr=ar({prop:"width",transform:zr}),Hr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,o,r;return{maxWidth:(null==(n=e.theme)||null==(o=n.breakpoints)||null==(r=o.values)?void 0:r[t])||nr[t]||zr(t)}};return rr(e,e.maxWidth,t)}return null};Hr.filterProps=["maxWidth"];const $r=ar({prop:"minWidth",transform:zr}),Gr=ar({prop:"height",transform:zr}),Br=ar({prop:"maxHeight",transform:zr}),Ur=ar({prop:"minHeight",transform:zr});ar({prop:"size",cssProperty:"width",transform:zr}),ar({prop:"size",cssProperty:"height",transform:zr});Sr(Lr,Hr,$r,Gr,Br,Ur,ar({prop:"boxSizing"}));const Wr={border:{themeKey:"borders",transform:Cr},borderTop:{themeKey:"borders",transform:Cr},borderRight:{themeKey:"borders",transform:Cr},borderBottom:{themeKey:"borders",transform:Cr},borderLeft:{themeKey:"borders",transform:Cr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Pr},color:{themeKey:"palette",transform:Tr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Tr},backgroundColor:{themeKey:"palette",transform:Tr},p:{style:xr},pt:{style:xr},pr:{style:xr},pb:{style:xr},pl:{style:xr},px:{style:xr},py:{style:xr},padding:{style:xr},paddingTop:{style:xr},paddingRight:{style:xr},paddingBottom:{style:xr},paddingLeft:{style:xr},paddingX:{style:xr},paddingY:{style:xr},paddingInline:{style:xr},paddingInlineStart:{style:xr},paddingInlineEnd:{style:xr},paddingBlock:{style:xr},paddingBlockStart:{style:xr},paddingBlockEnd:{style:xr},m:{style:wr},mt:{style:wr},mr:{style:wr},mb:{style:wr},ml:{style:wr},mx:{style:wr},my:{style:wr},margin:{style:wr},marginTop:{style:wr},marginRight:{style:wr},marginBottom:{style:wr},marginLeft:{style:wr},marginX:{style:wr},marginY:{style:wr},marginInline:{style:wr},marginInlineStart:{style:wr},marginInlineEnd:{style:wr},marginBlock:{style:wr},marginBlockStart:{style:wr},marginBlockEnd:{style:wr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ar},rowGap:{style:jr},columnGap:{style:Vr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:zr},maxWidth:{style:Hr},minWidth:{transform:zr},height:{transform:zr},maxHeight:{transform:zr},minHeight:{transform:zr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},qr=Wr;const Kr=function(){function e(e,t,n,o){const r={[e]:t,theme:n},i=o[e];if(!i)return{[e]:t};const{cssProperty:l=e,themeKey:a,transform:s,style:u}=i;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const d=ir(n,a)||{};return u?u(r):rr(r,t,(t=>{let n=lr(d,s,t);return t===n&&"string"==typeof t&&(n=lr(d,s,`${e}${"default"===t?"":Uo(t)}`,t)),!1===l?n:{[l]:n}}))}return function t(n){var o;const{sx:r,theme:i={}}=n||{};if(!r)return null;const l=null!=(o=i.unstable_sxConfig)?o:qr;function a(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const r=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(r);let s=r;return Object.keys(o).forEach((n=>{const r=function(e,t){return"function"==typeof e?e(t):e}(o[n],i);if(null!=r)if("object"==typeof r)if(l[n])s=tr(s,e(n,r,i,l));else{const e=rr({theme:i},r,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,r)?s=tr(s,e):s[n]=t({sx:r,theme:i})}else s=tr(s,e(n,r,i,l))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(a,s)}return Array.isArray(r)?r.map(a):a(r)}}();Kr.filterProps=["sx"];const Xr=Kr,Yr=["breakpoints","palette","spacing","shape"];function Jr(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={}}=e,l=Ro(e,Yr),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,r=Ro(e,Jo),i=Zo(t),l=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function u(e,r){const i=l.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[l[i]]?t[l[i]]:r)-o/100}${n})`}return Co({keys:l,values:i,up:a,down:s,between:u,only:function(e){return l.indexOf(e)+1<l.length?u(e,l[l.indexOf(e)+1]):a(e)},not:function(e){const t=l.indexOf(e);return 0===t?a(l[1]):t===l.length-1?s(l[t]):u(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},r)}(n),s=function(e=8){if(e.mui)return e;const t=mr({spacing:e}),n=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" "));return n.mui=!0,n}(r);let u=Lo({breakpoints:a,direction:"ltr",components:{},palette:Co({mode:"light"},o),spacing:s,shape:Co({},Qo,i)},l);return u=t.reduce(((e,t)=>Lo(e,t)),u),u.unstable_sxConfig=Co({},qr,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Xr({sx:e,theme:this})},u}function Zr(t=null){const n=e.useContext(S);return!n||function(e){return 0===Object.keys(e).length}(n)?t:n}const Qr=Jr();function ei(e,t=0,n=1){return"production"!==process.env.NODE_ENV&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Math.min(Math.max(t,e),n)}function ti(e){if(e.type)return e;if("#"===e.charAt(0))return ti(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Bo(9,e));let o,r=e.substring(t+1,e.length-1);if("color"===n){if(r=r.split(" "),o=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${o}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Bo(10,o))}else r=r.split(",");return r=r.map((e=>parseFloat(e))),{type:n,values:r,colorSpace:o}}function ni(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return-1!==t.indexOf("rgb")?o=o.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),o=-1!==t.indexOf("color")?`${n} ${o.join(" ")}`:`${o.join(", ")}`,`${t}(${o})`}function oi(e){let t="hsl"===(e=ti(e)).type||"hsla"===e.type?ti(function(e){e=ti(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),l=(e,t=(e+n/30)%12)=>r-i*Math.max(Math.min(t-3,9-t,1),-1);let a="rgb";const s=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(a+="a",s.push(t[3])),ni({type:a,values:s})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ri(e,t){const n=oi(e),o=oi(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function ii(e,t){return Co({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const li={black:"#000",white:"#fff"},ai={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},si={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ui={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},di={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ci={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},gi={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},pi={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},fi=["mode","contrastThreshold","tonalOffset"],hi={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:li.white,default:li.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},mi={text:{primary:li.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:li.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function vi(e,t,n,o){const r=o.light||o,i=o.dark||1.5*o;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=ti(e),t=ei(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ni(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=ti(e),t=ei(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ni(e)}(e.main,i)))}function bi(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,r=Ro(e,fi),i=e.primary||function(e="light"){return"dark"===e?{main:ci[200],light:ci[50],dark:ci[400]}:{main:ci[700],light:ci[400],dark:ci[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:si[200],light:si[50],dark:si[400]}:{main:si[500],light:si[300],dark:si[700]}}(t),a=e.error||function(e="light"){return"dark"===e?{main:ui[500],light:ui[300],dark:ui[700]}:{main:ui[700],light:ui[400],dark:ui[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:gi[400],light:gi[300],dark:gi[700]}:{main:gi[700],light:gi[500],dark:gi[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:pi[400],light:pi[300],dark:pi[700]}:{main:pi[800],light:pi[500],dark:pi[900]}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:di[400],light:di[300],dark:di[700]}:{main:"#ed6c02",light:di[500],dark:di[900]}}(t);function c(e){const t=ri(e,mi.text.primary)>=n?mi.text.primary:hi.text.primary;if("production"!==process.env.NODE_ENV){const n=ri(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return t}const g=({color:e,name:t,mainShade:n=500,lightShade:r=300,darkShade:i=700})=>{if(!(e=Co({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`:Bo(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@mui/material/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });`:Bo(12,t?` (${t})`:"",JSON.stringify(e.main)));return vi(e,"light",r,o),vi(e,"dark",i,o),e.contrastText||(e.contrastText=c(e.main)),e},p={dark:mi,light:hi};return"production"!==process.env.NODE_ENV&&(p[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Lo(Co({common:Co({},li),mode:t,primary:g({color:i,name:"primary"}),secondary:g({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:a,name:"error"}),warning:g({color:d,name:"warning"}),info:g({color:s,name:"info"}),success:g({color:u,name:"success"}),grey:ai,contrastThreshold:n,getContrastText:c,augmentColor:g,tonalOffset:o},p[t]),r)}const yi=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function wi(e){return Math.round(1e5*e)/1e5}const xi={textTransform:"uppercase"},Si='"Roboto", "Helvetica", "Arial", sans-serif';function Ci(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=Si,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:l=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:d,pxToRem:c}=n,g=Ro(n,yi);"production"!==process.env.NODE_ENV&&("number"!=typeof r&&console.error("MUI: `fontSize` is required to be a number."),"number"!=typeof u&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,f=c||(e=>e/u*p+"rem"),h=(e,t,n,r,i)=>Co({fontFamily:o,fontWeight:e,fontSize:f(t),lineHeight:n},o===Si?{letterSpacing:`${wi(r/t)}em`}:{},i,d),m={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(l,48,1.167,0),h4:h(l,34,1.235,.25),h5:h(l,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(l,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(l,16,1.5,.15),body2:h(l,14,1.43,.15),button:h(a,14,1.75,.4,xi),caption:h(l,12,1.66,.4),overline:h(l,12,2.66,1,xi),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Lo(Co({htmlFontSize:u,pxToRem:f,fontFamily:o,fontSize:r,fontWeightLight:i,fontWeightRegular:l,fontWeightMedium:a,fontWeightBold:s},m),g,{clone:!1})}function Ri(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const Ei=["none",Ri(0,2,1,-1,0,1,1,0,0,1,3,0),Ri(0,3,1,-2,0,2,2,0,0,1,5,0),Ri(0,3,3,-2,0,3,4,0,0,1,8,0),Ri(0,2,4,-1,0,4,5,0,0,1,10,0),Ri(0,3,5,-1,0,5,8,0,0,1,14,0),Ri(0,3,5,-1,0,6,10,0,0,1,18,0),Ri(0,4,5,-2,0,7,10,1,0,2,16,1),Ri(0,5,5,-3,0,8,10,1,0,3,14,2),Ri(0,5,6,-3,0,9,12,1,0,3,16,2),Ri(0,6,6,-3,0,10,14,1,0,4,18,3),Ri(0,6,7,-4,0,11,15,1,0,4,20,3),Ri(0,7,8,-4,0,12,17,2,0,5,22,4),Ri(0,7,8,-4,0,13,19,2,0,5,24,4),Ri(0,7,9,-4,0,14,21,2,0,5,26,4),Ri(0,8,9,-5,0,15,22,2,0,6,28,5),Ri(0,8,10,-5,0,16,24,2,0,6,30,5),Ri(0,8,11,-5,0,17,26,2,0,6,32,5),Ri(0,9,11,-5,0,18,28,2,0,7,34,6),Ri(0,9,12,-6,0,19,29,2,0,7,36,6),Ri(0,10,13,-6,0,20,31,3,0,8,38,7),Ri(0,10,13,-6,0,21,33,3,0,8,40,7),Ri(0,10,14,-6,0,22,35,3,0,8,42,7),Ri(0,11,14,-7,0,23,36,3,0,9,44,8),Ri(0,11,15,-7,0,24,38,3,0,9,46,8)],_i=["duration","easing","delay"],Di={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Oi={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ni(e){return`${Math.round(e)}ms`}function Ii(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function Mi(e){const t=Co({},Di,e.easing),n=Co({},Oi,e.duration);return Co({getAutoHeightDuration:Ii,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:i=t.easeInOut,delay:l=0}=o,a=Ro(o,_i);if("production"!==process.env.NODE_ENV){const t=e=>"string"==typeof e,n=e=>!isNaN(parseFloat(e));!t(e)&&!Array.isArray(e)&&console.error('MUI: Argument "props" must be a string or Array.'),!n(r)&&!t(r)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${r}.`),t(i)||console.error('MUI: Argument "easing" must be a string.'),!n(l)&&!t(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),0!==Object.keys(a).length&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(a).join(",")}].`)}return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof r?r:Ni(r)} ${i} ${"string"==typeof l?l:Ni(l)}`)).join(",")}},e,{easing:t,duration:n})}const ki={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Fi=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const Pi=function(e={},...t){const{mixins:n={},palette:o={},transitions:r={},typography:i={}}=e,l=Ro(e,Fi);if(e.vars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Bo(18));const a=bi(o),s=Jr(e);let u=Lo(s,{mixins:ii(s.breakpoints,n),palette:a,shadows:Ei.slice(),typography:Ci(a,i),transitions:Mi(r),zIndex:Co({},ki)});if(u=Lo(u,l),u=t.reduce(((e,t)=>Lo(e,t)),u),"production"!==process.env.NODE_ENV){const e=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],t=(t,n)=>{let o;for(o in t){const r=t[o];if(-1!==e.indexOf(o)&&Object.keys(r).length>0){if("production"!==process.env.NODE_ENV){const e=Yo("",o);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${o}\` internal state.`,"You can not override it like this: ",JSON.stringify(t,null,2),"",`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:r}},null,2),"","https://mui.com/r/state-classes-guide"].join("\n"))}t[o]={}}}};Object.keys(u.components).forEach((e=>{const n=u.components[e].styleOverrides;n&&0===e.indexOf("Mui")&&t(n,e)}))}return u.unstable_sxConfig=Co({},qr,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Xr({sx:e,theme:this})},u}(),Ai=Pi;function Vi(){const t=function(e=Qr){return Zr(e)}(Ai);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t.$$material||t}function ji(e,t){var n,o;const{timeout:r,easing:i,style:l={}}=e;return{duration:null!=(n=l.transitionDuration)?n:"number"==typeof r?r:r[t.mode]||0,easing:null!=(o=l.transitionTimingFunction)?o:"object"==typeof i?i[t.mode]:i,delay:l.transitionDelay}}const Ti=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],zi={entering:{opacity:1},entered:{opacity:1}},Li=e.forwardRef((function(t,n){const o=Vi(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:l=!0,children:a,easing:s,in:u,onEnter:d,onEntered:c,onEntering:g,onExit:p,onExited:f,onExiting:h,style:m,timeout:v=r,TransitionComponent:b=Vo}=t,y=Ro(t,Ti),w=e.useRef(null),x=function(...t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}(w,a.ref,n),S=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},C=S(g),R=S(((e,t)=>{(e=>{e.scrollTop})(e);const n=ji({style:m,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=o.transitions.create("opacity",n),e.style.transition=o.transitions.create("opacity",n),d&&d(e,t)})),E=S(c),_=S(h),D=S((e=>{const t=ji({style:m,timeout:v,easing:s},{mode:"exit"});e.style.webkitTransition=o.transitions.create("opacity",t),e.style.transition=o.transitions.create("opacity",t),p&&p(e)})),O=S(f);return V.jsx(b,Co({appear:l,in:u,nodeRef:w,onEnter:R,onEntered:E,onEntering:C,onExit:D,onExited:O,onExiting:_,addEndListener:e=>{i&&i(w.current,e)},timeout:v},y,{children:(t,n)=>e.cloneElement(a,Co({style:Co({opacity:0,visibility:"exited"!==t||u?void 0:"hidden"},zi[t],m,a.props.style),ref:x},n))}))}));"production"!==process.env.NODE_ENV&&(Li.propTypes={addEndListener:x.func,appear:x.bool,children:Go.isRequired,easing:x.oneOfType([x.shape({enter:x.string,exit:x.string}),x.string]),in:x.bool,onEnter:x.func,onEntered:x.func,onEntering:x.func,onExit:x.func,onExited:x.func,onExiting:x.func,style:x.object,timeout:x.oneOfType([x.number,x.shape({appear:x.number,enter:x.number,exit:x.number})])});const Hi=Li,$i=e=>V.jsx(f,{TransitionComponent:Hi,TransitionProps:{timeout:300},arrow:!0,placement:"top",componentsProps:{tooltip:{sx:{borderRadius:"3px !important","& .MuiTooltip-arrow":{color:"#363E4A !important"},color:"white !important",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) !important",display:"flex !important",padding:"4px 8px !important",alignItems:"center !important",fontSize:"12px !important",lineHeight:"16px !important",letterSpacing:" 0.24px !important",bgcolor:"#363E4A !important",wordBreak:"break-word !important"}}},...e});function Gi(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const Bi=e=>V.jsxs(h,{classes:{root:"flex gap-x-1"},sx:{padding:"8px","&.Mui-selected":{backgroundColor:"var(--colors-gama-50)","&:hover":{backgroundColor:"var(--colors-gama-50)"}}},...e,children:[V.jsx(Gi,{width:24,height:24,color:e.selected?"var(--colors-gama-500)":"transparent",style:{transition:"color 0.2s ease"}}),e.children]}),Ui=[10,20,50];function Wi({table:e,showRowSelect:t,locale:n}){const{anchorEl:r,open:i,handleClose:s,handleOpen:u}=ho(),{anchorEl:d,open:c,handleClose:g,handleOpen:p}=ho(),f=l(null),h="no"===n,v=o((()=>({anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}})),[]),b=a((()=>{var e,t,n;const o=Pe["asma-ui-table-styled-table"];null==(n=null==(t=null==(e=f.current)?void 0:e.closest(`.${o}`))?void 0:t.querySelector('[data-index="0"]'))||n.scrollIntoView({block:"center",inline:"start"})}),[]),y=e.getPageCount()||1,w=e.getState().pagination.pageIndex+1,x=o((()=>Array.from({length:y},((e,t)=>t+1))),[y]),S=e.getState().pagination.pageSize,C=o((()=>{const e=new Set([...Ui,S]);return Array.from(e).sort(((e,t)=>e-t))}),[]),R=a((t=>{e.setPageIndex(t-1),s(),b()}),[e,s,b]),E=a((t=>{e.setPageSize(t),g()}),[e,g]);return V.jsxs("div",{ref:f,className:bo["table-pagination"],children:[t&&V.jsxs(V.Fragment,{children:[V.jsxs(So,{dataTest:"table-rows-count-button",variant:"outlined",size:"large",onClick:p,endIcon:V.jsx(mo,{className:(c?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[S," ",h?"rader":"rows"]}),V.jsx(m,{open:c,anchorEl:d,slotProps:{paper:{sx:{width:d?d.clientWidth:void 0}}},onClose:g,anchorOrigin:v.anchorOrigin,transformOrigin:v.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:C.map((e=>V.jsx(Bi,{onClick:t=>{t.stopPropagation(),t.preventDefault(),E(e)},selected:S===e,children:V.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[e," ",h?"rader":"rows"]})},e)))})]}),V.jsx($i,{title:h?"Nåværende side":"Current Page",children:V.jsx("div",{children:V.jsxs(So,{dataTest:"current-page-button",variant:"outlined",size:"large",onClick:u,endIcon:V.jsx(mo,{className:(i?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[h?"Side":"Page"," ",w," ",h?"av":"of"," ",y]})})}),V.jsx(m,{open:i,anchorEl:r,slotProps:{paper:{sx:{width:r?r.clientWidth:void 0}}},onClose:s,anchorOrigin:v.anchorOrigin,transformOrigin:v.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:x.map((e=>V.jsx(Bi,{onClick:t=>{t.stopPropagation(),t.preventDefault(),R(e)},selected:e===w,children:V.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[h?"Side":"Page"," ",e]})},e)))}),V.jsx($i,{title:1===w?"":h?"Forrige side":"Previous Page",children:V.jsx("div",{children:V.jsx(So,{dataTest:"prev-page-button",variant:"outlined",onClick:()=>{e.previousPage(),b()},size:"large",disabled:!e.getCanPreviousPage(),startIcon:V.jsx(yo,{height:24,width:24})})})}),V.jsx($i,{title:w===y?"":h?"Neste side":"Next Page",children:V.jsx("div",{children:V.jsx(So,{dataTest:"next-page-button",variant:"outlined",onClick:()=>{e.nextPage(),b()},size:"large",disabled:!e.getCanNextPage(),startIcon:V.jsx(vo,{height:24,width:24})})})})]})}function qi({table:e,styledTableProps:t}){var n,o;if(t.hideFooter)return null;const r=t.paginationAlignLeft;return V.jsxs("div",{className:Pe["table-footer"],style:r&&{justifyContent:"flex-start"}||{},children:[!r&&(null==(n=t.footer)?void 0:n.call(t,e)),V.jsx(Wi,{table:e,showRowSelect:!!t.showRowCountSelect,locale:t.locale||"en"}),r&&(null==(o=t.footer)?void 0:o.call(t,e))]})}const Ki=t=>{const{columns:n,data:o,initialState:r,pageSize:i,enableRowSelection:l,tableInstanceRef:a,...s}=t,u=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:Oe(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:i||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[E]:!1},...r},enableRowSelection:l,getCoreRowModel:e=>$((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=Ne(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>$((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?ke(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>$((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,d;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){d=i[e];const t=d.id;if(d.filterFn(n,t,d.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Me(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>$((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>$((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:l,rowsById:a}=n;const s=o*r,u=s+o;let d;i=i.slice(s,u),d=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:ke({rows:i,flatRows:l,rowsById:a}),d.flatRows=[];const c=e=>{d.flatRows.push(e),e.subRows.length&&e.subRows.forEach(c)};return d.rows.forEach(c),d}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:s.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:t.enableResizing?{size:void 0}:void 0,...s});return a&&(a.current=u),{table:u}},Xi=({dataTest:e,...t})=>V.jsx(v,{...t,"data-test":e,sx:{...t.sx,"&.MuiCheckbox-root":{color:"var(--colors-delta-500) !important"},"&.MuiCheckbox-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.MuiCheckbox-indeterminate":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.Mui-disabled":{color:"var(--colors-delta-200) !important"},"&.MuiCheckbox-root .PrivateSwitchBase-input":{height:"100% !important",width:"100% !important"}}});function Yi(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2"})})}const Ji=e=>{var t;return V.jsx(h,{...e,classes:{root:Ve("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})};function Zi({tableData:e,actions:n}){const{anchorEl:o,open:r,handleClose:i,handleOpen:l}=ho(),a=n(e.row);return V.jsx("div",{className:"flex justify-center items-center w-[40px]",children:a.length?V.jsxs("div",{className:"flex items-center justify-center",children:[V.jsx(So,{dataTest:"",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),l(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:V.jsx(Yi,{className:"text-delta-800",width:20,height:20})}),V.jsx(m,{open:r,anchorEl:o,onClose:i,onClick:i,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:n(e.row).map(((n,o)=>{if(R(n)){const r=n.component(e.row,i);return t.isValidElement(r)?V.jsx(t.Fragment,{children:r},o):null}return n.hide?null:V.jsx(Ji,{className:n.className,disabled:n.disabled,onClick:()=>{var t;null==(t=n.onClick)||t.call(n,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:n.label},o)}))})]}):null})}function Qi(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 9V4h2V2H6v2h2v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1l1-1v-7H19v-2c-1.66 0-3-1.34-3-3"})})}const el={"actions-header":"_actions-header_1bxzk_1","pin-indicator":"_pin-indicator_1bxzk_11","pin-icon":"_pin-icon_1bxzk_21"};function tl({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=ho(),i=e.table.getAllLeafColumns().some((e=>e.getCanHide()&&!e.getIsVisible()&&!I.includes(e.id)));return V.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[V.jsxs("div",{className:el["actions-header"],onClick:r,children:[V.jsx(Qi,{className:el["pin-icon"]}),i&&V.jsx("div",{className:el["pin-indicator"]})]}),V.jsx(m,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 44px)",overflowY:"auto",scrollbarWidth:"thin"}},children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==E)).map((e=>e.columnDef.header?V.jsxs(Ji,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),className:"h-[44px]",children:[V.jsx(Xi,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),e.columnDef.pinnedHeaderText?e.columnDef.pinnedHeaderText:"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}function nl(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:V.jsx("path",{fill:"currentColor",d:"M14 6.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0m-5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M5.5 8a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8.5 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M10.5 15a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M4 13.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0"})})}const ol=({rowId:e,rowHeight:t,...n})=>{const{attributes:o,listeners:r}=lo({id:e,...n});return V.jsx("div",{...o,...r,style:{height:t||"auto"},children:V.jsx(nl,{width:24,height:24,className:"text-delta-800"})})};function rl({info:e,rowHeight:t}){const{expandedRows:n,toggleExpand:o}=uo(),r=n.has(e.row.id),i=e.row.getCanExpand();return V.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},onClick:()=>{i&&e.row.getToggleExpandedHandler()(),o(e.row.id)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},children:V.jsx("div",{style:{rotate:r?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},children:V.jsx(mo,{width:20,height:20,color:"var(--colors-gray-700)"})})})}const il=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:l,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:d,customActionsColumnProps:c}=e,g=t.some((e=>!0===e.fixedLeft));!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o,rowHeight:r,customActionsColumnProps:i}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?V.jsx(tl,{headerData:e}):null,cell:e=>n||o?V.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&V.jsx("div",{children:null==o?void 0:o(e)}),n&&V.jsx(Zi,{tableData:e,actions:n})]}):null,size:50,...i}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:c})),d&&!t.find((e=>e.id===N))&&t.unshift(function(e,t){return{id:N,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>V.jsx(rl,{info:e,rowHeight:t}),fixedLeft:e}}(g,u)),l&&!d&&!t.find((e=>e.id===_))&&t.unshift(function(e,t){return{id:_,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?V.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:V.jsx(mo,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(g,u)),a&&!t.find((e=>e.id===O))&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>V.jsx(ol,{rowId:e.id,rowHeight:t}),...e,id:O}}(s,u)),i&&!t.find((e=>e.id===E))&&t.unshift(function(e,t){return{id:E,minSize:52,maxSize:52,size:52,header:({table:e})=>V.jsx(Xi,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>V.jsx("div",{className:"w-[38px] h-[38px] flex items-center",style:{height:t||"auto"},children:V.jsx(Xi,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})}),fixedLeft:e}}(g,u))};function ll(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function al(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const sl=e=>{const{header:t,enableResizing:n,tableWidth:o}=e;let r=t.getSize();const i=t.headerGroup.headers.reduce(((e,t)=>e+t.getSize()),0),l=t.headerGroup.headers.some((e=>e.id===D)),a=t.headerGroup.headers[t.headerGroup.headers.length-(l?2:1)],s=Number(null==a?void 0:a.getSize());if(!n){if(r&&(r=`${r}px`),a&&a.id===t.id){let e;e=o?Math.floor(o)-i+s:"100%";const n=t.column.columnDef.minSize||0;r="string"==typeof e?e:e>n?`${e}px`:`${n}px`}return{width:r||t.column.columnDef.size,maxWidth:r||t.column.columnDef.maxSize,minWidth:r||t.column.columnDef.minSize}}return{width:r||t.column.columnDef.size,maxWidth:t.column.columnDef.maxSize||r,minWidth:t.column.columnDef.minSize||r}};function ul({styledTableProps:e,header:t,tableCanResize:n=!1,left:r,hasFixedLeftColumn:i,tableWidth:a}){const{actions:s,hideHeader:u=!1,enableResizing:d=!1}=e,c=l(null),{isResizing:g,enableResizingFlag:p,disableResizingFlag:f}=uo(),h=o((()=>t.headerGroup.headers.some((e=>e.id===D))),[t.headerGroup.headers]),m=o((()=>t.headerGroup.headers[t.headerGroup.headers.length-(h?2:1)]),[t.headerGroup.headers,h]);return V.jsx("th",{ref:c,colSpan:t.colSpan,className:Ve(Pe["t-cell"],u&&Pe["hide-header"],t.column.id===D&&Pe["t-cell__actions"],i&&!!s&&t.column.id===D&&Pe.shadowed,!0===t.column.columnDef.fixedLeft&&Pe["t-cell__fixed"]),style:{...sl({enableResizing:d,header:t,element:c.current,tableWidth:a}),...t.column.columnDef.fixedLeft&&{left:r}},children:V.jsxs("div",{className:Ve("flex items-center justify-left",u?Pe["hide-table-header"]:Pe["show-table-header"],t.column.getCanSort()&&Pe["sortable-column"],t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!g&&n&&n(e),f()},children:[Fe(t.column.columnDef.header,t.getContext()),{asc:V.jsx(ll,{className:Pe["sort-icon"]}),desc:V.jsx(al,{className:Pe["sort-icon"]})}[t.column.getIsSorted()]??null,n&&(!!d||t.id!==(null==m?void 0:m.id))&&t.column.getCanResize()&&!I.includes(t.column.id)&&V.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>dl({styledTableProps:e,header:t})))},onTouchStart:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>dl({styledTableProps:e,header:t})))},className:`${Pe.resizer} ${t.column.getIsResizing()?Pe.isResizing:""}`})]})},t.id)}function dl({styledTableProps:e,header:t}){if(e.uniqueKey){const n=e.uniqueKey,o=localStorage.getItem(n);let r={};if(o)try{r=JSON.parse(o)}catch{console.warn("Failed to parse stored dimensions. Resetting."),r={}}r[t.column.id]=t.column.getSize(),localStorage.setItem(n,JSON.stringify(r))}}function cl(...e){return C(Ve(e))}function gl({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1,tableHeaderRef:i,tableHeaderStyle:l={}}=t,a=e.getHeaderGroups().some((e=>e.headers.some((e=>!0===e.column.columnDef.fixedLeft)))),s=r?{...l,position:"sticky",top:-.2}:{...l};return V.jsx("thead",{className:cl(Pe["table-header"],t.tableHeaderClassName),style:s,ref:i,children:e.getHeaderGroups().map((e=>V.jsx("tr",{children:e.headers.map(((r,i)=>{const l=r.column.columnDef.fixedLeft,s=e.headers.slice(0,i).reduce(((e,t)=>e+(t.column.getSize()||0)),0);return V.jsx(ul,{styledTableProps:t,header:r,tableCanResize:n,left:l?s:0,hasFixedLeftColumn:a,tableWidth:o},r.column.id)}))},e.id)))})}const pl=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:o}=e;return n&&t?function(e,t,n){const o={...e};return t.top+e.y<=n.top?o.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(o.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?o.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(o.x=n.left+n.width-t.right),o}(o,n,t):o},fl=e=>{let{transform:t}=e;return{...t,x:0}};function hl(e){return V.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[V.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),V.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:V.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const ml=({fetching:e=!1})=>e?V.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:V.jsx(hl,{className:Pe["loading-icon"],width:50,height:50})}):null,vl=({data:e,setData:t,children:n})=>{const r=o((()=>null==e?void 0:e.map((e=>e.id))),[e]);return V.jsx(Tn,{collisionDetection:St,modifiers:[fl,pl],onDragEnd:function(e){if(!t)return;const{active:n,over:o}=e;n&&o&&n.id!==o.id&&t((e=>Un(e,r.indexOf(n.id),r.indexOf(o.id))))},children:n})},bl=({data:e,setData:t,enableDnd:n,children:o})=>n?V.jsx(vl,{data:e,setData:t,children:o}):V.jsx(V.Fragment,{children:o}),yl=e=>{const t={...e,rowHeight:e.rowHeight||48},{className:n,tableClassName:i,height:a,data:u,enableDnd:d,setData:c}=t;il(t);const{table:g}=Ki(t),p=l(null),[f,h]=s(null);r((()=>{const e=p.current;if(!e)return;const t=t=>{const n=e.getBoundingClientRect().width;h((e=>"setup"===t||n!==e?n:e))},n=new ResizeObserver((()=>t("resize")));return n.observe(e),t("setup"),()=>{n.unobserve(e)}}),[]);const m=o((()=>{var e,n;if(!t.enableColumnResizing)return;const o=g.getFlatHeaders(),r={};for(let e=0;e<o.length;e++){const t=o[e];r[`--header-${t.id}-size`]=t.getSize(),r[`--col-${t.column.id}-size`]=t.column.getSize()}return null==(e=t.getTableState)||e.call(t,g.getState()),null==(n=t.getColumnSizing)||n.call(t,g.getState().columnSizing),r}),[t.enableColumnResizing,g.getState().columnSizingInfo,g.getState().columnSizing]),v=u.length>0&&e.loading;return V.jsx(so,{children:V.jsx(bl,{enableDnd:!!d,data:u,setData:c,children:V.jsxs("div",{className:cl(Pe["asma-ui-table-styled-table"],i),children:[V.jsx("div",{className:cl(Pe["table-wrapper"],v&&Pe["table-wrapper-fetching"],n),style:{height:a},children:V.jsxs("table",{ref:p,className:Pe["styled-table"],style:{...m},children:[V.jsx(gl,{table:g,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:f}),V.jsx(ml,{fetching:!!v}),m?V.jsx(V.Fragment,{children:g.getState().columnSizingInfo.isResizingColumn?V.jsx(wl,{table:g,styledTableProps:t}):V.jsx(fo,{table:g,styledTableProps:t})}):V.jsx(fo,{table:g,styledTableProps:t})]})}),V.jsx(qi,{table:g,styledTableProps:t})]})})})},wl=c(fo,((e,t)=>e.table.options.data===t.table.options.data));export{D as ACTIONS_COLUMN_ID,O as DND_HANDLE_COLUMN_ID,_ as EXPAND_COLUMN_ID,I as INTERNAL_COLUMN_IDS,wl as MemoizedTableBody,ol as RowDragHandleCell,E as SELECT_COLUMN_ID,N as SHOW_FULL_TEXT_ID,yl as StyledTable,Ie as createColumnHelper,R as isCustomAction};
|
|
41
|
+
function Fe(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const Pe={"asma-ui-table-styled-table":"_asma-ui-table-styled-table_f1odr_1","table-wrapper":"_table-wrapper_f1odr_10","table-wrapper-fetching":"_table-wrapper-fetching_f1odr_15","styled-table":"_styled-table_f1odr_18",tbody:"_tbody_f1odr_27","loading-icon":"_loading-icon_f1odr_32","t-row":"_t-row_f1odr_39","action-cell":"_action-cell_f1odr_55","fixed-cell":"_fixed-cell_f1odr_58","t-cell":"_t-cell_f1odr_73",expanded_row:"_expanded_row_f1odr_87",selected:"_selected_f1odr_111",shadowed:"_shadowed_f1odr_114","is-loading":"_is-loading_f1odr_132","action-cell-default-background":"_action-cell-default-background_f1odr_135","fixed-cell-default-background":"_fixed-cell-default-background_f1odr_138","no-rows-overlay":"_no-rows-overlay_f1odr_141","sortable-column":"_sortable-column_f1odr_150",resizer:"_resizer_f1odr_154",isResizing:"_isResizing_f1odr_166","hide-table-header":"_hide-table-header_f1odr_178","show-table-header":"_show-table-header_f1odr_182","table-header":"_table-header_f1odr_187","hide-header":"_hide-header_f1odr_207","t-cell__actions":"_t-cell__actions_f1odr_210","t-cell__fixed":"_t-cell__fixed_f1odr_220","sort-icon":"_sort-icon_f1odr_227","table-footer":"_table-footer_f1odr_230"};function Ae(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ae(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ve(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=Ae(e))&&(o&&(o+=" "),o+=t);return o}const je=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Te(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function ze(e){return"nodeType"in e}function Le(e){var t,n;return e?Te(e)?e:ze(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function He(e){const{Document:t}=Le(e);return e instanceof t}function $e(e){return!Te(e)&&e instanceof Le(e).HTMLElement}function Ge(e){return e instanceof Le(e).SVGElement}function Be(e){return e?Te(e)?e.document:ze(e)?He(e)?e:$e(e)||Ge(e)?e.ownerDocument:document:document:document}const Ue=je?r:i;function We(e){const t=l(e);return Ue((()=>{t.current=e})),a((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function qe(e,t){void 0===t&&(t=[e]);const n=l(e);return Ue((()=>{n.current!==e&&(n.current=e)}),t),n}function Ke(e,t){const n=l();return o((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function Xe(e){const t=We(e),n=l(null),o=a((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function Ye(e){const t=l();return i((()=>{t.current=e}),[e]),t.current}let Je={};function Ze(e,t){return o((()=>{if(t)return t;const n=null==Je[e]?0:Je[e]+1;return Je[e]=n,e+"-"+n}),[e,t])}function Qe(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t}),{...t})}}const et=Qe(1),tt=Qe(-1);function nt(e){if(!e)return!1;const{KeyboardEvent:t}=Le(e.target);return t&&e instanceof t}function ot(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=Le(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const rt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[rt.Translate.toString(e),rt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),it="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function lt(e){return e.matches(it)?e:e.querySelector(it)}const at={display:"none"};function st(e){let{id:n,value:o}=e;return t.createElement("div",{id:n,style:at},o)}function ut(e){let{id:n,announcement:o,ariaLiveType:r="assertive"}=e;return t.createElement("div",{id:n,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},o)}const dt=u(null);const ct={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},gt={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function pt(e){let{announcements:n=gt,container:r,hiddenTextDescribedById:l,screenReaderInstructions:u=ct}=e;const{announce:c,announcement:g}=function(){const[e,t]=s("");return{announce:a((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=Ze("DndLiveRegion"),[f,h]=s(!1);if(i((()=>{h(!0)}),[]),function(e){const t=d(dt);i((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(o((()=>({onDragStart(e){let{active:t}=e;c(n.onDragStart({active:t}))},onDragMove(e){let{active:t,over:o}=e;n.onDragMove&&c(n.onDragMove({active:t,over:o}))},onDragOver(e){let{active:t,over:o}=e;c(n.onDragOver({active:t,over:o}))},onDragEnd(e){let{active:t,over:o}=e;c(n.onDragEnd({active:t,over:o}))},onDragCancel(e){let{active:t,over:o}=e;c(n.onDragCancel({active:t,over:o}))}})),[c,n])),!f)return null;const m=t.createElement(t.Fragment,null,t.createElement(st,{id:l,value:u.draggable}),t.createElement(ut,{id:p,announcement:g}));return r?w(m,r):m}var ft,ht;function mt(){}(ht=ft||(ft={})).DragStart="dragStart",ht.DragMove="dragMove",ht.DragEnd="dragEnd",ht.DragCancel="dragCancel",ht.DragOver="dragOver",ht.RegisterDroppable="registerDroppable",ht.SetDroppableDisabled="setDroppableDisabled",ht.UnregisterDroppable="unregisterDroppable";const vt=Object.freeze({x:0,y:0});function bt(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function yt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function wt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function xt(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const St=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=xt(t,t.left,t.top),i=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=bt(xt(o),r);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(yt)};function Ct(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=r-o,a=i-n;if(o<r&&n<i){const n=t.width*t.height,o=e.width*e.height,r=l*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const Rt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,i=n.get(o);if(i){const n=Ct(i,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(wt)};function Et(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:vt}function _t(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const Dt=_t(1);const Ot={ignoreTransform:!1};function Nt(e,t){void 0===t&&(t=Ot);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=Le(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:i,x:l,y:a}=o,s=e.left-l-(1-r)*parseFloat(n),u=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?e.width/r:e.width,c=i?e.height/i:e.height;return{width:d,height:c,top:u,right:s+d,bottom:u+c,left:s}}(n,t,o))}const{top:o,left:r,width:i,height:l,bottom:a,right:s}=n;return{top:o,left:r,width:i,height:l,bottom:a,right:s}}function It(e){return Nt(e,{ignoreTransform:!0})}function Mt(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t||!r)return n;if(He(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!$e(r)||Ge(r)||n.includes(r))return n;const i=Le(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=Le(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(r,i)&&n.push(r),function(e,t){return void 0===t&&(t=Le(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?n:o(r.parentNode)}(e):n}function kt(e){const[t]=Mt(e,1);return t??null}function Ft(e){return je&&e?Te(e)?e:ze(e)?He(e)||e===Be(e).scrollingElement?window:$e(e)?e:null:null:null}function Pt(e){return Te(e)?e.scrollX:e.scrollLeft}function At(e){return Te(e)?e.scrollY:e.scrollTop}function Vt(e){return{x:Pt(e),y:At(e)}}var jt;function Tt(e){return!(!je||!e)&&e===document.scrollingElement}function zt(e){const t={x:0,y:0},n=Tt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(jt||(jt={}));const Lt={x:.2,y:.2};function Ht(e,t,n,o,r){let{top:i,left:l,right:a,bottom:s}=n;void 0===o&&(o=10),void 0===r&&(r=Lt);const{isTop:u,isBottom:d,isLeft:c,isRight:g}=zt(e),p={x:0,y:0},f={x:0,y:0},h=t.height*r.y,m=t.width*r.x;return!u&&i<=t.top+h?(p.y=jt.Backward,f.y=o*Math.abs((t.top+h-i)/h)):!d&&s>=t.bottom-h&&(p.y=jt.Forward,f.y=o*Math.abs((t.bottom-h-s)/h)),!g&&a>=t.right-m?(p.x=jt.Forward,f.x=o*Math.abs((t.right-m-a)/m)):!c&&l<=t.left+m&&(p.x=jt.Backward,f.x=o*Math.abs((t.left+m-l)/m)),{direction:p,speed:f}}function $t(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Gt(e){return e.reduce(((e,t)=>et(e,Vt(t))),vt)}const Bt=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Pt(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+At(t)),0)}]];class Ut{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Mt(t),o=Gt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Bt)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=r(n),l=o[e]-t;return this.rect[i]+l},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Wt{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function qt(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Kt,Xt;function Yt(e){e.preventDefault()}function Jt(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Kt||(Kt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(Xt||(Xt={}));const Zt={start:[Xt.Space,Xt.Enter],cancel:[Xt.Esc],end:[Xt.Space,Xt.Enter]},Qt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Xt.Right:return{...n,x:n.x+25};case Xt.Left:return{...n,x:n.x-25};case Xt.Down:return{...n,y:n.y+25};case Xt.Up:return{...n,y:n.y-25}}};class en{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Wt(Be(t)),this.windowListeners=new Wt(Le(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kt.Resize,this.handleCancel),this.windowListeners.add(Kt.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Kt.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Nt),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);kt(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(vt)}handleKeyDown(e){if(nt(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=Zt,coordinateGetter:i=Qt,scrollBehavior:l="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:s}=n.current,u=s?{x:s.left,y:s.top}:vt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=tt(d,u),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:u,maxScroll:c,minScroll:g}=zt(n),p=$t(n),f={x:Math.min(r===Xt.Right?p.right-p.width/2:p.right,Math.max(r===Xt.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(r===Xt.Down?p.bottom-p.height/2:p.bottom,Math.max(r===Xt.Down?p.top:p.top+p.height/2,d.y))},h=r===Xt.Right&&!a||r===Xt.Left&&!s,m=r===Xt.Down&&!u||r===Xt.Up&&!i;if(h&&f.x!==d.x){const e=n.scrollLeft+t.x,i=r===Xt.Right&&e<=c.x||r===Xt.Left&&e>=g.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});o.x=i?n.scrollLeft-e:r===Xt.Right?n.scrollLeft-c.x:n.scrollLeft-g.x,o.x&&n.scrollBy({left:-o.x,behavior:l});break}if(m&&f.y!==d.y){const e=n.scrollTop+t.y,i=r===Xt.Down&&e<=c.y||r===Xt.Up&&e>=g.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});o.y=i?n.scrollTop-e:r===Xt.Down?n.scrollTop-c.y:n.scrollTop-g.y,o.y&&n.scrollBy({top:-o.y,behavior:l});break}}this.handleMove(e,et(tt(d,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function tn(e){return!(!e||!("distance"in e))}function nn(e){return!(!e||!("delay"in e))}en.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Zt,onActivation:r}=t,{active:i}=n;const{code:l}=e.nativeEvent;if(o.start.includes(l)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class on{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=Le(e);return e instanceof t?e:Be(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Be(i),this.documentListeners=new Wt(this.document),this.listeners=new Wt(n),this.windowListeners=new Wt(Le(i)),this.initialCoordinates=null!=(o=ot(r))?o:vt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Kt.Resize,this.handleCancel),this.windowListeners.add(Kt.DragStart,Yt),this.windowListeners.add(Kt.VisibilityChange,this.handleCancel),this.windowListeners.add(Kt.ContextMenu,Yt),this.documentListeners.add(Kt.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(nn(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(tn(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Kt.Click,Jt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kt.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:i,options:{activationConstraint:l}}=r;if(!o)return;const a=null!=(t=ot(e))?t:vt,s=tt(o,a);if(!n&&l){if(tn(l)){if(null!=l.tolerance&&qt(s,l.tolerance))return this.handleCancel();if(qt(s,l.distance))return this.handleStart()}return nn(l)&&qt(s,l.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===Xt.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const rn={move:{name:"pointermove"},end:{name:"pointerup"}};class ln extends on{constructor(e){const{event:t}=e,n=Be(t.target);super(e,rn,n)}}ln.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const an={move:{name:"mousemove"},end:{name:"mouseup"}};var sn;!function(e){e[e.RightClick=2]="RightClick"}(sn||(sn={}));(class extends on{constructor(e){super(e,an,Be(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==sn.RightClick&&(null==o||o({event:n}),!0)}}];const un={move:{name:"touchmove"},end:{name:"touchend"}};var dn,cn;function gn(e){let{acceleration:t,activator:n=dn.Pointer,canScroll:r,draggingRect:s,enabled:u,interval:d=5,order:c=cn.TreeOrder,pointerCoordinates:g,scrollableAncestors:p,scrollableAncestorRects:f,delta:h,threshold:m}=e;const v=function(e){let{delta:t,disabled:n}=e;const o=Ye(t);return Ke((e=>{if(n||!o||!e)return pn;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[jt.Backward]:e.x[jt.Backward]||-1===r.x,[jt.Forward]:e.x[jt.Forward]||1===r.x},y:{[jt.Backward]:e.y[jt.Backward]||-1===r.y,[jt.Forward]:e.y[jt.Forward]||1===r.y}}}),[n,t,o])}({delta:h,disabled:!u}),[b,y]=function(){const e=l(null);return[a(((t,n)=>{e.current=setInterval(t,n)}),[]),a((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),w=l({x:0,y:0}),x=l({x:0,y:0}),S=o((()=>{switch(n){case dn.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case dn.DraggableRect:return s}}),[n,s,g]),C=l(null),R=a((()=>{const e=C.current;if(!e)return;const t=w.current.x*x.current.x,n=w.current.y*x.current.y;e.scrollBy(t,n)}),[]),E=o((()=>c===cn.TreeOrder?[...p].reverse():p),[c,p]);i((()=>{if(u&&p.length&&S){for(const e of E){if(!1===(null==r?void 0:r(e)))continue;const n=p.indexOf(e),o=f[n];if(!o)continue;const{direction:i,speed:l}=Ht(e,o,S,t,m);for(const e of["x","y"])v[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return y(),C.current=e,b(R,d),w.current=l,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()}),[t,R,r,y,u,d,JSON.stringify(S),JSON.stringify(v),b,p,E,f,JSON.stringify(m)])}(class extends on{constructor(e){super(e,un)}static setup(){return window.addEventListener(un.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(un.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(dn||(dn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(cn||(cn={}));const pn={x:{[jt.Backward]:!1,[jt.Forward]:!1},y:{[jt.Backward]:!1,[jt.Forward]:!1}};var fn,hn;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(fn||(fn={})),(hn||(hn={})).Optimized="optimized";const mn=new Map;function vn(e,t){return Ke((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function bn(e){let{callback:t,disabled:n}=e;const r=We(t),l=o((()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return i((()=>()=>null==l?void 0:l.disconnect()),[l]),l}function yn(e){return new Ut(Nt(e),e)}function wn(e,t,n){void 0===t&&(t=yn);const[r,l]=g((function(o){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=o??n)?r:null;const i=t(e);return JSON.stringify(o)===JSON.stringify(i)?o:i}),null),a=function(e){let{callback:t,disabled:n}=e;const r=We(t),l=o((()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return i((()=>()=>null==l?void 0:l.disconnect()),[l]),l}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){l();break}}}}),s=bn({callback:l});return Ue((()=>{l(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),r}const xn=[];function Sn(e,t){void 0===t&&(t=[]);const n=l(null);return i((()=>{n.current=null}),t),i((()=>{const t=e!==vt;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?tt(e,n.current):vt}function Cn(e){return o((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Rn=[];function En(e){let{measure:t}=e;const[n,r]=s(null),i=bn({callback:a((e=>{for(const{target:n}of e)if($e(n)){r((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),l=a((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return $e(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[u,d]=Xe(l);return o((()=>({nodeRef:u,rect:n,setRef:d})),[n,u,d])}const _n=[{sensor:ln,options:{}},{sensor:en,options:{}}],Dn={current:{}},On={draggable:{measure:It},droppable:{measure:It,strategy:fn.WhileDragging,frequency:hn.Optimized},dragOverlay:{measure:Nt}};class Nn extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const In={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:mt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:On,measureDroppableContainers:mt,windowRect:null,measuringScheduled:!1},Mn=u({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:mt,draggableNodes:new Map,over:null,measureDroppableContainers:mt}),kn=u(In);function Fn(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nn}}}function Pn(e,t){switch(t.type){case ft.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ft.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case ft.DragEnd:case ft.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ft.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new Nn(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case ft.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const l=new Nn(e.droppable.containers);return l.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:l}}}case ft.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new Nn(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function An(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=d(Mn),l=Ye(o),a=Ye(null==n?void 0:n.id);return i((()=>{if(!t&&!o&&l&&null!=a){if(!nt(l)||document.activeElement===l.target)return;const e=r.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=lt(e);if(t){t.focus();break}}}))}}),[o,t,r,a,l]),null}const Vn=u({...vt,scaleX:1,scaleY:1});var jn;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(jn||(jn={}));const Tn=c((function(e){var n,r,u,d;let{id:c,accessibility:p,autoScroll:f=!0,children:h,sensors:m=_n,collisionDetection:v=Rt,measuring:b,modifiers:w,...x}=e;const S=g(Pn,void 0,Fn),[C,R]=S,[E,_]=function(){const[e]=s((()=>new Set)),t=a((t=>(e.add(t),()=>e.delete(t))),[e]);return[a((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[D,O]=s(jn.Uninitialized),N=D===jn.Initialized,{draggable:{active:I,nodes:M,translate:k},droppable:{containers:F}}=C,P=I?M.get(I):null,A=l({initial:null,translated:null}),V=o((()=>{var e;return null!=I?{id:I,data:null!=(e=null==P?void 0:P.data)?e:Dn,rect:A}:null}),[I,P]),j=l(null),[T,z]=s(null),[L,H]=s(null),$=qe(x,Object.values(x)),G=Ze("DndDescribedBy",c),B=o((()=>F.getEnabled()),[F]),U=function(e){return o((()=>({draggable:{...On.draggable,...null==e?void 0:e.draggable},droppable:{...On.droppable,...null==e?void 0:e.droppable},dragOverlay:{...On.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(b),{droppableRects:W,measureDroppableContainers:q,measuringScheduled:K}=function(e,t){let{dragging:n,dependencies:o,config:r}=t;const[u,d]=s(null),{frequency:c,measure:g,strategy:p}=r,f=l(e),h=function(){switch(p){case fn.Always:return!1;case fn.BeforeDragging:return n;default:return!n}}(),m=qe(h),v=a((function(e){void 0===e&&(e=[]),!m.current&&d((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),b=l(null),y=Ke((t=>{if(h&&!n)return mn;if(!t||t===mn||f.current!==e||null!=u){const t=new Map;for(let n of e){if(!n)continue;if(u&&u.length>0&&!u.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Ut(g(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,u,n,h,g]);return i((()=>{f.current=e}),[e]),i((()=>{h||v()}),[n,h]),i((()=>{u&&u.length>0&&d(null)}),[JSON.stringify(u)]),i((()=>{h||"number"!=typeof c||null!==b.current||(b.current=setTimeout((()=>{v(),b.current=null}),c))}),[c,h,v,...o]),{droppableRects:y,measureDroppableContainers:v,measuringScheduled:null!=u}}(B,{dragging:N,dependencies:[k.x,k.y],config:U.droppable}),X=function(e,t){const n=null!==t?e.get(t):void 0,o=n?n.node.current:null;return Ke((e=>{var n;return null===t?null:null!=(n=o??e)?n:null}),[o,t])}(M,I),Y=o((()=>L?ot(L):null),[L]),J=function(){const e=!1===(null==T?void 0:T.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=N&&!e&&!t;return"object"==typeof f?{...f,enabled:n}:{enabled:n}}(),Z=function(e,t){return vn(e,t)}(X,U.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=l(!1),{x:a,y:s}="boolean"==typeof r?{x:r,y:r}:r;Ue((()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Et(n(e),o);if(a||(r.x=0),s||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=kt(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,a,s,o,n])}({activeNode:I?M.get(I):null,config:J.layoutShiftCompensation,initialRect:Z,measure:U.draggable.measure});const Q=wn(X,U.draggable.measure,Z),ee=wn(X?X.parentElement:null),te=l({activatorEvent:null,active:null,activeNode:X,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=F.getNodeFor(null==(n=te.current.over)?void 0:n.id),oe=En({measure:U.dragOverlay.measure}),re=null!=(r=oe.nodeRef.current)?r:X,ie=N?null!=(u=oe.rect)?u:Q:null,le=!(!oe.nodeRef.current||!oe.rect),ae=function(e){return Et(e,vn(e))}(le?null:Q),se=Cn(re?Le(re):null),ue=function(e){const t=l(e),n=Ke((n=>e?n&&n!==xn&&e&&t.current&&e.parentNode===t.current.parentNode?n:Mt(e):xn),[e]);return i((()=>{t.current=e}),[e]),n}(N?ne??X:null),de=function(e,t){void 0===t&&(t=Nt);const[n]=e,o=Cn(n?Le(n):null),[r,i]=g((function(){return e.length?e.map((e=>Tt(e)?o:new Ut(t(e),e))):Rn}),Rn),l=bn({callback:i});return e.length>0&&r===Rn&&i(),Ue((()=>{e.length?e.forEach((e=>null==l?void 0:l.observe(e))):(null==l||l.disconnect(),i())}),[e]),r}(ue),ce=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(w,{transform:{x:k.x-ae.x,y:k.y-ae.y,scaleX:1,scaleY:1},activatorEvent:L,active:V,activeNodeRect:Q,containerNodeRect:ee,draggingNodeRect:ie,over:te.current.over,overlayNodeRect:oe.rect,scrollableAncestors:ue,scrollableAncestorRects:de,windowRect:se}),ge=Y?et(Y,k):null,pe=function(e){const[t,n]=s(null),r=l(e),u=a((e=>{const t=Ft(e.target);t&&n((e=>e?(e.set(t,Vt(t)),new Map(e)):null))}),[]);return i((()=>{const t=r.current;if(e!==t){o(t);const i=e.map((e=>{const t=Ft(e);return t?(t.addEventListener("scroll",u,{passive:!0}),[t,Vt(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach((e=>{const t=Ft(e);null==t||t.removeEventListener("scroll",u)}))}}),[u,e]),o((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>et(e,t)),vt):Gt(e):vt),[e,t])}(ue),fe=Sn(pe),he=Sn(pe,[Q]),me=et(ce,fe),ve=ie?Dt(ie,ce):null,be=V&&ve?v({active:V,collisionRect:ve,droppableRects:W,droppableContainers:B,pointerCoordinates:ge}):null,ye=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(be,"id"),[we,xe]=s(null),Se=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(le?ce:et(ce,he),null!=(d=null==we?void 0:we.rect)?d:null,Q),Ce=a(((e,t)=>{let{sensor:n,options:o}=t;if(null==j.current)return;const r=M.get(j.current);if(!r)return;const i=e.nativeEvent,l=new n({active:j.current,activeNode:r,event:i,options:o,context:te,onStart(e){const t=j.current;if(null==t)return;const n=M.get(t);if(!n)return;const{onDragStart:o}=$.current,r={active:{id:t,data:n.data,rect:A}};y((()=>{null==o||o(r),O(jn.Initializing),R({type:ft.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:r})}))},onMove(e){R({type:ft.DragMove,coordinates:e})},onEnd:a(ft.DragEnd),onCancel:a(ft.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=te.current;let l=null;if(t&&r){const{cancelDrop:a}=$.current;l={activatorEvent:i,active:t,collisions:n,delta:r,over:o},e===ft.DragEnd&&"function"==typeof a&&await Promise.resolve(a(l))&&(e=ft.DragCancel)}j.current=null,y((()=>{R({type:e}),O(jn.Uninitialized),xe(null),z(null),H(null);const t=e===ft.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=$.current[t];null==e||e(l),E({type:t,event:l})}}))}}y((()=>{z(l),H(e.nativeEvent)}))}),[M]),Re=function(e,t){return o((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,a(((e,t)=>(n,o)=>{const r=n.nativeEvent,i=M.get(o);if(null!==j.current||!i||r.dndKit||r.defaultPrevented)return;const l={active:i};!0===e(n,t.options,l)&&(r.dndKit={capturedBy:t.sensor},j.current=o,Ce(n,t))}),[M,Ce]));(function(e){i((()=>{if(!je)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))})(m),Ue((()=>{Q&&D===jn.Initializing&&O(jn.Initialized)}),[Q,D]),i((()=>{const{onDragMove:e}=$.current,{active:t,activatorEvent:n,collisions:o,over:r}=te.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:o,delta:{x:me.x,y:me.y},over:r};y((()=>{null==e||e(i),E({type:"onDragMove",event:i})}))}),[me.x,me.y]),i((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=te.current;if(!e||null==j.current||!t||!r)return;const{onDragOver:i}=$.current,l=o.get(ye),a=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};y((()=>{xe(a),null==i||i(s),E({type:"onDragOver",event:s})}))}),[ye]),Ue((()=>{te.current={activatorEvent:L,active:V,activeNode:X,collisionRect:ve,collisions:be,droppableRects:W,draggableNodes:M,draggingNode:re,draggingNodeRect:ie,droppableContainers:F,over:we,scrollableAncestors:ue,scrollAdjustedTranslate:me},A.current={initial:ie,translated:ve}}),[V,X,be,ve,M,re,ie,W,F,we,ue,me]),gn({...J,delta:k,draggingRect:ve,pointerCoordinates:ge,scrollableAncestors:ue,scrollableAncestorRects:de});const Ee=o((()=>({active:V,activeNode:X,activeNodeRect:Q,activatorEvent:L,collisions:be,containerNodeRect:ee,dragOverlay:oe,draggableNodes:M,droppableContainers:F,droppableRects:W,over:we,measureDroppableContainers:q,scrollableAncestors:ue,scrollableAncestorRects:de,measuringConfiguration:U,measuringScheduled:K,windowRect:se})),[V,X,Q,L,be,ee,oe,M,F,W,we,q,ue,de,U,K,se]),_e=o((()=>({activatorEvent:L,activators:Re,active:V,activeNodeRect:Q,ariaDescribedById:{draggable:G},dispatch:R,draggableNodes:M,over:we,measureDroppableContainers:q})),[L,Re,V,Q,R,G,M,we,q]);return t.createElement(dt.Provider,{value:_},t.createElement(Mn.Provider,{value:_e},t.createElement(kn.Provider,{value:Ee},t.createElement(Vn.Provider,{value:Se},h)),t.createElement(An,{disabled:!1===(null==p?void 0:p.restoreFocus)})),t.createElement(pt,{...p,hiddenTextDescribedById:G}))})),zn=u(null),Ln="button",Hn="Droppable";function $n(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const l=Ze(Hn),{activators:a,activatorEvent:s,active:u,activeNodeRect:c,ariaDescribedById:g,draggableNodes:p,over:f}=d(Mn),{role:h=Ln,roleDescription:m="draggable",tabIndex:v=0}=i??{},b=(null==u?void 0:u.id)===t,y=d(b?Vn:zn),[w,x]=Xe(),[S,C]=Xe(),R=function(e,t){return o((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(a,t),E=qe(n);Ue((()=>(p.set(t,{id:t,key:l,node:w,activatorNode:S,data:E}),()=>{const e=p.get(t);e&&e.key===l&&p.delete(t)})),[p,t]);return{active:u,activatorEvent:s,activeNodeRect:c,attributes:o((()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||h!==Ln)||void 0,"aria-roledescription":m,"aria-describedby":g.draggable})),[r,h,v,b,m,g.draggable]),isDragging:b,listeners:r?void 0:R,node:w,over:f,setNodeRef:x,setActivatorNodeRef:C,transform:y}}const Gn="Droppable",Bn={timeout:25};function Un(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Wn(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function qn(e){return null!==e&&e>=0}const Kn=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=Un(t,o,n),l=t[r],a=i[r];return a&&l?{x:a.left-l.left,y:a.top-l.top,scaleX:a.width/l.width,scaleY:a.height/l.height}:null},Xn={scaleX:1,scaleY:1},Yn=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:l}=e;const a=null!=(t=i[n])?t:o;if(!a)return null;if(r===n){const e=i[l];return e?{x:0,y:n<l?e.top+e.height-(a.top+a.height):e.top-a.top,...Xn}:null}const s=function(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];return o?n<t?r?o.top-(r.top+r.height):i?i.top-(o.top+o.height):0:i?i.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}(i,r,n);return r>n&&r<=l?{x:0,y:-a.height-s,...Xn}:r<n&&r>=l?{x:0,y:a.height+s,...Xn}:{x:0,y:0,...Xn}};const Jn="Sortable",Zn=t.createContext({activeIndex:-1,containerId:Jn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Kn,disabled:{draggable:!1,droppable:!1}});function Qn(e){let{children:n,id:r,items:a,strategy:s=Kn,disabled:u=!1}=e;const{active:c,dragOverlay:g,droppableRects:p,over:f,measureDroppableContainers:h}=d(kn),m=Ze(Jn,r),v=null!==g.rect,b=o((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),y=null!=c,w=c?b.indexOf(c.id):-1,x=f?b.indexOf(f.id):-1,S=l(b),C=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(b,S.current),R=-1!==x&&-1===w||C,E=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);Ue((()=>{C&&y&&h(b)}),[C,b,y,h]),i((()=>{S.current=b}),[b]);const _=o((()=>({activeIndex:w,containerId:m,disabled:E,disableTransforms:R,items:b,overIndex:x,useDragOverlay:v,sortedRects:Wn(b,p),strategy:s})),[w,m,E.draggable,E.droppable,R,b,x,p,v,s]);return t.createElement(Zn.Provider,{value:_},n)}const eo=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return Un(n,o,r).indexOf(t)},to=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:l,previousItems:a,previousContainerId:s,transition:u}=e;return!(!u||!o||a!==i&&r===l)&&(!!n||l!==r&&t===s)},no={duration:200,easing:"ease"},oo="transform",ro=rt.Transition.toString({property:oo,duration:0,easing:"linear"}),io={roleDescription:"sortable"};function lo(e){let{animateLayoutChanges:t=to,attributes:n,disabled:r,data:u,getNewIndex:c=eo,id:g,strategy:p,resizeObserverConfig:f,transition:h=no}=e;const{items:m,containerId:v,activeIndex:b,disabled:y,disableTransforms:w,sortedRects:x,overIndex:S,useDragOverlay:C,strategy:R}=d(Zn),E=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(r,y),_=m.indexOf(g),D=o((()=>({sortable:{containerId:v,index:_,items:m},...u})),[v,u,_,m]),O=o((()=>m.slice(m.indexOf(g))),[m,g]),{rect:N,node:I,isOver:M,setNodeRef:k}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const s=Ze(Gn),{active:u,dispatch:c,over:g,measureDroppableContainers:p}=d(Mn),f=l({disabled:n}),h=l(!1),m=l(null),v=l(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...Bn,...r},x=qe(y??o),S=bn({callback:a((()=>{h.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),v.current=null}),w)):h.current=!0}),[w]),disabled:b||!u}),C=a(((e,t)=>{S&&(t&&(S.unobserve(t),h.current=!1),e&&S.observe(e))}),[S]),[R,E]=Xe(C),_=qe(t);return i((()=>{!S||!R.current||(S.disconnect(),h.current=!1,S.observe(R.current))}),[R,S]),Ue((()=>(c({type:ft.RegisterDroppable,element:{id:o,key:s,disabled:n,node:R,rect:m,data:_}}),()=>c({type:ft.UnregisterDroppable,key:s,id:o}))),[o]),i((()=>{n!==f.current.disabled&&(c({type:ft.SetDroppableDisabled,id:o,key:s,disabled:n}),f.current.disabled=n)}),[o,s,n,c]),{active:u,rect:m,isOver:(null==g?void 0:g.id)===o,node:R,over:g,setNodeRef:E}}({id:g,data:D,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...f}}),{active:F,activatorEvent:P,activeNodeRect:A,attributes:V,setNodeRef:j,listeners:T,isDragging:z,over:L,setActivatorNodeRef:H,transform:$}=$n({id:g,data:D,attributes:{...io,...n},disabled:E.draggable}),G=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o((()=>e=>{t.forEach((t=>t(e)))}),t)}(k,j),B=!!F,U=B&&!w&&qn(b)&&qn(S),W=!C&&z,q=U?(W&&U?$:null)??(p??R)({rects:x,activeNodeRect:A,activeIndex:b,overIndex:S,index:_}):null,K=qn(b)&&qn(S)?c({id:g,items:m,activeIndex:b,overIndex:S}):_,X=null==F?void 0:F.id,Y=l({activeId:X,items:m,newIndex:K,containerId:v}),J=m!==Y.current.items,Z=t({active:F,containerId:v,isDragging:z,isSorting:B,id:g,index:_,items:m,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:h,wasDragging:null!=Y.current.activeId}),Q=function(e){let{disabled:t,index:n,node:o,rect:r}=e;const[a,u]=s(null),d=l(n);return Ue((()=>{if(!t&&n!==d.current&&o.current){const e=r.current;if(e){const t=Nt(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&u(n)}}n!==d.current&&(d.current=n)}),[t,n,o,r]),i((()=>{a&&u(null)}),[a]),a}({disabled:!Z,index:_,node:I,rect:N});return i((()=>{B&&Y.current.newIndex!==K&&(Y.current.newIndex=K),v!==Y.current.containerId&&(Y.current.containerId=v),m!==Y.current.items&&(Y.current.items=m)}),[B,K,v,m]),i((()=>{if(X===Y.current.activeId)return;if(X&&!Y.current.activeId)return void(Y.current.activeId=X);const e=setTimeout((()=>{Y.current.activeId=X}),50);return()=>clearTimeout(e)}),[X]),{active:F,activeIndex:b,attributes:V,data:D,rect:N,index:_,newIndex:K,items:m,isOver:M,isSorting:B,isDragging:z,listeners:T,node:I,overIndex:S,over:L,setNodeRef:G,setActivatorNodeRef:H,setDroppableNodeRef:k,setDraggableNodeRef:j,transform:Q??q,transition:function(){if(Q||J&&Y.current.newIndex===_)return ro;if((!W||nt(P))&&h&&(B||Z))return rt.Transition.toString({...h,property:oo})}()}}Xt.Down,Xt.Right,Xt.Up,Xt.Left;const ao=u(void 0),so=({children:e})=>{const[t,n]=s(new Set),[o,r]=s(!1);return V.jsx(ao.Provider,{value:{expandedRows:t,toggleExpand:e=>{n((t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))},enableResizingFlag:()=>r(!0),disableResizingFlag:()=>r(!1),isResizing:o},children:e})},uo=()=>{const e=d(ao);if(void 0===e)throw new Error("useRootContext must be used within a RootContextProvider");return e};function co({styledTableProps:e,row:t,index:r}){const{focusable:l,loading:a,getRowClassName:s,rowHeight:u,onRowClick:d,expandArrow:c,enableDnd:g,disableDndForRow:p,tdClassName:f,customSubRowData:h,renderSubRows:m,defaultExpanded:v,actions:b}=e,y=null==p?void 0:p(t),{transform:w,transition:x,setNodeRef:S,isDragging:C}=lo({id:t.original.id,disabled:!g||y}),R={transform:rt.Transform.toString(w),transition:x,opacity:C?.8:1,zIndex:C?1:0,position:"relative"},{expandedRows:E,isResizing:_,disableResizingFlag:O,toggleExpand:N}=uo();i((()=>{v&&t.getCanExpand()&&!t.getIsExpanded()&&N(t.id)}),[]);const I=t.getVisibleCells().map(((e,t,n)=>({...e,left:n.slice(0,t).reduce(((e,t)=>e+(t.column.getSize()||0)),0)}))),M=o((()=>I.filter((({column:e})=>e.columnDef.fixedLeft))),[I]);return V.jsxs(n,{children:[V.jsx("tr",{"data-index":r,"data-test":t.id,id:t.id,tabIndex:l?-1:void 0,className:Ve(Pe["t-row"],a&&Pe["is-loading"],t.getIsSelected()&&Pe.selected,null==s?void 0:s(t)),style:{height:u?`${u}px`:"inherit",...g&&R},ref:y?void 0:S,onMouseUp:e=>{var n,o;if(e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName)return;t.getCanExpand()&&!c&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r="Range"===(null==(o=window.getSelection())?void 0:o.type);d&&!r&&!_&&d(e,t),O()},children:I.map((e=>{var n;const o=e.column.id===D,r=e.column.columnDef.fixedLeft,i=e.id===(null==(n=M.at(-1))?void 0:n.id),l=E.has(t.original.id.toString());return V.jsx("td",{className:Ve(Pe["t-cell"],f,o&&Pe["action-cell"],o&&!!b&&M.length&&Pe.shadowed,o&&t.getIsSelected()&&Pe.selected,o&&(null!=s&&s(t)?null==s?void 0:s(t):Pe["action-cell-default-background"]),r&&Pe["fixed-cell"],i&&Pe.shadowed,r&&t.getIsSelected()&&Pe.selected,r&&(null!=s&&s(t)?null==s?void 0:s(t):Pe["fixed-cell-default-background"]),l&&Pe.expanded_row),style:{left:r?e.left:void 0},children:Fe(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&V.jsx(V.Fragment,{children:h&&m&&m({rows:h.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function go({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return V.jsx(V.Fragment,{children:n.map(((t,n)=>V.jsx(co,{styledTableProps:e,row:t,index:n},t.id)))})}const po=({colSpan:e,noRowsOverlay:t})=>V.jsx("tr",{className:Pe["no-rows-overlay"],children:V.jsx("td",{colSpan:e,children:t})});function fo({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:i,enableDnd:l,rowHeight:a}=t;return V.jsx("tbody",{className:Pe.tbody,children:0===o.length&&r?V.jsx(T,{colSpan:n.length,rowHeight:a}):o.length>0?V.jsx(V.Fragment,{children:l?V.jsx(Qn,{items:o,strategy:Yn,children:V.jsx(go,{table:e,styledTableProps:t})}):V.jsx(go,{table:e,styledTableProps:t})}):V.jsx(po,{colSpan:n.length,noRowsOverlay:i})})}const ho=()=>{const[e,t]=s(null),[n,o]=s(!1),r=a((e=>{t(e.currentTarget),o(!0)}),[]);return{open:n,handleClose:a((()=>{o(!1)}),[]),handleOpen:r,anchorEl:e}};function mo(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}function vo(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const bo={"table-pagination":"_table-pagination_k2a41_1","table-pagination__pages-list":"_table-pagination__pages-list_k2a41_13","table-pagination__pages-list__page":"_table-pagination__pages-list__page_k2a41_18","page-selected":"_page-selected_k2a41_29","check-icon":"_check-icon_k2a41_32"};function yo(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}const wo="_asma-core-ui-button_1r2np_1",xo={contained:"_contained_1r2np_27",outlined:"_outlined_1r2np_141",text:"_text_1r2np_255",textGray:"_textGray_1r2np_369",textWhite:"_textWhite_1r2np_426",large:"_large_1r2np_79",small:"_small_1r2np_74",medium:"_medium_1r2np_69",error:"_error_1r2np_84",common:"_common_1r2np_27"},So=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const d="large"===n||"medium"===n,c=s?"error":"common";return V.jsxs("button",{...u,className:Ve(wo,xo[e],xo[c],xo[n],t),ref:r,"data-test":a,children:[i,o&&V.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:d?"8px":"4px",paddingLeft:d?"8px":"4px",paddingRight:d?"8px":"4px"},children:o}),l]})};function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Co.apply(this,arguments)}function Ro(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function Eo(e,t){return(Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const _o=!1;var Do="production"!==process.env.NODE_ENV?x.oneOfType([x.number,x.shape({enter:x.number,exit:x.number,appear:x.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&x.oneOfType([x.string,x.shape({enter:x.string,exit:x.string,active:x.string}),x.shape({enter:x.string,enterDone:x.string,enterActive:x.string,exit:x.string,exitDone:x.string,exitActive:x.string})]);const Oo=t.createContext(null);var No="unmounted",Io="exited",Mo="entering",ko="entered",Fo="exiting",Po=function(e){function n(t,n){var o;o=e.call(this,t,n)||this;var r,i=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(r=Io,o.appearStatus=Mo):r=ko:r=t.unmountOnExit||t.mountOnEnter?No:Io,o.state={status:r},o.nextCallback=null,o}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Eo(e,t)}(n,e),n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===No?{status:Io}:null};var o=n.prototype;return o.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},o.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Mo&&n!==ko&&(t=Mo):(n===Mo||n===ko)&&(t=Fo)}this.updateStatus(!1,t)},o.componentWillUnmount=function(){this.cancelNextCallback()},o.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},o.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Mo){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Io&&this.setState({status:No})},o.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[b.findDOMNode(this),o],i=r[0],l=r[1],a=this.getTimeouts(),s=o?a.appear:a.enter;!e&&!n||_o?this.safeSetState({status:ko},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,l),this.safeSetState({status:Mo},(function(){t.props.onEntering(i,l),t.onTransitionEnd(s,(function(){t.safeSetState({status:ko},(function(){t.props.onEntered(i,l)}))}))})))},o.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:b.findDOMNode(this);t&&!_o?(this.props.onExit(o),this.safeSetState({status:Fo},(function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Io},(function(){e.props.onExited(o)}))}))}))):this.safeSetState({status:Io},(function(){e.props.onExited(o)}))},o.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},o.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},o.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},o.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:b.findDOMNode(this),o=null==e&&!this.props.addEndListener;if(n&&!o){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=r[0],l=r[1];this.props.addEndListener(i,l)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},o.render=function(){var e=this.state.status;if(e===No)return null;var n=this.props,o=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var r=Ro(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return t.createElement(Oo.Provider,{value:null},"function"==typeof o?o(e,r):t.cloneElement(t.Children.only(o),r))},n}(t.Component);function Ao(){}Po.contextType=Oo,Po.propTypes="production"!==process.env.NODE_ENV?{nodeRef:x.shape({current:typeof Element>"u"?x.any:function(e,t,n,o,r,i){var l=e[t];return x.instanceOf(l&&"ownerDocument"in l?l.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:x.oneOfType([x.func.isRequired,x.element.isRequired]).isRequired,in:x.bool,mountOnEnter:x.bool,unmountOnExit:x.bool,appear:x.bool,enter:x.bool,exit:x.bool,timeout:function(e){var t=Do;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return t.apply(void 0,[e].concat(o))},addEndListener:x.func,onEnter:x.func,onEntering:x.func,onEntered:x.func,onExit:x.func,onExiting:x.func,onExited:x.func}:{},Po.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ao,onEntering:Ao,onEntered:Ao,onExit:Ao,onExiting:Ao,onExited:Ao},Po.UNMOUNTED=No,Po.EXITED=Io,Po.ENTERING=Mo,Po.ENTERED=ko,Po.EXITING=Fo;const Vo=Po;function jo(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}function To(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function zo(e){if(!To(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=zo(e[n])})),t}function Lo(e,t,n={clone:!0}){const o=n.clone?Co({},e):e;return To(e)&&To(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(To(t[r])&&r in e&&To(e[r])?o[r]=Lo(e[r],t[r],n):n.clone?o[r]=To(t[r])?zo(t[r]):t[r]:o[r]=t[r])})),o}function Ho(e,t,n,o,r){const i=e[t],l=r||t;if(null==i||typeof window>"u")return null;let a;const s=i.type;return"function"==typeof s&&!function(e){const{prototype:t={}}=e;return!!t.isReactComponent}(s)&&(a="Did you accidentally use a plain function component for an element instead?"),void 0!==a?new Error(`Invalid ${o} \`${l}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const $o=jo(x.element,Ho);$o.isRequired=jo(x.element.isRequired,Ho);const Go=$o;function Bo(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Uo(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Bo(7));return e.charAt(0).toUpperCase()+e.slice(1)}const Wo=e=>e,qo=(()=>{let e=Wo;return{configure(t){e=t},generate:t=>e(t),reset(){e=Wo}}})(),Ko=qo,Xo={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Yo(e,t,n="Mui"){const o=Xo[t];return o?`${n}-${o}`:`${Ko.generate(e)}-${t}`}const Jo=["values","unit","step"],Zo=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Co({},e,{[t.key]:t.val})),{})};const Qo={borderRadius:4},er="production"!==process.env.NODE_ENV?x.oneOfType([x.number,x.string,x.object,x.array]):{};function tr(e,t){return t?Lo(e,t,{clone:!1}):e}const nr={xs:0,sm:600,md:900,lg:1200,xl:1536},or={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${nr[e]}px)`};function rr(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||or;return t.reduce(((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o)),{})}if("object"==typeof t){const e=o.breakpoints||or;return Object.keys(t).reduce(((o,r)=>{if(-1!==Object.keys(e.values||nr).indexOf(r)){o[e.up(r)]=n(t[r],r)}else{const e=r;o[e]=t[e]}return o}),{})}return n(t)}function ir(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function lr(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:ir(e,n)||o,t&&(r=t(r,o,e)),r}function ar(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:r}=e,i=e=>{if(null==e[t])return null;const i=e[t],l=ir(e.theme,o)||{};return rr(e,i,(e=>{let o=lr(l,r,e);return e===o&&"string"==typeof e&&(o=lr(l,r,`${t}${"default"===e?"":Uo(e)}`,e)),!1===n?o:{[n]:o}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:er}:{},i.filterProps=[t],i}const sr={m:"margin",p:"padding"},ur={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},dr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!dr[e])return[e];e=dr[e]}const[t,n]=e.split(""),o=sr[t],r=ur[n]||"";return Array.isArray(r)?r.map((e=>o+e)):[o+r]})),gr=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],pr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],fr=[...gr,...pr];function hr(e,t,n,o){var r;const i=null!=(r=ir(e,t,!1))?r:n;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function mr(e){return hr(e,"spacing",8,"spacing")}function vr(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function br(e,t,n,o){if(-1===t.indexOf(n))return null;const r=function(e,t){return n=>e.reduce(((e,o)=>(e[o]=vr(t,n),e)),{})}(cr(n),o);return rr(e,e[n],r)}function yr(e,t){const n=mr(e.theme);return Object.keys(e).map((o=>br(e,t,o,n))).reduce(tr,{})}function wr(e){return yr(e,gr)}function xr(e){return yr(e,pr)}function Sr(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,o)=>t[o]?tr(n,t[o](e)):n),{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function Cr(e){return"number"!=typeof e?e:`${e}px solid`}wr.propTypes="production"!==process.env.NODE_ENV?gr.reduce(((e,t)=>(e[t]=er,e)),{}):{},wr.filterProps=gr,xr.propTypes="production"!==process.env.NODE_ENV?pr.reduce(((e,t)=>(e[t]=er,e)),{}):{},xr.filterProps=pr,"production"!==process.env.NODE_ENV&&fr.reduce(((e,t)=>(e[t]=er,e)),{});const Rr=ar({prop:"border",themeKey:"borders",transform:Cr}),Er=ar({prop:"borderTop",themeKey:"borders",transform:Cr}),_r=ar({prop:"borderRight",themeKey:"borders",transform:Cr}),Dr=ar({prop:"borderBottom",themeKey:"borders",transform:Cr}),Or=ar({prop:"borderLeft",themeKey:"borders",transform:Cr}),Nr=ar({prop:"borderColor",themeKey:"palette"}),Ir=ar({prop:"borderTopColor",themeKey:"palette"}),Mr=ar({prop:"borderRightColor",themeKey:"palette"}),kr=ar({prop:"borderBottomColor",themeKey:"palette"}),Fr=ar({prop:"borderLeftColor",themeKey:"palette"}),Pr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=hr(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:vr(t,e)});return rr(e,e.borderRadius,n)}return null};Pr.propTypes="production"!==process.env.NODE_ENV?{borderRadius:er}:{},Pr.filterProps=["borderRadius"],Sr(Rr,Er,_r,Dr,Or,Nr,Ir,Mr,kr,Fr,Pr);const Ar=e=>{if(void 0!==e.gap&&null!==e.gap){const t=hr(e.theme,"spacing",8,"gap"),n=e=>({gap:vr(t,e)});return rr(e,e.gap,n)}return null};Ar.propTypes="production"!==process.env.NODE_ENV?{gap:er}:{},Ar.filterProps=["gap"];const Vr=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=hr(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:vr(t,e)});return rr(e,e.columnGap,n)}return null};Vr.propTypes="production"!==process.env.NODE_ENV?{columnGap:er}:{},Vr.filterProps=["columnGap"];const jr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=hr(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:vr(t,e)});return rr(e,e.rowGap,n)}return null};jr.propTypes="production"!==process.env.NODE_ENV?{rowGap:er}:{},jr.filterProps=["rowGap"];function Tr(e,t){return"grey"===t?t:e}Sr(Ar,Vr,jr,ar({prop:"gridColumn"}),ar({prop:"gridRow"}),ar({prop:"gridAutoFlow"}),ar({prop:"gridAutoColumns"}),ar({prop:"gridAutoRows"}),ar({prop:"gridTemplateColumns"}),ar({prop:"gridTemplateRows"}),ar({prop:"gridTemplateAreas"}),ar({prop:"gridArea"}));function zr(e){return e<=1&&0!==e?100*e+"%":e}Sr(ar({prop:"color",themeKey:"palette",transform:Tr}),ar({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Tr}),ar({prop:"backgroundColor",themeKey:"palette",transform:Tr}));const Lr=ar({prop:"width",transform:zr}),Hr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,o,r;return{maxWidth:(null==(n=e.theme)||null==(o=n.breakpoints)||null==(r=o.values)?void 0:r[t])||nr[t]||zr(t)}};return rr(e,e.maxWidth,t)}return null};Hr.filterProps=["maxWidth"];const $r=ar({prop:"minWidth",transform:zr}),Gr=ar({prop:"height",transform:zr}),Br=ar({prop:"maxHeight",transform:zr}),Ur=ar({prop:"minHeight",transform:zr});ar({prop:"size",cssProperty:"width",transform:zr}),ar({prop:"size",cssProperty:"height",transform:zr});Sr(Lr,Hr,$r,Gr,Br,Ur,ar({prop:"boxSizing"}));const Wr={border:{themeKey:"borders",transform:Cr},borderTop:{themeKey:"borders",transform:Cr},borderRight:{themeKey:"borders",transform:Cr},borderBottom:{themeKey:"borders",transform:Cr},borderLeft:{themeKey:"borders",transform:Cr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Pr},color:{themeKey:"palette",transform:Tr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Tr},backgroundColor:{themeKey:"palette",transform:Tr},p:{style:xr},pt:{style:xr},pr:{style:xr},pb:{style:xr},pl:{style:xr},px:{style:xr},py:{style:xr},padding:{style:xr},paddingTop:{style:xr},paddingRight:{style:xr},paddingBottom:{style:xr},paddingLeft:{style:xr},paddingX:{style:xr},paddingY:{style:xr},paddingInline:{style:xr},paddingInlineStart:{style:xr},paddingInlineEnd:{style:xr},paddingBlock:{style:xr},paddingBlockStart:{style:xr},paddingBlockEnd:{style:xr},m:{style:wr},mt:{style:wr},mr:{style:wr},mb:{style:wr},ml:{style:wr},mx:{style:wr},my:{style:wr},margin:{style:wr},marginTop:{style:wr},marginRight:{style:wr},marginBottom:{style:wr},marginLeft:{style:wr},marginX:{style:wr},marginY:{style:wr},marginInline:{style:wr},marginInlineStart:{style:wr},marginInlineEnd:{style:wr},marginBlock:{style:wr},marginBlockStart:{style:wr},marginBlockEnd:{style:wr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ar},rowGap:{style:jr},columnGap:{style:Vr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:zr},maxWidth:{style:Hr},minWidth:{transform:zr},height:{transform:zr},maxHeight:{transform:zr},minHeight:{transform:zr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},qr=Wr;const Kr=function(){function e(e,t,n,o){const r={[e]:t,theme:n},i=o[e];if(!i)return{[e]:t};const{cssProperty:l=e,themeKey:a,transform:s,style:u}=i;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const d=ir(n,a)||{};return u?u(r):rr(r,t,(t=>{let n=lr(d,s,t);return t===n&&"string"==typeof t&&(n=lr(d,s,`${e}${"default"===t?"":Uo(t)}`,t)),!1===l?n:{[l]:n}}))}return function t(n){var o;const{sx:r,theme:i={}}=n||{};if(!r)return null;const l=null!=(o=i.unstable_sxConfig)?o:qr;function a(n){let o=n;if("function"==typeof n)o=n(i);else if("object"!=typeof n)return n;if(!o)return null;const r=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),a=Object.keys(r);let s=r;return Object.keys(o).forEach((n=>{const r=function(e,t){return"function"==typeof e?e(t):e}(o[n],i);if(null!=r)if("object"==typeof r)if(l[n])s=tr(s,e(n,r,i,l));else{const e=rr({theme:i},r,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,r)?s=tr(s,e):s[n]=t({sx:r,theme:i})}else s=tr(s,e(n,r,i,l))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(a,s)}return Array.isArray(r)?r.map(a):a(r)}}();Kr.filterProps=["sx"];const Xr=Kr,Yr=["breakpoints","palette","spacing","shape"];function Jr(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={}}=e,l=Ro(e,Yr),a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,r=Ro(e,Jo),i=Zo(t),l=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function u(e,r){const i=l.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[l[i]]?t[l[i]]:r)-o/100}${n})`}return Co({keys:l,values:i,up:a,down:s,between:u,only:function(e){return l.indexOf(e)+1<l.length?u(e,l[l.indexOf(e)+1]):a(e)},not:function(e){const t=l.indexOf(e);return 0===t?a(l[1]):t===l.length-1?s(l[t]):u(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},r)}(n),s=function(e=8){if(e.mui)return e;const t=mr({spacing:e}),n=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" "));return n.mui=!0,n}(r);let u=Lo({breakpoints:a,direction:"ltr",components:{},palette:Co({mode:"light"},o),spacing:s,shape:Co({},Qo,i)},l);return u=t.reduce(((e,t)=>Lo(e,t)),u),u.unstable_sxConfig=Co({},qr,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Xr({sx:e,theme:this})},u}function Zr(t=null){const n=e.useContext(S);return!n||function(e){return 0===Object.keys(e).length}(n)?t:n}const Qr=Jr();function ei(e,t=0,n=1){return"production"!==process.env.NODE_ENV&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Math.min(Math.max(t,e),n)}function ti(e){if(e.type)return e;if("#"===e.charAt(0))return ti(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Bo(9,e));let o,r=e.substring(t+1,e.length-1);if("color"===n){if(r=r.split(" "),o=r.shift(),4===r.length&&"/"===r[3].charAt(0)&&(r[3]=r[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${o}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Bo(10,o))}else r=r.split(",");return r=r.map((e=>parseFloat(e))),{type:n,values:r,colorSpace:o}}function ni(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return-1!==t.indexOf("rgb")?o=o.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),o=-1!==t.indexOf("color")?`${n} ${o.join(" ")}`:`${o.join(", ")}`,`${t}(${o})`}function oi(e){let t="hsl"===(e=ti(e)).type||"hsla"===e.type?ti(function(e){e=ti(e);const{values:t}=e,n=t[0],o=t[1]/100,r=t[2]/100,i=o*Math.min(r,1-r),l=(e,t=(e+n/30)%12)=>r-i*Math.max(Math.min(t-3,9-t,1),-1);let a="rgb";const s=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(a+="a",s.push(t[3])),ni({type:a,values:s})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ri(e,t){const n=oi(e),o=oi(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function ii(e,t){return Co({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const li={black:"#000",white:"#fff"},ai={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},si={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ui={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},di={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ci={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},gi={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},pi={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},fi=["mode","contrastThreshold","tonalOffset"],hi={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:li.white,default:li.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},mi={text:{primary:li.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:li.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function vi(e,t,n,o){const r=o.light||o,i=o.dark||1.5*o;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=ti(e),t=ei(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ni(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=ti(e),t=ei(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ni(e)}(e.main,i)))}function bi(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,r=Ro(e,fi),i=e.primary||function(e="light"){return"dark"===e?{main:ci[200],light:ci[50],dark:ci[400]}:{main:ci[700],light:ci[400],dark:ci[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:si[200],light:si[50],dark:si[400]}:{main:si[500],light:si[300],dark:si[700]}}(t),a=e.error||function(e="light"){return"dark"===e?{main:ui[500],light:ui[300],dark:ui[700]}:{main:ui[700],light:ui[400],dark:ui[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:gi[400],light:gi[300],dark:gi[700]}:{main:gi[700],light:gi[500],dark:gi[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:pi[400],light:pi[300],dark:pi[700]}:{main:pi[800],light:pi[500],dark:pi[900]}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:di[400],light:di[300],dark:di[700]}:{main:"#ed6c02",light:di[500],dark:di[900]}}(t);function c(e){const t=ri(e,mi.text.primary)>=n?mi.text.primary:hi.text.primary;if("production"!==process.env.NODE_ENV){const n=ri(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return t}const g=({color:e,name:t,mainShade:n=500,lightShade:r=300,darkShade:i=700})=>{if(!(e=Co({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`:Bo(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@mui/material/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });`:Bo(12,t?` (${t})`:"",JSON.stringify(e.main)));return vi(e,"light",r,o),vi(e,"dark",i,o),e.contrastText||(e.contrastText=c(e.main)),e},p={dark:mi,light:hi};return"production"!==process.env.NODE_ENV&&(p[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Lo(Co({common:Co({},li),mode:t,primary:g({color:i,name:"primary"}),secondary:g({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:a,name:"error"}),warning:g({color:d,name:"warning"}),info:g({color:s,name:"info"}),success:g({color:u,name:"success"}),grey:ai,contrastThreshold:n,getContrastText:c,augmentColor:g,tonalOffset:o},p[t]),r)}const yi=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function wi(e){return Math.round(1e5*e)/1e5}const xi={textTransform:"uppercase"},Si='"Roboto", "Helvetica", "Arial", sans-serif';function Ci(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=Si,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:l=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:d,pxToRem:c}=n,g=Ro(n,yi);"production"!==process.env.NODE_ENV&&("number"!=typeof r&&console.error("MUI: `fontSize` is required to be a number."),"number"!=typeof u&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,f=c||(e=>e/u*p+"rem"),h=(e,t,n,r,i)=>Co({fontFamily:o,fontWeight:e,fontSize:f(t),lineHeight:n},o===Si?{letterSpacing:`${wi(r/t)}em`}:{},i,d),m={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(l,48,1.167,0),h4:h(l,34,1.235,.25),h5:h(l,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(l,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(l,16,1.5,.15),body2:h(l,14,1.43,.15),button:h(a,14,1.75,.4,xi),caption:h(l,12,1.66,.4),overline:h(l,12,2.66,1,xi),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Lo(Co({htmlFontSize:u,pxToRem:f,fontFamily:o,fontSize:r,fontWeightLight:i,fontWeightRegular:l,fontWeightMedium:a,fontWeightBold:s},m),g,{clone:!1})}function Ri(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const Ei=["none",Ri(0,2,1,-1,0,1,1,0,0,1,3,0),Ri(0,3,1,-2,0,2,2,0,0,1,5,0),Ri(0,3,3,-2,0,3,4,0,0,1,8,0),Ri(0,2,4,-1,0,4,5,0,0,1,10,0),Ri(0,3,5,-1,0,5,8,0,0,1,14,0),Ri(0,3,5,-1,0,6,10,0,0,1,18,0),Ri(0,4,5,-2,0,7,10,1,0,2,16,1),Ri(0,5,5,-3,0,8,10,1,0,3,14,2),Ri(0,5,6,-3,0,9,12,1,0,3,16,2),Ri(0,6,6,-3,0,10,14,1,0,4,18,3),Ri(0,6,7,-4,0,11,15,1,0,4,20,3),Ri(0,7,8,-4,0,12,17,2,0,5,22,4),Ri(0,7,8,-4,0,13,19,2,0,5,24,4),Ri(0,7,9,-4,0,14,21,2,0,5,26,4),Ri(0,8,9,-5,0,15,22,2,0,6,28,5),Ri(0,8,10,-5,0,16,24,2,0,6,30,5),Ri(0,8,11,-5,0,17,26,2,0,6,32,5),Ri(0,9,11,-5,0,18,28,2,0,7,34,6),Ri(0,9,12,-6,0,19,29,2,0,7,36,6),Ri(0,10,13,-6,0,20,31,3,0,8,38,7),Ri(0,10,13,-6,0,21,33,3,0,8,40,7),Ri(0,10,14,-6,0,22,35,3,0,8,42,7),Ri(0,11,14,-7,0,23,36,3,0,9,44,8),Ri(0,11,15,-7,0,24,38,3,0,9,46,8)],_i=["duration","easing","delay"],Di={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Oi={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ni(e){return`${Math.round(e)}ms`}function Ii(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function Mi(e){const t=Co({},Di,e.easing),n=Co({},Oi,e.duration);return Co({getAutoHeightDuration:Ii,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:i=t.easeInOut,delay:l=0}=o,a=Ro(o,_i);if("production"!==process.env.NODE_ENV){const t=e=>"string"==typeof e,n=e=>!isNaN(parseFloat(e));!t(e)&&!Array.isArray(e)&&console.error('MUI: Argument "props" must be a string or Array.'),!n(r)&&!t(r)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${r}.`),t(i)||console.error('MUI: Argument "easing" must be a string.'),!n(l)&&!t(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),0!==Object.keys(a).length&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(a).join(",")}].`)}return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof r?r:Ni(r)} ${i} ${"string"==typeof l?l:Ni(l)}`)).join(",")}},e,{easing:t,duration:n})}const ki={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Fi=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const Pi=function(e={},...t){const{mixins:n={},palette:o={},transitions:r={},typography:i={}}=e,l=Ro(e,Fi);if(e.vars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Bo(18));const a=bi(o),s=Jr(e);let u=Lo(s,{mixins:ii(s.breakpoints,n),palette:a,shadows:Ei.slice(),typography:Ci(a,i),transitions:Mi(r),zIndex:Co({},ki)});if(u=Lo(u,l),u=t.reduce(((e,t)=>Lo(e,t)),u),"production"!==process.env.NODE_ENV){const e=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],t=(t,n)=>{let o;for(o in t){const r=t[o];if(-1!==e.indexOf(o)&&Object.keys(r).length>0){if("production"!==process.env.NODE_ENV){const e=Yo("",o);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${o}\` internal state.`,"You can not override it like this: ",JSON.stringify(t,null,2),"",`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:r}},null,2),"","https://mui.com/r/state-classes-guide"].join("\n"))}t[o]={}}}};Object.keys(u.components).forEach((e=>{const n=u.components[e].styleOverrides;n&&0===e.indexOf("Mui")&&t(n,e)}))}return u.unstable_sxConfig=Co({},qr,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Xr({sx:e,theme:this})},u}(),Ai=Pi;function Vi(){const t=function(e=Qr){return Zr(e)}(Ai);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t.$$material||t}function ji(e,t){var n,o;const{timeout:r,easing:i,style:l={}}=e;return{duration:null!=(n=l.transitionDuration)?n:"number"==typeof r?r:r[t.mode]||0,easing:null!=(o=l.transitionTimingFunction)?o:"object"==typeof i?i[t.mode]:i,delay:l.transitionDelay}}const Ti=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],zi={entering:{opacity:1},entered:{opacity:1}},Li=e.forwardRef((function(t,n){const o=Vi(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:l=!0,children:a,easing:s,in:u,onEnter:d,onEntered:c,onEntering:g,onExit:p,onExited:f,onExiting:h,style:m,timeout:v=r,TransitionComponent:b=Vo}=t,y=Ro(t,Ti),w=e.useRef(null),x=function(...t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}(w,a.ref,n),S=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},C=S(g),R=S(((e,t)=>{(e=>{e.scrollTop})(e);const n=ji({style:m,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=o.transitions.create("opacity",n),e.style.transition=o.transitions.create("opacity",n),d&&d(e,t)})),E=S(c),_=S(h),D=S((e=>{const t=ji({style:m,timeout:v,easing:s},{mode:"exit"});e.style.webkitTransition=o.transitions.create("opacity",t),e.style.transition=o.transitions.create("opacity",t),p&&p(e)})),O=S(f);return V.jsx(b,Co({appear:l,in:u,nodeRef:w,onEnter:R,onEntered:E,onEntering:C,onExit:D,onExited:O,onExiting:_,addEndListener:e=>{i&&i(w.current,e)},timeout:v},y,{children:(t,n)=>e.cloneElement(a,Co({style:Co({opacity:0,visibility:"exited"!==t||u?void 0:"hidden"},zi[t],m,a.props.style),ref:x},n))}))}));"production"!==process.env.NODE_ENV&&(Li.propTypes={addEndListener:x.func,appear:x.bool,children:Go.isRequired,easing:x.oneOfType([x.shape({enter:x.string,exit:x.string}),x.string]),in:x.bool,onEnter:x.func,onEntered:x.func,onEntering:x.func,onExit:x.func,onExited:x.func,onExiting:x.func,style:x.object,timeout:x.oneOfType([x.number,x.shape({appear:x.number,enter:x.number,exit:x.number})])});const Hi=Li,$i=e=>V.jsx(f,{TransitionComponent:Hi,TransitionProps:{timeout:300},arrow:!0,placement:"top",componentsProps:{tooltip:{sx:{borderRadius:"3px !important","& .MuiTooltip-arrow":{color:"#363E4A !important"},color:"white !important",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.25) !important",display:"flex !important",padding:"4px 8px !important",alignItems:"center !important",fontSize:"12px !important",lineHeight:"16px !important",letterSpacing:" 0.24px !important",bgcolor:"#363E4A !important",wordBreak:"break-word !important"}}},...e});function Gi(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const Bi=e=>V.jsxs(h,{classes:{root:"flex gap-x-1"},sx:{padding:"8px","&.Mui-selected":{backgroundColor:"var(--colors-gama-50)","&:hover":{backgroundColor:"var(--colors-gama-50)"}}},...e,children:[V.jsx(Gi,{width:24,height:24,color:e.selected?"var(--colors-gama-500)":"transparent",style:{transition:"color 0.2s ease"}}),e.children]}),Ui=[10,20,50];function Wi({table:e,showRowSelect:t,locale:n}){const{anchorEl:r,open:i,handleClose:s,handleOpen:u}=ho(),{anchorEl:d,open:c,handleClose:g,handleOpen:p}=ho(),f=l(null),h="no"===n,v=o((()=>({anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}})),[]),b=a((()=>{var e,t,n;const o=Pe["asma-ui-table-styled-table"];null==(n=null==(t=null==(e=f.current)?void 0:e.closest(`.${o}`))?void 0:t.querySelector('[data-index="0"]'))||n.scrollIntoView({block:"center",inline:"start"})}),[]),y=e.getPageCount()||1,w=e.getState().pagination.pageIndex+1,x=o((()=>Array.from({length:y},((e,t)=>t+1))),[y]),S=e.getState().pagination.pageSize,C=o((()=>{const e=new Set([...Ui,S]);return Array.from(e).sort(((e,t)=>e-t))}),[]),R=a((t=>{e.setPageIndex(t-1),s(),b()}),[e,s,b]),E=a((t=>{e.setPageSize(t),g()}),[e,g]);return V.jsxs("div",{ref:f,className:bo["table-pagination"],children:[t&&V.jsxs(V.Fragment,{children:[V.jsxs(So,{dataTest:"table-rows-count-button",variant:"outlined",size:"large",onClick:p,endIcon:V.jsx(mo,{className:(c?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[S," ",h?"rader":"rows"]}),V.jsx(m,{open:c,anchorEl:d,slotProps:{paper:{sx:{width:d?d.clientWidth:void 0}}},onClose:g,anchorOrigin:v.anchorOrigin,transformOrigin:v.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2",root:"max-h-[280px]"},children:C.map((e=>V.jsx(Bi,{onClick:t=>{t.stopPropagation(),t.preventDefault(),E(e)},selected:S===e,children:V.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[e," ",h?"rader":"rows"]})},e)))})]}),V.jsx($i,{title:h?"Nåværende side":"Current Page",children:V.jsx("div",{children:V.jsxs(So,{dataTest:"current-page-button",variant:"outlined",size:"large",onClick:u,endIcon:V.jsx(mo,{className:(i?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[h?"Side":"Page"," ",w," ",h?"av":"of"," ",y]})})}),V.jsx(m,{open:i,anchorEl:r,slotProps:{paper:{sx:{width:r?r.clientWidth:void 0}}},onClose:s,anchorOrigin:v.anchorOrigin,transformOrigin:v.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2",root:"max-h-[280px]"},children:x.map((e=>V.jsx(Bi,{onClick:t=>{t.stopPropagation(),t.preventDefault(),R(e)},selected:e===w,children:V.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[h?"Side":"Page"," ",e]})},e)))}),V.jsx($i,{title:1===w?"":h?"Forrige side":"Previous Page",children:V.jsx("div",{children:V.jsx(So,{dataTest:"prev-page-button",variant:"outlined",onClick:()=>{e.previousPage(),b()},size:"large",disabled:!e.getCanPreviousPage(),startIcon:V.jsx(yo,{height:24,width:24})})})}),V.jsx($i,{title:w===y?"":h?"Neste side":"Next Page",children:V.jsx("div",{children:V.jsx(So,{dataTest:"next-page-button",variant:"outlined",onClick:()=>{e.nextPage(),b()},size:"large",disabled:!e.getCanNextPage(),startIcon:V.jsx(vo,{height:24,width:24})})})})]})}function qi({table:e,styledTableProps:t}){var n,o;if(t.hideFooter)return null;const r=t.paginationAlignLeft;return V.jsxs("div",{className:Pe["table-footer"],style:r&&{justifyContent:"flex-start"}||{},children:[!r&&(null==(n=t.footer)?void 0:n.call(t,e)),V.jsx(Wi,{table:e,showRowSelect:!!t.showRowCountSelect,locale:t.locale||"en"}),r&&(null==(o=t.footer)?void 0:o.call(t,e))]})}const Ki=t=>{const{columns:n,data:o,initialState:r,pageSize:i,enableRowSelection:l,tableInstanceRef:a,...s}=t,u=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:Oe(n)}))),[r,i]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{i(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:i||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[E]:!1},...r},enableRowSelection:l,getCoreRowModel:e=>$((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,i){void 0===r&&(r=0);const l=[];for(let s=0;s<t.length;s++){const u=Ne(e,e._getRowId(t[s],s,i),t[s],s,r,void 0,null==i?void 0:i.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return l};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>$((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?ke(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>$((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const i=o.getFilterFn();i?r.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const l=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,d;o&&a&&s.length&&(l.push("__global__"),s.forEach((e=>{var t;i.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){d=i[e];const t=d.id;if(d.filterFn(n,t,d.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return Me(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>$((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],i=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<i.length;o+=1){var n;const r=i[o],a=l[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>$((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:i,flatRows:l,rowsById:a}=n;const s=o*r,u=s+o;let d;i=i.slice(s,u),d=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:ke({rows:i,flatRows:l,rowsById:a}),d.flatRows=[];const c=e=>{d.flatRows.push(e),e.subRows.length&&e.subRows.forEach(c)};return d.rows.forEach(c),d}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:s.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:t.enableResizing?{size:void 0}:void 0,...s});return a&&(a.current=u),{table:u}},Xi=({dataTest:e,...t})=>V.jsx(v,{...t,"data-test":e,sx:{...t.sx,"&.MuiCheckbox-root":{color:"var(--colors-delta-500) !important"},"&.MuiCheckbox-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.MuiCheckbox-indeterminate":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.Mui-disabled":{color:"var(--colors-delta-200) !important"},"&.MuiCheckbox-root .PrivateSwitchBase-input":{height:"100% !important",width:"100% !important"}}});function Yi(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2"})})}const Ji=e=>{var t;return V.jsx(h,{...e,classes:{root:Ve("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})};function Zi({tableData:e,actions:n}){const{anchorEl:o,open:r,handleClose:i,handleOpen:l}=ho(),a=n(e.row);return V.jsx("div",{className:"flex justify-center items-center w-[40px]",children:a.length?V.jsxs("div",{className:"flex items-center justify-center",children:[V.jsx(So,{dataTest:"",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),l(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:V.jsx(Yi,{className:"text-delta-800",width:20,height:20})}),V.jsx(m,{open:r,anchorEl:o,onClose:i,onClick:i,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:n(e.row).map(((n,o)=>{if(R(n)){const r=n.component(e.row,i);return t.isValidElement(r)?V.jsx(t.Fragment,{children:r},o):null}return n.hide?null:V.jsx(Ji,{className:n.className,disabled:n.disabled,onClick:()=>{var t;null==(t=n.onClick)||t.call(n,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:n.label},o)}))})]}):null})}function Qi(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 9V4h2V2H6v2h2v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1l1-1v-7H19v-2c-1.66 0-3-1.34-3-3"})})}const el={"actions-header":"_actions-header_1bxzk_1","pin-indicator":"_pin-indicator_1bxzk_11","pin-icon":"_pin-icon_1bxzk_21"};function tl({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=ho(),i=e.table.getAllLeafColumns().some((e=>e.getCanHide()&&!e.getIsVisible()&&!I.includes(e.id)));return V.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[V.jsxs("div",{className:el["actions-header"],onClick:r,children:[V.jsx(Qi,{className:el["pin-icon"]}),i&&V.jsx("div",{className:el["pin-indicator"]})]}),V.jsx(m,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 44px)",overflowY:"auto",scrollbarWidth:"thin"}},children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==E)).map((e=>e.columnDef.header?V.jsxs(Ji,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),className:"h-[44px]",children:[V.jsx(Xi,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),e.columnDef.pinnedHeaderText?e.columnDef.pinnedHeaderText:"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}function nl(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:V.jsx("path",{fill:"currentColor",d:"M14 6.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0m-5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M5.5 8a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8.5 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M10.5 15a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M4 13.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0"})})}const ol=({rowId:e,rowHeight:t,...n})=>{const{attributes:o,listeners:r}=lo({id:e,...n});return V.jsx("div",{...o,...r,style:{height:t||"auto"},children:V.jsx(nl,{width:24,height:24,className:"text-delta-800"})})};function rl({info:e,rowHeight:t}){const{expandedRows:n,toggleExpand:o}=uo(),r=n.has(e.row.id),i=e.row.getCanExpand();return V.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},onClick:()=>{i&&e.row.getToggleExpandedHandler()(),o(e.row.id)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},children:V.jsx("div",{style:{rotate:r?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},children:V.jsx(mo,{width:20,height:20,color:"var(--colors-gray-700)"})})})}const il=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:l,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:d,customActionsColumnProps:c}=e,g=t.some((e=>!0===e.fixedLeft));!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o,rowHeight:r,customActionsColumnProps:i}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?V.jsx(tl,{headerData:e}):null,cell:e=>n||o?V.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&V.jsx("div",{children:null==o?void 0:o(e)}),n&&V.jsx(Zi,{tableData:e,actions:n})]}):null,size:50,...i}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:c})),d&&!t.find((e=>e.id===N))&&t.unshift(function(e,t){return{id:N,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>V.jsx(rl,{info:e,rowHeight:t}),fixedLeft:e}}(g,u)),l&&!d&&!t.find((e=>e.id===_))&&t.unshift(function(e,t){return{id:_,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?V.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:V.jsx(mo,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(g,u)),a&&!t.find((e=>e.id===O))&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>V.jsx(ol,{rowId:e.id,rowHeight:t}),...e,id:O}}(s,u)),i&&!t.find((e=>e.id===E))&&t.unshift(function(e,t){return{id:E,minSize:52,maxSize:52,size:52,header:({table:e})=>V.jsx(Xi,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>V.jsx("div",{className:"w-[38px] h-[38px] flex items-center",style:{height:t||"auto"},children:V.jsx(Xi,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})}),fixedLeft:e}}(g,u))};function ll(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function al(e){return V.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:V.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const sl=e=>{const{header:t,enableResizing:n,tableWidth:o}=e;let r=t.getSize();const i=t.headerGroup.headers.reduce(((e,t)=>e+t.getSize()),0),l=t.headerGroup.headers.some((e=>e.id===D)),a=t.headerGroup.headers[t.headerGroup.headers.length-(l?2:1)],s=Number(null==a?void 0:a.getSize());if(!n){if(r&&(r=`${r}px`),a&&a.id===t.id){let e;e=o?Math.floor(o)-i+s:"100%";const n=t.column.columnDef.minSize||0;r="string"==typeof e?e:e>n?`${e}px`:`${n}px`}return{width:r||t.column.columnDef.size,maxWidth:r||t.column.columnDef.maxSize,minWidth:r||t.column.columnDef.minSize}}return{width:r||t.column.columnDef.size,maxWidth:t.column.columnDef.maxSize||r,minWidth:t.column.columnDef.minSize||r}};function ul({styledTableProps:e,header:t,tableCanResize:n=!1,left:r,hasFixedLeftColumn:i,tableWidth:a}){const{actions:s,hideHeader:u=!1,enableResizing:d=!1}=e,c=l(null),{isResizing:g,enableResizingFlag:p,disableResizingFlag:f}=uo(),h=o((()=>t.headerGroup.headers.some((e=>e.id===D))),[t.headerGroup.headers]),m=o((()=>t.headerGroup.headers[t.headerGroup.headers.length-(h?2:1)]),[t.headerGroup.headers,h]);return V.jsx("th",{ref:c,colSpan:t.colSpan,className:Ve(Pe["t-cell"],u&&Pe["hide-header"],t.column.id===D&&Pe["t-cell__actions"],i&&!!s&&t.column.id===D&&Pe.shadowed,!0===t.column.columnDef.fixedLeft&&Pe["t-cell__fixed"]),style:{...sl({enableResizing:d,header:t,element:c.current,tableWidth:a}),...t.column.columnDef.fixedLeft&&{left:r}},children:V.jsxs("div",{className:Ve("flex items-center justify-left",u?Pe["hide-table-header"]:Pe["show-table-header"],t.column.getCanSort()&&Pe["sortable-column"],t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!g&&n&&n(e),f()},children:[Fe(t.column.columnDef.header,t.getContext()),{asc:V.jsx(ll,{className:Pe["sort-icon"]}),desc:V.jsx(al,{className:Pe["sort-icon"]})}[t.column.getIsSorted()]??null,n&&(!!d||t.id!==(null==m?void 0:m.id))&&t.column.getCanResize()&&!I.includes(t.column.id)&&V.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>dl({styledTableProps:e,header:t})))},onTouchStart:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>dl({styledTableProps:e,header:t})))},className:`${Pe.resizer} ${t.column.getIsResizing()?Pe.isResizing:""}`})]})},t.id)}function dl({styledTableProps:e,header:t}){if(e.uniqueKey){const n=e.uniqueKey,o=localStorage.getItem(n);let r={};if(o)try{r=JSON.parse(o)}catch{console.warn("Failed to parse stored dimensions. Resetting."),r={}}r[t.column.id]=t.column.getSize(),localStorage.setItem(n,JSON.stringify(r))}}function cl(...e){return C(Ve(e))}function gl({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1,tableHeaderRef:i,tableHeaderStyle:l={}}=t,a=e.getHeaderGroups().some((e=>e.headers.some((e=>!0===e.column.columnDef.fixedLeft)))),s=r?{...l,position:"sticky",top:-.2}:{...l};return V.jsx("thead",{className:cl(Pe["table-header"],t.tableHeaderClassName),style:s,ref:i,children:e.getHeaderGroups().map((e=>V.jsx("tr",{children:e.headers.map(((r,i)=>{const l=r.column.columnDef.fixedLeft,s=e.headers.slice(0,i).reduce(((e,t)=>e+(t.column.getSize()||0)),0);return V.jsx(ul,{styledTableProps:t,header:r,tableCanResize:n,left:l?s:0,hasFixedLeftColumn:a,tableWidth:o},r.column.id)}))},e.id)))})}const pl=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:o}=e;return n&&t?function(e,t,n){const o={...e};return t.top+e.y<=n.top?o.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(o.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?o.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(o.x=n.left+n.width-t.right),o}(o,n,t):o},fl=e=>{let{transform:t}=e;return{...t,x:0}};function hl(e){return V.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[V.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),V.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:V.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const ml=({fetching:e=!1})=>e?V.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:V.jsx(hl,{className:Pe["loading-icon"],width:50,height:50})}):null,vl=({data:e,setData:t,children:n})=>{const r=o((()=>null==e?void 0:e.map((e=>e.id))),[e]);return V.jsx(Tn,{collisionDetection:St,modifiers:[fl,pl],onDragEnd:function(e){if(!t)return;const{active:n,over:o}=e;n&&o&&n.id!==o.id&&t((e=>Un(e,r.indexOf(n.id),r.indexOf(o.id))))},children:n})},bl=({data:e,setData:t,enableDnd:n,children:o})=>n?V.jsx(vl,{data:e,setData:t,children:o}):V.jsx(V.Fragment,{children:o}),yl=e=>{const t={...e,rowHeight:e.rowHeight||48},{className:n,tableClassName:i,height:a,data:u,enableDnd:d,setData:c}=t;il(t);const{table:g}=Ki(t),p=l(null),[f,h]=s(null);r((()=>{const e=p.current;if(!e)return;const t=t=>{const n=e.getBoundingClientRect().width;h((e=>"setup"===t||n!==e?n:e))},n=new ResizeObserver((()=>t("resize")));return n.observe(e),t("setup"),()=>{n.unobserve(e)}}),[]);const m=o((()=>{var e,n;if(!t.enableColumnResizing)return;const o=g.getFlatHeaders(),r={};for(let e=0;e<o.length;e++){const t=o[e];r[`--header-${t.id}-size`]=t.getSize(),r[`--col-${t.column.id}-size`]=t.column.getSize()}return null==(e=t.getTableState)||e.call(t,g.getState()),null==(n=t.getColumnSizing)||n.call(t,g.getState().columnSizing),r}),[t.enableColumnResizing,g.getState().columnSizingInfo,g.getState().columnSizing]),v=u.length>0&&e.loading;return V.jsx(so,{children:V.jsx(bl,{enableDnd:!!d,data:u,setData:c,children:V.jsxs("div",{className:cl(Pe["asma-ui-table-styled-table"],i),children:[V.jsx("div",{className:cl(Pe["table-wrapper"],v&&Pe["table-wrapper-fetching"],n),style:{height:a},children:V.jsxs("table",{ref:p,className:Pe["styled-table"],style:{...m},children:[V.jsx(gl,{table:g,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:f}),V.jsx(ml,{fetching:!!v}),m?V.jsx(V.Fragment,{children:g.getState().columnSizingInfo.isResizingColumn?V.jsx(wl,{table:g,styledTableProps:t}):V.jsx(fo,{table:g,styledTableProps:t})}):V.jsx(fo,{table:g,styledTableProps:t})]})}),V.jsx(qi,{table:g,styledTableProps:t})]})})})},wl=c(fo,((e,t)=>e.table.options.data===t.table.options.data));export{D as ACTIONS_COLUMN_ID,O as DND_HANDLE_COLUMN_ID,_ as EXPAND_COLUMN_ID,I as INTERNAL_COLUMN_IDS,wl as MemoizedTableBody,ol as RowDragHandleCell,E as SELECT_COLUMN_ID,N as SHOW_FULL_TEXT_ID,yl as StyledTable,Ie as createColumnHelper,R as isCustomAction};
|