asma-ui-table 1.0.97 → 1.0.98

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.
@@ -37,4 +37,4 @@ var e=Object.defineProperty,t=(t,n,o)=>(((t,n,o)=>{n in t?e(t,n,{enumerable:!0,c
37
37
  *
38
38
  * @license MIT
39
39
  */
40
- function xo(e,t){return e?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)}(e)?n.createElement(e,t):e:null}const Co={getInitialState:e=>({expandedRows:new Set,...e}),getDefaultOptions:e=>({onChangeExpandedRows:xn("expandedRows",e)}),createTable:e=>{e.setExpandedRows=t=>{var n,o;return null==(o=(n=e.options).onChangeExpandedRows)?void 0:o.call(n,e=>wn(t,e))}},createRow:(e,t)=>{e.onChangeExpanded=n=>t.setExpandedRows(t=>{const o=new Set(t),r=e.id;return n?o.add(r):o.delete(r),wn(()=>o,t)}),e.isExpanded=()=>t.getState().expandedRows.has(e.id),e.toggleExpand=()=>{const t=e.isExpanded();e.onChangeExpanded(!t)}}},So={getInitialState:e=>({focusedRow:null,...e}),getDefaultOptions:e=>({onChangeFocusedRow:xn("focusedRow",e)}),createTable:e=>{e.setFocusedRow=t=>{var n,o;return null==(o=(n=e.options).onChangeFocusedRow)?void 0:o.call(n,e=>wn(t,e))},e.focusRowById=async t=>{var n;if(-1===e.getRowModel().rows.findIndex(e=>e.id===t)&&e.getState().pagination){const o=e.getState().pagination.pageSize,r=e.getCoreRowModel().rows.findIndex(e=>e.id===t);if(-1!==r){const t=Math.floor(r/o);null==(n=e.setPageIndex)||n.call(e,t)}}if(await new Promise(requestAnimationFrame),!e.getRowModel().rows.find(e=>e.id===t))return;e.setFocusedRow(()=>t);const o=document.getElementById(t);o&&(o.focus({preventScroll:!1}),o.scrollIntoView({behavior:"smooth",block:"center"}))}},createRow:(e,t)=>{e.isFocused=()=>t.getState().focusedRow===e.id,e.onChangeFocused=(n,o)=>{const r=o??e.id;if(t.setFocusedRow(()=>n?r:null),n){const e=document.getElementById(r);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}},e.toggleFocused=()=>e.onChangeFocused(!e.isFocused()),e.focusNextRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex(e=>e.id===t.getState().focusedRow),r=n[o+1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus())},e.focusPrevRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex(e=>e.id===t.getState().focusedRow),r=n[o-1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus())}}},Ro={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xn("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>{var n,o;return null==(o=(n=e.options).onColumnOrderChange)?void 0:o.call(n,e=>wn(t,e))},e.resetColumnOrder=()=>{const t=e.getAllLeafColumns().map(e=>e.id);e.setColumnOrder(()=>t)}}},Eo=e=>{const{columns:t,data:o,initialState:r,pageSize:i,enableRowSelection:l,tableInstanceRef:a,locale:s,...u}=e,c=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=n.useState(()=>({current:bo(t)})),[r,i]=n.useState(()=>o.current.initialState);return o.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}})),o.current}({_features:[Co,So,Ro],columns:t,data:o,meta:{locale:s??"en"},initialState:{pagination:{pageIndex:0,pageSize:i||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[D]:!1},...r},enableRowSelection:l,getCoreRowModel:e=>Sn(()=>[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=On(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},Rn(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex())),getExpandedRowModel:e=>Sn(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?yo(t):t,Rn(e.options,"debugTable","getExpandedRowModel")),getFilteredRowModel:e=>Sn(()=>[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,c;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++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,e=>{n.columnFiltersMeta[t]=e})){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return wo(t.rows,e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0},e)},Rn(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex())),getSortedRowModel:e=>Sn(()=>[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.map(e=>({...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=a.sortUndefined,u=null!=(n=null==r?void 0:r.desc)&&n;let c=0;if(s){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);if(n||o){if("first"===s)return n?-1:1;if("last"===s)return n?1:-1;c=n&&o?0:n?s:-s}}if(0===c&&(c=a.sortingFn(e,t,r.id)),0!==c)return u&&(c*=-1),a.invertSorting&&(c*=-1),c}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}},Rn(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex())),getPaginationRowModel:e=>Sn(()=>[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 c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:yo({rows:i,flatRows:l,rowsById:a}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c},Rn(e.options,"debugTable","getPaginationRowModel")),getRowId:u.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:e.enableResizing?{size:void 0}:void 0,...u});return a&&(a.current=c),{table:c}},_o={CheckboxWrapper:"_CheckboxWrapper_k4bh3_1","size-small":"_size-small_k4bh3_11","size-medium":"_size-medium_k4bh3_15",Checkbox:"_Checkbox_k4bh3_1",ReadOnly:"_ReadOnly_k4bh3_45",Indicator:"_Indicator_k4bh3_54",HideWrapper:"_HideWrapper_k4bh3_58",CheckboxHover:"_CheckboxHover_k4bh3_65",CheckboxRippleContainer:"_CheckboxRippleContainer_k4bh3_65",CheckboxRipple:"_CheckboxRipple_k4bh3_65",ripple:"_ripple_k4bh3_1"};function Io(){}const Do=Object.freeze({});const Oo={};function ko(e,t){const o=n.useRef(Oo);return o.current===Oo&&(o.current=e(t)),o}const No=n[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Mo=No&&No!==n.useLayoutEffect?No:e=>e();function Fo(e){const t=ko(Po).current;return t.next=e,Mo(t.effect),t.trampoline}function Po(){const e={next:void 0,callback:jo,trampoline:(...t)=>{var n;return null==(n=e.callback)?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function jo(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}const Ao=typeof document<"u"?n.useLayoutEffect:()=>{};function To(e,t,n,o){const r=ko(Vo).current;return function(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}(r,e,t,n,o)&&Lo(r,[e,t,n,o]),r.callback}function Vo(){return{callback:null,cleanup:null,refs:[]}}function Lo(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const o=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const r=t[e];if(null!=r)switch(typeof r){case"function":{const t=r(n);"function"==typeof t&&(o[e]=t);break}case"object":r.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=o[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const zo={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ho={...zo,position:"fixed",top:0,left:0},$o={...zo,position:"absolute"};let Bo=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({}),Go=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const Uo={valid:e=>null===e?null:e?{[Go.valid]:""}:{[Go.invalid]:""}};function Wo(e){return n.useMemo(()=>({checked:t=>e.indeterminate?{}:t?{[Bo.checked]:""}:{[Bo.unchecked]:""},...Uo}),[e.indeterminate])}function qo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`}const Ko=parseInt(n.version,10);function Xo(e){if(!n.isValidElement(e))return null;const t=e,o=t.props;return(function(e){return Ko>=e}(19)?null==o?void 0:o.ref:t.ref)??null}function Yo(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}const Jo={};function Zo(e,t,n,o,r){let i={...nr(e,Jo)};return t&&(i=Qo(i,t)),n&&(i=Qo(i,n)),o&&(i=Qo(i,o)),r&&(i=Qo(i,r)),i}function Qo(e,t){return tr(t)?t(e):function(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":e[n]=Yo(e.style,o);break;case"className":e[n]=ir(e.className,o);break;default:er(n,o)?e[n]=or(e[n],o):e[n]=o}}return e}(e,t)}function er(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return 111===n&&110===o&&r>=65&&r<=90&&("function"==typeof t||typeof t>"u")}function tr(e){return"function"==typeof e}function nr(e,t){return tr(e)?e(t):e??Jo}function or(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const o=n;rr(o);const r=t(o);return o.baseUIHandlerPrevented||null==e||e(o),r}const o=t(n);return null==e||e(n),o}:t:e}function rr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ir(e,t){return t?e?t+" "+e:t:e}function lr(e,t,o={}){const r=t.render,i=function(e,t={}){const{className:n,style:o,render:r}=e,{state:i=Do,ref:l,props:a,stateAttributesMapping:s,enabled:u=!0}=t,c=u?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,d=u?function(e,t){return"function"==typeof e?e(t):e}(o,i):void 0,g=u?function(e,t){const n={};for(const o in e){const r=e[o];if(null!=t&&t.hasOwnProperty(o)){const e=t[o](r);null!=e&&Object.assign(n,e);continue}!0===r?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}(i,s):Do,p=u?Yo(g,Array.isArray(a)?function(e){if(0===e.length)return Jo;if(1===e.length)return nr(e[0],Jo);let t={...nr(e[0],Jo)};for(let n=1;n<e.length;n+=1)t=Qo(t,e[n]);return t}(a):a)??Do:Do;return typeof document<"u"&&(u?Array.isArray(l)?p.ref=function(e){const t=ko(Vo).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&Lo(t,e),t.callback}([p.ref,Xo(r),...l]):p.ref=To(p.ref,Xo(r),l):To(null,null)),u?(void 0!==c&&(p.className=ir(p.className,c)),void 0!==d&&(p.style=Yo(p.style,d)),p):Do}(t,o);if(!1===o.enabled)return null;return function(e,t,o,r){if(t){if("function"==typeof t)return t(o,r);const e=Zo(o,t.props);return e.ref=o.ref,n.cloneElement(t,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?f("button",{type:"button",...t,key:t.key}):"img"===e?f("img",{alt:"",...t,key:t.key}):n.createElement(e,t)}(e,o);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":qo(8))}(e,r,i,o.state??Do)}const ar={...n};let sr=0;const ur=ar.useId;function cr(e,t){if(void 0!==ur){const n=ur();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[o,r]=n.useState(e),i=e||o;return n.useEffect(()=>{null==o&&(sr+=1,r(`${t}-${sr}`))},[o,t]),i}(e,t)}function dr(e){return cr(e,"base-ui")}function gr(e){return typeof window<"u"&&(e instanceof HTMLElement||e instanceof function(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}(e).HTMLElement)}let pr;function fr(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");pr.has(t)||(pr.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(pr=new Set);const hr=n.createContext(void 0);function mr(e={}){const{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:i=!0}=e,l=n.useRef(null),a=void 0!==function(e=!1){const t=n.useContext(hr);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":qo(16));return t}(!0),s=Fo(()=>{const e=l.current;return!("A"!==(null==e?void 0:e.tagName)||null==e||!e.href)}),{props:u}=function(e){const{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:i=0,isNativeButton:l}=e,a=r&&!1!==t,s=r&&!1===t;return{props:n.useMemo(()=>{const e={onKeyDown(e){o&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=i,!l&&o&&(e.tabIndex=t?i:-1)),(l&&(t||a)||!l&&o)&&(e["aria-disabled"]=o),l&&(!t||s)&&(e.disabled=o),e},[r,o,t,a,s,l,i])}}({focusableWhenDisabled:o,disabled:t,composite:a,tabIndex:r,isNativeButton:i});"production"!==process.env.NODE_ENV&&n.useEffect(()=>{if(!l.current)return;const e="BUTTON"===l.current.tagName;i?e||fr("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):e&&fr("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[i]);const c=n.useCallback(()=>{const e=l.current;(function(e){return gr(e)&&"BUTTON"===e.tagName})(e)&&a&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,a]);Ao(c,[c]);return{getButtonProps:n.useCallback((e={})=>{const{onClick:n,onMouseDown:o,onKeyUp:r,onKeyDown:l,onPointerDown:a,...c}=e;return Zo({type:i?"button":void 0,onClick(e){t?e.preventDefault():null==n||n(e)},onMouseDown(e){t||null==o||o(e)},onKeyDown(e){if(t||(rr(e),null==l||l(e)),e.baseUIHandlerPrevented)return;const o=e.target===e.currentTarget&&!i&&!s()&&!t,r="Enter"===e.key,a=" "===e.key;o&&((a||r)&&e.preventDefault(),r&&(null==n||n(e)))},onKeyUp(e){t||(rr(e),null==r||r(e)),!e.baseUIHandlerPrevented&&e.target===e.currentTarget&&!i&&!t&&" "===e.key&&(null==n||n(e))},onPointerDown(e){t?e.preventDefault():null==a||a(e)}},i?void 0:{role:"button"},u,c)},[t,u,i,s]),buttonRef:Fo(e=>{l.current=e,c()})}}"production"!==process.env.NODE_ENV&&(hr.displayName="CompositeRootContext");const vr=n.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:Io,disabled:void 0,touched:!1,setTouched:Io,dirty:!1,setDirty:Io,filled:!1,setFilled:Io,focused:!1,setFocused:Io,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Do)=>e,getInputValidationProps:(e=Do)=>e,inputRef:{current:null},commit:async()=>{}}});function br(e=!0){const t=n.useContext(vr);if(t.setValidityData===Io&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":qo(28));return t}"production"!==process.env.NODE_ENV&&(vr.displayName="FieldRootContext");const yr=n.createContext({disabled:!1});function wr(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}"production"!==process.env.NODE_ENV&&(yr.displayName="FieldItemContext");const xr=n.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Io,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Cr(){return n.useContext(xr)}"production"!==process.env.NODE_ENV&&(xr.displayName="FormContext");const Sr=n.createContext({controlId:void 0,setControlId:Io,labelId:void 0,setLabelId:Io,messageIds:[],setMessageIds:Io,getDescriptionProps:e=>e});"production"!==process.env.NODE_ENV&&(Sr.displayName="LabelableContext");const Rr=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Rr.displayName="CheckboxGroupContext");const Er=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Er.displayName="CheckboxRootContext");const _r="data-parent",Ir=n.forwardRef(function(e,t){const{checked:o,className:r,defaultChecked:i=!1,disabled:l=!1,id:a,indeterminate:s=!1,inputRef:u,name:c,onCheckedChange:d,parent:g=!1,readOnly:p=!1,render:f,required:h=!1,uncheckedValue:v,value:b,nativeButton:y=!1,...w}=e,{clearErrors:x}=Cr(),{disabled:C,name:S,setDirty:R,setFilled:E,setFocused:_,setTouched:I,state:D,validationMode:O,validityData:k,shouldValidateOnChange:N,validation:M}=br(),F=n.useContext(yr),{labelId:P,controlId:j,setControlId:A,getDescriptionProps:T}=n.useContext(Sr),V=function(e=!0){const t=n.useContext(Rr);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.":qo(3));return t}(),L=null==V?void 0:V.parent,H=L&&V.allValues,$=C||F.disabled||(null==V?void 0:V.disabled)||l,B=S??c,G=b??B,U=dr(),W=dr();let q=j;H?q=g?W:`${L.id}-${G}`:a&&(q=a);let K={};H&&(g?K=V.parent.getParentProps():G&&(K=V.parent.getChildProps(G)));const X=Fo(d),{checked:Y=o,indeterminate:J=s,onCheckedChange:Z,...Q}=K,ee=null==V?void 0:V.value,te=null==V?void 0:V.setValue,ne=null==V?void 0:V.defaultValue,oe=n.useRef(null),{getButtonProps:re,buttonRef:ie}=mr({disabled:$,native:y}),le=(null==V?void 0:V.validation)??M,[ae,se]=function({controlled:e,default:t,name:o,state:r="value"}){const{current:i}=n.useRef(void 0!==e),[l,a]=n.useState(t),s=i?e:l;if("production"!==process.env.NODE_ENV){n.useEffect(()=>{i!==(void 0!==e)&&console.error([`Base UI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))},[r,o,e]);const{current:l}=n.useRef(t);n.useEffect(()=>{!i&&JSON.stringify(l)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join("\n"))},[JSON.stringify(t)])}return[s,n.useCallback(e=>{i||a(e)},[])]}({controlled:G&&ee&&!g?ee.includes(G):Y,default:G&&ne&&!g?ne.includes(G):i,name:"Checkbox",state:"checked"});Ao(()=>{if(A!==Io)return A(q),()=>{A(void 0)}},[q,V,A,g]),function(e){const{enabled:t=!0,value:n,id:o,name:r,controlRef:i,commit:l}=e,{formRef:a}=Cr(),{invalid:s,markedDirtyRef:u,validityData:c,setValidityData:d}=br(),g=Fo(e.getValue);Ao(()=>{if(!t)return;let e=n;void 0===e&&(e=g()),null===c.initialValue&&null!==e&&d(t=>({...t,initialValue:e}))},[t,d,n,c.initialValue,g]),Ao(()=>{!t||!o||a.current.fields.set(o,{getValue:g,name:r,controlRef:i,validityData:wr(c,s),validate(e=!0){let t=n;void 0===t&&(t=g()),u.current=!0,e?m.flushSync(()=>l(t)):l(t)}})},[l,i,t,a,g,o,s,u,r,c,n]),Ao(()=>{const e=a.current.fields;return()=>{o&&e.delete(o)}},[a,o])}({enabled:!V,id:U,commit:le.commit,value:ae,controlRef:oe,name:B,getValue:()=>ae});const ue=n.useRef(null),ce=To(u,ue,le.inputRef);Ao(()=>{ue.current&&(ue.current.indeterminate=J,ae&&E(!0))},[ae,J,E]),function(e,t){const o=n.useRef(e),r=Fo(t);Ao(()=>{o.current!==e&&r(o.current)},[e,r]),Ao(()=>{o.current=e},[e])}(ae,()=>{V&&!g||(x(B),E(ae),R(ae!==k.initialValue),N()?le.commit(ae):le.commit(ae,!0))});const de=Zo({checked:ae,disabled:$,name:g?void 0:B,id:y?void 0:q??void 0,required:h,ref:ce,style:B?$o:Ho,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked,n=function(e,t,n,o){let r=!1,i=!1;const l=o??Do;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...l}}("none",e.nativeEvent);if(null==Z||Z(t,n),X(t,n),!n.isCanceled&&(se(t),G&&ee&&te&&!g)){const e=t?[...ee,G]:ee.filter(e=>e!==G);te(e,n)}},onFocus(){var e;null==(e=oe.current)||e.focus()}},void 0!==b?{value:(V?ae&&b:b)||""}:Do,T,V?le.getValidationProps:le.getInputValidationProps),ge=H?!!Y:ae,pe=H&&J||s;n.useEffect(()=>{L&&G&&L.disabledStatesRef.current.set(G,$)},[L,$,G]);const fe=n.useMemo(()=>({...D,checked:ge,disabled:$,readOnly:p,required:h,indeterminate:pe}),[D,ge,$,p,h,pe]),he=Wo(fe),me=lr("span",e,{state:fe,ref:[ie,oe,t,null==V?void 0:V.registerControlRef],props:[{id:y?q??void 0:U,role:"checkbox","aria-checked":J?"mixed":ae,"aria-readonly":p||void 0,"aria-required":h||void 0,"aria-labelledby":P,[_r]:g?"":void 0,onFocus(){_(!0)},onBlur(){const e=ue.current;e&&(I(!0),_(!1),"onBlur"===O&&le.commit(V?ee:e.checked))},onClick(e){var t;p||$||(e.preventDefault(),null==(t=ue.current)||t.click())}},T,le.getValidationProps,w,Q,re],stateAttributesMapping:he});return z.jsxs(Er.Provider,{value:fe,children:[me,!ae&&!V&&B&&!g&&void 0!==v&&z.jsx("input",{type:"hidden",name:B,value:v}),z.jsx("input",{...de})]})});"production"!==process.env.NODE_ENV&&(Ir.displayName="CheckboxRoot");const Dr=[];const Or=null;let kr=globalThis.requestAnimationFrame;const Nr=new class{constructor(){t(this,"callbacks",[]),t(this,"callbacksCount",0),t(this,"nextId",1),t(this,"startId",1),t(this,"isScheduled",!1),t(this,"tick",e=>{var t;this.isScheduled=!1;const n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let o=0;o<n.length;o+=1)null==(t=n[o])||t.call(n,e)})}request(e){const t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const n="test"===process.env.NODE_ENV&&kr!==requestAnimationFrame&&(kr=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Mr{constructor(){t(this,"currentId",Or),t(this,"cancel",()=>{this.currentId!==Or&&(Nr.cancel(this.currentId),this.currentId=Or)}),t(this,"disposeEffect",()=>this.cancel)}static create(){return new Mr}static request(e){return Nr.request(e)}static cancel(e){return Nr.cancel(e)}request(e){this.cancel(),this.currentId=Nr.request(()=>{this.currentId=Or,e()})}}function Fr(){const e=ko(Mr.create).current;return function(e){n.useEffect(e,Dr)}(e.disposeEffect),e}let Pr=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const jr={[Pr.startingStyle]:""},Ar={[Pr.endingStyle]:""},Tr={transitionStatus:e=>"starting"===e?jr:"ending"===e?Ar:null};function Vr(e){const{enabled:t=!0,open:o,ref:r,onComplete:i}=e,l=Fo(i),a=function(e,t=!1,n=!0){const o=Fr();return Fo((r,i=null)=>{function l(){m.flushSync(r)}o.cancel();const a=function(e){return null==e?e:"current"in e?e.current:e}(e);if(null==a)return;const s=a;if("function"!=typeof s.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let e=function(){const e=Pr.startingStyle;if(!s.hasAttribute(e))return void o.request(r);const t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),r())});t.observe(s,{attributes:!0,attributeFilter:[e]}),null==i||i.addEventListener("abort",()=>t.disconnect(),{once:!0})},r=function(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{null!=i&&i.aborted||l()}).catch(()=>{const e=s.getAnimations();if(n){if(null!=i&&i.aborted)return;l()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&r()})};if(t)return void e();o.request(r)}})}(r,o,!1);n.useEffect(()=>{if(!t)return;const e=new AbortController;return a(l,e.signal),()=>{e.abort()}},[t,o,l,a])}const Lr=n.forwardRef(function(e,t){const{render:o,className:r,keepMounted:i=!1,...l}=e,a=function(){const e=n.useContext(Er);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.":qo(14));return e}(),s=a.checked||a.indeterminate,{transitionStatus:u,setMounted:c}=function(e,t=!1,o=!1){const[r,i]=n.useState(e&&t?"idle":void 0),[l,a]=n.useState(e);return e&&!l&&(a(!0),i("starting")),!e&&l&&"ending"!==r&&!o&&i("ending"),!e&&!l&&"ending"===r&&i(void 0),Ao(()=>{if(!e&&l&&"ending"!==r&&o){const e=Mr.request(()=>{i("ending")});return()=>{Mr.cancel(e)}}},[e,l,r,o]),Ao(()=>{if(!e||t)return;const n=Mr.request(()=>{i(void 0)});return()=>{Mr.cancel(n)}},[t,e]),Ao(()=>{if(!e||!t)return;e&&l&&"idle"!==r&&i("starting");const n=Mr.request(()=>{i("idle")});return()=>{Mr.cancel(n)}},[t,e,l,i,r]),n.useMemo(()=>({mounted:l,setMounted:a,transitionStatus:r}),[l,r])}(s),d=n.useRef(null),g=n.useMemo(()=>({...a,transitionStatus:u}),[a,u]);Vr({open:s,ref:d,onComplete(){s||c(!1)}});const p=Wo(a),f=n.useMemo(()=>({...p,...Tr,...Uo}),[p]),h=i||s,m=lr("span",e,{enabled:h,ref:[t,d],state:g,stateAttributesMapping:f,props:l});return h?m:null});"production"!==process.env.NODE_ENV&&(Lr.displayName="CheckboxIndicator");const zr=({className:e})=>z.jsxs("svg",{viewBox:"0 0 24 24",className:e,fill:"none",children:[z.jsx("title",{children:"Indeterminate icon"}),z.jsx("rect",{x:"5.5",y:"10.5",width:"13",height:"2.75",fill:"currentColor"})]}),Hr=e=>z.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...e,children:[z.jsx("title",{children:"Check icon"}),z.jsx("path",{d:"M4 12l5 5L20 6"})]}),$r=({dataTest:e,size:t="medium",disabled:n,readOnly:r,indeterminate:i=!1,checked:a,disableRipple:s,hideWrapper:u,className:c,onChange:d,...g})=>{const p=!!u,f=!(s||p||n||r),h=fn(_o.CheckboxWrapper,!p&&_o[`size-${t}`],p&&_o.HideWrapper,r&&_o.ReadOnly,f&&_o.CheckboxHover,c),m=fn("styled-checkbox-inner",_o.Checkbox,_o[`size-${t}`]),v=i?zr:Hr,b=o.useRef(null),y=o.useCallback(e=>{var t;if(e.stopPropagation(),!f)return;const n=document.createElement("span");n.className=_o.CheckboxRipple||"",n.addEventListener("animationend",()=>n.remove(),{once:!0}),null==(t=b.current)||t.appendChild(n)},[f]);l(()=>()=>{var e;null==(e=b.current)||e.replaceChildren()},[]);const w=o.useCallback(e=>{if(r)return;const t={target:{name:g.name,value:g.value,checked:e}};null==d||d(t,e)},[d,g.name,g.value,r]);return z.jsxs(Ir,{className:h,"data-test":e,checked:a,disabled:n,readOnly:r,indeterminate:i,onPointerDown:y,onCheckedChange:w,...g,children:[!p&&f&&z.jsx("span",{ref:b,className:_o.CheckboxRippleContainer}),z.jsx("span",{className:m,children:z.jsx(Lr,{className:_o.Indicator,children:z.jsx(v,{strokeWidth:"small"===t?3:2})})})]})};function Br(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}const Gr=()=>{const[e,t]=u(null),[n,o]=u(!1),r=s(e=>{t(e.currentTarget),o(!0)},[]);return{open:n,handleClose:s(()=>{o(!1)},[]),handleOpen:r,anchorEl:e}};function Ur(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.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 Wr=e=>{var t;return z.jsx(x,{...e,classes:{root:pn("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})},qr="_asma-core-ui-button_17pcg_1",Kr={contained:"_contained_17pcg_6",outlined:"_outlined_17pcg_130",text:"_text_17pcg_254",textGray:"_textGray_17pcg_378",textWhite:"_textWhite_17pcg_440",large:"_large_17pcg_58",small:"_small_17pcg_53",medium:"_medium_17pcg_48",error:"_error_17pcg_68",common:"_common_17pcg_6"},Xr=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const c="large"===n||"medium"===n,d=s?"error":"common";return z.jsxs("button",{...u,className:pn(qr,Kr[e],Kr[d],Kr[n],t),ref:r,"data-test":a,children:[i,o&&z.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:c?"8px":"4px",paddingLeft:c?"8px":"4px",paddingRight:c?"8px":"4px"},children:o}),l]})};function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yr.apply(null,arguments)}function Jr(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}function Zr(e,t){return(Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const Qr=!1;var ei="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.shape({enter:E.number,exit:E.number,appear:E.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&E.oneOfType([E.string,E.shape({enter:E.string,exit:E.string,active:E.string}),E.shape({enter:E.string,enterDone:E.string,enterActive:E.string,exit:E.string,exitDone:E.string,exitActive:E.string})]);const ti=o.createContext(null);var ni="unmounted",oi="exited",ri="entering",ii="entered",li="exiting",ai=function(e){function t(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=oi,o.appearStatus=ri):r=ii:r=t.unmountOnExit||t.mountOnEnter?ni:oi,o.state={status:r},o.nextCallback=null,o}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zr(e,t)}(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ni?{status:oi}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==ri&&n!==ii&&(t=ri):(n===ri||n===ii)&&(t=li)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.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}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===ri){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:v.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===oi&&this.setState({status:ni})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[v.findDOMNode(this),o],i=r[0],l=r[1],a=this.getTimeouts(),s=o?a.appear:a.enter;!e&&!n||Qr?this.safeSetState({status:ii},function(){t.props.onEntered(i)}):(this.props.onEnter(i,l),this.safeSetState({status:ri},function(){t.props.onEntering(i,l),t.onTransitionEnd(s,function(){t.safeSetState({status:ii},function(){t.props.onEntered(i,l)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:v.findDOMNode(this);t&&!Qr?(this.props.onExit(o),this.safeSetState({status:li},function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:oi},function(){e.props.onExited(o)})})})):this.safeSetState({status:oi},function(){e.props.onExited(o)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.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},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:v.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)},n.render=function(){var e=this.state.status;if(e===ni)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Jr(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o.createElement(ti.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},t}(o.Component);function si(){}ai.contextType=ti,ai.propTypes="production"!==process.env.NODE_ENV?{nodeRef:E.shape({current:typeof Element>"u"?E.any:function(e,t,n,o,r,i){var l=e[t];return E.instanceOf(l&&"ownerDocument"in l?l.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:E.oneOfType([E.func.isRequired,E.element.isRequired]).isRequired,in:E.bool,mountOnEnter:E.bool,unmountOnExit:E.bool,appear:E.bool,enter:E.bool,exit:E.bool,timeout:function(e){var t=ei;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:E.func,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func}:{},ai.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:si,onEntering:si,onEntered:si,onExit:si,onExiting:si,onExited:si},ai.UNMOUNTED=ni,ai.EXITED=oi,ai.ENTERING=ri,ai.ENTERED=ii,ai.EXITING=li;const ui=ai;function ci(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}function di(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 gi=ci(E.element,di);gi.isRequired=ci(E.element.isRequired,di);const pi=gi;function fi(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."}const hi=Object.freeze(Object.defineProperty({__proto__:null,default:fi},Symbol.toStringTag,{value:"Module"}));function mi(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function vi(e){if(n.isValidElement(e)||!mi(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=vi(e[n])}),t}function bi(e,t,o={clone:!0}){const r=o.clone?Yr({},e):e;return mi(e)&&mi(t)&&Object.keys(t).forEach(i=>{n.isValidElement(t[i])?r[i]=t[i]:mi(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&mi(e[i])?r[i]=bi(e[i],t[i],o):o.clone?r[i]=mi(t[i])?vi(t[i]):t[i]:r[i]=t[i]}),r}const yi=["values","unit","step"];function wi(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,r=Jr(e,yi),i=(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)=>Yr({},e,{[t.key]:t.val}),{})})(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 Yr({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)}const xi={borderRadius:4},Ci="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.string,E.object,E.array]):{};function Si(e,t){return t?bi(e,t,{clone:!1}):e}const Ri={xs:0,sm:600,md:900,lg:1200,xl:1536},Ei={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ri[e]}px)`};function _i(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||Ei;return t.reduce((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o),{})}if("object"==typeof t){const e=o.breakpoints||Ei;return Object.keys(t).reduce((o,r)=>{if(-1!==Object.keys(e.values||Ri).indexOf(r)){o[e.up(r)]=n(t[r],r)}else{const e=r;o[e]=t[e]}return o},{})}return n(t)}function Ii(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function Di(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":fi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Oi(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 ki(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:Oi(e,n)||o,t&&(r=t(r,o,e)),r}function Ni(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=Oi(e.theme,o)||{};return _i(e,i,e=>{let o=ki(l,r,e);return e===o&&"string"==typeof e&&(o=ki(l,r,`${t}${"default"===e?"":Di(e)}`,e)),!1===n?o:{[n]:o}})};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:Ci}:{},i.filterProps=[t],i}const Mi={m:"margin",p:"padding"},Fi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Pi={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ji=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!Pi[e])return[e];e=Pi[e]}const[t,n]=e.split(""),o=Mi[t],r=Fi[n]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),Ai=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Vi=[...Ai,...Ti];function Li(e,t,n,o){var r;const i=null!=(r=Oi(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 zi(e){return Li(e,"spacing",8,"spacing")}function Hi(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 $i(e,t,n,o){if(-1===t.indexOf(n))return null;const r=function(e,t){return n=>e.reduce((e,o)=>(e[o]=Hi(t,n),e),{})}(ji(n),o);return _i(e,e[n],r)}function Bi(e,t){const n=zi(e.theme);return Object.keys(e).map(o=>$i(e,t,o,n)).reduce(Si,{})}function Gi(e){return Bi(e,Ai)}function Ui(e){return Bi(e,Ti)}function Wi(...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]?Si(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 qi(e){return"number"!=typeof e?e:`${e}px solid`}function Ki(e,t){return Ni({prop:e,themeKey:"borders",transform:t})}Gi.propTypes="production"!==process.env.NODE_ENV?Ai.reduce((e,t)=>(e[t]=Ci,e),{}):{},Gi.filterProps=Ai,Ui.propTypes="production"!==process.env.NODE_ENV?Ti.reduce((e,t)=>(e[t]=Ci,e),{}):{},Ui.filterProps=Ti,"production"!==process.env.NODE_ENV&&Vi.reduce((e,t)=>(e[t]=Ci,e),{});const Xi=Ki("border",qi),Yi=Ki("borderTop",qi),Ji=Ki("borderRight",qi),Zi=Ki("borderBottom",qi),Qi=Ki("borderLeft",qi),el=Ki("borderColor"),tl=Ki("borderTopColor"),nl=Ki("borderRightColor"),ol=Ki("borderBottomColor"),rl=Ki("borderLeftColor"),il=Ki("outline",qi),ll=Ki("outlineColor"),al=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Li(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:Hi(t,e)});return _i(e,e.borderRadius,n)}return null};al.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Ci}:{},al.filterProps=["borderRadius"],Wi(Xi,Yi,Ji,Zi,Qi,el,tl,nl,ol,rl,al,il,ll);const sl=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Li(e.theme,"spacing",8,"gap"),n=e=>({gap:Hi(t,e)});return _i(e,e.gap,n)}return null};sl.propTypes="production"!==process.env.NODE_ENV?{gap:Ci}:{},sl.filterProps=["gap"];const ul=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Li(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:Hi(t,e)});return _i(e,e.columnGap,n)}return null};ul.propTypes="production"!==process.env.NODE_ENV?{columnGap:Ci}:{},ul.filterProps=["columnGap"];const cl=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Li(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:Hi(t,e)});return _i(e,e.rowGap,n)}return null};cl.propTypes="production"!==process.env.NODE_ENV?{rowGap:Ci}:{},cl.filterProps=["rowGap"];function dl(e,t){return"grey"===t?t:e}Wi(sl,ul,cl,Ni({prop:"gridColumn"}),Ni({prop:"gridRow"}),Ni({prop:"gridAutoFlow"}),Ni({prop:"gridAutoColumns"}),Ni({prop:"gridAutoRows"}),Ni({prop:"gridTemplateColumns"}),Ni({prop:"gridTemplateRows"}),Ni({prop:"gridTemplateAreas"}),Ni({prop:"gridArea"}));function gl(e){return e<=1&&0!==e?100*e+"%":e}Wi(Ni({prop:"color",themeKey:"palette",transform:dl}),Ni({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:dl}),Ni({prop:"backgroundColor",themeKey:"palette",transform:dl}));const pl=Ni({prop:"width",transform:gl}),fl=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,o;const r=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||Ri[t];return r?"px"!==(null==(o=e.theme)||null==(o=o.breakpoints)?void 0:o.unit)?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:gl(t)}};return _i(e,e.maxWidth,t)}return null};fl.filterProps=["maxWidth"];const hl=Ni({prop:"minWidth",transform:gl}),ml=Ni({prop:"height",transform:gl}),vl=Ni({prop:"maxHeight",transform:gl}),bl=Ni({prop:"minHeight",transform:gl});Ni({prop:"size",cssProperty:"width",transform:gl}),Ni({prop:"size",cssProperty:"height",transform:gl});Wi(pl,fl,hl,ml,vl,bl,Ni({prop:"boxSizing"}));const yl={border:{themeKey:"borders",transform:qi},borderTop:{themeKey:"borders",transform:qi},borderRight:{themeKey:"borders",transform:qi},borderBottom:{themeKey:"borders",transform:qi},borderLeft:{themeKey:"borders",transform:qi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:qi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:al},color:{themeKey:"palette",transform:dl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:dl},backgroundColor:{themeKey:"palette",transform:dl},p:{style:Ui},pt:{style:Ui},pr:{style:Ui},pb:{style:Ui},pl:{style:Ui},px:{style:Ui},py:{style:Ui},padding:{style:Ui},paddingTop:{style:Ui},paddingRight:{style:Ui},paddingBottom:{style:Ui},paddingLeft:{style:Ui},paddingX:{style:Ui},paddingY:{style:Ui},paddingInline:{style:Ui},paddingInlineStart:{style:Ui},paddingInlineEnd:{style:Ui},paddingBlock:{style:Ui},paddingBlockStart:{style:Ui},paddingBlockEnd:{style:Ui},m:{style:Gi},mt:{style:Gi},mr:{style:Gi},mb:{style:Gi},ml:{style:Gi},mx:{style:Gi},my:{style:Gi},margin:{style:Gi},marginTop:{style:Gi},marginRight:{style:Gi},marginBottom:{style:Gi},marginLeft:{style:Gi},marginX:{style:Gi},marginY:{style:Gi},marginInline:{style:Gi},marginInlineStart:{style:Gi},marginInlineEnd:{style:Gi},marginBlock:{style:Gi},marginBlockStart:{style:Gi},marginBlockEnd:{style:Gi},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:sl},rowGap:{style:cl},columnGap:{style:ul},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:gl},maxWidth:{style:fl},minWidth:{transform:gl},height:{transform:gl},maxHeight:{transform:gl},minHeight:{transform:gl},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},wl=yl;const xl=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 c=Oi(n,a)||{};return u?u(r):_i(r,t,t=>{let n=ki(c,s,t);return t===n&&"string"==typeof t&&(n=ki(c,s,`${e}${"default"===t?"":Di(t)}`,t)),!1===l?n:{[l]:n}})}return function t(n){var o;const{sx:r,theme:i={},nested:l}=n||{};if(!r)return null;const a=null!=(o=i.unstable_sxConfig)?o:wl;function s(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),s=Object.keys(r);let u=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(a[n])u=Si(u,e(n,r,i,a));else{const e=_i({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)?u=Si(u,e):u[n]=t({sx:r,theme:i,nested:!0})}else u=Si(u,e(n,r,i,a))}),!l&&i.modularCssLayers?{"@layer sx":Ii(s,u)}:Ii(s,u)}return Array.isArray(r)?r.map(s):s(r)}}();xl.filterProps=["sx"];const Cl=xl;function Sl(e,t){const n=this;return n.vars&&"function"==typeof n.getColorSchemeSelector?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const Rl=["breakpoints","palette","spacing","shape"];function El(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={}}=e,l=Jr(e,Rl),a=wi(n),s=function(e=8){if(e.mui)return e;const t=zi({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=bi({breakpoints:a,direction:"ltr",components:{},palette:Yr({mode:"light"},o),spacing:s,shape:Yr({},xi,i)},l);return u.applyStyles=Sl,u=t.reduce((e,t)=>bi(e,t),u),u.unstable_sxConfig=Yr({},wl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Cl({sx:e,theme:this})},u}function _l(e=null){const t=n.useContext(_);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}const Il=El();const Dl=e=>e,Ol=(()=>{let e=Dl;return{configure(t){e=t},generate:t=>e(t),reset(){e=Dl}}})(),kl=Ol,Nl={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ml(e,t,n="Mui"){const o=Nl[t];return o?`${n}-${o}`:`${kl.generate(e)}-${t}`}const Fl=Object.freeze(Object.defineProperty({__proto__:null,default:function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},Symbol.toStringTag,{value:"Module"}));function Pl(e,t){return Yr({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var jl={},Al={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Al);var Tl=Al.exports;const Vl=P(hi),Ll=P(Fl);var zl=Tl;Object.defineProperty(jl,"__esModule",{value:!0}),jl.alpha=Ql,jl.blend=function(e,t,n,o=1){const r=(e,t)=>Math.round((e**(1/o)*(1-n)+t**(1/o)*n)**o),i=Kl(e),l=Kl(t);return Yl({type:"rgb",values:[r(i.values[0],l.values[0]),r(i.values[1],l.values[1]),r(i.values[2],l.values[2])]})},jl.colorChannel=void 0;var Hl=jl.darken=ea;jl.decomposeColor=Kl,jl.emphasize=na;var $l=jl.getContrastRatio=function(e,t){const n=Zl(e),o=Zl(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)};jl.getLuminance=Zl,jl.hexToRgb=ql,jl.hslToRgb=Jl;var Bl=jl.lighten=ta;jl.private_safeAlpha=function(e,t,n){try{return Ql(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.private_safeColorChannel=void 0,jl.private_safeDarken=function(e,t,n){try{return ea(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.private_safeEmphasize=function(e,t,n){try{return na(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.private_safeLighten=function(e,t,n){try{return ta(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.recomposeColor=Yl,jl.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=Kl(e);return`#${t.map((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e)).join("")}`};var Gl=zl(Vl),Ul=zl(Ll);function Wl(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}].`),(0,Ul.default)(e,t,n)}function ql(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(", ")})`:""}function Kl(e){if(e.type)return e;if("#"===e.charAt(0))return Kl(ql(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().`:(0,Gl.default)(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.`:(0,Gl.default)(10,o))}else r=r.split(",");return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:o}}const Xl=e=>{const t=Kl(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e).join(" ")};jl.colorChannel=Xl;function Yl(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 Jl(e){e=Kl(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])),Yl({type:a,values:s})}function Zl(e){let t="hsl"===(e=Kl(e)).type||"hsla"===e.type?Kl(Jl(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 Ql(e,t){return e=Kl(e),t=Wl(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Yl(e)}function ea(e,t){if(e=Kl(e),t=Wl(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 Yl(e)}function ta(e,t){if(e=Kl(e),t=Wl(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 Yl(e)}function na(e,t=.15){return Zl(e)>.5?ea(e,t):ta(e,t)}jl.private_safeColorChannel=(e,t)=>{try{return Xl(e)}catch{return t&&"production"!==process.env.NODE_ENV&&console.warn(t),e}};const oa={black:"#000",white:"#fff"},ra={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"},ia={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"},la={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"},aa={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"},sa={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"},ua={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"},ca={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"},da=["mode","contrastThreshold","tonalOffset"],ga={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:oa.white,default:oa.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}},pa={text:{primary:oa.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:oa.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 fa(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=Bl(e.main,r):"dark"===t&&(e.dark=Hl(e.main,i)))}function ha(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,r=Jr(e,da),i=e.primary||function(e="light"){return"dark"===e?{main:sa[200],light:sa[50],dark:sa[400]}:{main:sa[700],light:sa[400],dark:sa[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:ia[200],light:ia[50],dark:ia[400]}:{main:ia[500],light:ia[300],dark:ia[700]}}(t),a=e.error||function(e="light"){return"dark"===e?{main:la[500],light:la[300],dark:la[700]}:{main:la[700],light:la[400],dark:la[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:ua[400],light:ua[300],dark:ua[700]}:{main:ua[700],light:ua[500],dark:ua[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:ca[400],light:ca[300],dark:ca[700]}:{main:ca[800],light:ca[500],dark:ca[900]}}(t),c=e.warning||function(e="light"){return"dark"===e?{main:aa[400],light:aa[300],dark:aa[700]}:{main:"#ed6c02",light:aa[500],dark:aa[900]}}(t);function d(e){const t=$l(e,pa.text.primary)>=n?pa.text.primary:ga.text.primary;if("production"!==process.env.NODE_ENV){const n=$l(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=Yr({},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.`:fi(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} });`:fi(12,t?` (${t})`:"",JSON.stringify(e.main)));return fa(e,"light",r,o),fa(e,"dark",i,o),e.contrastText||(e.contrastText=d(e.main)),e},p={dark:pa,light:ga};return"production"!==process.env.NODE_ENV&&(p[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),bi(Yr({common:Yr({},oa),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:c,name:"warning"}),info:g({color:s,name:"info"}),success:g({color:u,name:"success"}),grey:ra,contrastThreshold:n,getContrastText:d,augmentColor:g,tonalOffset:o},p[t]),r)}const ma=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function va(e){return Math.round(1e5*e)/1e5}const ba={textTransform:"uppercase"},ya='"Roboto", "Helvetica", "Arial", sans-serif';function wa(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=ya,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:l=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,g=Jr(n,ma);"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=d||(e=>e/u*p+"rem"),h=(e,t,n,r,i)=>Yr({fontFamily:o,fontWeight:e,fontSize:f(t),lineHeight:n},o===ya?{letterSpacing:`${va(r/t)}em`}:{},i,c),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,ba),caption:h(l,12,1.66,.4),overline:h(l,12,2.66,1,ba),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return bi(Yr({htmlFontSize:u,pxToRem:f,fontFamily:o,fontSize:r,fontWeightLight:i,fontWeightRegular:l,fontWeightMedium:a,fontWeightBold:s},m),g,{clone:!1})}function xa(...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 Ca=["none",xa(0,2,1,-1,0,1,1,0,0,1,3,0),xa(0,3,1,-2,0,2,2,0,0,1,5,0),xa(0,3,3,-2,0,3,4,0,0,1,8,0),xa(0,2,4,-1,0,4,5,0,0,1,10,0),xa(0,3,5,-1,0,5,8,0,0,1,14,0),xa(0,3,5,-1,0,6,10,0,0,1,18,0),xa(0,4,5,-2,0,7,10,1,0,2,16,1),xa(0,5,5,-3,0,8,10,1,0,3,14,2),xa(0,5,6,-3,0,9,12,1,0,3,16,2),xa(0,6,6,-3,0,10,14,1,0,4,18,3),xa(0,6,7,-4,0,11,15,1,0,4,20,3),xa(0,7,8,-4,0,12,17,2,0,5,22,4),xa(0,7,8,-4,0,13,19,2,0,5,24,4),xa(0,7,9,-4,0,14,21,2,0,5,26,4),xa(0,8,9,-5,0,15,22,2,0,6,28,5),xa(0,8,10,-5,0,16,24,2,0,6,30,5),xa(0,8,11,-5,0,17,26,2,0,6,32,5),xa(0,9,11,-5,0,18,28,2,0,7,34,6),xa(0,9,12,-6,0,19,29,2,0,7,36,6),xa(0,10,13,-6,0,20,31,3,0,8,38,7),xa(0,10,13,-6,0,21,33,3,0,8,40,7),xa(0,10,14,-6,0,22,35,3,0,8,42,7),xa(0,11,14,-7,0,23,36,3,0,9,44,8),xa(0,11,15,-7,0,24,38,3,0,9,46,8)],Sa=["duration","easing","delay"],Ra={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)"},Ea={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function _a(e){return`${Math.round(e)}ms`}function Ia(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function Da(e){const t=Yr({},Ra,e.easing),n=Yr({},Ea,e.duration);return Yr({getAutoHeightDuration:Ia,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:i=t.easeInOut,delay:l=0}=o,a=Jr(o,Sa);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.'),"object"!=typeof o&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join("\n")),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:_a(r)} ${i} ${"string"==typeof l?l:_a(l)}`).join(",")}},e,{easing:t,duration:n})}const Oa={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},ka=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const Na=function(e={},...t){const{mixins:n={},palette:o={},transitions:r={},typography:i={}}=e,l=Jr(e,ka);if(e.vars&&void 0===e.generateCssVars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":fi(18));const a=ha(o),s=El(e);let u=bi(s,{mixins:Pl(s.breakpoints,n),palette:a,shadows:Ca.slice(),typography:wa(a,i),transitions:Da(r),zIndex:Yr({},Oa)});if(u=bi(u,l),u=t.reduce((e,t)=>bi(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=Ml("",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=Yr({},wl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Cl({sx:e,theme:this})},u}(),Ma=Na;function Fa(){const e=function(e=Il){return _l(e)}(Ma);return"production"!==process.env.NODE_ENV&&n.useDebugValue(e),e.$$material||e}function Pa(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 ja=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Aa={entering:{opacity:1},entered:{opacity:1}},Ta=n.forwardRef(function(e,t){const o=Fa(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:l=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:g,onExit:p,onExited:f,onExiting:h,style:m,timeout:v=r,TransitionComponent:b=ui}=e,y=Jr(e,ja),w=n.useRef(null),x=function(...e){return n.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)})},e)}(w,function(e){var t;return parseInt(n.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}(a),t),C=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=C(g),R=C((e,t)=>{(e=>{e.scrollTop})(e);const n=Pa({style:m,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=o.transitions.create("opacity",n),e.style.transition=o.transitions.create("opacity",n),c&&c(e,t)}),E=C(d),_=C(h),I=C(e=>{const t=Pa({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)}),D=C(f);return z.jsx(b,Yr({appear:l,in:u,nodeRef:w,onEnter:R,onEntered:E,onEntering:S,onExit:I,onExited:D,onExiting:_,addEndListener:e=>{i&&i(w.current,e)},timeout:v},y,{children:(e,t)=>n.cloneElement(a,Yr({style:Yr({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},Aa[e],m,a.props.style),ref:x},t))}))});"production"!==process.env.NODE_ENV&&(Ta.propTypes={addEndListener:E.func,appear:E.bool,children:pi.isRequired,easing:E.oneOfType([E.shape({enter:E.string,exit:E.string}),E.string]),in:E.bool,onEnter:E.func,onEntered:E.func,onEntering:E.func,onExit:E.func,onExited:E.func,onExiting:E.func,style:E.object,timeout:E.oneOfType([E.number,E.shape({appear:E.number,enter:E.number,exit:E.number})])});const Va=Ta,La=e=>z.jsx(C,{TransitionComponent:Va,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 za(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16 ",...e,children:z.jsxs("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",children:[z.jsx("circle",{cx:"8",cy:"8",r:"6.25"}),z.jsx("path",{d:"m8 10.75v0m0-6v3.5"})]})})}function Ha({tableData:e,actions:t,rowActionsState:n}){var i;const{anchorEl:a,open:s,handleClose:c,handleOpen:d}=Gr(),g=t(e.row),p=(null==n?void 0:n(e.row))??{state:"enabled"},f="no"===(null==(i=e.table.options.meta)?void 0:i.locale)?"Ingen handlinger tilgjengelig":"No actions available",h=r(()=>g.every(e=>!("component"in e)&&e.hide),[g]),m=g.length>0&&!h,v="enabled"===p.state&&!m,b="hidden"!==p.state&&(m||v||"disabled"===p.state),[y,w]=u(!1);if(l(()=>{if(!y)return;const e=window.setTimeout(()=>w(!1),1600);return()=>window.clearTimeout(e)},[y]),!b)return z.jsx("div",{className:"flex justify-center items-center w-[40px]"});const x="disabled"===p.state,C=z.jsx(Xr,{dataTest:"",variant:"text",size:"small",disabled:x,onClick:t=>{t.stopPropagation(),t.preventDefault(),!x&&(d(t),e.row.onChangeFocused(!0))},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:z.jsx(Ur,{className:x?"text-delta-300":"text-delta-700",width:20,height:20})});return z.jsx("div",{className:"flex justify-center items-center w-[40px]",children:z.jsxs("div",{className:"flex items-center justify-center",children:["disabled"===p.state?z.jsx(La,{title:p.tooltipTitle,arrow:!0,placement:p.tooltipPlacement||"top",open:y,onOpen:()=>w(!0),onClose:()=>w(!1),children:z.jsx("span",{className:"cursor-not-allowed",onTouchStart:e=>{e.stopPropagation(),e.preventDefault(),w(!0)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:C})}):C,"enabled"===p.state&&z.jsx(S,{open:s,anchorEl:a,onClose:()=>{c(),e.row.onChangeFocused(!1)},onClick:()=>{c(),e.row.onChangeFocused(!1)},anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:v?z.jsxs("div",{className:"flex items-center gap-2 p-3 text-delta-700",children:[z.jsx(za,{width:20,height:20}),z.jsx("span",{children:f})]}):g.map((t,n)=>{if(I(t)){const r=t.component(e.row,c);return o.isValidElement(r)?z.jsx(o.Fragment,{children:r},n):null}return t.hide?null:z.jsx(La,{title:null==t?void 0:t.tooltipTitle,arrow:!0,placement:(null==t?void 0:t.tooltipPlacement)||"left",children:z.jsx("span",{children:z.jsx(Wr,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label})})},n)})})]})})}function $a(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.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 Ba="_actions-header_1bxzk_1",Ga="_pin-indicator_1bxzk_11",Ua="_pin-icon_1bxzk_21";function Wa(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:z.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 qa={en:{column_reorder:"This column is fixed and can’t be reordered.",column_hidden:"This column is fixed and can’t be hidden."},no:{column_reorder:"Denne kolonnen er fast og kan ikke flyttes.",column_hidden:"Denne kolonnen er fast og kan ikke skjules."}};function Ka({id:e,disabled:t,children:n}){const{attributes:o,listeners:r,setNodeRef:i,transform:l,transition:a}=dn({id:e,disabled:t}),s={transform:se.Transform.toString(l),transition:a,height:36};return z.jsx("div",{ref:i,style:s,...o,...r,children:n})}function Xa({headerData:e,locale:t}){const{anchorEl:n,open:o,handleClose:i,handleOpen:l}=Gr(),a=e.table.getAllLeafColumns().some(e=>e.getCanHide()&&!e.getIsVisible()&&!F.includes(e.id)),s=e.table.getAllLeafColumns(),u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r(()=>[...t].filter(e=>null!=e),[...t])}(function(e,t){return r(()=>({sensor:e,options:t??{}}),[e,t])}(gt,{activationConstraint:{distance:10}})),c=function(e="en"){return r(()=>qa[e]??qa.en,[e])}(t),d=s.filter(e=>!F.includes(e.id)&&!!e.columnDef.header);return z.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[z.jsxs("button",{type:"button",className:Ba,onClick:l,children:[z.jsx($a,{className:Ua}),a&&z.jsx("div",{className:Ga})]}),z.jsx(S,{anchorEl:n,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:o,onClose:i,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 44px)",overflowY:"auto",scrollbarWidth:"thin"}},children:z.jsx($t,{modifiers:[Kt,qt],onDragEnd:t=>{var n;const{active:o,over:r}=t;!o||!r||o.id===r.id||null!=(n=s.find(e=>e.id===r.id))&&n.columnDef.fixedLeft||(e.table.resetColumnOrder(),e.table.setColumnOrder(e=>{const t=e.indexOf(o.id),n=e.indexOf(r.id);return Xt(e,t,n)}))},sensors:u,children:z.jsx(on,{items:d.map(e=>e.id),strategy:en,children:d.map(e=>{const t=!!e.columnDef.fixedLeft,n=!1===e.columnDef.enableHiding;return z.jsx(Ka,{id:e.id,disabled:t,children:z.jsx(La,{title:t&&c.column_reorder,arrow:!0,children:z.jsx("span",{children:z.jsxs(Wr,{onClick:()=>{n||e.toggleVisibility(!e.getIsVisible())},className:"h-[44px] flex items-center",children:[z.jsx(Wa,{width:20,height:20,className:fn(t?"text-delta-300 cursor-not-allowed":"text-delta-800 cursor-grab")}),z.jsx(La,{title:n&&c.column_hidden,arrow:!0,children:z.jsx("span",{children:z.jsx($r,{readOnly:n,dataTest:`${e.id}-column-visibility-checkbox`,size:"small",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()})})}),e.columnDef.pinnedHeaderText??("string"==typeof e.columnDef.header?e.columnDef.header:e.id)]})})})},e.id)})})})})]})}const Ya=({rowId:e,rowHeight:t,...n})=>{const{attributes:o,listeners:r}=dn({id:e,...n});return z.jsx("div",{...o,...r,style:{height:t||"auto"},children:z.jsx(Wa,{width:24,height:24,className:pn(n.disabled?"text-delta-300 cursor-not-allowed":"text-delta-800 cursor-grab")})})};function Ja({info:e,rowHeight:t}){const n=e.row.getCanExpand();return z.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},children:z.jsx(Xr,{dataTest:"expand-text-button",size:"small",variant:"textGray",onClick:()=>{n&&e.row.getToggleExpandedHandler()(),e.row.toggleExpand()},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},startIcon:z.jsx(Br,{width:20,height:20,style:{rotate:e.row.isExpanded()?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms",cursor:"pointer"}})})})}const Za=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:l,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:c,customActionsColumnProps:d,rowActionsState:g,locale:p}=e,f=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,rowActionsState:l,locale:a}=e;return{id:k,enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?z.jsx(Xa,{headerData:e,locale:a}):null,cell:e=>n||o?z.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&z.jsx("div",{children:null==o?void 0:o(e)}),n&&z.jsx(Ha,{tableData:e,actions:n,rowActionsState:l})]}):null,size:50,...i}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:d,rowActionsState:g,locale:p})),c&&!t.find(e=>e.id===M)&&t.unshift(function(e,t){return{id:M,minSize:38,maxSize:38,size:38,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>z.jsx(Ja,{info:e,rowHeight:t}),fixedLeft:e}}(f,u)),l&&!c&&!t.find(e=>e.id===O)&&t.unshift(function(e,t){return{id:O,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?z.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:z.jsx(Br,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(f,u)),a&&!t.find(e=>e.id===N)&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>z.jsx(Ya,{rowId:e.id,rowHeight:t}),...e,id:N}}(s,u)),i&&!t.find(e=>e.id===D)&&t.unshift(function(e,t){return{id:D,minSize:38,maxSize:38,size:38,header:({table:e})=>z.jsx($r,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>z.jsx("div",{style:{height:t||"auto"},className:"flex items-center w-full",children:z.jsx($r,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})}),fixedLeft:e}}(f,u))},Qa="_asma-ui-table-styled-table_1s531_1",es="_table-wrapper_1s531_18",ts="_table-shell_1s531_25",ns="_table-wrapper--no-rows_1s531_31",os="_table-wrapper--proxy_1s531_34",rs="_table-wrapper--proxy-bottom_1s531_35",is="_table-wrapper-fetching_1s531_45",ls="_table-scroll_1s531_48",as="_table-x--fill-height_1s531_57",ss="_table-x_1s531_57",us="_table-header--sticky_1s531_72",cs="_table-hscroll_1s531_77",ds="_table-hscroll__content_1s531_87",gs="_no-rows-overlay-container_1s531_90",ps="_styled-table_1s531_99",fs="_tbody_1s531_108",hs="_loading-icon_1s531_113",ms="_t-row_1s531_120",vs="_t-cell_1s531_120",bs="_action-cell_1s531_130",ys="_fixed-cell_1s531_133",ws="_expanded_row_1s531_161",xs="_selected_1s531_179",Cs="_single-selection_1s531_182",Ss="_shadowed_1s531_198",Rs="_is-loading_1s531_219",Es="_action-cell-default-background_1s531_222",_s="_fixed-cell-default-background_1s531_225",Is="_sortable-column_1s531_228",Ds="_resizer_1s531_232",Os="_isResizing_1s531_244",ks="_hide-table-header_1s531_256",Ns="_show-table-header_1s531_260",Ms="_table-header_1s531_72",Fs="_hide-header_1s531_285",Ps="_t-cell__actions_1s531_288",js="_t-cell__fixed_1s531_298",As="_sort-icon_1s531_305",Ts="_table-footer--sticky_1s531_308",Vs="_table-footer--inline_1s531_319",Ls="_table-bottom_1s531_330",zs="_table-bottom--sticky_1s531_344";function Hs(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function $s(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const Bs=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===k),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 Gs({styledTableProps:e,header:t,tableCanResize:n=!1,left:o,hasFixedLeftColumn:i,tableWidth:l}){const{actions:s,hideHeader:u=!1,enableResizing:c=!1}=e,d=a(null),{isResizing:g,enableResizingFlag:p,disableResizingFlag:f}=vn(),h=!bn()&&t.column.columnDef.fixedLeft,m=r(()=>t.headerGroup.headers.some(e=>e.id===k),[t.headerGroup.headers]),v=r(()=>t.headerGroup.headers[t.headerGroup.headers.length-(m?2:1)],[t.headerGroup.headers,m]);return z.jsx("th",{ref:d,colSpan:t.colSpan,className:pn(vs,u&&Fs,t.column.id===k&&Ps,i&&!!s&&t.column.id===k&&Ss,h&&js),style:{...Bs({enableResizing:c,header:t,element:d.current,tableWidth:l}),...h&&{left:o}},children:z.jsxs("div",{className:pn("flex items-center justify-left",u?ks:Ns,t.column.getCanSort()&&Is,t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!g&&n&&n(e),f()},children:[xo(t.column.columnDef.header,t.getContext()),{asc:z.jsx(Hs,{className:As}),desc:z.jsx($s,{className:As})}[t.column.getIsSorted()]??null,n&&(!!c||t.id!==(null==v?void 0:v.id))&&t.column.getCanResize()&&!F.includes(t.column.id)&&z.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",()=>Us({styledTableProps:e,header:t}))},onTouchStart:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",()=>Us({styledTableProps:e,header:t}))},className:`${Ds} ${t.column.getIsResizing()?Os:""}`})]})},t.id)}function Us({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 Ws({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1,tableHeaderRef:i,tableHeaderStyle:l={}}=t,a=bn(),s=e.getHeaderGroups().some(e=>e.headers.some(e=>!0===e.column.columnDef.fixedLeft)),u={...l};return z.jsx("thead",{className:fn(Ms,r&&us,t.tableHeaderClassName),style:u,ref:i,children:e.getHeaderGroups().map(e=>z.jsx("tr",{children:e.headers.map((r,i)=>{const l=!a&&r.column.columnDef.fixedLeft,u=e.headers.slice(0,i).reduce((e,t)=>e+(t.column.getSize()||0),0);return z.jsx(Gs,{styledTableProps:t,header:r,tableCanResize:n,left:l?u:0,hasFixedLeftColumn:s,tableWidth:o},r.column.id)})},e.id))})}const qs="_skeleton-row_5gbhw_1",Ks=({colSpan:e,rowHeight:t=48})=>z.jsx(h,{children:Array.from({length:10}).map((n,o)=>z.jsx("tr",{children:z.jsx("td",{colSpan:e,height:t,className:qs,children:z.jsx(R,{variant:"rectangular",width:"100%",height:40,sx:{backgroundColor:"var(--colors-delta-50)",borderRadius:"8px"}},o)})},o))});function Xs({styledTableProps:e,row:t,index:n}){const{loading:o,getRowClassName:i,rowHeight:a,onRowClick:s,expandArrow:u,enableDnd:c,disableDndForRow:d,tdClassName:g,customSubRowData:p,renderSubRows:f,defaultExpanded:m,actions:v,textExpandArrow:b,enableMultiRowSelection:y,enableRowSelection:w,singleSelectionRow:x}=e,C=null==d?void 0:d(t),{transform:S,transition:R,setNodeRef:E,isDragging:_}=dn({id:t.original.id,disabled:!c||C}),I={transform:se.Transform.toString(S),transition:R,opacity:_?.8:1,zIndex:_?1:0,position:"relative"},{isResizing:D,disableResizingFlag:O}=vn(),N=bn();l(()=>{m&&t.getCanExpand()&&!t.getIsExpanded()&&t.toggleExpand()},[]);const M=e=>{var n,o;t.getCanExpand()&&!u&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r=!("Range"===(null==(o=window.getSelection())?void 0:o.type)||D),i=s instanceof Function;!i&&b&&r?t.toggleExpand():i&&r&&(s(e,t),t.onChangeFocused(!0)),O()},F=t.getVisibleCells().map((e,t,n)=>({...e,left:n.slice(0,t).reduce((e,t)=>e+(t.column.getSize()||0),0)})),P=r(()=>F.filter(({column:e})=>e.columnDef.fixedLeft),[F]),j=!y&&!w&&x,A=t.getIsSelected()&&j,T=s instanceof Function;return z.jsxs(h,{children:[z.jsx("tr",{role:"row","aria-selected":t.getIsSelected()||t.isFocused()?"true":"false",tabIndex:t.isFocused()?0:-1,"data-index":n,"data-test":t.id,id:t.id,className:pn(ms,o&&Rs,null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit",...c&&I},ref:C?void 0:E,onMouseUp:e=>{e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName||"LI"===e.target.nodeName||e.target.closest("li")||M(e)},onMouseDown:e=>{e.detail>1&&!T&&b&&e.preventDefault()},onKeyDown:e=>{switch(e.key){case"Tab":case"ArrowDown":t.focusNextRow(),e.preventDefault();break;case"ArrowUp":t.focusPrevRow(),e.preventDefault();break;case"Enter":M(e)}},children:F.map((e,n)=>{var o;const r=e.column.id===k,l=!N&&e.column.columnDef.fixedLeft,a=e.id===(null==(o=P.at(-1))?void 0:o.id),s=t.isExpanded(),u=0===n;return z.jsx("td",{className:pn(vs,T&&"cursor-pointer",g,r&&bs,r&&!!v&&P.length&&Ss,r&&(null!=i&&i(t)?null==i?void 0:i(t):Es),l&&ys,a&&Ss,t.getIsSelected()&&xs,l&&(null!=i&&i(t)?null==i?void 0:i(t):_s),s&&ws,(A||t.isFocused())&&Cs),style:{left:l?e.left:void 0},children:z.jsxs("div",{style:{display:"flex",alignItems:"center",minWidth:u?32:void 0,position:"relative"},children:[u&&A&&z.jsx("span",{style:{display:"inline-flex",alignItems:"center",position:"absolute",left:0,top:"50%",transform:"translateY(-50%)"},children:z.jsx(Ys,{})}),z.jsx("span",{style:{marginLeft:u&&j?30:0,width:"100%"},children:xo(e.column.columnDef.cell,e.getContext())})]})},e.id)})}),t.getIsExpanded()&&z.jsx(z.Fragment,{children:p&&f&&f({rows:p.get(t.original.id.toString())??[],row:t.original})})]},t.id)}const Ys=()=>z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 2 22 22",style:{color:"var(--colors-gama-500)"},children:z.jsx("path",{fill:"currentColor",d:"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"})});function Js({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return z.jsx(z.Fragment,{children:n.map((t,n)=>z.jsx(Xs,{styledTableProps:e,row:t,index:n},t.id))})}function Zs({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,enableDnd:i,rowHeight:l}=t,a=e.getAllLeafColumns().length||n.length||1;return r&&0===o.length?z.jsx("tbody",{className:fs,children:z.jsx(Ks,{colSpan:a,rowHeight:l})}):0===o.length?null:z.jsx("tbody",{className:fs,children:i?z.jsx(on,{items:o,strategy:en,children:z.jsx(Js,{table:e,styledTableProps:t})}):z.jsx(Js,{table:e,styledTableProps:t})})}function Qs(e){return z.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[z.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}),z.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:z.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const eu=({fetching:e=!1})=>e?z.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:z.jsx(Qs,{className:hs,width:50,height:50})}):null;function tu(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const nu="_table-pagination_pu6mb_1";function ou(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}function ru(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const iu=e=>z.jsxs(x,{classes:{root:"flex gap-x-1"},sx:{padding:"8px","&.Mui-selected":{backgroundColor:"var(--colors-gama-50)","&:hover":{backgroundColor:"var(--colors-gama-50)"}}},...e,children:[z.jsx(ru,{width:24,height:24,color:e.selected?"var(--colors-gama-500)":"transparent",style:{transition:"color 0.2s ease"}}),e.children]}),lu=[10,20,50];function au({table:e,showRowSelect:t,locale:n}){const{anchorEl:o,open:i,handleClose:l,handleOpen:u}=Gr(),{anchorEl:c,open:d,handleClose:g,handleOpen:p}=Gr(),f=a(null),h="no"===n,m=r(()=>({anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}}),[]),v=s(()=>{var e,t,n;const o=Qa;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"})},[]),b=e.getPageCount()||1,y=e.getState().pagination.pageIndex+1,w=r(()=>Array.from({length:b},(e,t)=>t+1),[b]),x=e.getState().pagination.pageSize,C=r(()=>{const e=new Set([...lu,x]);return Array.from(e).sort((e,t)=>e-t)},[]),R=s(t=>{e.setPageIndex(t-1),l(),v()},[e,l,v]),E=s(t=>{e.setPageSize(t),g()},[e,g]);return z.jsxs("div",{ref:f,className:nu,children:[t&&z.jsxs(z.Fragment,{children:[z.jsxs(Xr,{dataTest:"table-rows-count-button",variant:"outlined",size:"large",onClick:p,endIcon:z.jsx(Br,{className:(d?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[x," ",h?"rader":"rows"]}),z.jsx(S,{open:d,anchorEl:c,slotProps:{paper:{sx:{width:c?c.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:g,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:C.map(e=>z.jsx(iu,{onClick:t=>{t.stopPropagation(),t.preventDefault(),E(e)},selected:x===e,children:z.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[e," ",h?"rader":"rows"]})},e))})]}),z.jsx(La,{title:h?"Nåværende side":"Current Page",children:z.jsx("div",{children:z.jsxs(Xr,{dataTest:"current-page-button",variant:"outlined",size:"large",onClick:u,endIcon:z.jsx(Br,{className:(i?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[h?"Side":"Page"," ",y," ",h?"av":"of"," ",b]})})}),z.jsx(S,{open:i,anchorEl:o,slotProps:{paper:{sx:{width:o?o.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:l,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:w.map(e=>z.jsx(iu,{onClick:t=>{t.stopPropagation(),t.preventDefault(),R(e)},selected:e===y,children:z.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[h?"Side":"Page"," ",e]})},e))}),z.jsx(La,{title:1===y?"":h?"Forrige side":"Previous Page",children:z.jsx("div",{children:z.jsx(Xr,{dataTest:"prev-page-button",variant:"outlined",onClick:()=>{e.previousPage(),v()},size:"large",disabled:!e.getCanPreviousPage(),startIcon:z.jsx(ou,{height:24,width:24})})})}),z.jsx(La,{title:y===b?"":h?"Neste side":"Next Page",children:z.jsx("div",{children:z.jsx(Xr,{dataTest:"next-page-button",variant:"outlined",onClick:()=>{e.nextPage(),v()},size:"large",disabled:!e.getCanNextPage(),startIcon:z.jsx(tu,{height:24,width:24})})})})]})}function su({table:e,styledTableProps:t,canShowStickyFooter:n}){var o,r,i;if(t.hideFooter||0===t.data.length)return null;const l=t.paginationAlignLeft,a=e.getState().pagination.pageSize,s=e.getFilteredRowModel().rows.length>a,u=null==(o=t.footer)?void 0:o.call(t,e);return null!=u&&!1!==u||s?z.jsxs("div",{className:n?Ts:Vs,style:l&&{justifyContent:"flex-start"}||{},children:[!l&&(null==(r=t.footer)?void 0:r.call(t,e)),s&&z.jsx(au,{table:e,showRowSelect:!!t.showRowCountSelect,locale:t.locale||"en"}),l&&(null==(i=t.footer)?void 0:i.call(t,e))]}):null}function uu({enabled:e,data:t,setData:n,children:o}){const i=r(()=>t.map(e=>e.id),[t]);return e?z.jsx($t,{collisionDetection:_e,modifiers:[Kt,qt],onDragEnd:t=>{if(!e||!n)return;const{active:o,over:r}=t;!o||!r||o.id===r.id||n(e=>Xt(e,i.indexOf(o.id),i.indexOf(r.id)))},children:o}):z.jsx(z.Fragment,{children:o})}function cu({enabled:e,className:t,children:n}){return e?z.jsx("div",{className:t,children:n}):z.jsx(z.Fragment,{children:n})}const du=e=>{const t=r(()=>({...e,rowHeight:e.rowHeight||48}),[e]),{className:n,tableClassName:o,height:l,noRowsOverlay:s,data:c,enableDnd:d,setData:g,loading:p}=t;Za(t);const{table:f}=Eo(t),h=c.length>0,m=h&&!!p,v=!h&&!p,b=bn(),y=!!t.stickyFooter&&!b,w=!y,{tableScrollRef:x,tableXRef:C,hScrollRef:S,hScrollContentRef:R}=function(e){const t=a(null),n=a(null),o=a(null),r=a(null);return i(()=>{if(!e)return;const i=t.current,l=n.current,a=o.current,s=r.current;if(!(i&&l&&a&&s))return;let u=!1;const c=()=>{s.style.width=`${l.scrollWidth}px`},d=()=>{u||(u=!0,a.scrollLeft=l.scrollLeft,u=!1)},g=()=>{u||(u=!0,l.scrollLeft=a.scrollLeft,u=!1)};c(),d(),l.addEventListener("scroll",d,{passive:!0}),a.addEventListener("scroll",g,{passive:!0});const p=new ResizeObserver(c);return p.observe(l),()=>{l.removeEventListener("scroll",d),a.removeEventListener("scroll",g),p.disconnect()}},[e]),{tableScrollRef:t,tableXRef:n,hScrollRef:o,hScrollContentRef:r}}(w),{ref:E,heightPx:_}=function(){const e=a(null),[t,n]=u(0);return i(()=>{const t=e.current;if(!t)return;let o=0;const r=()=>{const e=Math.round(t.getBoundingClientRect().height);n(t=>t===e?t:e)},i=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(r)};i();const l=new ResizeObserver(i);return l.observe(t),()=>{cancelAnimationFrame(o),l.disconnect()}},[]),{ref:e,heightPx:t}}(),I=t.rowHeight??48,D=f.getRowModel().rows.length,O=r(()=>I<=0?0:Math.floor(_/I),[_,I]),k=!y&&D>0&&D<=O,N=fn(y?es:k||!y&&v?rs:os,m&&is,v&&ns,n),M=z.jsxs("table",{className:ps,children:[z.jsx(Ws,{table:f,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:null}),z.jsx(eu,{fetching:!!m}),z.jsx(Zs,{table:f,styledTableProps:t})]});return z.jsx(mn,{children:z.jsx(uu,{enabled:!!d,data:c,setData:g,children:z.jsxs("div",{ref:E,className:fn(Qa,o),style:{height:l},children:[z.jsx(cu,{enabled:y,className:ts,children:z.jsxs("div",{className:N,children:[y?M:z.jsxs("div",{ref:x,className:fn(ls),children:[z.jsx("div",{ref:C,className:fn(ss,!k&&as),children:M}),z.jsx("div",{ref:S,className:cs,children:z.jsx("div",{ref:R,className:ds})}),z.jsx("div",{className:fn(Ls,k&&zs),children:z.jsx(su,{table:f,styledTableProps:t,canShowStickyFooter:!1})})]}),v&&z.jsx("div",{className:gs,children:s})]})}),y&&z.jsx(su,{table:f,styledTableProps:t,canShowStickyFooter:!0})]})})})};export{k as ACTIONS_COLUMN_ID,N as DND_HANDLE_COLUMN_ID,O as EXPAND_COLUMN_ID,F as INTERNAL_COLUMN_IDS,Ya as RowDragHandleCell,D as SELECT_COLUMN_ID,M as SHOW_FULL_TEXT_ID,du as StyledTable,yn as createColumnHelper,I as isCustomAction};
40
+ function xo(e,t){return e?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)}(e)?n.createElement(e,t):e:null}const Co={getInitialState:e=>({expandedRows:new Set,...e}),getDefaultOptions:e=>({onChangeExpandedRows:xn("expandedRows",e)}),createTable:e=>{e.setExpandedRows=t=>{var n,o;return null==(o=(n=e.options).onChangeExpandedRows)?void 0:o.call(n,e=>wn(t,e))}},createRow:(e,t)=>{e.onChangeExpanded=n=>t.setExpandedRows(t=>{const o=new Set(t),r=e.id;return n?o.add(r):o.delete(r),wn(()=>o,t)}),e.isExpanded=()=>t.getState().expandedRows.has(e.id),e.toggleExpand=()=>{const t=e.isExpanded();e.onChangeExpanded(!t)}}},So={getInitialState:e=>({focusedRow:null,...e}),getDefaultOptions:e=>({onChangeFocusedRow:xn("focusedRow",e)}),createTable:e=>{e.setFocusedRow=t=>{var n,o;return null==(o=(n=e.options).onChangeFocusedRow)?void 0:o.call(n,e=>wn(t,e))},e.focusRowById=async t=>{var n;if(-1===e.getRowModel().rows.findIndex(e=>e.id===t)&&e.getState().pagination){const o=e.getState().pagination.pageSize,r=e.getCoreRowModel().rows.findIndex(e=>e.id===t);if(-1!==r){const t=Math.floor(r/o);null==(n=e.setPageIndex)||n.call(e,t)}}if(await new Promise(requestAnimationFrame),!e.getRowModel().rows.find(e=>e.id===t))return;e.setFocusedRow(()=>t);const o=document.getElementById(t);o&&(o.focus({preventScroll:!1}),o.scrollIntoView({behavior:"smooth",block:"center"}))}},createRow:(e,t)=>{e.isFocused=()=>t.getState().focusedRow===e.id,e.onChangeFocused=(n,o)=>{const r=o??e.id;if(t.setFocusedRow(()=>n?r:null),n){const e=document.getElementById(r);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}},e.toggleFocused=()=>e.onChangeFocused(!e.isFocused()),e.focusNextRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex(e=>e.id===t.getState().focusedRow),r=n[o+1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus())},e.focusPrevRow=()=>{var e;const n=t.getRowModel().rows,o=n.findIndex(e=>e.id===t.getState().focusedRow),r=n[o-1];r&&(r.onChangeFocused(!0,r.id),null==(e=document.getElementById(r.id))||e.focus())}}},Ro={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xn("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>{var n,o;return null==(o=(n=e.options).onColumnOrderChange)?void 0:o.call(n,e=>wn(t,e))},e.resetColumnOrder=()=>{const t=e.getAllLeafColumns().map(e=>e.id);e.setColumnOrder(()=>t)}}},Eo=e=>{const{columns:t,data:o,initialState:r,pageSize:i,enableRowSelection:l,tableInstanceRef:a,locale:s,...u}=e,c=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=n.useState(()=>({current:bo(t)})),[r,i]=n.useState(()=>o.current.initialState);return o.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}})),o.current}({_features:[Co,So,Ro],columns:t,data:o,meta:{locale:s??"en"},initialState:{pagination:{pageIndex:0,pageSize:i||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[D]:!1},...r},enableRowSelection:l,getCoreRowModel:e=>Sn(()=>[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=On(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},Rn(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex())),getExpandedRowModel:e=>Sn(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?yo(t):t,Rn(e.options,"debugTable","getExpandedRowModel")),getFilteredRowModel:e=>Sn(()=>[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,c;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++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,e=>{n.columnFiltersMeta[t]=e})){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return wo(t.rows,e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0},e)},Rn(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex())),getSortedRowModel:e=>Sn(()=>[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.map(e=>({...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=a.sortUndefined,u=null!=(n=null==r?void 0:r.desc)&&n;let c=0;if(s){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);if(n||o){if("first"===s)return n?-1:1;if("last"===s)return n?1:-1;c=n&&o?0:n?s:-s}}if(0===c&&(c=a.sortingFn(e,t,r.id)),0!==c)return u&&(c*=-1),a.invertSorting&&(c*=-1),c}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}},Rn(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex())),getPaginationRowModel:e=>Sn(()=>[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 c;i=i.slice(s,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:l,rowsById:a}:yo({rows:i,flatRows:l,rowsById:a}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c},Rn(e.options,"debugTable","getPaginationRowModel")),getRowId:u.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:e.enableResizing?{size:void 0}:void 0,...u});return a&&(a.current=c),{table:c}},_o={CheckboxWrapper:"_CheckboxWrapper_k4bh3_1","size-small":"_size-small_k4bh3_11","size-medium":"_size-medium_k4bh3_15",Checkbox:"_Checkbox_k4bh3_1",ReadOnly:"_ReadOnly_k4bh3_45",Indicator:"_Indicator_k4bh3_54",HideWrapper:"_HideWrapper_k4bh3_58",CheckboxHover:"_CheckboxHover_k4bh3_65",CheckboxRippleContainer:"_CheckboxRippleContainer_k4bh3_65",CheckboxRipple:"_CheckboxRipple_k4bh3_65",ripple:"_ripple_k4bh3_1"};function Io(){}const Do=Object.freeze({});const Oo={};function ko(e,t){const o=n.useRef(Oo);return o.current===Oo&&(o.current=e(t)),o}const No=n[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Mo=No&&No!==n.useLayoutEffect?No:e=>e();function Fo(e){const t=ko(Po).current;return t.next=e,Mo(t.effect),t.trampoline}function Po(){const e={next:void 0,callback:jo,trampoline:(...t)=>{var n;return null==(n=e.callback)?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function jo(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}const Ao=typeof document<"u"?n.useLayoutEffect:()=>{};function To(e,t,n,o){const r=ko(Vo).current;return function(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}(r,e,t,n,o)&&Lo(r,[e,t,n,o]),r.callback}function Vo(){return{callback:null,cleanup:null,refs:[]}}function Lo(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const o=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const r=t[e];if(null!=r)switch(typeof r){case"function":{const t=r(n);"function"==typeof t&&(o[e]=t);break}case"object":r.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=o[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const zo={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Ho={...zo,position:"fixed",top:0,left:0},$o={...zo,position:"absolute"};let Bo=function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({}),Go=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const Uo={valid:e=>null===e?null:e?{[Go.valid]:""}:{[Go.invalid]:""}};function Wo(e){return n.useMemo(()=>({checked:t=>e.indeterminate?{}:t?{[Bo.checked]:""}:{[Bo.unchecked]:""},...Uo}),[e.indeterminate])}function qo(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`}const Ko=parseInt(n.version,10);function Xo(e){if(!n.isValidElement(e))return null;const t=e,o=t.props;return(function(e){return Ko>=e}(19)?null==o?void 0:o.ref:t.ref)??null}function Yo(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}const Jo={};function Zo(e,t,n,o,r){let i={...nr(e,Jo)};return t&&(i=Qo(i,t)),n&&(i=Qo(i,n)),o&&(i=Qo(i,o)),r&&(i=Qo(i,r)),i}function Qo(e,t){return tr(t)?t(e):function(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":e[n]=Yo(e.style,o);break;case"className":e[n]=ir(e.className,o);break;default:er(n,o)?e[n]=or(e[n],o):e[n]=o}}return e}(e,t)}function er(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return 111===n&&110===o&&r>=65&&r<=90&&("function"==typeof t||typeof t>"u")}function tr(e){return"function"==typeof e}function nr(e,t){return tr(e)?e(t):e??Jo}function or(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const o=n;rr(o);const r=t(o);return o.baseUIHandlerPrevented||null==e||e(o),r}const o=t(n);return null==e||e(n),o}:t:e}function rr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ir(e,t){return t?e?t+" "+e:t:e}function lr(e,t,o={}){const r=t.render,i=function(e,t={}){const{className:n,style:o,render:r}=e,{state:i=Do,ref:l,props:a,stateAttributesMapping:s,enabled:u=!0}=t,c=u?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,d=u?function(e,t){return"function"==typeof e?e(t):e}(o,i):void 0,g=u?function(e,t){const n={};for(const o in e){const r=e[o];if(null!=t&&t.hasOwnProperty(o)){const e=t[o](r);null!=e&&Object.assign(n,e);continue}!0===r?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}(i,s):Do,p=u?Yo(g,Array.isArray(a)?function(e){if(0===e.length)return Jo;if(1===e.length)return nr(e[0],Jo);let t={...nr(e[0],Jo)};for(let n=1;n<e.length;n+=1)t=Qo(t,e[n]);return t}(a):a)??Do:Do;return typeof document<"u"&&(u?Array.isArray(l)?p.ref=function(e){const t=ko(Vo).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&Lo(t,e),t.callback}([p.ref,Xo(r),...l]):p.ref=To(p.ref,Xo(r),l):To(null,null)),u?(void 0!==c&&(p.className=ir(p.className,c)),void 0!==d&&(p.style=Yo(p.style,d)),p):Do}(t,o);if(!1===o.enabled)return null;return function(e,t,o,r){if(t){if("function"==typeof t)return t(o,r);const e=Zo(o,t.props);return e.ref=o.ref,n.cloneElement(t,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?f("button",{type:"button",...t,key:t.key}):"img"===e?f("img",{alt:"",...t,key:t.key}):n.createElement(e,t)}(e,o);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":qo(8))}(e,r,i,o.state??Do)}const ar={...n};let sr=0;const ur=ar.useId;function cr(e,t){if(void 0!==ur){const n=ur();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[o,r]=n.useState(e),i=e||o;return n.useEffect(()=>{null==o&&(sr+=1,r(`${t}-${sr}`))},[o,t]),i}(e,t)}function dr(e){return cr(e,"base-ui")}function gr(e){return typeof window<"u"&&(e instanceof HTMLElement||e instanceof function(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}(e).HTMLElement)}let pr;function fr(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");pr.has(t)||(pr.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(pr=new Set);const hr=n.createContext(void 0);function mr(e={}){const{disabled:t=!1,focusableWhenDisabled:o,tabIndex:r=0,native:i=!0}=e,l=n.useRef(null),a=void 0!==function(e=!1){const t=n.useContext(hr);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":qo(16));return t}(!0),s=Fo(()=>{const e=l.current;return!("A"!==(null==e?void 0:e.tagName)||null==e||!e.href)}),{props:u}=function(e){const{focusableWhenDisabled:t,disabled:o,composite:r=!1,tabIndex:i=0,isNativeButton:l}=e,a=r&&!1!==t,s=r&&!1===t;return{props:n.useMemo(()=>{const e={onKeyDown(e){o&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=i,!l&&o&&(e.tabIndex=t?i:-1)),(l&&(t||a)||!l&&o)&&(e["aria-disabled"]=o),l&&(!t||s)&&(e.disabled=o),e},[r,o,t,a,s,l,i])}}({focusableWhenDisabled:o,disabled:t,composite:a,tabIndex:r,isNativeButton:i});"production"!==process.env.NODE_ENV&&n.useEffect(()=>{if(!l.current)return;const e="BUTTON"===l.current.tagName;i?e||fr("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):e&&fr("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[i]);const c=n.useCallback(()=>{const e=l.current;(function(e){return gr(e)&&"BUTTON"===e.tagName})(e)&&a&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,a]);Ao(c,[c]);return{getButtonProps:n.useCallback((e={})=>{const{onClick:n,onMouseDown:o,onKeyUp:r,onKeyDown:l,onPointerDown:a,...c}=e;return Zo({type:i?"button":void 0,onClick(e){t?e.preventDefault():null==n||n(e)},onMouseDown(e){t||null==o||o(e)},onKeyDown(e){if(t||(rr(e),null==l||l(e)),e.baseUIHandlerPrevented)return;const o=e.target===e.currentTarget&&!i&&!s()&&!t,r="Enter"===e.key,a=" "===e.key;o&&((a||r)&&e.preventDefault(),r&&(null==n||n(e)))},onKeyUp(e){t||(rr(e),null==r||r(e)),!e.baseUIHandlerPrevented&&e.target===e.currentTarget&&!i&&!t&&" "===e.key&&(null==n||n(e))},onPointerDown(e){t?e.preventDefault():null==a||a(e)}},i?void 0:{role:"button"},u,c)},[t,u,i,s]),buttonRef:Fo(e=>{l.current=e,c()})}}"production"!==process.env.NODE_ENV&&(hr.displayName="CompositeRootContext");const vr=n.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:Io,disabled:void 0,touched:!1,setTouched:Io,dirty:!1,setDirty:Io,filled:!1,setFilled:Io,focused:!1,setFocused:Io,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Do)=>e,getInputValidationProps:(e=Do)=>e,inputRef:{current:null},commit:async()=>{}}});function br(e=!0){const t=n.useContext(vr);if(t.setValidityData===Io&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":qo(28));return t}"production"!==process.env.NODE_ENV&&(vr.displayName="FieldRootContext");const yr=n.createContext({disabled:!1});function wr(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}"production"!==process.env.NODE_ENV&&(yr.displayName="FieldItemContext");const xr=n.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Io,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Cr(){return n.useContext(xr)}"production"!==process.env.NODE_ENV&&(xr.displayName="FormContext");const Sr=n.createContext({controlId:void 0,setControlId:Io,labelId:void 0,setLabelId:Io,messageIds:[],setMessageIds:Io,getDescriptionProps:e=>e});"production"!==process.env.NODE_ENV&&(Sr.displayName="LabelableContext");const Rr=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Rr.displayName="CheckboxGroupContext");const Er=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Er.displayName="CheckboxRootContext");const _r="data-parent",Ir=n.forwardRef(function(e,t){const{checked:o,className:r,defaultChecked:i=!1,disabled:l=!1,id:a,indeterminate:s=!1,inputRef:u,name:c,onCheckedChange:d,parent:g=!1,readOnly:p=!1,render:f,required:h=!1,uncheckedValue:v,value:b,nativeButton:y=!1,...w}=e,{clearErrors:x}=Cr(),{disabled:C,name:S,setDirty:R,setFilled:E,setFocused:_,setTouched:I,state:D,validationMode:O,validityData:k,shouldValidateOnChange:N,validation:M}=br(),F=n.useContext(yr),{labelId:P,controlId:j,setControlId:A,getDescriptionProps:T}=n.useContext(Sr),V=function(e=!0){const t=n.useContext(Rr);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>.":qo(3));return t}(),L=null==V?void 0:V.parent,H=L&&V.allValues,$=C||F.disabled||(null==V?void 0:V.disabled)||l,B=S??c,G=b??B,U=dr(),W=dr();let q=j;H?q=g?W:`${L.id}-${G}`:a&&(q=a);let K={};H&&(g?K=V.parent.getParentProps():G&&(K=V.parent.getChildProps(G)));const X=Fo(d),{checked:Y=o,indeterminate:J=s,onCheckedChange:Z,...Q}=K,ee=null==V?void 0:V.value,te=null==V?void 0:V.setValue,ne=null==V?void 0:V.defaultValue,oe=n.useRef(null),{getButtonProps:re,buttonRef:ie}=mr({disabled:$,native:y}),le=(null==V?void 0:V.validation)??M,[ae,se]=function({controlled:e,default:t,name:o,state:r="value"}){const{current:i}=n.useRef(void 0!==e),[l,a]=n.useState(t),s=i?e:l;if("production"!==process.env.NODE_ENV){n.useEffect(()=>{i!==(void 0!==e)&&console.error([`Base UI: A component is changing the ${i?"":"un"}controlled ${r} state of ${o} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))},[r,o,e]);const{current:l}=n.useRef(t);n.useEffect(()=>{!i&&JSON.stringify(l)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join("\n"))},[JSON.stringify(t)])}return[s,n.useCallback(e=>{i||a(e)},[])]}({controlled:G&&ee&&!g?ee.includes(G):Y,default:G&&ne&&!g?ne.includes(G):i,name:"Checkbox",state:"checked"});Ao(()=>{if(A!==Io)return A(q),()=>{A(void 0)}},[q,V,A,g]),function(e){const{enabled:t=!0,value:n,id:o,name:r,controlRef:i,commit:l}=e,{formRef:a}=Cr(),{invalid:s,markedDirtyRef:u,validityData:c,setValidityData:d}=br(),g=Fo(e.getValue);Ao(()=>{if(!t)return;let e=n;void 0===e&&(e=g()),null===c.initialValue&&null!==e&&d(t=>({...t,initialValue:e}))},[t,d,n,c.initialValue,g]),Ao(()=>{!t||!o||a.current.fields.set(o,{getValue:g,name:r,controlRef:i,validityData:wr(c,s),validate(e=!0){let t=n;void 0===t&&(t=g()),u.current=!0,e?m.flushSync(()=>l(t)):l(t)}})},[l,i,t,a,g,o,s,u,r,c,n]),Ao(()=>{const e=a.current.fields;return()=>{o&&e.delete(o)}},[a,o])}({enabled:!V,id:U,commit:le.commit,value:ae,controlRef:oe,name:B,getValue:()=>ae});const ue=n.useRef(null),ce=To(u,ue,le.inputRef);Ao(()=>{ue.current&&(ue.current.indeterminate=J,ae&&E(!0))},[ae,J,E]),function(e,t){const o=n.useRef(e),r=Fo(t);Ao(()=>{o.current!==e&&r(o.current)},[e,r]),Ao(()=>{o.current=e},[e])}(ae,()=>{V&&!g||(x(B),E(ae),R(ae!==k.initialValue),N()?le.commit(ae):le.commit(ae,!0))});const de=Zo({checked:ae,disabled:$,name:g?void 0:B,id:y?void 0:q??void 0,required:h,ref:ce,style:B?$o:Ho,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked,n=function(e,t,n,o){let r=!1,i=!1;const l=o??Do;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...l}}("none",e.nativeEvent);if(null==Z||Z(t,n),X(t,n),!n.isCanceled&&(se(t),G&&ee&&te&&!g)){const e=t?[...ee,G]:ee.filter(e=>e!==G);te(e,n)}},onFocus(){var e;null==(e=oe.current)||e.focus()}},void 0!==b?{value:(V?ae&&b:b)||""}:Do,T,V?le.getValidationProps:le.getInputValidationProps),ge=H?!!Y:ae,pe=H&&J||s;n.useEffect(()=>{L&&G&&L.disabledStatesRef.current.set(G,$)},[L,$,G]);const fe=n.useMemo(()=>({...D,checked:ge,disabled:$,readOnly:p,required:h,indeterminate:pe}),[D,ge,$,p,h,pe]),he=Wo(fe),me=lr("span",e,{state:fe,ref:[ie,oe,t,null==V?void 0:V.registerControlRef],props:[{id:y?q??void 0:U,role:"checkbox","aria-checked":J?"mixed":ae,"aria-readonly":p||void 0,"aria-required":h||void 0,"aria-labelledby":P,[_r]:g?"":void 0,onFocus(){_(!0)},onBlur(){const e=ue.current;e&&(I(!0),_(!1),"onBlur"===O&&le.commit(V?ee:e.checked))},onClick(e){var t;p||$||(e.preventDefault(),null==(t=ue.current)||t.click())}},T,le.getValidationProps,w,Q,re],stateAttributesMapping:he});return z.jsxs(Er.Provider,{value:fe,children:[me,!ae&&!V&&B&&!g&&void 0!==v&&z.jsx("input",{type:"hidden",name:B,value:v}),z.jsx("input",{...de})]})});"production"!==process.env.NODE_ENV&&(Ir.displayName="CheckboxRoot");const Dr=[];const Or=null;let kr=globalThis.requestAnimationFrame;const Nr=new class{constructor(){t(this,"callbacks",[]),t(this,"callbacksCount",0),t(this,"nextId",1),t(this,"startId",1),t(this,"isScheduled",!1),t(this,"tick",e=>{var t;this.isScheduled=!1;const n=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let o=0;o<n.length;o+=1)null==(t=n[o])||t.call(n,e)})}request(e){const t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const n="test"===process.env.NODE_ENV&&kr!==requestAnimationFrame&&(kr=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class Mr{constructor(){t(this,"currentId",Or),t(this,"cancel",()=>{this.currentId!==Or&&(Nr.cancel(this.currentId),this.currentId=Or)}),t(this,"disposeEffect",()=>this.cancel)}static create(){return new Mr}static request(e){return Nr.request(e)}static cancel(e){return Nr.cancel(e)}request(e){this.cancel(),this.currentId=Nr.request(()=>{this.currentId=Or,e()})}}function Fr(){const e=ko(Mr.create).current;return function(e){n.useEffect(e,Dr)}(e.disposeEffect),e}let Pr=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const jr={[Pr.startingStyle]:""},Ar={[Pr.endingStyle]:""},Tr={transitionStatus:e=>"starting"===e?jr:"ending"===e?Ar:null};function Vr(e){const{enabled:t=!0,open:o,ref:r,onComplete:i}=e,l=Fo(i),a=function(e,t=!1,n=!0){const o=Fr();return Fo((r,i=null)=>{function l(){m.flushSync(r)}o.cancel();const a=function(e){return null==e?e:"current"in e?e.current:e}(e);if(null==a)return;const s=a;if("function"!=typeof s.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let e=function(){const e=Pr.startingStyle;if(!s.hasAttribute(e))return void o.request(r);const t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),r())});t.observe(s,{attributes:!0,attributeFilter:[e]}),null==i||i.addEventListener("abort",()=>t.disconnect(),{once:!0})},r=function(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{null!=i&&i.aborted||l()}).catch(()=>{const e=s.getAnimations();if(n){if(null!=i&&i.aborted)return;l()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&r()})};if(t)return void e();o.request(r)}})}(r,o,!1);n.useEffect(()=>{if(!t)return;const e=new AbortController;return a(l,e.signal),()=>{e.abort()}},[t,o,l,a])}const Lr=n.forwardRef(function(e,t){const{render:o,className:r,keepMounted:i=!1,...l}=e,a=function(){const e=n.useContext(Er);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.":qo(14));return e}(),s=a.checked||a.indeterminate,{transitionStatus:u,setMounted:c}=function(e,t=!1,o=!1){const[r,i]=n.useState(e&&t?"idle":void 0),[l,a]=n.useState(e);return e&&!l&&(a(!0),i("starting")),!e&&l&&"ending"!==r&&!o&&i("ending"),!e&&!l&&"ending"===r&&i(void 0),Ao(()=>{if(!e&&l&&"ending"!==r&&o){const e=Mr.request(()=>{i("ending")});return()=>{Mr.cancel(e)}}},[e,l,r,o]),Ao(()=>{if(!e||t)return;const n=Mr.request(()=>{i(void 0)});return()=>{Mr.cancel(n)}},[t,e]),Ao(()=>{if(!e||!t)return;e&&l&&"idle"!==r&&i("starting");const n=Mr.request(()=>{i("idle")});return()=>{Mr.cancel(n)}},[t,e,l,i,r]),n.useMemo(()=>({mounted:l,setMounted:a,transitionStatus:r}),[l,r])}(s),d=n.useRef(null),g=n.useMemo(()=>({...a,transitionStatus:u}),[a,u]);Vr({open:s,ref:d,onComplete(){s||c(!1)}});const p=Wo(a),f=n.useMemo(()=>({...p,...Tr,...Uo}),[p]),h=i||s,m=lr("span",e,{enabled:h,ref:[t,d],state:g,stateAttributesMapping:f,props:l});return h?m:null});"production"!==process.env.NODE_ENV&&(Lr.displayName="CheckboxIndicator");const zr=({className:e})=>z.jsxs("svg",{viewBox:"0 0 24 24",className:e,fill:"none",children:[z.jsx("title",{children:"Indeterminate icon"}),z.jsx("rect",{x:"5.5",y:"10.5",width:"13",height:"2.75",fill:"currentColor"})]}),Hr=e=>z.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...e,children:[z.jsx("title",{children:"Check icon"}),z.jsx("path",{d:"M4 12l5 5L20 6"})]}),$r=({dataTest:e,size:t="medium",disabled:n,readOnly:r,indeterminate:i=!1,checked:a,disableRipple:s,hideWrapper:u,className:c,onChange:d,...g})=>{const p=!!u,f=!(s||p||n||r),h=fn(_o.CheckboxWrapper,!p&&_o[`size-${t}`],p&&_o.HideWrapper,r&&_o.ReadOnly,f&&_o.CheckboxHover,c),m=fn("styled-checkbox-inner",_o.Checkbox,_o[`size-${t}`]),v=i?zr:Hr,b=o.useRef(null),y=o.useCallback(e=>{var t;if(e.stopPropagation(),!f)return;const n=document.createElement("span");n.className=_o.CheckboxRipple||"",n.addEventListener("animationend",()=>n.remove(),{once:!0}),null==(t=b.current)||t.appendChild(n)},[f]);l(()=>()=>{var e;null==(e=b.current)||e.replaceChildren()},[]);const w=o.useCallback(e=>{if(r)return;const t={target:{name:g.name,value:g.value,checked:e}};null==d||d(t,e)},[d,g.name,g.value,r]);return z.jsxs(Ir,{className:h,"data-test":e,checked:a,disabled:n,readOnly:r,indeterminate:i,onPointerDown:y,onCheckedChange:w,...g,children:[!p&&f&&z.jsx("span",{ref:b,className:_o.CheckboxRippleContainer}),z.jsx("span",{className:m,children:z.jsx(Lr,{className:_o.Indicator,children:z.jsx(v,{strokeWidth:"small"===t?3:2})})})]})};function Br(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}const Gr=()=>{const[e,t]=u(null),[n,o]=u(!1),r=s(e=>{t(e.currentTarget),o(!0)},[]);return{open:n,handleClose:s(()=>{o(!1)},[]),handleOpen:r,anchorEl:e}};function Ur(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.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 Wr=e=>{var t;return z.jsx(x,{...e,classes:{root:pn("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})},qr="_asma-core-ui-button_17pcg_1",Kr={contained:"_contained_17pcg_6",outlined:"_outlined_17pcg_130",text:"_text_17pcg_254",textGray:"_textGray_17pcg_378",textWhite:"_textWhite_17pcg_440",large:"_large_17pcg_58",small:"_small_17pcg_53",medium:"_medium_17pcg_48",error:"_error_17pcg_68",common:"_common_17pcg_6"},Xr=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:i,endIcon:l,dataTest:a,error:s,...u})=>{const c="large"===n||"medium"===n,d=s?"error":"common";return z.jsxs("button",{...u,className:pn(qr,Kr[e],Kr[d],Kr[n],t),ref:r,"data-test":a,children:[i,o&&z.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:c?"8px":"4px",paddingLeft:c?"8px":"4px",paddingRight:c?"8px":"4px"},children:o}),l]})};function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yr.apply(null,arguments)}function Jr(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}function Zr(e,t){return(Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const Qr=!1;var ei="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.shape({enter:E.number,exit:E.number,appear:E.number}).isRequired]):null;"production"!==process.env.NODE_ENV&&E.oneOfType([E.string,E.shape({enter:E.string,exit:E.string,active:E.string}),E.shape({enter:E.string,enterDone:E.string,enterActive:E.string,exit:E.string,exitDone:E.string,exitActive:E.string})]);const ti=o.createContext(null);var ni="unmounted",oi="exited",ri="entering",ii="entered",li="exiting",ai=function(e){function t(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=oi,o.appearStatus=ri):r=ii:r=t.unmountOnExit||t.mountOnEnter?ni:oi,o.state={status:r},o.nextCallback=null,o}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zr(e,t)}(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ni?{status:oi}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==ri&&n!==ii&&(t=ri):(n===ri||n===ii)&&(t=li)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.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}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===ri){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:v.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===oi&&this.setState({status:ni})},n.performEnter=function(e){var t=this,n=this.props.enter,o=this.context?this.context.isMounting:e,r=this.props.nodeRef?[o]:[v.findDOMNode(this),o],i=r[0],l=r[1],a=this.getTimeouts(),s=o?a.appear:a.enter;!e&&!n||Qr?this.safeSetState({status:ii},function(){t.props.onEntered(i)}):(this.props.onEnter(i,l),this.safeSetState({status:ri},function(){t.props.onEntering(i,l),t.onTransitionEnd(s,function(){t.safeSetState({status:ii},function(){t.props.onEntered(i,l)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),o=this.props.nodeRef?void 0:v.findDOMNode(this);t&&!Qr?(this.props.onExit(o),this.safeSetState({status:li},function(){e.props.onExiting(o),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:oi},function(){e.props.onExited(o)})})})):this.safeSetState({status:oi},function(){e.props.onExited(o)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.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},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:v.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)},n.render=function(){var e=this.state.status;if(e===ni)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Jr(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o.createElement(ti.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},t}(o.Component);function si(){}ai.contextType=ti,ai.propTypes="production"!==process.env.NODE_ENV?{nodeRef:E.shape({current:typeof Element>"u"?E.any:function(e,t,n,o,r,i){var l=e[t];return E.instanceOf(l&&"ownerDocument"in l?l.ownerDocument.defaultView.Element:Element)(e,t,n,o,r,i)}}),children:E.oneOfType([E.func.isRequired,E.element.isRequired]).isRequired,in:E.bool,mountOnEnter:E.bool,unmountOnExit:E.bool,appear:E.bool,enter:E.bool,exit:E.bool,timeout:function(e){var t=ei;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:E.func,onEnter:E.func,onEntering:E.func,onEntered:E.func,onExit:E.func,onExiting:E.func,onExited:E.func}:{},ai.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:si,onEntering:si,onEntered:si,onExit:si,onExiting:si,onExited:si},ai.UNMOUNTED=ni,ai.EXITED=oi,ai.ENTERING=ri,ai.ENTERED=ii,ai.EXITING=li;const ui=ai;function ci(e,t){return"production"===process.env.NODE_ENV?()=>null:function(...n){return e(...n)||t(...n)}}function di(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 gi=ci(E.element,di);gi.isRequired=ci(E.element.isRequired,di);const pi=gi;function fi(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."}const hi=Object.freeze(Object.defineProperty({__proto__:null,default:fi},Symbol.toStringTag,{value:"Module"}));function mi(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function vi(e){if(n.isValidElement(e)||!mi(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=vi(e[n])}),t}function bi(e,t,o={clone:!0}){const r=o.clone?Yr({},e):e;return mi(e)&&mi(t)&&Object.keys(t).forEach(i=>{n.isValidElement(t[i])?r[i]=t[i]:mi(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&mi(e[i])?r[i]=bi(e[i],t[i],o):o.clone?r[i]=mi(t[i])?vi(t[i]):t[i]:r[i]=t[i]}),r}const yi=["values","unit","step"];function wi(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,r=Jr(e,yi),i=(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)=>Yr({},e,{[t.key]:t.val}),{})})(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 Yr({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)}const xi={borderRadius:4},Ci="production"!==process.env.NODE_ENV?E.oneOfType([E.number,E.string,E.object,E.array]):{};function Si(e,t){return t?bi(e,t,{clone:!1}):e}const Ri={xs:0,sm:600,md:900,lg:1200,xl:1536},Ei={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ri[e]}px)`};function _i(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const e=o.breakpoints||Ei;return t.reduce((o,r,i)=>(o[e.up(e.keys[i])]=n(t[i]),o),{})}if("object"==typeof t){const e=o.breakpoints||Ei;return Object.keys(t).reduce((o,r)=>{if(-1!==Object.keys(e.values||Ri).indexOf(r)){o[e.up(r)]=n(t[r],r)}else{const e=r;o[e]=t[e]}return o},{})}return n(t)}function Ii(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function Di(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":fi(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Oi(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 ki(e,t,n,o=n){let r;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||o:Oi(e,n)||o,t&&(r=t(r,o,e)),r}function Ni(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=Oi(e.theme,o)||{};return _i(e,i,e=>{let o=ki(l,r,e);return e===o&&"string"==typeof e&&(o=ki(l,r,`${t}${"default"===e?"":Di(e)}`,e)),!1===n?o:{[n]:o}})};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:Ci}:{},i.filterProps=[t],i}const Mi={m:"margin",p:"padding"},Fi={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Pi={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ji=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!Pi[e])return[e];e=Pi[e]}const[t,n]=e.split(""),o=Mi[t],r=Fi[n]||"";return Array.isArray(r)?r.map(e=>o+e):[o+r]}),Ai=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ti=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Vi=[...Ai,...Ti];function Li(e,t,n,o){var r;const i=null!=(r=Oi(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 zi(e){return Li(e,"spacing",8,"spacing")}function Hi(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 $i(e,t,n,o){if(-1===t.indexOf(n))return null;const r=function(e,t){return n=>e.reduce((e,o)=>(e[o]=Hi(t,n),e),{})}(ji(n),o);return _i(e,e[n],r)}function Bi(e,t){const n=zi(e.theme);return Object.keys(e).map(o=>$i(e,t,o,n)).reduce(Si,{})}function Gi(e){return Bi(e,Ai)}function Ui(e){return Bi(e,Ti)}function Wi(...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]?Si(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 qi(e){return"number"!=typeof e?e:`${e}px solid`}function Ki(e,t){return Ni({prop:e,themeKey:"borders",transform:t})}Gi.propTypes="production"!==process.env.NODE_ENV?Ai.reduce((e,t)=>(e[t]=Ci,e),{}):{},Gi.filterProps=Ai,Ui.propTypes="production"!==process.env.NODE_ENV?Ti.reduce((e,t)=>(e[t]=Ci,e),{}):{},Ui.filterProps=Ti,"production"!==process.env.NODE_ENV&&Vi.reduce((e,t)=>(e[t]=Ci,e),{});const Xi=Ki("border",qi),Yi=Ki("borderTop",qi),Ji=Ki("borderRight",qi),Zi=Ki("borderBottom",qi),Qi=Ki("borderLeft",qi),el=Ki("borderColor"),tl=Ki("borderTopColor"),nl=Ki("borderRightColor"),ol=Ki("borderBottomColor"),rl=Ki("borderLeftColor"),il=Ki("outline",qi),ll=Ki("outlineColor"),al=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Li(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:Hi(t,e)});return _i(e,e.borderRadius,n)}return null};al.propTypes="production"!==process.env.NODE_ENV?{borderRadius:Ci}:{},al.filterProps=["borderRadius"],Wi(Xi,Yi,Ji,Zi,Qi,el,tl,nl,ol,rl,al,il,ll);const sl=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Li(e.theme,"spacing",8,"gap"),n=e=>({gap:Hi(t,e)});return _i(e,e.gap,n)}return null};sl.propTypes="production"!==process.env.NODE_ENV?{gap:Ci}:{},sl.filterProps=["gap"];const ul=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Li(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:Hi(t,e)});return _i(e,e.columnGap,n)}return null};ul.propTypes="production"!==process.env.NODE_ENV?{columnGap:Ci}:{},ul.filterProps=["columnGap"];const cl=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Li(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:Hi(t,e)});return _i(e,e.rowGap,n)}return null};cl.propTypes="production"!==process.env.NODE_ENV?{rowGap:Ci}:{},cl.filterProps=["rowGap"];function dl(e,t){return"grey"===t?t:e}Wi(sl,ul,cl,Ni({prop:"gridColumn"}),Ni({prop:"gridRow"}),Ni({prop:"gridAutoFlow"}),Ni({prop:"gridAutoColumns"}),Ni({prop:"gridAutoRows"}),Ni({prop:"gridTemplateColumns"}),Ni({prop:"gridTemplateRows"}),Ni({prop:"gridTemplateAreas"}),Ni({prop:"gridArea"}));function gl(e){return e<=1&&0!==e?100*e+"%":e}Wi(Ni({prop:"color",themeKey:"palette",transform:dl}),Ni({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:dl}),Ni({prop:"backgroundColor",themeKey:"palette",transform:dl}));const pl=Ni({prop:"width",transform:gl}),fl=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,o;const r=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||Ri[t];return r?"px"!==(null==(o=e.theme)||null==(o=o.breakpoints)?void 0:o.unit)?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:gl(t)}};return _i(e,e.maxWidth,t)}return null};fl.filterProps=["maxWidth"];const hl=Ni({prop:"minWidth",transform:gl}),ml=Ni({prop:"height",transform:gl}),vl=Ni({prop:"maxHeight",transform:gl}),bl=Ni({prop:"minHeight",transform:gl});Ni({prop:"size",cssProperty:"width",transform:gl}),Ni({prop:"size",cssProperty:"height",transform:gl});Wi(pl,fl,hl,ml,vl,bl,Ni({prop:"boxSizing"}));const yl={border:{themeKey:"borders",transform:qi},borderTop:{themeKey:"borders",transform:qi},borderRight:{themeKey:"borders",transform:qi},borderBottom:{themeKey:"borders",transform:qi},borderLeft:{themeKey:"borders",transform:qi},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:qi},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:al},color:{themeKey:"palette",transform:dl},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:dl},backgroundColor:{themeKey:"palette",transform:dl},p:{style:Ui},pt:{style:Ui},pr:{style:Ui},pb:{style:Ui},pl:{style:Ui},px:{style:Ui},py:{style:Ui},padding:{style:Ui},paddingTop:{style:Ui},paddingRight:{style:Ui},paddingBottom:{style:Ui},paddingLeft:{style:Ui},paddingX:{style:Ui},paddingY:{style:Ui},paddingInline:{style:Ui},paddingInlineStart:{style:Ui},paddingInlineEnd:{style:Ui},paddingBlock:{style:Ui},paddingBlockStart:{style:Ui},paddingBlockEnd:{style:Ui},m:{style:Gi},mt:{style:Gi},mr:{style:Gi},mb:{style:Gi},ml:{style:Gi},mx:{style:Gi},my:{style:Gi},margin:{style:Gi},marginTop:{style:Gi},marginRight:{style:Gi},marginBottom:{style:Gi},marginLeft:{style:Gi},marginX:{style:Gi},marginY:{style:Gi},marginInline:{style:Gi},marginInlineStart:{style:Gi},marginInlineEnd:{style:Gi},marginBlock:{style:Gi},marginBlockStart:{style:Gi},marginBlockEnd:{style:Gi},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:sl},rowGap:{style:cl},columnGap:{style:ul},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:gl},maxWidth:{style:fl},minWidth:{transform:gl},height:{transform:gl},maxHeight:{transform:gl},minHeight:{transform:gl},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},wl=yl;const xl=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 c=Oi(n,a)||{};return u?u(r):_i(r,t,t=>{let n=ki(c,s,t);return t===n&&"string"==typeof t&&(n=ki(c,s,`${e}${"default"===t?"":Di(t)}`,t)),!1===l?n:{[l]:n}})}return function t(n){var o;const{sx:r,theme:i={},nested:l}=n||{};if(!r)return null;const a=null!=(o=i.unstable_sxConfig)?o:wl;function s(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),s=Object.keys(r);let u=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(a[n])u=Si(u,e(n,r,i,a));else{const e=_i({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)?u=Si(u,e):u[n]=t({sx:r,theme:i,nested:!0})}else u=Si(u,e(n,r,i,a))}),!l&&i.modularCssLayers?{"@layer sx":Ii(s,u)}:Ii(s,u)}return Array.isArray(r)?r.map(s):s(r)}}();xl.filterProps=["sx"];const Cl=xl;function Sl(e,t){const n=this;return n.vars&&"function"==typeof n.getColorSchemeSelector?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const Rl=["breakpoints","palette","spacing","shape"];function El(e={},...t){const{breakpoints:n={},palette:o={},spacing:r,shape:i={}}=e,l=Jr(e,Rl),a=wi(n),s=function(e=8){if(e.mui)return e;const t=zi({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=bi({breakpoints:a,direction:"ltr",components:{},palette:Yr({mode:"light"},o),spacing:s,shape:Yr({},xi,i)},l);return u.applyStyles=Sl,u=t.reduce((e,t)=>bi(e,t),u),u.unstable_sxConfig=Yr({},wl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Cl({sx:e,theme:this})},u}function _l(e=null){const t=n.useContext(_);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}const Il=El();const Dl=e=>e,Ol=(()=>{let e=Dl;return{configure(t){e=t},generate:t=>e(t),reset(){e=Dl}}})(),kl=Ol,Nl={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ml(e,t,n="Mui"){const o=Nl[t];return o?`${n}-${o}`:`${kl.generate(e)}-${t}`}const Fl=Object.freeze(Object.defineProperty({__proto__:null,default:function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}},Symbol.toStringTag,{value:"Module"}));function Pl(e,t){return Yr({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var jl={},Al={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Al);var Tl=Al.exports;const Vl=P(hi),Ll=P(Fl);var zl=Tl;Object.defineProperty(jl,"__esModule",{value:!0}),jl.alpha=Ql,jl.blend=function(e,t,n,o=1){const r=(e,t)=>Math.round((e**(1/o)*(1-n)+t**(1/o)*n)**o),i=Kl(e),l=Kl(t);return Yl({type:"rgb",values:[r(i.values[0],l.values[0]),r(i.values[1],l.values[1]),r(i.values[2],l.values[2])]})},jl.colorChannel=void 0;var Hl=jl.darken=ea;jl.decomposeColor=Kl,jl.emphasize=na;var $l=jl.getContrastRatio=function(e,t){const n=Zl(e),o=Zl(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)};jl.getLuminance=Zl,jl.hexToRgb=ql,jl.hslToRgb=Jl;var Bl=jl.lighten=ta;jl.private_safeAlpha=function(e,t,n){try{return Ql(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.private_safeColorChannel=void 0,jl.private_safeDarken=function(e,t,n){try{return ea(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.private_safeEmphasize=function(e,t,n){try{return na(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.private_safeLighten=function(e,t,n){try{return ta(e,t)}catch{return n&&"production"!==process.env.NODE_ENV&&console.warn(n),e}},jl.recomposeColor=Yl,jl.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=Kl(e);return`#${t.map((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e)).join("")}`};var Gl=zl(Vl),Ul=zl(Ll);function Wl(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}].`),(0,Ul.default)(e,t,n)}function ql(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(", ")})`:""}function Kl(e){if(e.type)return e;if("#"===e.charAt(0))return Kl(ql(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().`:(0,Gl.default)(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.`:(0,Gl.default)(10,o))}else r=r.split(",");return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:o}}const Xl=e=>{const t=Kl(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e).join(" ")};jl.colorChannel=Xl;function Yl(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 Jl(e){e=Kl(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])),Yl({type:a,values:s})}function Zl(e){let t="hsl"===(e=Kl(e)).type||"hsla"===e.type?Kl(Jl(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 Ql(e,t){return e=Kl(e),t=Wl(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Yl(e)}function ea(e,t){if(e=Kl(e),t=Wl(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 Yl(e)}function ta(e,t){if(e=Kl(e),t=Wl(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 Yl(e)}function na(e,t=.15){return Zl(e)>.5?ea(e,t):ta(e,t)}jl.private_safeColorChannel=(e,t)=>{try{return Xl(e)}catch{return t&&"production"!==process.env.NODE_ENV&&console.warn(t),e}};const oa={black:"#000",white:"#fff"},ra={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"},ia={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"},la={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"},aa={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"},sa={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"},ua={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"},ca={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"},da=["mode","contrastThreshold","tonalOffset"],ga={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:oa.white,default:oa.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}},pa={text:{primary:oa.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:oa.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 fa(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=Bl(e.main,r):"dark"===t&&(e.dark=Hl(e.main,i)))}function ha(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,r=Jr(e,da),i=e.primary||function(e="light"){return"dark"===e?{main:sa[200],light:sa[50],dark:sa[400]}:{main:sa[700],light:sa[400],dark:sa[800]}}(t),l=e.secondary||function(e="light"){return"dark"===e?{main:ia[200],light:ia[50],dark:ia[400]}:{main:ia[500],light:ia[300],dark:ia[700]}}(t),a=e.error||function(e="light"){return"dark"===e?{main:la[500],light:la[300],dark:la[700]}:{main:la[700],light:la[400],dark:la[800]}}(t),s=e.info||function(e="light"){return"dark"===e?{main:ua[400],light:ua[300],dark:ua[700]}:{main:ua[700],light:ua[500],dark:ua[900]}}(t),u=e.success||function(e="light"){return"dark"===e?{main:ca[400],light:ca[300],dark:ca[700]}:{main:ca[800],light:ca[500],dark:ca[900]}}(t),c=e.warning||function(e="light"){return"dark"===e?{main:aa[400],light:aa[300],dark:aa[700]}:{main:"#ed6c02",light:aa[500],dark:aa[900]}}(t);function d(e){const t=$l(e,pa.text.primary)>=n?pa.text.primary:ga.text.primary;if("production"!==process.env.NODE_ENV){const n=$l(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=Yr({},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.`:fi(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} });`:fi(12,t?` (${t})`:"",JSON.stringify(e.main)));return fa(e,"light",r,o),fa(e,"dark",i,o),e.contrastText||(e.contrastText=d(e.main)),e},p={dark:pa,light:ga};return"production"!==process.env.NODE_ENV&&(p[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),bi(Yr({common:Yr({},oa),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:c,name:"warning"}),info:g({color:s,name:"info"}),success:g({color:u,name:"success"}),grey:ra,contrastThreshold:n,getContrastText:d,augmentColor:g,tonalOffset:o},p[t]),r)}const ma=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function va(e){return Math.round(1e5*e)/1e5}const ba={textTransform:"uppercase"},ya='"Roboto", "Helvetica", "Arial", sans-serif';function wa(e,t){const n="function"==typeof t?t(e):t,{fontFamily:o=ya,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:l=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:u=16,allVariants:c,pxToRem:d}=n,g=Jr(n,ma);"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=d||(e=>e/u*p+"rem"),h=(e,t,n,r,i)=>Yr({fontFamily:o,fontWeight:e,fontSize:f(t),lineHeight:n},o===ya?{letterSpacing:`${va(r/t)}em`}:{},i,c),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,ba),caption:h(l,12,1.66,.4),overline:h(l,12,2.66,1,ba),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return bi(Yr({htmlFontSize:u,pxToRem:f,fontFamily:o,fontSize:r,fontWeightLight:i,fontWeightRegular:l,fontWeightMedium:a,fontWeightBold:s},m),g,{clone:!1})}function xa(...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 Ca=["none",xa(0,2,1,-1,0,1,1,0,0,1,3,0),xa(0,3,1,-2,0,2,2,0,0,1,5,0),xa(0,3,3,-2,0,3,4,0,0,1,8,0),xa(0,2,4,-1,0,4,5,0,0,1,10,0),xa(0,3,5,-1,0,5,8,0,0,1,14,0),xa(0,3,5,-1,0,6,10,0,0,1,18,0),xa(0,4,5,-2,0,7,10,1,0,2,16,1),xa(0,5,5,-3,0,8,10,1,0,3,14,2),xa(0,5,6,-3,0,9,12,1,0,3,16,2),xa(0,6,6,-3,0,10,14,1,0,4,18,3),xa(0,6,7,-4,0,11,15,1,0,4,20,3),xa(0,7,8,-4,0,12,17,2,0,5,22,4),xa(0,7,8,-4,0,13,19,2,0,5,24,4),xa(0,7,9,-4,0,14,21,2,0,5,26,4),xa(0,8,9,-5,0,15,22,2,0,6,28,5),xa(0,8,10,-5,0,16,24,2,0,6,30,5),xa(0,8,11,-5,0,17,26,2,0,6,32,5),xa(0,9,11,-5,0,18,28,2,0,7,34,6),xa(0,9,12,-6,0,19,29,2,0,7,36,6),xa(0,10,13,-6,0,20,31,3,0,8,38,7),xa(0,10,13,-6,0,21,33,3,0,8,40,7),xa(0,10,14,-6,0,22,35,3,0,8,42,7),xa(0,11,14,-7,0,23,36,3,0,9,44,8),xa(0,11,15,-7,0,24,38,3,0,9,46,8)],Sa=["duration","easing","delay"],Ra={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)"},Ea={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function _a(e){return`${Math.round(e)}ms`}function Ia(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function Da(e){const t=Yr({},Ra,e.easing),n=Yr({},Ea,e.duration);return Yr({getAutoHeightDuration:Ia,create:(e=["all"],o={})=>{const{duration:r=n.standard,easing:i=t.easeInOut,delay:l=0}=o,a=Jr(o,Sa);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.'),"object"!=typeof o&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join("\n")),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:_a(r)} ${i} ${"string"==typeof l?l:_a(l)}`).join(",")}},e,{easing:t,duration:n})}const Oa={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},ka=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];const Na=function(e={},...t){const{mixins:n={},palette:o={},transitions:r={},typography:i={}}=e,l=Jr(e,ka);if(e.vars&&void 0===e.generateCssVars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":fi(18));const a=ha(o),s=El(e);let u=bi(s,{mixins:Pl(s.breakpoints,n),palette:a,shadows:Ca.slice(),typography:wa(a,i),transitions:Da(r),zIndex:Yr({},Oa)});if(u=bi(u,l),u=t.reduce((e,t)=>bi(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=Ml("",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=Yr({},wl,null==l?void 0:l.unstable_sxConfig),u.unstable_sx=function(e){return Cl({sx:e,theme:this})},u}(),Ma=Na;function Fa(){const e=function(e=Il){return _l(e)}(Ma);return"production"!==process.env.NODE_ENV&&n.useDebugValue(e),e.$$material||e}function Pa(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 ja=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Aa={entering:{opacity:1},entered:{opacity:1}},Ta=n.forwardRef(function(e,t){const o=Fa(),r={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:l=!0,children:a,easing:s,in:u,onEnter:c,onEntered:d,onEntering:g,onExit:p,onExited:f,onExiting:h,style:m,timeout:v=r,TransitionComponent:b=ui}=e,y=Jr(e,ja),w=n.useRef(null),x=function(...e){return n.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(e,t)})},e)}(w,function(e){var t;return parseInt(n.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}(a),t),C=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=C(g),R=C((e,t)=>{(e=>{e.scrollTop})(e);const n=Pa({style:m,timeout:v,easing:s},{mode:"enter"});e.style.webkitTransition=o.transitions.create("opacity",n),e.style.transition=o.transitions.create("opacity",n),c&&c(e,t)}),E=C(d),_=C(h),I=C(e=>{const t=Pa({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)}),D=C(f);return z.jsx(b,Yr({appear:l,in:u,nodeRef:w,onEnter:R,onEntered:E,onEntering:S,onExit:I,onExited:D,onExiting:_,addEndListener:e=>{i&&i(w.current,e)},timeout:v},y,{children:(e,t)=>n.cloneElement(a,Yr({style:Yr({opacity:0,visibility:"exited"!==e||u?void 0:"hidden"},Aa[e],m,a.props.style),ref:x},t))}))});"production"!==process.env.NODE_ENV&&(Ta.propTypes={addEndListener:E.func,appear:E.bool,children:pi.isRequired,easing:E.oneOfType([E.shape({enter:E.string,exit:E.string}),E.string]),in:E.bool,onEnter:E.func,onEntered:E.func,onEntering:E.func,onExit:E.func,onExited:E.func,onExiting:E.func,style:E.object,timeout:E.oneOfType([E.number,E.shape({appear:E.number,enter:E.number,exit:E.number})])});const Va=Ta,La=e=>z.jsx(C,{TransitionComponent:Va,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 za(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16 ",...e,children:z.jsxs("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",children:[z.jsx("circle",{cx:"8",cy:"8",r:"6.25"}),z.jsx("path",{d:"m8 10.75v0m0-6v3.5"})]})})}function Ha({tableData:e,actions:t,rowActionsState:n}){var i;const{anchorEl:a,open:s,handleClose:c,handleOpen:d}=Gr(),g=t(e.row),p=(null==n?void 0:n(e.row))??{state:"enabled"},f="no"===(null==(i=e.table.options.meta)?void 0:i.locale)?"Ingen handlinger tilgjengelig":"No actions available",h=r(()=>g.every(e=>!("component"in e)&&e.hide),[g]),m=g.length>0&&!h,v="enabled"===p.state&&!m,b="hidden"!==p.state&&(m||v||"disabled"===p.state),[y,w]=u(!1);if(l(()=>{if(!y)return;const e=window.setTimeout(()=>w(!1),1600);return()=>window.clearTimeout(e)},[y]),!b)return z.jsx("div",{className:"flex justify-center items-center w-[40px]"});const x="disabled"===p.state,C=z.jsx(Xr,{dataTest:"",variant:"text",size:"small",disabled:x,onClick:t=>{t.stopPropagation(),t.preventDefault(),!x&&(d(t),e.row.onChangeFocused(!0))},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:z.jsx(Ur,{className:x?"text-delta-300":"text-delta-700",width:20,height:20})});return z.jsx("div",{className:"flex justify-center items-center w-[40px]",children:z.jsxs("div",{className:"flex items-center justify-center",children:["disabled"===p.state?z.jsx(La,{title:p.tooltipTitle,arrow:!0,placement:p.tooltipPlacement||"top",open:y,onOpen:()=>w(!0),onClose:()=>w(!1),children:z.jsx("span",{className:"cursor-not-allowed",onTouchStart:e=>{e.stopPropagation(),e.preventDefault(),w(!0)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:C})}):C,"enabled"===p.state&&z.jsx(S,{open:s,anchorEl:a,onClose:()=>{c(),e.row.onChangeFocused(!1)},onClick:()=>{c(),e.row.onChangeFocused(!1)},anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:v?z.jsxs("div",{className:"flex items-center gap-2 p-3 text-delta-700",children:[z.jsx(za,{width:20,height:20}),z.jsx("span",{children:f})]}):g.map((t,n)=>{if(I(t)){const r=t.component(e.row,c);return o.isValidElement(r)?z.jsx(o.Fragment,{children:r},n):null}return t.hide?null:z.jsx(La,{title:null==t?void 0:t.tooltipTitle,arrow:!0,placement:(null==t?void 0:t.tooltipPlacement)||"left",children:z.jsx("span",{children:z.jsx(Wr,{className:t.className,disabled:t.disabled,onClick:()=>{var n;null==(n=t.onClick)||n.call(t,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:t.label})})},n)})})]})})}function $a(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.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 Ba="_actions-header_1bxzk_1",Ga="_pin-indicator_1bxzk_11",Ua="_pin-icon_1bxzk_21";function Wa(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:z.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 qa={en:{column_reorder:"This column is fixed and can’t be reordered.",column_hidden:"This column is fixed and can’t be hidden."},no:{column_reorder:"Denne kolonnen er fast og kan ikke flyttes.",column_hidden:"Denne kolonnen er fast og kan ikke skjules."}};function Ka({id:e,disabled:t,children:n}){const{attributes:o,listeners:r,setNodeRef:i,transform:l,transition:a}=dn({id:e,disabled:t}),s={transform:se.Transform.toString(l),transition:a};return z.jsx("div",{ref:i,style:s,...o,...r,children:n})}function Xa({headerData:e,locale:t}){const{anchorEl:n,open:o,handleClose:i,handleOpen:l}=Gr(),a=e.table.getAllLeafColumns().some(e=>e.getCanHide()&&!e.getIsVisible()&&!F.includes(e.id)),s=e.table.getAllLeafColumns(),u=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r(()=>[...t].filter(e=>null!=e),[...t])}(function(e,t){return r(()=>({sensor:e,options:t??{}}),[e,t])}(gt,{activationConstraint:{distance:10}})),c=function(e="en"){return r(()=>qa[e]??qa.en,[e])}(t),d=s.filter(e=>!F.includes(e.id)&&!!e.columnDef.header);return z.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[z.jsxs("button",{type:"button",className:Ba,onClick:l,children:[z.jsx($a,{className:Ua}),a&&z.jsx("div",{className:Ga})]}),z.jsx(S,{anchorEl:n,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:o,onClose:i,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 44px)",overflowY:"auto",scrollbarWidth:"thin"}},children:z.jsx($t,{modifiers:[Kt,qt],onDragEnd:t=>{var n;const{active:o,over:r}=t;!o||!r||o.id===r.id||null!=(n=s.find(e=>e.id===r.id))&&n.columnDef.fixedLeft||(e.table.resetColumnOrder(),e.table.setColumnOrder(e=>{const t=e.indexOf(o.id),n=e.indexOf(r.id);return Xt(e,t,n)}))},sensors:u,children:z.jsx(on,{items:d.map(e=>e.id),strategy:en,children:d.map(e=>{const t=!!e.columnDef.fixedLeft,n=!1===e.columnDef.enableHiding;return z.jsx(Ka,{id:e.id,disabled:t,children:z.jsx(La,{title:t&&c.column_reorder,arrow:!0,children:z.jsx("span",{children:z.jsxs(Wr,{onClick:()=>{n||e.toggleVisibility(!e.getIsVisible())},className:"h-[44px] flex items-center",children:[z.jsx(Wa,{width:20,height:20,className:fn(t?"text-delta-300 cursor-not-allowed":"text-delta-800 cursor-grab")}),z.jsx(La,{title:n&&c.column_hidden,arrow:!0,children:z.jsx("span",{className:"px-2",children:z.jsx($r,{readOnly:n,dataTest:`${e.id}-column-visibility-checkbox`,size:"small",disableRipple:!0,checked:e.getIsVisible(),hideWrapper:!0})})}),e.columnDef.pinnedHeaderText??("string"==typeof e.columnDef.header?e.columnDef.header:e.id)]})})})},e.id)})})})})]})}const Ya=({rowId:e,rowHeight:t,...n})=>{const{attributes:o,listeners:r}=dn({id:e,...n});return z.jsx("div",{...o,...r,style:{height:t||"auto"},children:z.jsx(Wa,{width:24,height:24,className:pn(n.disabled?"text-delta-300 cursor-not-allowed":"text-delta-800 cursor-grab")})})};function Ja({info:e,rowHeight:t}){const n=e.row.getCanExpand();return z.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},children:z.jsx(Xr,{dataTest:"expand-text-button",size:"small",variant:"textGray",onClick:()=>{n&&e.row.getToggleExpandedHandler()(),e.row.toggleExpand()},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},startIcon:z.jsx(Br,{width:20,height:20,style:{rotate:e.row.isExpanded()?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms",cursor:"pointer"}})})})}const Za=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:i,expandArrow:l,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:c,customActionsColumnProps:d,rowActionsState:g,locale:p}=e,f=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,rowActionsState:l,locale:a}=e;return{id:k,enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?z.jsx(Xa,{headerData:e,locale:a}):null,cell:e=>n||o?z.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&z.jsx("div",{children:null==o?void 0:o(e)}),n&&z.jsx(Ha,{tableData:e,actions:n,rowActionsState:l})]}):null,size:50,...i}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:d,rowActionsState:g,locale:p})),c&&!t.find(e=>e.id===M)&&t.unshift(function(e,t){return{id:M,minSize:38,maxSize:38,size:38,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>z.jsx(Ja,{info:e,rowHeight:t}),fixedLeft:e}}(f,u)),l&&!c&&!t.find(e=>e.id===O)&&t.unshift(function(e,t){return{id:O,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?z.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:z.jsx(Br,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(f,u)),a&&!t.find(e=>e.id===N)&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>z.jsx(Ya,{rowId:e.id,rowHeight:t}),...e,id:N}}(s,u)),i&&!t.find(e=>e.id===D)&&t.unshift(function(e,t){return{id:D,minSize:38,maxSize:38,size:38,header:({table:e})=>z.jsx($r,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>z.jsx("div",{style:{height:t||"auto"},className:"flex items-center w-full",children:z.jsx($r,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})}),fixedLeft:e}}(f,u))},Qa="_asma-ui-table-styled-table_1s531_1",es="_table-wrapper_1s531_18",ts="_table-shell_1s531_25",ns="_table-wrapper--no-rows_1s531_31",os="_table-wrapper--proxy_1s531_34",rs="_table-wrapper--proxy-bottom_1s531_35",is="_table-wrapper-fetching_1s531_45",ls="_table-scroll_1s531_48",as="_table-x--fill-height_1s531_57",ss="_table-x_1s531_57",us="_table-header--sticky_1s531_72",cs="_table-hscroll_1s531_77",ds="_table-hscroll__content_1s531_87",gs="_no-rows-overlay-container_1s531_90",ps="_styled-table_1s531_99",fs="_tbody_1s531_108",hs="_loading-icon_1s531_113",ms="_t-row_1s531_120",vs="_t-cell_1s531_120",bs="_action-cell_1s531_130",ys="_fixed-cell_1s531_133",ws="_expanded_row_1s531_161",xs="_selected_1s531_179",Cs="_single-selection_1s531_182",Ss="_shadowed_1s531_198",Rs="_is-loading_1s531_219",Es="_action-cell-default-background_1s531_222",_s="_fixed-cell-default-background_1s531_225",Is="_sortable-column_1s531_228",Ds="_resizer_1s531_232",Os="_isResizing_1s531_244",ks="_hide-table-header_1s531_256",Ns="_show-table-header_1s531_260",Ms="_table-header_1s531_72",Fs="_hide-header_1s531_285",Ps="_t-cell__actions_1s531_288",js="_t-cell__fixed_1s531_298",As="_sort-icon_1s531_305",Ts="_table-footer--sticky_1s531_308",Vs="_table-footer--inline_1s531_319",Ls="_table-bottom_1s531_330",zs="_table-bottom--sticky_1s531_344";function Hs(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function $s(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const Bs=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===k),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 Gs({styledTableProps:e,header:t,tableCanResize:n=!1,left:o,hasFixedLeftColumn:i,tableWidth:l}){const{actions:s,hideHeader:u=!1,enableResizing:c=!1}=e,d=a(null),{isResizing:g,enableResizingFlag:p,disableResizingFlag:f}=vn(),h=!bn()&&t.column.columnDef.fixedLeft,m=r(()=>t.headerGroup.headers.some(e=>e.id===k),[t.headerGroup.headers]),v=r(()=>t.headerGroup.headers[t.headerGroup.headers.length-(m?2:1)],[t.headerGroup.headers,m]);return z.jsx("th",{ref:d,colSpan:t.colSpan,className:pn(vs,u&&Fs,t.column.id===k&&Ps,i&&!!s&&t.column.id===k&&Ss,h&&js),style:{...Bs({enableResizing:c,header:t,element:d.current,tableWidth:l}),...h&&{left:o}},children:z.jsxs("div",{className:pn("flex items-center justify-left",u?ks:Ns,t.column.getCanSort()&&Is,t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!g&&n&&n(e),f()},children:[xo(t.column.columnDef.header,t.getContext()),{asc:z.jsx(Hs,{className:As}),desc:z.jsx($s,{className:As})}[t.column.getIsSorted()]??null,n&&(!!c||t.id!==(null==v?void 0:v.id))&&t.column.getCanResize()&&!F.includes(t.column.id)&&z.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",()=>Us({styledTableProps:e,header:t}))},onTouchStart:n=>{n.stopPropagation(),p(),t.getResizeHandler()(n),window.addEventListener("mouseup",()=>Us({styledTableProps:e,header:t}))},className:`${Ds} ${t.column.getIsResizing()?Os:""}`})]})},t.id)}function Us({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 Ws({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1,tableHeaderRef:i,tableHeaderStyle:l={}}=t,a=bn(),s=e.getHeaderGroups().some(e=>e.headers.some(e=>!0===e.column.columnDef.fixedLeft)),u={...l};return z.jsx("thead",{className:fn(Ms,r&&us,t.tableHeaderClassName),style:u,ref:i,children:e.getHeaderGroups().map(e=>z.jsx("tr",{children:e.headers.map((r,i)=>{const l=!a&&r.column.columnDef.fixedLeft,u=e.headers.slice(0,i).reduce((e,t)=>e+(t.column.getSize()||0),0);return z.jsx(Gs,{styledTableProps:t,header:r,tableCanResize:n,left:l?u:0,hasFixedLeftColumn:s,tableWidth:o},r.column.id)})},e.id))})}const qs="_skeleton-row_5gbhw_1",Ks=({colSpan:e,rowHeight:t=48})=>z.jsx(h,{children:Array.from({length:10}).map((n,o)=>z.jsx("tr",{children:z.jsx("td",{colSpan:e,height:t,className:qs,children:z.jsx(R,{variant:"rectangular",width:"100%",height:40,sx:{backgroundColor:"var(--colors-delta-50)",borderRadius:"8px"}},o)})},o))});function Xs({styledTableProps:e,row:t,index:n}){const{loading:o,getRowClassName:i,rowHeight:a,onRowClick:s,expandArrow:u,enableDnd:c,disableDndForRow:d,tdClassName:g,customSubRowData:p,renderSubRows:f,defaultExpanded:m,actions:v,textExpandArrow:b,enableMultiRowSelection:y,enableRowSelection:w,singleSelectionRow:x}=e,C=null==d?void 0:d(t),{transform:S,transition:R,setNodeRef:E,isDragging:_}=dn({id:t.original.id,disabled:!c||C}),I={transform:se.Transform.toString(S),transition:R,opacity:_?.8:1,zIndex:_?1:0,position:"relative"},{isResizing:D,disableResizingFlag:O}=vn(),N=bn();l(()=>{m&&t.getCanExpand()&&!t.getIsExpanded()&&t.toggleExpand()},[]);const M=e=>{var n,o;t.getCanExpand()&&!u&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r=!("Range"===(null==(o=window.getSelection())?void 0:o.type)||D),i=s instanceof Function;!i&&b&&r?t.toggleExpand():i&&r&&(s(e,t),t.onChangeFocused(!0)),O()},F=t.getVisibleCells().map((e,t,n)=>({...e,left:n.slice(0,t).reduce((e,t)=>e+(t.column.getSize()||0),0)})),P=r(()=>F.filter(({column:e})=>e.columnDef.fixedLeft),[F]),j=!y&&!w&&x,A=t.getIsSelected()&&j,T=s instanceof Function;return z.jsxs(h,{children:[z.jsx("tr",{role:"row","aria-selected":t.getIsSelected()||t.isFocused()?"true":"false",tabIndex:t.isFocused()?0:-1,"data-index":n,"data-test":t.id,id:t.id,className:pn(ms,o&&Rs,null==i?void 0:i(t)),style:{height:a?`${a}px`:"inherit",...c&&I},ref:C?void 0:E,onMouseUp:e=>{e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName||"LI"===e.target.nodeName||e.target.closest("li")||M(e)},onMouseDown:e=>{e.detail>1&&!T&&b&&e.preventDefault()},onKeyDown:e=>{switch(e.key){case"Tab":case"ArrowDown":t.focusNextRow(),e.preventDefault();break;case"ArrowUp":t.focusPrevRow(),e.preventDefault();break;case"Enter":M(e)}},children:F.map((e,n)=>{var o;const r=e.column.id===k,l=!N&&e.column.columnDef.fixedLeft,a=e.id===(null==(o=P.at(-1))?void 0:o.id),s=t.isExpanded(),u=0===n;return z.jsx("td",{className:pn(vs,T&&"cursor-pointer",g,r&&bs,r&&!!v&&P.length&&Ss,r&&(null!=i&&i(t)?null==i?void 0:i(t):Es),l&&ys,a&&Ss,t.getIsSelected()&&xs,l&&(null!=i&&i(t)?null==i?void 0:i(t):_s),s&&ws,(A||t.isFocused())&&Cs),style:{left:l?e.left:void 0},children:z.jsxs("div",{style:{display:"flex",alignItems:"center",minWidth:u?32:void 0,position:"relative"},children:[u&&A&&z.jsx("span",{style:{display:"inline-flex",alignItems:"center",position:"absolute",left:0,top:"50%",transform:"translateY(-50%)"},children:z.jsx(Ys,{})}),z.jsx("span",{style:{marginLeft:u&&j?30:0,width:"100%"},children:xo(e.column.columnDef.cell,e.getContext())})]})},e.id)})}),t.getIsExpanded()&&z.jsx(z.Fragment,{children:p&&f&&f({rows:p.get(t.original.id.toString())??[],row:t.original})})]},t.id)}const Ys=()=>z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 2 22 22",style:{color:"var(--colors-gama-500)"},children:z.jsx("path",{fill:"currentColor",d:"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"})});function Js({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return z.jsx(z.Fragment,{children:n.map((t,n)=>z.jsx(Xs,{styledTableProps:e,row:t,index:n},t.id))})}function Zs({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,enableDnd:i,rowHeight:l}=t,a=e.getAllLeafColumns().length||n.length||1;return r&&0===o.length?z.jsx("tbody",{className:fs,children:z.jsx(Ks,{colSpan:a,rowHeight:l})}):0===o.length?null:z.jsx("tbody",{className:fs,children:i?z.jsx(on,{items:o,strategy:en,children:z.jsx(Js,{table:e,styledTableProps:t})}):z.jsx(Js,{table:e,styledTableProps:t})})}function Qs(e){return z.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[z.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}),z.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:z.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const eu=({fetching:e=!1})=>e?z.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:z.jsx(Qs,{className:hs,width:50,height:50})}):null;function tu(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const nu="_table-pagination_pu6mb_1";function ou(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}function ru(e){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:z.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const iu=e=>z.jsxs(x,{classes:{root:"flex gap-x-1"},sx:{padding:"8px","&.Mui-selected":{backgroundColor:"var(--colors-gama-50)","&:hover":{backgroundColor:"var(--colors-gama-50)"}}},...e,children:[z.jsx(ru,{width:24,height:24,color:e.selected?"var(--colors-gama-500)":"transparent",style:{transition:"color 0.2s ease"}}),e.children]}),lu=[10,20,50];function au({table:e,showRowSelect:t,locale:n}){const{anchorEl:o,open:i,handleClose:l,handleOpen:u}=Gr(),{anchorEl:c,open:d,handleClose:g,handleOpen:p}=Gr(),f=a(null),h="no"===n,m=r(()=>({anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}}),[]),v=s(()=>{var e,t,n;const o=Qa;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"})},[]),b=e.getPageCount()||1,y=e.getState().pagination.pageIndex+1,w=r(()=>Array.from({length:b},(e,t)=>t+1),[b]),x=e.getState().pagination.pageSize,C=r(()=>{const e=new Set([...lu,x]);return Array.from(e).sort((e,t)=>e-t)},[]),R=s(t=>{e.setPageIndex(t-1),l(),v()},[e,l,v]),E=s(t=>{e.setPageSize(t),g()},[e,g]);return z.jsxs("div",{ref:f,className:nu,children:[t&&z.jsxs(z.Fragment,{children:[z.jsxs(Xr,{dataTest:"table-rows-count-button",variant:"outlined",size:"large",onClick:p,endIcon:z.jsx(Br,{className:(d?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[x," ",h?"rader":"rows"]}),z.jsx(S,{open:d,anchorEl:c,slotProps:{paper:{sx:{width:c?c.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:g,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:C.map(e=>z.jsx(iu,{onClick:t=>{t.stopPropagation(),t.preventDefault(),E(e)},selected:x===e,children:z.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[e," ",h?"rader":"rows"]})},e))})]}),z.jsx(La,{title:h?"Nåværende side":"Current Page",children:z.jsx("div",{children:z.jsxs(Xr,{dataTest:"current-page-button",variant:"outlined",size:"large",onClick:u,endIcon:z.jsx(Br,{className:(i?"rotate-180":"rotate-0")+" transition-transform duration-300",height:24,width:24}),children:[h?"Side":"Page"," ",y," ",h?"av":"of"," ",b]})})}),z.jsx(S,{open:i,anchorEl:o,slotProps:{paper:{sx:{width:o?o.clientWidth:void 0,maxHeight:288,overflowY:"auto"}}},onClose:l,anchorOrigin:m.anchorOrigin,transformOrigin:m.transformOrigin,classes:{paper:"border border-solid border-delta-200 py-2"},children:w.map(e=>z.jsx(iu,{onClick:t=>{t.stopPropagation(),t.preventDefault(),R(e)},selected:e===y,children:z.jsxs("span",{className:"text-delta-700 text-sm font-normal",children:[h?"Side":"Page"," ",e]})},e))}),z.jsx(La,{title:1===y?"":h?"Forrige side":"Previous Page",children:z.jsx("div",{children:z.jsx(Xr,{dataTest:"prev-page-button",variant:"outlined",onClick:()=>{e.previousPage(),v()},size:"large",disabled:!e.getCanPreviousPage(),startIcon:z.jsx(ou,{height:24,width:24})})})}),z.jsx(La,{title:y===b?"":h?"Neste side":"Next Page",children:z.jsx("div",{children:z.jsx(Xr,{dataTest:"next-page-button",variant:"outlined",onClick:()=>{e.nextPage(),v()},size:"large",disabled:!e.getCanNextPage(),startIcon:z.jsx(tu,{height:24,width:24})})})})]})}function su({table:e,styledTableProps:t,canShowStickyFooter:n}){var o,r,i;if(t.hideFooter||0===t.data.length)return null;const l=t.paginationAlignLeft,a=e.getState().pagination.pageSize,s=e.getFilteredRowModel().rows.length>a,u=null==(o=t.footer)?void 0:o.call(t,e);return null!=u&&!1!==u||s?z.jsxs("div",{className:n?Ts:Vs,style:l&&{justifyContent:"flex-start"}||{},children:[!l&&(null==(r=t.footer)?void 0:r.call(t,e)),s&&z.jsx(au,{table:e,showRowSelect:!!t.showRowCountSelect,locale:t.locale||"en"}),l&&(null==(i=t.footer)?void 0:i.call(t,e))]}):null}function uu({enabled:e,data:t,setData:n,children:o}){const i=r(()=>t.map(e=>e.id),[t]);return e?z.jsx($t,{collisionDetection:_e,modifiers:[Kt,qt],onDragEnd:t=>{if(!e||!n)return;const{active:o,over:r}=t;!o||!r||o.id===r.id||n(e=>Xt(e,i.indexOf(o.id),i.indexOf(r.id)))},children:o}):z.jsx(z.Fragment,{children:o})}function cu({enabled:e,className:t,children:n}){return e?z.jsx("div",{className:t,children:n}):z.jsx(z.Fragment,{children:n})}const du=e=>{const t=r(()=>({...e,rowHeight:e.rowHeight||48}),[e]),{className:n,tableClassName:o,height:l,noRowsOverlay:s,data:c,enableDnd:d,setData:g,loading:p}=t;Za(t);const{table:f}=Eo(t),h=c.length>0,m=h&&!!p,v=!h&&!p,b=bn(),y=!!t.stickyFooter&&!b,w=!y,{tableScrollRef:x,tableXRef:C,hScrollRef:S,hScrollContentRef:R}=function(e){const t=a(null),n=a(null),o=a(null),r=a(null);return i(()=>{if(!e)return;const i=t.current,l=n.current,a=o.current,s=r.current;if(!(i&&l&&a&&s))return;let u=!1;const c=()=>{s.style.width=`${l.scrollWidth}px`},d=()=>{u||(u=!0,a.scrollLeft=l.scrollLeft,u=!1)},g=()=>{u||(u=!0,l.scrollLeft=a.scrollLeft,u=!1)};c(),d(),l.addEventListener("scroll",d,{passive:!0}),a.addEventListener("scroll",g,{passive:!0});const p=new ResizeObserver(c);return p.observe(l),()=>{l.removeEventListener("scroll",d),a.removeEventListener("scroll",g),p.disconnect()}},[e]),{tableScrollRef:t,tableXRef:n,hScrollRef:o,hScrollContentRef:r}}(w),{ref:E,heightPx:_}=function(){const e=a(null),[t,n]=u(0);return i(()=>{const t=e.current;if(!t)return;let o=0;const r=()=>{const e=Math.round(t.getBoundingClientRect().height);n(t=>t===e?t:e)},i=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(r)};i();const l=new ResizeObserver(i);return l.observe(t),()=>{cancelAnimationFrame(o),l.disconnect()}},[]),{ref:e,heightPx:t}}(),I=t.rowHeight??48,D=f.getRowModel().rows.length,O=r(()=>I<=0?0:Math.floor(_/I),[_,I]),k=!y&&D>0&&D<=O,N=fn(y?es:k||!y&&v?rs:os,m&&is,v&&ns,n),M=z.jsxs("table",{className:ps,children:[z.jsx(Ws,{table:f,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:null}),z.jsx(eu,{fetching:!!m}),z.jsx(Zs,{table:f,styledTableProps:t})]});return z.jsx(mn,{children:z.jsx(uu,{enabled:!!d,data:c,setData:g,children:z.jsxs("div",{ref:E,className:fn(Qa,o),style:{height:l},children:[z.jsx(cu,{enabled:y,className:ts,children:z.jsxs("div",{className:N,children:[y?M:z.jsxs("div",{ref:x,className:fn(ls),children:[z.jsx("div",{ref:C,className:fn(ss,!k&&as),children:M}),z.jsx("div",{ref:S,className:cs,children:z.jsx("div",{ref:R,className:ds})}),z.jsx("div",{className:fn(Ls,k&&zs),children:z.jsx(su,{table:f,styledTableProps:t,canShowStickyFooter:!1})})]}),v&&z.jsx("div",{className:gs,children:s})]})}),y&&z.jsx(su,{table:f,styledTableProps:t,canShowStickyFooter:!0})]})})})};export{k as ACTIONS_COLUMN_ID,N as DND_HANDLE_COLUMN_ID,O as EXPAND_COLUMN_ID,F as INTERNAL_COLUMN_IDS,Ya as RowDragHandleCell,D as SELECT_COLUMN_ID,M as SHOW_FULL_TEXT_ID,du as StyledTable,yn as createColumnHelper,I as isCustomAction};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.97",
6
+ "version": "1.0.98",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/**/*",