@apia/theme 0.1.3 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1,3827 @@
1
- import{jsx as x,Fragment as So}from"react/jsx-runtime";import{ThemeProvider as U,Box as J}from"theme-ui";import{useRef as Po,Suspense as K,useState as To,createContext as Io}from"react";import{cloneDeep as z,merge as O}from"lodash";import{getValueByPath as Ro,setValueByPath as M,EventEmitter as Q,useMount as Bo}from"@apia/util";import f from"tinycolor2";import{focusOutline as L}from"@apia/theme";function c(o){var e;const r=[];for(let i=0;i<=6;i++)r[i+1]=(e=o[i])!=null?e:null;if(o.print)r[0]=o.print;else for(let i=5;i>=0;i--)o[i]!==void 0&&(r[0]=o[i]);return r}function t(o){var e;return(e=Z.spacing(o))!=null?e:o}const C={py:2,px:4,fontSize:"0.9em"},j={outlineColor:"outlineColor",outlineWidth:"3px",outlineStyle:"solid",outlineOffset:"-3px"};function H(o){return{variant:o,"data-variant":o}}const D={dark:"#cce5ff",light:"#557"},Wo=Array(50).fill(1).map((o,e)=>c({0:Math.ceil(e/2.5),1:Math.ceil(e/2.1),2:Math.ceil(e/1.7),3:Math.ceil(e/1.3),4:e})),Z={action:{disabled:"#d9d9d9",disabledOpacity:1,active:D,activeOpacity:.45,focus:D,focusOpacity:.05,hover:D,hoverOpacity:.1,readonly:D,readonlyOpacity:.4,selected:"rgb(204 214 222)",selectedOpacity:1},background:{default:"#f4f4f4",overlay:"rgba(0, 0, 0, 0.2)",paper:"white"},border:{article:"#cacaca",field:"#444",section:"#aaa"},common:{black:"black",white:"white"},info:{main:"#fff"},primary:{main:"#00496c"},secondary:{main:"#6c757d"},spacing:o=>Wo[o],text:{accent:"#609",disabled:"#555",icon:"white",link:"#00496c",primary:"#4a4a4a",secondary:"white",title:"#00496c"},error:{main:"#db7678",light:"#fff2f4"},success:{main:"#8bde8b",light:"#e7ffd9"},warning:{main:"#f8f588",light:"#fffdd9"},darkenRatio:15,lightenRatio:35,responsive:c,queryColumnsMultiplier:2};var Do=Object.defineProperty,ee=Object.getOwnPropertySymbols,Eo=Object.prototype.hasOwnProperty,Ao=Object.prototype.propertyIsEnumerable,oe=(o,e,r)=>e in o?Do(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,re=(o,e)=>{for(var r in e||(e={}))Eo.call(e,r)&&oe(o,r,e[r]);if(ee)for(var r of ee(e))Ao.call(e,r)&&oe(o,r,e[r]);return o};function I(o){return re(re({},o),o.borderColor?{borderLeftColor:o.borderColor,borderRightColor:o.borderColor,borderBottomColor:o.borderColor,borderTopColor:o.borderColor}:void 0)}var Fo=Object.defineProperty,te=Object.getOwnPropertySymbols,zo=Object.prototype.hasOwnProperty,Mo=Object.prototype.propertyIsEnumerable,ae=(o,e,r)=>e in o?Fo(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ne=(o,e)=>{for(var r in e||(e={}))zo.call(e,r)&&ae(o,r,e[r]);if(te)for(var r of te(e))Mo.call(e,r)&&ae(o,r,e[r]);return o};const p=(o,e)=>{var r,i,u,l;if(e==="default")return I(o);const b=R(),y=b.action[`${e}Opacity`],w=e==="checked"?"selected":e;o=Object.fromEntries(Object.entries(o).map(([v,s])=>(["backgroundColor","borderColor","borderLeftColor","borderRightColor","borderBottomColor","borderTopColor","color"].includes(v)&&(s??"").startsWith("palette")&&(s=Ro(b,s.slice(8))),[v,s])));const a=f.mix((r=o.backgroundColor)!=null?r:"",f((i=o.backgroundColor)!=null?i:"").isLight()?b.action[w].light:b.action[w].dark,100*y).toRgbString();return I(ne(ne({},o.backgroundColor?{backgroundColor:e==="checked"?(u=o.backgroundColor)!=null?u:"":a,color:e==="checked"?f.mix(f((l=o.color)!=null?l:"black"),f(b.action.selected.dark),100*b.action.selectedOpacity).toRgbString():window.currentPalette.getContrastText(a)}:null),o.borderColor?{borderColor:f.mix(o.borderColor,f(o.borderColor).isLight()?b.action[w].light:b.action[w].dark,100*y).toRgbString()}:null))},E=(o,e)=>{const r=e?.default!==!1?z(o):{};return e?.active!==!1&&(r.active=p(o,"active")),e?.disabled!==!1&&(r.disabled=p(o,"disabled")),e?.focus!==!1&&(r.focus=p(o,"focus")),e?.hover!==!1&&(r.hover=p(o,"hover")),e?.readonly!==!1&&(r.readonly=p(o,"readonly")),e?.selected!==!1&&(r.selected=p(o,"selected")),e?.checked!==!1&&(r.checked=p(o,"checked")),r};function ie(o,e){o.forEach(r=>{Object.entries(r).forEach(([i,u])=>{if(typeof u=="string")return;const l=u;if(typeof l!="string"&&!l.preventParse){l.active||(l.active={}),l.checked||(l.checked={}),l.focus||(l.focus={}),l.disabled||(l.disabled={}),l.hover||(l.hover={}),l.selected||(l.selected={});const b=E(l,e);r[i]=O(b,l)}})})}function Lo(o){return!!o&&typeof o=="object"&&"main"in o}function Ho(o,e){return f(o).lighten(e??20).toRgbString()}function Xo(o,e){return f(o).darken(e??20).toRgbString()}function qo(o){const e=f(o);return f.readability("white",e)<f.readability("black",e)?"black":"white"}const m=(o,e)=>{switch(e){case"active":return{"&:active":o,"input[role]:active ~ &":o,"input[role]:active ~ & path":o};case"checked":return{"&:checked":o,"input[role]:checked ~ &":o,"input[role]:checked ~ & path":o};case"disabled":return{"&:disabled":o,"input[role]:disabled ~ &":o,"input[role]:disabled ~ & path":o};case"focus":{const r=O({},j,o);return{"&:focus":r,"input[role]:focus ~ &":r}}case"hover":return{'&:hover:not([readonly], :disabled,[aria-selected="true"],:active)':o,'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"])':o,'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"]) path':o};case"readonly":return{"&[readonly]":o,"input[role][readonly] ~ &":o,"input[role][readonly] ~ & path":o,"&.readonly input ~ &, &.readOnly input ~ &":o,"&.readonly input ~ & path, &.readOnly input ~ & path":o,"&.readonly, &.readOnly":o};case"selected":return{"&:selected":o,"input[role]:selected ~ &":o,"input[role]:selected ~ & path":o,'&[aria-selected="true"]':o};default:return o}};function h(o,e){return O(I({color:`${o}.color`,backgroundColor:`${o}.backgroundColor`,borderColor:`${o}.borderColor`}),e?.mergeObject)}var Go=Object.defineProperty,le=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,Vo=Object.prototype.propertyIsEnumerable,ce=(o,e,r)=>e in o?Go(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,$=(o,e)=>{for(var r in e||(e={}))No.call(e,r)&&ce(o,r,e[r]);if(le)for(var r of le(e))Vo.call(e,r)&&ce(o,r,e[r]);return o};function n(o,e){var r,i,u,l,b,y,w,a;const v=h(`${o}.active`,e),s=h(`${o}.checked`,e),g=$({cursor:"not-allowed"},h(`${o}.disabled`,e)),_=h(`${o}.hover`,e),P=((r=e?.states)==null?void 0:r.focus)!==!1?h(`${o}.focus`,e):{},T=$({cursor:"notAllowed"},h(`${o}.readonly`,e)),k=h(`${o}.selected`,e);return O($($($($($($($($({},((i=e?.states)==null?void 0:i.default)!==!1?h(o,e):null),((u=e?.states)==null?void 0:u.checked)!==!1?m(s,"checked"):null),m(P,"focus")),((l=e?.states)==null?void 0:l.hover)!==!1?m(_,"hover"):null),((b=e?.states)==null?void 0:b.selected)!==!1?m(k,"selected"):null),((y=e?.states)==null?void 0:y.active)!==!1?m(v,"active"):null),((w=e?.states)==null?void 0:w.disabled)!==!1?m(g,"disabled"):null),((a=e?.states)==null?void 0:a.readonly)!==!1?m(T,"readonly"):null),e?.mergeObject)}var Yo=Object.defineProperty,de=Object.getOwnPropertySymbols,Uo=Object.prototype.hasOwnProperty,Jo=Object.prototype.propertyIsEnumerable,se=(o,e,r)=>e in o?Yo(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,S=(o,e)=>{for(var r in e||(e={}))Uo.call(e,r)&&se(o,r,e[r]);if(de)for(var r of de(e))Jo.call(e,r)&&se(o,r,e[r]);return o};const pe=(o,e)=>S(S(S(S(S(S(S(S({},e?.default!==!1?o:null),e?.checked!==!1?m(p(o,"checked"),"checked"):null),m(p(o,"focus"),"focus")),e?.selected!==!1?m(p(o,"selected"),"selected"):null),e?.hover!==!1?m(p(o,"hover"),"hover"):null),e?.active!==!1?m(p(o,"active"),"active"):null),e?.disabled!==!1?m(p(o,"disabled"),"disabled"):null),e?.readonly!==!1?m(p(o,"readonly"),"readonly"):null),ue=(o,e)=>{if(e==="default")return o;const r=e==="checked"?"selected":e,i=R(),u=i.action[`${e}Opacity`];return f.mix(o,f(o).isLight()?i.action[r].light:i.action[r].dark,100*u).toRgbString()};function be(o){var e,r,i,u,l,b,y,w;const a=z(o);a.lightenColor=(e=o.lightenColor)!=null?e:(s,g)=>Ho(s,g??o.lightenRatio),a.darkenColor=(r=o.darkenColor)!=null?r:(s,g)=>Xo(s,g??o.darkenRatio),a.getContrastText=(i=o.getContrastText)!=null?i:qo,Object.entries(o).forEach(([s,g])=>{var _,P,T;const k=g;Lo(k)?a[s]={main:k.main,light:(_=k.light)!=null?_:a.lightenColor(k.main),dark:(P=k.dark)!=null?P:a.darkenColor(k.main),contrastText:(T=k.contrastText)!=null?T:a.getContrastText(k.main)}:a[s]=g}),a.border.article=(u=a.border.article)!=null?u:a.secondary.main,a.border.field=(l=a.border.field)!=null?l:a.text.primary,a.border.section=(b=a.border.section)!=null?b:a.primary.main;function v(s){var g,_;return typeof s=="string"?{dark:s,light:s}:{dark:(g=s.dark)!=null?g:s.light,light:(_=s.light)!=null?_:s.dark}}a.action.active=v(a.action.active),a.action.disabled=v(a.action.disabled),a.action.focus=v(a.action.focus),a.action.hover=v(a.action.hover),a.action.readonly=v(a.action.readonly),a.action.selected=v(a.action.selected),a.buildStateObject=m,a.getColor=ue,a.getStatesForColors=E,a.getOneState=p,a.getStatesFromDefinition=pe,a.getStatesFromPath=n,a.gray=(y=a.gray)!=null?y:{};for(let s=1;s<=18;s++){const g=Math.round(13.37962962962963*s);a.gray[s*50]=(w=a.gray[s*50])!=null?w:`rgb(${g},${g},${g})`}return a}var Ko=Object.defineProperty,fe=Object.getOwnPropertySymbols,Qo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,me=(o,e,r)=>e in o?Ko(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,X=(o,e)=>{for(var r in e||(e={}))Qo.call(e,r)&&me(o,r,e[r]);if(fe)for(var r of fe(e))Zo.call(e,r)&&me(o,r,e[r]);return o};function ge(o,e){return O(I(X(X(X({},o.color?{color:o.color}:null),o.backgroundColor?{backgroundColor:o.backgroundColor}:null),o.borderColor?{borderColor:o.borderColor}:null)),e?.mergeObject)}function er(o,e){var r,i,u,l,b,y,w,a,v;const s=p(o,"active"),g=p(o,"checked"),_=p(o,"disabled"),P=(r=e?.states)!=null&&r.focus?p(o,"focus"):{},T=p(o,"hover"),k=p(o,"readonly"),jo=p(o,"selected");return O(((i=e?.states)==null?void 0:i.default)!==!1?ge(o):null,((u=e?.states)==null?void 0:u.checked)!==!1?m(g,"checked"):{},((l=e?.states)==null?void 0:l.focus)!==!1?m(P,"focus"):{},((b=e?.states)==null?void 0:b.hover)!==!1?m(T,"hover"):{},((y=e?.states)==null?void 0:y.active)!==!1?m(s,"active"):{},((w=e?.states)==null?void 0:w.selected)!==!1?m(jo,"selected"):{},((a=e?.states)==null?void 0:a.disabled)!==!1?m(_,"disabled"):{},((v=e?.states)==null?void 0:v.readonly)!==!1?m(k,"readonly"):{},e?.mergeObject)}const or={ocean:["#008E1B","#009155","#009187","#008EB1","#006872","#2F4858"],sunset:["#ae76de","#D65DB1","#FF6F91","#FF9671","#FFC75F","#F9F871"],red:["#dc143c","#ff2400","#800020","#b22222","#e52b50","#ff7f50"],orange:["#F76E11","#FF9F45","#FFBC80","#FC4F4F","#eb9605","#964000"],green:["#a4de02","#76ba1b","#4c9a2a","#acdf87","#68bb59","#1e5631"],blue:["#7ad6f4","#45bdee","#28a7ea","#006cbb","#034698","#032f64"],violet:["#80007e","#a02d9c","#c37ecd","#9e5fb8","#7f3e98","#4c197f"],turquoise:["#0ddbcc","#43ebff","#19ceeb","#28acea","#388ee9","#3d76e0"],yellow:["#fff700","#ffff9f","#fef54f","#f9e231","#f6c616","#eab200"],grey:["#b1b5ba","#d2d5d6","#dee0e0","#bdbdbb","#9fa19c","#686e67"]},rr=()=>{const o=window.currentPalette;return{datagrid:{borderColor:o.background.paper,header:{backgroundColor:o.background.default,color:o.text.primary,borderColor:o.background.default},body:{preventParse:!0,backgroundColor:o.background.paper,evenRowsBackgroundColor:o.darkenColor(o.background.paper,3),color:o.text.primary,borderColor:o.gray[800],selectedRows:{borderColor:o.gray[800],backgroundColor:o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor,color:o.getContrastText(o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor)}}},pagination:{backgroundColor:o.primary.main,icons:{backgroundColor:o.primary.main,borderColor:o.primary.main,color:o.primary.contrastText},pagesBox:{preventParse:!0,backgroundColor:o.background.paper,borderColor:o.border.field,color:o.text.primary}},primaryTable:{borderColor:o.background.paper,header:{backgroundColor:o.primary.main,color:o.primary.contrastText,borderColor:o.primary.main},body:{preventParse:!0,backgroundColor:o.background.paper,evenRowsBackgroundColor:o.darkenColor(o.background.paper,3),color:o.text.primary,borderColor:o.gray[800],selectedRows:{borderColor:o.gray[800],backgroundColor:o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor,color:o.getContrastText(o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor)}}},secondaryTable:{borderColor:o.background.paper,header:{backgroundColor:o.background.default,color:o.text.primary,borderColor:o.background.default},body:{preventParse:!0,backgroundColor:o.background.paper,evenRowsBackgroundColor:o.darkenColor(o.background.paper,3),color:o.text.primary,borderColor:o.gray[800],selectedRows:{borderColor:o.gray[800],backgroundColor:o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor,color:o.getContrastText(o.getOneState({backgroundColor:o.background.paper},"selected").backgroundColor)}}}}};var tr=Object.defineProperty,ar=Object.defineProperties,nr=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,he=(o,e,r)=>e in o?tr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ve=(o,e)=>{for(var r in e||(e={}))ir.call(e,r)&&he(o,r,e[r]);if(ye)for(var r of ye(e))lr.call(e,r)&&he(o,r,e[r]);return o},xe=(o,e)=>ar(o,nr(e));const we="#004085",cr="#cce5ff",q="white";function ke(){const o=R();return o.getStatesFromDefinition({backgroundColor:o.background.paper,color:o.text.primary},{active:!1,checked:!1,default:!1,disabled:!1,focus:!1,readonly:!1})}function R(o){const e=o===!0,r=typeof o!="boolean"?o:void 0;return window.currentPalette&&!e||(window.currentPalette=be(O(Z,window.defaultPalette,r??window.customPalette))),window.currentPalette}function dr(){var o;const e=z((o=window.currentPalette)!=null?o:R()),r={palette:xe(ve({},e),{lightenColor:void 0,darkenColor:void 0,getContrastText:void 0,buildStateObject:void 0,getColor:void 0,getOneState:void 0,getStatesForColors:void 0,getStatesFromDefinition:void 0,getStatesFromPath:void 0}),accordion:{borderColor:e.border.section},buttons:{accordion:{backgroundColor:e.primary.main,borderColor:e.border.section,color:e.primary.contrastText},accordionPrimary:{backgroundColor:e.primary.main,borderColor:e.border.section,color:e.primary.contrastText},close:xe(ve({},E({color:e.text.primary,backgroundColor:e.background.paper})),{backgroundColor:"transparent"}),collapsibleAsidePanelTitle:{color:e.text.primary},deletableInputButton:{backgroundColor:"transparent",color:e.secondary.main,active:{color:e.darkenColor(e.secondary.main,40)},disabled:{color:e.secondary.main},focus:{color:e.darkenColor(e.secondary.main,20)},hover:{color:e.darkenColor(e.secondary.main,20)}},icon:{backgroundColor:e.secondary.main,color:e.text.icon,hover:{color:e.secondary.contrastText},focus:{color:e.secondary.contrastText}},iconAlert:{backgroundColor:"transparent",color:e.text.icon,active:{backgroundColor:"transparent",color:f("#e5c200").darken(10).toRgbString()},focus:{backgroundColor:"transparent",color:f("#e5c200").darken(5).toRgbString()},hover:{backgroundColor:"transparent",color:f("#e5c200").darken(5).toRgbString()}},iconPrimary:{backgroundColor:e.primary.main,color:e.primary.contrastText,active:{color:e.primary.contrastText},focus:{color:e.primary.contrastText},hover:{color:e.primary.contrastText},disabled:{color:e.gray[500]}},iconToggled:{backgroundColor:e.primary.main,color:e.primary.contrastText,active:{color:e.primary.contrastText},focus:{color:e.common.white},hover:{color:e.common.white}},iconOutline:{backgroundColor:e.background.paper,color:e.primary.main,borderColor:e.border.article},imagePreview:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.border.article},link:{backgroundColor:"transparent",color:e.text.primary,borderColor:"transparent",active:{color:e.text.primary},focus:{color:e.text.primary},hover:{color:e.text.primary}},openTab:{backgroundColor:e.primary.main,color:e.primary.contrastText,borderColor:e.primary.dark},outline:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.primary.main},outlineDanger:{backgroundColor:e.background.paper,color:e.primary.main,borderColor:e.primary.main,active:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*80),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*80),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*80))},focus:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*60),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*60),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*60))},hover:{borderColor:e.darkenColor(e.error.dark,e.action.activeOpacity*70),backgroundColor:e.darkenColor(e.error.dark,e.action.activeOpacity*70),color:e.getContrastText(e.darkenColor(e.error.dark,e.action.activeOpacity*70))}},outlineWarning:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.primary.main,active:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText},focus:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText},hover:{borderColor:e.warning.main,backgroundColor:e.warning.main,color:e.warning.contrastText}},paper:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.background.paper},primary:{backgroundColor:e.primary.main,color:e.primary.contrastText,borderColor:e.primary.main},secondary:{backgroundColor:e.secondary.main,color:e.secondary.contrastText,borderColor:e.secondary.main},tab:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.border.article},toggleIcon:{color:e.secondary.contrastText,backgroundColor:e.secondary.main,borderColor:e.border.field,danger:{backgroundColor:e.error.main,borderColor:e.border.field,color:e.error.contrastText},toggled:{backgroundColor:e.primary.main,borderColor:e.border.field,color:e.primary.contrastText}},transparentIcon:{backgroundColor:"transparent",color:e.text.primary,hover:{color:e.primary.main},focus:{color:e.primary.main}}},components:rr(),dropzone:{backgroundColor:e.background.paper,borderColor:e.border.section,color:e.background.default},form:{backgroundColor:e.background.paper,fields:{backgroundColor:e.background.paper,color:e.text.primary,borderColor:e.border.field},radio:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(15).toRgbString(),borderColor:e.text.primary,active:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(0).toRgbString()},checked:{backgroundColor:"red",color:f(window.currentPalette.text.primary).lighten(15).toRgbString()},disabled:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(55).toRgbString()},hover:{backgroundColor:"transparent",color:f(window.currentPalette.text.primary).lighten(7).toRgbString()},readonly:{color:f(window.currentPalette.text.primary).lighten(38).toRgbString(),backgroundColor:"transparent"}}},modal:{borderColor:e.border.section,backgroundColor:e.background.paper},notifications:{error:{backgroundColor:e.error.light,color:e.getContrastText(e.error.light),borderColor:e.error.main},success:{backgroundColor:e.success.light,color:e.getContrastText(e.success.light),borderColor:e.success.main},warning:{backgroundColor:e.warning.light,color:e.getContrastText(e.warning.light),borderColor:e.warning.main}},pagination:{color:e.primary.contrastText,backgroundColor:e.primary.main},printView:{main:{backgroundColor:e.background.default,page:{backgroundColor:e.background.paper,borderColor:e.border.article}},list:{table:{borderColor:e.border.section},th:{backgroundColor:"#eee"},cell:{borderColor:e.border.article}}},schemas:or,scrollbars:{bar:{color:e.secondary.main,backgroundColor:e.background.default,hover:{backgroundColor:e.lightenColor(e.background.default,10),color:e.lightenColor(e.secondary.main,10)},active:{backgroundColor:e.lightenColor(e.background.default,10),color:e.lightenColor(e.secondary.main,20)}}},tab:{backgroundColor:e.background.paper,borderColor:e.border.section},topBar:{backgroundColor:e.primary.main},accent:e.text.accent,background:e.background.default,iconWarning:"rgb(246 222 87)",muted:e.text.disabled,primary:e.primary.main,secondary:e.secondary.main,text:e.text.primary,warning:e.warning.main,danger:e.error.main,link:e.text.accent,success:e.success.main,title:e.text.title,selected:e.getOneState({backgroundColor:e.background.paper},"selected").backgroundColor,lightBorder:"hsl(0, 12%, 85%)",outlineColor:"#00a8f6",touchedBorderColor:"orange",baseGrey:"#dfdfdf",darkBorder:"hsl(247, 98%, 10%)",darkBlue:we,disabled:"#efefef",favorite:"#e5c200",filtersRowBackground:q,formBackground:q,grey:"#777",gridRowHighlight:"#e1f3ff",highlightButton:"hsl(61, 100%, 91%)",lightBlue:cr,oddRow:"#f0f5ff",paginationBackground:"hsl(229deg, 75%, 90%)",readOnlyText:"#737373",required:"darkred",scrollbarBack:"rgb(206, 206, 206)",scrollbarFront:"rgb(156, 156, 156)",sysExceptionNotificationBg:"#f8d7da",sysMessageNotificationBg:"#fff3cd",tabBackground:"white",treeRuler:"#ccc",white:q,priorityNone:"gray",priorityLow:e.success.main,priorityNormal:"rgb(255 211 34)",priorityHigh:"rgb(255 150 0)",priorityUrgent:"red",charts:{front:we}};return ie([r?.buttons,r?.form]),r}var sr=Object.defineProperty,Ce=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,Oe=(o,e,r)=>e in o?sr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,G=(o,e)=>{for(var r in e||(e={}))pr.call(e,r)&&Oe(o,r,e[r]);if(Ce)for(var r of Ce(e))ur.call(e,r)&&Oe(o,r,e[r]);return o};const br={primary:{border:"1px solid",borderLeft:"12px solid",borderRadius:"alerts",display:"flex",flexDirection:"column",fontWeight:"normal",maxHeight:"60vh",overflow:"auto",p:0,"&:focus":{outline:"none"},".notification__header":{display:"flex",alignItems:"center",justifyContent:"space-between",position:"sticky",top:0,width:"100%",p:t(5)},".notification__title":{fontSize:18,fontWeight:"bold",color:"palette.text.primary",display:"flex",gap:t(5),alignItems:"center"},".notification__closeButton":{flexShrink:0},".notification__body":{alignItems:"center",display:"flex",flexDirection:"row",gap:t(5),width:"100%",p:t(5)},".notification__header ~ .notification__body":{pt:0},".notification__content":{display:"flex",alignItems:"stretch",flexDirection:"column",gap:t(5),width:"100%"},".notification__icon":{flexShrink:0,height:"iconMd",svg:{height:"iconMd",width:"iconMd"}},".notification__message":{display:"flex",flexDirection:"column",fontWeight:"normal",gap:t(3),width:"100%",wordBreak:"break-word"},".notification__trace":{maxWidth:"100%",overflow:"hidden",maxHeight:"30vh",flexShrink:0,backgroundColor:"rgba(10,10,10,0.02)",pt:t(5),".notification__traceLabel":{pl:t(5),display:"flex",gap:2},".notification__traceText":{fontWeight:"normal",p:t(5),maxHeight:"30vh",overflow:"auto",maxWidth:"100%",position:"relative"}},"&:focus .notification__closeButton":j},warning:{variant:"alerts.primary","&, & .notification__header":G({},h("notifications.warning"))},danger:{variant:"alerts.primary","&, & .notification__header":G({},h("notifications.error"))},success:{variant:"alerts.primary","&, & .notification__header":G({},h("notifications.success"))}};var fr=Object.defineProperty,mr=Object.defineProperties,gr=Object.getOwnPropertyDescriptors,$e=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable,_e=(o,e,r)=>e in o?fr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,d=(o,e)=>{for(var r in e||(e={}))yr.call(e,r)&&_e(o,r,e[r]);if($e)for(var r of $e(e))hr.call(e,r)&&_e(o,r,e[r]);return o},je=(o,e)=>mr(o,gr(e));const vr={inherit:{color:"inherit",background:"inherit",border:"none",borderRadius:0,font:"inherit",cursor:"pointer",padding:0,margin:0},collapsibleAsidePanelTitle:d({variant:"buttons.inherit",display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},n("buttons.collapsibleAsidePanelTitle")),primary:je(d({borderWidth:"2px",borderStyle:"solid",variant:"text.default",py:c({0:3,4:4}),px:c({0:5,4:6}),display:"inline-block",width:c({0:"100%",1:"auto"}),cursor:"pointer",borderRadius:"buttons",fontWeight:"normal",userSelect:"none",transition:"background-color 300ms ease-out, color 300ms ease-out",wordBreak:"keep-all"},n("buttons.primary")),{"&:focus, &:focus-visible":{outlineColor:"#00daff"}}),"primary-sm":d({variant:"buttons.primary","&:focus, &:focus-visible":{}},C),secondary:d({variant:"buttons.primary","&:focus, &:focus-visible":{},borderWidth:"0px",borderStyle:"solid"},n("buttons.secondary")),"secondary-sm":d({variant:"buttons.secondary"},C),"light-secondary":d({variant:"buttons.secondary"},n("buttons.lightSecondary")),danger:d({variant:"buttons.primary","&:focus, &:focus-visible":{}},n("buttons.danger")),"danger-sm":d({variant:"buttons.danger"},C),warning:d({variant:"buttons.primary","&:focus, &:focus-visible":{}},n("buttons.warning")),"warning-sm":d({variant:"buttons.warning"},C),close:d({cursor:"pointer",ml:"auto",mr:"2",borderRadius:"buttons"},n("buttons.close")),accordion:{variant:"buttons.primary","&:focus, &:focus-visible":{},cursor:"pointer",m:t(0),py:c({0:3,4:4}),px:c({0:5,4:6}),width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"buttons",textAlign:"left",fontFamily:"heading",fontSize:"text.default",textDecoration:"none",textTransform:"none",fontWeight:"bold",border:"none",transition:"background-color 300ms ease-out, color 300ms ease-out",userSelect:"text","&, *":n("buttons.accordion"),"h3.toggleAccordionElementLabel":{variant:"text.default",color:"inherit",margin:0,wordBreak:"break-word"}},"accordion-primary":d({variant:"buttons.accordion",border:"none"},n("buttons.accordionPrimary")),icon:je(d({display:"flex",justifyContent:"center",alignItems:"center",p:t(0),m:t(0),bg:"secondary",cursor:"pointer",transition:"background-color 300ms ease-out, color 300ms ease-out",borderRadius:"buttons",border:"none"},n("buttons.icon")),{svg:{width:"auto",height:"20px",display:"block"},"&.isToggled":d({},n("buttons.iconToggled"))}),"icon-primary":d({variant:"buttons.icon"},n("buttons.iconPrimary")),"icon-outline":d({variant:"buttons.icon",bg:"white",border:"1px solid"},n("buttons.iconOutline")),"icon-outline-danger":d({variant:"buttons.icon",bg:"white",border:"1px solid"},n("buttons.outlineDanger")),"icon-only":d({variant:"buttons.icon"},n("buttons.iconOnly")),link:d({variant:"inherit",width:"auto",border:"none",textDecoration:"underline",px:2,py:1,borderRadius:"buttons",cursor:"pointer",textTransform:"none",transition:"background-color 300ms ease-out, color 300ms ease-out"},n("buttons.link")),"link-sm":d({variant:"buttons.link"},C),outline:d({variant:"buttons.primary",borderWidth:"2px",borderStyle:"solid",borderRadius:"buttons","&:focus, &:focus-visible":{}},n("buttons.outline",{states:{active:!1,checked:!1,disabled:!1,focus:!1,hover:!1,readonly:!1,selected:!1}})),"outline-sm":d({variant:"buttons.outline"},C),"transparent-sm":d({variant:"buttons.outline","&:focus, &:focus-visible":{},bg:"transparent",color:"inherit",border:"none",font:"inherit",textTransform:"inherit"},C),"outline-danger":d({variant:"buttons.outline","&:focus, &:focus-visible":{}},n("buttons.outlineDanger")),"outline-danger-sm":d({variant:"buttons.outline-danger"},C),"outline-warning":d({variant:"buttons.outline","&:focus, &:focus-visible":{}},n("buttons.outlineWarning")),"outline-warning-sm":d({variant:"buttons.outline-warning"},C),"outline-extended":{variant:"buttons.outline",gridColumnStart:1,gridColumnEnd:3,width:"100%"},"outline-danger-extended":{variant:"buttons.outline-danger",gridColumnStart:1,gridColumnEnd:3,width:"100%"},"primary-extended":{variant:"buttons.primary","&:focus, &:focus-visible":{},gridColumnStart:1,gridColumnEnd:3,width:"100%"},query:{extended:{variant:"buttons.outline","&:focus, &:focus-visible":{},gridColumnStart:1,gridColumnEnd:3}},tableAccordion:d({variant:"buttons.accordion",fontSize:"text.default",p:t(3),wordBreak:"keep-all",a:{color:"background"}},n("buttons.tableAccordion")),tableHeader:d({variant:"buttons.tableAccordion",alignItems:"center",justifyContent:"center",height:"100%",border:"none",svg:{ml:t(2)}},n("buttons.tableHeader")),paper:d({variant:"buttons.primary",borderWidth:"2px",borderStyle:"solid",borderRadius:"buttons"},n("buttons.paper")),"paper-sm":d(d({variant:"buttons.primary",borderWidth:"2px",borderStyle:"solid",borderRadius:"buttons"},n("buttons.paper")),C)};var xr=Object.defineProperty,Se=Object.getOwnPropertySymbols,wr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Pe=(o,e,r)=>e in o?xr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Cr=(o,e)=>{for(var r in e||(e={}))wr.call(e,r)&&Pe(o,r,e[r]);if(Se)for(var r of Se(e))kr.call(e,r)&&Pe(o,r,e[r]);return o};const Or=Cr({display:"inline-flex",borderRadius:"default",flexBasis:"32px",flexShrink:0,width:"32px",height:"32px",alignItems:"center",justifyContent:"center",p:"3px",border:"1px solid",svg:{width:"20px"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}}));var $r=Object.defineProperty,_r=Object.defineProperties,jr=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Ie=(o,e,r)=>e in o?$r(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Tr=(o,e)=>{for(var r in e||(e={}))Sr.call(e,r)&&Ie(o,r,e[r]);if(Te)for(var r of Te(e))Pr.call(e,r)&&Ie(o,r,e[r]);return o},Ir=(o,e)=>_r(o,jr(e));const Rr=Ir(Tr({borderRadius:"default"},n("form.fields",{states:{active:!1,focus:!1,hover:!1}})),{backgroundColor:"unset",alignItems:"center","&.nativeCheckbox":{appearance:"none",width:"25px",height:"25px",border:"solid 1px #cccccc",marginRight:"8px",position:"relative",cursor:"pointer","&:checked::before":{content:'"\u2713"',color:"palette.text.primary",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:0,left:0,right:0,bottom:0,fontSize:"larger",fontWeight:"bolder",borderRadius:"5px",cursor:"pointer"},"&:indeterminate::before":{content:'"-"',color:"palette.text.primary",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:"-1px",left:0,right:0,bottom:0,fontSize:"xx-large",fontWeight:"600",borderRadius:"5px",cursor:"pointer"}}});var Br=Object.defineProperty,Wr=Object.defineProperties,Dr=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,Ar=Object.prototype.propertyIsEnumerable,Be=(o,e,r)=>e in o?Br(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,We=(o,e)=>{for(var r in e||(e={}))Er.call(e,r)&&Be(o,r,e[r]);if(Re)for(var r of Re(e))Ar.call(e,r)&&Be(o,r,e[r]);return o},Fr=(o,e)=>Wr(o,Dr(e));const zr=Fr(We({display:"flex",flexDirection:"column",alignItems:"stretch",justifyContent:"stretch",gap:t(2),width:"100%","&.readOnly":{input:{color:"Text.fields",bg:"Background.fields"}},".iconInput":{width:"100%",position:"relative"},'input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]), input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]) path, .delete_date_button':We({position:"absolute",right:"59px",padding:0,top:"calc(50% - 10px)",margin:0,marginRight:0,borderRadius:"100%",width:"20px",height:"20px"},n("buttons.icon-outline")),input:{flexShrink:1},"& > div":{display:"flex",gap:t(2),flexShrink:0,width:"auto",maxWidth:"100%",minWidth:0,button:{width:"45px",flexShrink:0}}},n("form.fields",{states:{hover:!1,active:!1,focus:!1}})),{backgroundColor:void 0});var Mr=Object.defineProperty,De=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,Ee=(o,e,r)=>e in o?Mr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Xr=(o,e)=>{for(var r in e||(e={}))Lr.call(e,r)&&Ee(o,r,e[r]);if(De)for(var r of De(e))Hr.call(e,r)&&Ee(o,r,e[r]);return o};const qr={display:"flex",gap:t(1),justifyContent:"stretch",alignItems:"center","&.readOnly":{input:Xr({},h("form.fields"))},input:{height:"50px",width:"100%"},button:{display:"flex",width:"45px",flexShrink:0,height:"50px"}};var Gr=Object.defineProperty,Nr=Object.defineProperties,Vr=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,Yr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Fe=(o,e,r)=>e in o?Gr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Jr=(o,e)=>{for(var r in e||(e={}))Yr.call(e,r)&&Fe(o,r,e[r]);if(Ae)for(var r of Ae(e))Ur.call(e,r)&&Fe(o,r,e[r]);return o},Kr=(o,e)=>Nr(o,Vr(e));const Qr=Kr(Jr({variant:"text.default",border:"1px solid",borderRadius:"default",padding:c({0:3,3:4}),"::placeholder":{color:"#b0b0b0"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),{material:{input:{borderLeft:"none",borderRight:"none",borderTop:"none",borderBottomColor:"palette.border.section","& + .input__underline":{transform:"scale(1)"},"&:focus":{outline:"none","~::after":{animationName:"growHorizontal",animationDuration:"150ms",animationTimingFunction:"ease-out",content:'""',display:"block",height:"0",outlineColor:"palette.primary.main",outlineStyle:"solid",outlineWidth:"1.5px",outlineOffset:0,position:"fixed",transformOrigin:"center center",width:"100%"}}}}}),Zr={variant:"text.default",alignItems:"center",width:"auto",textTransform:"none",cursor:"pointer","&:not(.radio-label)":{fontWeight:"bold"},"&.required":{position:"relative","&::before":{color:"danger",position:"absolute",content:'"*"',top:0,left:"-10px"}},"&:last-of-type":{"input, textarea, select":{mb:t(0)}}};var et=Object.defineProperty,ze=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Me=(o,e,r)=>e in o?et(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,tt=(o,e)=>{for(var r in e||(e={}))ot.call(e,r)&&Me(o,r,e[r]);if(ze)for(var r of ze(e))rt.call(e,r)&&Me(o,r,e[r]);return o};const at=tt({width:"32px",height:"32px",input:{height:"32px !important"}},n("form.radio"));var nt=Object.defineProperty,Le=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,He=(o,e,r)=>e in o?nt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ct=(o,e)=>{for(var r in e||(e={}))it.call(e,r)&&He(o,r,e[r]);if(Le)for(var r of Le(e))lt.call(e,r)&&He(o,r,e[r]);return o};const dt=ct({variant:"text.default",display:"inline-block",fontFamily:"body",p:t(4),pr:7,borderRadius:"default",width:"100%",maxWidth:"100%"},n("form.fields",{states:{active:!1,hover:!1,focus:!1}}));var st=Object.defineProperty,pt=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,qe=(o,e,r)=>e in o?st(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ge=(o,e)=>{for(var r in e||(e={}))bt.call(e,r)&&qe(o,r,e[r]);if(Xe)for(var r of Xe(e))ft.call(e,r)&&qe(o,r,e[r]);return o},mt=(o,e)=>pt(o,ut(e));const gt=Ge({variant:"text.default",height:"100%",padding:"4px",borderRadius:"default",border:"1px solid",width:"100%",transition:"background-color 100ms ease-out, color 100ms ease-out",overflow:"auto",option:mt(Ge({padding:2},ke()),{"&:checked":{backgroundColor:window.currentPalette.getColor(window.currentPalette.background.paper,"selected"),color:window.currentPalette.getContrastText(window.currentPalette.getColor(window.currentPalette.background.paper,"selected"))}}),"+ svg":{display:"none"}},n("form.fields",{states:{active:!1,hover:!1,focus:!1}})),yt={"+ span":{fontSize:14,fontWeight:"normal",wordBreak:"break-all"},backgroundColor:"form.fields.checked.borderColor"},ht={"&, & textarea":{height:"100%",minHeight:"130px",resize:"vertical"},textarea:{variant:"forms.input"}};var vt=Object.defineProperty,xt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Ve=(o,e,r)=>e in o?vt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ye=(o,e)=>{for(var r in e||(e={}))kt.call(e,r)&&Ve(o,r,e[r]);if(Ne)for(var r of Ne(e))Ct.call(e,r)&&Ve(o,r,e[r]);return o},Ot=(o,e)=>xt(o,wt(e));const $t={border:"1px solid",borderColor:"palette.border.field",display:"inline-block",position:"relative",pr:"45px",".deletableInput__input":{border:"none"},".deletableInput__deleteButton":Ye({height:"100%",outlineOffset:"-2px",position:"absolute",right:0,top:0,width:"45px"},n("buttons.deletableInputButton")),"&:focus-within:not(.asMaterial)":Ot(Ye({},j),{".deletableInput__input:focus":{outline:"none"},".deletableInput__deleteButton:focus":{outline:"none"}}),"&.asMaterial":{borderLeft:"none",borderRight:"none",borderTop:"none",borderBottomColor:"palette.border.section","& + .input__underline":{transform:"scale(1)"},".deletableInput__input:focus":{outline:"none","~.input__underline::after":{animationName:"growHorizontal",animationDuration:"150ms",animationTimingFunction:"ease-out",content:'""',display:"block",height:"0",outlineColor:"palette.primary.main",outlineStyle:"solid",outlineWidth:"1.5px",outlineOffset:0,position:"absolute",transformOrigin:"center center",left:0,right:0}}}},_t=()=>({checkbox:Rr,customCheckbox:Or,dateInput:zr,deletableInput:$t,iconInput:qr,input:Qr,label:Zr,radio:at,select:dt,selectMultiple:gt,switch:yt,textarea:ht,'input[type="date"]':{variant:"forms.input"}}),jt={overlay:{position:"fixed",overflow:"hidden",top:"0",right:"0",bottom:"0",left:"0",width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"palette.background.overlay",zIndex:"modal","&:not(.screenLock) .modal-enter-done":{boxShadow:"modals"}}},St={margin:"auto",display:"flex",flexDirection:"column",wordBreak:"break-word",overflow:"hidden",width:"100%",".handler__form":{display:"flex",flexDirection:"column",overflow:"hidden",gap:t(6),".toggleAccordionElement":{position:"sticky",top:0},".handler__form__elements":{display:"flex",flexDirection:"column",alignItems:"stretch",overflowY:"auto",maxHeight:"60vh",gap:t(3),pr:t(3)},".handler__form__elements__section__content":{display:"flex",flexDirection:"column",wordBreak:"break-word",background:"palette.background.paper",p:0,gap:t(3)},".content .handler__form__elements__section__content":{border:"1px solid",borderColor:"palette.border.section",borderTop:"none",p:t(6)},".handler__form__buttons":{display:"flex",flexDirection:"row",justifyContent:"center",p:0,gap:"0px",textAlign:"center"},".radio":{display:"flex",flexDirection:"column",flexWrap:"wrap",listStyle:"none",variant:"layout.execution.form.fields.radio"},".handler__checkbox, .handler__radio":{"label span":{fontWeight:"normal"}},".checkbox":{flexDirection:"row-reverse",alignItems:"center",justifyContent:"start",gap:t(4),".semicolon":{display:"none"},input:{width:"100%"}},".handler__hidden":{display:"none"},"label.select > div":{width:"100%"},".spacer":{height:t(7)}},".progressBox":{p:t(5),pt:t(0)}};var Pt=Object.defineProperty,Tt=Object.defineProperties,It=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Je=(o,e,r)=>e in o?Pt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,A=(o,e)=>{for(var r in e||(e={}))Rt.call(e,r)&&Je(o,r,e[r]);if(Ue)for(var r of Ue(e))Bt.call(e,r)&&Je(o,r,e[r]);return o},Ke=(o,e)=>Tt(o,It(e));const Wt=Ke(A({apiaApi:St},jt),{main:A({zIndex:"modal",display:"flex",flexDirection:"column",p:t(6),alignItems:"center",justifyItems:"center",maxHeight:"100vh",maxWidth:"calc(100vw - 10px)",resize:"both",overflow:"auto",border:"1px solid",gap:t(5),"&>div":{overflow:"hidden",flexGrow:0,flexShrink:0,p:"3px",width:"100%"},"&>div.modal__header":{alignItems:c({0:"end",4:"center"}),flexShrink:0,overflow:"visible",".modal__headerBar":{display:"flex",flexDirection:"row",alignItems:"center",gap:t(3)}},"&>div.modal__content, &>div.modal__content>form":{overflow:"auto",width:"100%",flexBasis:"100%",flexShrink:1,display:"flex",justifyContent:"stretch",alignItems:"stretch"}},h("modal")),finder:{variant:"layout.common.modals.main",height:c({0:"100vh",3:"80vh"}),width:c({0:"95vw",3:"80vw",4:"70vw"}),".modal__content":{p:t(2),overflow:"hidden",".confirm__content":{overflow:"hidden",".finder__content":{display:"flex",alignItems:"stretch"},".selection__keyHandler":{overflow:"hidden",height:"100%",".responsiveTable__wrapper":{height:"100%",border:"1px solid",borderColor:"palette.border.article",backgroundColor:"palette.gray.900"}}}}},sm:{variant:"layout.common.modals.main",maxWidth:"min(350px, calc(100vw - 10px))"},md:{variant:"layout.common.modals.main",maxWidth:"min(500px, calc(100vw - 10px))"},"md-fixed":{variant:"layout.common.modals.main",width:"min(500px, calc(100vw - 10px))",maxHeight:c({0:"95vh",2:"80vh"})},lg:{variant:"layout.common.modals.main",maxWidth:"min(640px, calc(100vw - 10px))"},"lg-fixed":{variant:"layout.common.modals.main",width:"640px",height:"60vh"},xl:{variant:"layout.common.modals.main",maxWidth:"min(730px, calc(100vw - 10px))"},"xl-fixed":{variant:"layout.common.modals.main",width:c({0:"95vw",2:"60vw"}),height:c({0:"95vh",2:"80vh"})},xxl:{variant:"layout.common.modals.main",width:c({0:"95vw",2:"80vw"}),maxHeight:c({0:"95vh",2:"80vh"})},"xxl-fixed":{variant:"layout.common.modals.main",width:c({0:"95vw",2:"80vw"}),height:c({0:"95vh",2:"80vh"})},xxxl:{variant:"layout.common.modals.main",width:c({0:"95vw",2:"95vw"}),maxHeight:c({0:"95vh",2:"95vh"})},"xxxl-fixed":{variant:"layout.common.modals.main",width:c({0:"95vw",2:"95vw"}),height:c({0:"95vh",2:"95vh"})},flex:{variant:"layout.common.modals.main",maxWidth:"95vw",maxHeight:"95vh",".modal__content":{p:t(2),overflow:"auto"}},cal:{variant:"layout.common.modals.sm",width:"350px",".react-calendar":{backgroundColor:"palette.background.paper",button:Ke(A({},n("form.fields")),{"&.react-calendar__tile--active":A({},n("buttons.primary"))})}},editGrid:{variant:"layout.common.modals.main",width:"root",maxHeight:"90vh"}});var Dt=Object.defineProperty,Et=Object.defineProperties,At=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,zt=Object.prototype.propertyIsEnumerable,Ze=(o,e,r)=>e in o?Dt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,N=(o,e)=>{for(var r in e||(e={}))Ft.call(e,r)&&Ze(o,r,e[r]);if(Qe)for(var r of Qe(e))zt.call(e,r)&&Ze(o,r,e[r]);return o},eo=(o,e)=>Et(o,At(e));function Mt(){return{'td[data-focused="false"], th[data-focused="false"]':{"*:focus-visible, &:focus, &:focus-visible":{outline:"none"},"*:focus":N({},L)},'[data-focused="true"]:not(.row__separator__cell)':{'&:not([data-editionmode="true"])':{"&:focus, & > *:focus, *:focus-visible":eo(N({},L),{"&.cell__download__document":{outlineOffset:0}})},'&[data-editionmode="true"]':{"&:focus, *:focus, *:focus-visible":eo(N({},L),{outlineStyle:"dotted",outlineWidth:"6px",outlineOffset:"-4px"})}},'[data-focused="true"].row__separator__cell':{backgroundColor:"palette.secondary.main",outline:"none"}}}const oo=({children:o,customTheme:e})=>{const r=go(e);return x(U,{theme:r,children:o})};var Lt=Object.defineProperty,Ht=Object.defineProperties,Xt=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,to=(o,e,r)=>e in o?Lt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,V=(o,e)=>{for(var r in e||(e={}))qt.call(e,r)&&to(o,r,e[r]);if(ro)for(var r of ro(e))Gt.call(e,r)&&to(o,r,e[r]);return o},Nt=(o,e)=>Ht(o,Xt(e));function Vt(o,e,r,i,u=!1){const l=M({},e,r);return Object.assign(b=>{const y=Po(0);return u?x(oo,{customTheme:l,children:x(ao,{avoidFirstRender:y,children:x(K,{children:x(i,V({},b))})})}):x(oo,{customTheme:l,children:x(ao,{avoidFirstRender:y,children:x(J,Nt(V({className:"variant__holder"},H(e)),{children:x(K,{children:x(i,V({},b))})}))})})},{displayName:o})}const ao=({avoidFirstRender:o,children:e})=>(o.current++,o.current<=1?null:x(So,{children:e}));function Yt(o,e){const r=typeof o=="string"?o:"",i=typeof o=="string"?e:o;F.emit("newStyles",{path:r,styles:i})}var Ut=Object.defineProperty,Jt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,no=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Zt=Object.prototype.propertyIsEnumerable,io=(o,e,r)=>e in o?Ut(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,B=(o,e)=>{for(var r in e||(e={}))Qt.call(e,r)&&io(o,r,e[r]);if(no)for(var r of no(e))Zt.call(e,r)&&io(o,r,e[r]);return o},W=(o,e)=>Jt(o,Kt(e));const ea=W(B({variant:"colors.tables.primary",backgroundColor:"components.primaryTable.body.backgroundColor",border:"1px solid",borderColor:"components.primaryTable.borderColor",borderCollapse:"separate",borderSpacing:0,tableLayout:"fixed",thead:W(B({},h("tables.primary.thead")),{zIndex:1,position:"sticky",insetBlockStart:0,"tr:not(.filtersRow):not(.responsiveTable__filters__row)":{"th, td":W(B({variant:"buttons.primary",py:c({0:3,4:4}),px:c({0:3,4:4}),width:"breakWidth",borderRadius:0,borderStyle:"solid",borderWidth:"1px",display:"table-cell",verticalAlign:"center",wordBreak:"break-word",'&[role="presentation"]':{display:"none"}},n("components.primaryTable.header")),{"& *":{color:"inherit"},"&:last-of-type:not(td)":{maxWidth:"100%",width:"100%"},".headButton__label":{textAlign:"left"},".headButton__resizer":{width:"20px",cursor:"ew-resize",zIndex:1e3,position:"absolute",right:"-10px",height:"100%"},"&:last-of-type .headButton__resizer":{right:"0px"},"&.additionalColumn":{minWidth:"50px",maxWidth:"50px",width:"50px",p:0,textAlign:"center",verticalAlign:"center"},".headButton__container":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:3,svg:{flexShrink:0}},"&>div":{color:"components.primaryTable.header.color",svg:{color:"components.primaryTable.body.color"}},"&:not(:last-of-type)":{"&>div":{borderRightWidth:"1px"}}}),"th.requiredFilterColumn":{borderLeft:"4px solid !important",borderLeftColor:"palette.error.main !important"}},"tr.filtersRow, tr.responsiveTable__filters__row":{backgroundColor:"components.primaryTable.body.backgroundColor","th.noFilter":{background:"transparent"},"td.requiredFilter__Border":{borderLeftStyle:"solid !important",borderLeftWidth:"4px !important",borderLeftColor:"palette.error.main"},td:{"input:not([disabled]), select:not([disabled])":{border:"1px solid white"},background:"transparent",border:"1px solid",borderColor:"components.primaryTable.body.borderColor",p:0},transition:"height 0.3s","&.hidden":{height:"0",overflow:"hidden",p:t(0),border:"none","& *":{height:"0",overflow:"hidden",fontSize:0,lineHeight:0,p:t(0),border:"none"}}}}),tbody:{tr:W(B(W(B({borderBottomWidth:"1px",borderBottomStyle:"solid"},n("components.primaryTable.body",{states:{disabled:!1,readonly:!1,active:!1,hover:!1,checked:!1,focus:!1,selected:!1}})),{"&:nth-of-type(2n)":{backgroundColor:"components.primaryTable.body.evenRowsBackgroundColor"},"&.non-selectable":{cursor:"not-allowed"},"&.hidden":{display:"none"},"&.locked":{background:"palette.gray.900",td:{borderColor:"palette.gray.850"}}}),ke()),{"&.draggingRow":{outline:"3px dotted",outlineColor:"components.primaryTable.header.borderColor",outlineOffset:"-3px","*":{outline:"none !important"}},borderColor:"components.primaryTable.body.borderColor",".rowStatesList":{display:"flex",gap:t(3),alignItems:"center",svg:{width:"smallIcon",height:"smallIcon",cursor:"pointer"}},td:{verticalAlign:"top",wordBreak:"break-word",border:"1px solid",borderColor:"components.primaryTable.body.borderColor","&.stickyColumn":{position:"sticky",left:0,backgroundColor:"components.primaryTable.body.backgroundColor"},".moreInformationButton":{width:"30px",height:"30px",padding:"3px",border:"none",background:"transparent"}}}),td:{p:t(3)},".responsiveTable__additionalInfoContainer":{display:"grid",gridTemplateColumns:c({0:"repeat(2, 1fr)",5:"repeat(4, 1fr)"}),columnGap:3,rowGap:2},".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator":{gridColumnStart:"1",gridColumnEnd:"5",borderBottom:"1px solid",borderBottomColor:"palette.gray.700",height:"auto"}},".editionMode":{border:"3px solid",borderColor:"components.primaryTable.header.borderColor",borderWidth:"1.5px",borderStyle:"dotted"},".stateCell":{width:"50px",maxWidth:"50px",minWidth:"50px",textAlign:"center",verticalAlign:"middle"}},Mt()),{".no__registers":{py:6,minWidth:"200px"},".requiredFilter__Column":{fontWeight:"bold"},".bold":{fontWeight:"bold"},".light":{color:"#6a6a6a"},".additionalInfo__cell, .stateCell":{verticalAlign:"middle"}}),oa={width:"100%",border:"1px solid",borderColor:"primary",borderCollapse:"collapse",thead:{tr:{th:{bg:"primary",color:"white",textAlign:"center",fontWeight:"bold",p:t(4)}}},tbody:{tr:{"td,th":{borderColor:"muted",p:t(4)},"&:not(tr:last-of-type)":{"td,th":{borderBottom:"1px solid"}},"td:not(td:last-child),th:not(th:last-child)":{borderRight:"1px solid"},th:{textAlign:"left",whiteSpace:"nowrap",minWidth:"min-content",width:0}}}},ra={display:"flex",flexDirection:"column",gap:t(2),".responsiveTable__accordionElement__toggler":{variant:"buttons.outline",borderWidth:"1px",display:"flex",gap:t(3),alignItems:"stretch",width:"100%",px:4,py:3,"&:hover h3":{color:"palette.primary.contrastText"},".accordionElement__toggler__checkbox":{flexShrink:0,m:t(2)},".accordionElement__toggler__button":{flexGrow:100,display:"flex",justifyContent:"space-between",py:2,pr:t(2),alignItems:"center",".accordionElement__toggler__label":{flexGrow:100,m:t(0),textAlign:"left",fontSize:16},".accordionElement__toggler__expandIcon":{flexShrink:0,svg:{width:"32px"}}}},".responsiveTable__accordionElement__content":{"& > div":{backgroundColor:"palette.background.paper",transition:"padding-bottom 300ms, padding-top 300ms",px:5},"&.rah-static--height-zero":{"& > div":{py:0}},"&.rah-static--height-auto, &.rah-animating--down":{"& > div":{py:5}},".priority_container":{display:"flex",alignItems:"center"},".priority":{display:"flex"}}},ta={border:"2px solid",borderColor:"printView.list.table.borderColor","td, th":{p:3,textAlign:"left"}},aa={maxHeight:"100%",overflow:"auto",position:"relative",table:{width:"100%"},"&.isLoading":{overflow:"hidden"},".responsiveTable__isLoading":{position:"absolute",top:0,left:0,right:0,bottom:0,background:f(window.currentPalette.background.paper).setAlpha(.7).toRgbString(),zIndex:1,display:"flex",alignItems:"center",justifyContent:"center"},".cell__download__document":{display:"flex",gap:3,alignItems:"center",justifyContent:"start","&, *":{color:"palette.primary.main"},svg:{flexShrink:0}}};var na=Object.defineProperty,lo=Object.getOwnPropertySymbols,ia=Object.prototype.hasOwnProperty,la=Object.prototype.propertyIsEnumerable,co=(o,e,r)=>e in o?na(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,so=(o,e)=>{for(var r in e||(e={}))ia.call(e,r)&&co(o,r,e[r]);if(lo)for(var r of lo(e))la.call(e,r)&&co(o,r,e[r]);return o};const ca={variant:"layout.common.tables.primary",borderColor:"components.secondaryTable.borderColor","& thead":{"tr:not(.filtersRow):not(.responsiveTable__filters__row)":{"& th, & td":()=>so({},n("components.secondaryTable.header"))}},"& tbody":{tr:so({"&:nth-of-type(2n)":{backgroundColor:"components.secondaryTable.body.evenRowsBackgroundColor"},td:{borderColor:"components.secondaryTable.body.borderColor"},'&[aria-selected="true"]':{backgroundColor:"components.secondaryTable.body.selectedRows.backgroundColor","& td":{borderColor:"components.secondaryTable.body.selectedRows.borderColor"},color:"components.secondaryTable.body.selectedRows.color"},borderBottomWidth:"1px",borderBottomStyle:"solid"},n("components.secondaryTable.body",{states:{disabled:!1,readonly:!1,active:!1,hover:!1,checked:!1,focus:!1,selected:!1}}))}},da={accordion:ra,information:oa,primary:ea,print:ta,responsive:aa,secondary:ca},sa={display:"flex",flexDirection:"column",gap:t(2),".captcha__imageContainer":{border:"1px solid",borderColor:"palette.border.field",p:t(4)},".captcha__inputContainer":{display:"flex",gap:t(2),justifyContent:"stretch",input:{flexGrow:1,width:"100%"},".captcha__buttons":{width:"24px",flexDirection:"column",display:"flex",gap:t(2),flexShrink:0,button:{width:"24px",height:"24px",p:"5px",variant:"buttons.icon-outline",svg:{color:"palette.text.primary",height:"16px",width:"16px"}}}}},pa={captcha:sa};var ua=Object.defineProperty,po=Object.getOwnPropertySymbols,ba=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable,uo=(o,e,r)=>e in o?ua(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,ma=(o,e)=>{for(var r in e||(e={}))ba.call(e,r)&&uo(o,r,e[r]);if(po)for(var r of po(e))fa.call(e,r)&&uo(o,r,e[r]);return o};const ga={position:"relative",'[role="tree"]:focus':{outline:"none",".focus":j},ul:{listStyle:"none",p:0},".tree__searchLabelBox":{alignItems:"center",borderRadius:"2px",display:"flex",float:"right",gap:t(3),justifyContent:"center",position:"sticky",right:"4px",top:"4px",transform:"translateX(0)",width:"100%",zIndex:"stickyElements",".tree__loading":{position:"fixed",top:0,right:"4px",height:"iconMd",width:"iconMd",background:"palette.background.paper"},button:{cursor:"pointer"}},".tree__searchLabel":ma({alignItems:"center",display:"flex",gap:t(3),justifyContent:"center",position:"fixed",p:"2px 5px",right:0,top:0},p({backgroundColor:"palette.background.paper"},"selected")),'[role="treeitem"]':{'&[aria-expanded="false"] ul':{display:"none"},'&[aria-selected="true"] > .tree__nodeItemLabel':p({backgroundColor:"palette.background.paper"},"selected"),background:"transparent"},".tree__nodeItemLabel":{display:"flex",flexWrap:"nowrap",gap:3,alignItems:"center",wordBreak:"break-all",".button__content":{textAlign:"left"},"& > *:not(.tree__nodeItemLabelRenderer)":{flexShrink:0,textAlign:"left"},"&:hover":p({backgroundColor:"palette.background.paper"},"hover")},".spacer":{borderLeft:"1px solid",borderLeftColor:"palette.border.section",width:"20px",alignSelf:"stretch"}},ya={primary:ga},ha={forms:pa,modals:Wt,tables:da,trees:ya},va={"@keyframes growHorizontal":{from:{transform:"scaleX(0)"},to:{transform:"scaleY(100%)"}},".hamburguerMenu":{display:"none"},".hamburguerMenu-enter,\n.hamburguerMenu-appear":{display:"block",transform:"scale(0.7)",opacity:0},".hamburguerMenu-enter-active,\n.hamburguerMenu-appear-active":{transform:"translateX(0)",transition:"opacity 150ms, transform 150ms",transformOrigin:"right top",opacity:1},".hamburguerMenu-enter-done,\n.hamburguerMenu-appear-done":{display:"block"},".hamburguerMenu-exit":{display:"block",transform:"scale(1)",opacity:1},".hamburguerMenu-exit-active":{transform:"scale(0.7) translateX(0)",transition:"opacity 150ms, transform 150ms",display:"block",opacity:0,transformOrigin:"right top"},".hamburguerMenu-exit-done":{display:"none"},".modal-enter,\n.modal-appear":{opacity:0,transform:"scale(0.8)"},".modal-enter-active,\n.modal-appear-active":{opacity:1,transform:"translateX(0)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"},".modal-exit":{opacity:0},".modal-exit-done":{opacity:0,display:"none"},".modal-exit-active":{opacity:0,transform:"scale(100)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"},".overlayAnimation-enter .overlayAnimation:not(.not-released),\n.overlayAnimation-appear .overlayAnimation:not(.not-released)":{opacity:0},".overlayAnimation-enter-active .overlayAnimation:not(.not-released),\n.overlayAnimation-appear-active .overlayAnimation:not(.not-released)":{opacity:1,transition:"opacity 150ms"},".overlayAnimation-exit":{opacity:1},".overlayAnimation-exit-active":{opacity:0,transition:"opacity 150ms"},".fromRight-enter,\n.fromRight-appear":{transform:"translateX(550px)"},".fromRight-enter-active,\n.fromRight-appear-active":{transition:"transform 150ms",transform:"translateX(0)"},".fromRight-exit":{transform:"translateX(0)"},".fromRight-exit-active":{transition:"transform 150ms",transform:"translateX(550px)"},".notification-enter,\n.notification-appear":{opacity:0,transform:"scale(0.8)"},".notification-enter-active,\n.notification-appear-active":{opacity:1,transform:"translateX(0)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"},".notification-exit":{opacity:1},".notification-exit-active":{opacity:0,transform:"scale(0.8)",transition:"opacity 150ms, transform 150ms",transitionDelay:"0"}};var xa=Object.defineProperty,bo=Object.getOwnPropertySymbols,wa=Object.prototype.hasOwnProperty,ka=Object.prototype.propertyIsEnumerable,fo=(o,e,r)=>e in o?xa(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Y=(o,e)=>{for(var r in e||(e={}))wa.call(e,r)&&fo(o,r,e[r]);if(bo)for(var r of bo(e))ka.call(e,r)&&fo(o,r,e[r]);return o};const mo=Y({"*":{fontFamily:"body",fontWeight:"body",code:{fontFamily:"monospace"},"&:focus":j},body:{minHeight:"100vh"},h1:{fontSize:c({0:26,3:32})},h2:{fontSize:c({0:22,3:28})},h3:{fontSize:c({0:19,3:25})},h4:{fontSize:c({0:18,3:22})},h5:{fontSize:c({0:18,3:22})},h6:{fontSize:c({0:17,3:17})},"h1,h2,h3,h4,h5,h6":{letterSpacing:"heading",lineHeight:"heading",variant:"text.title"},"*:not(h1, h2, h3, h4, h5, h6, code)":{fontFamily:"body",fontSize:16,fontWeight:"body",letterSpacing:"body",lineHeight:"body"},a:{textDecoration:"underline"},"textarea,a":{transition:"color 200ms ease-out",":focus":Y({},j),":focus-visible":Y({},j)},"*:focus":j,ul:{listStyle:"none",listStyleType:"none",margin:0,padding:0},abbr:{"&.required":{textDecoration:"none",border:"none",mx:1,alignSelf:"baseline",fontWeight:"bold",color:"danger"}},table:{borderCollapse:"separate",borderSpacing:0},"& label":{display:"flex","& > span":{mb:t(1),fontWeight:"bold"},"&.required":{position:"relative","&::before":{color:"danger",position:"absolute",content:'"*"',top:0,left:"-10px"},"*:invalid":{borderColor:"danger"}}},".bold":{fontWeight:"bold"}},va),Ca={common:ha,root:mo},Oa={default:{color:"palette.text.primary",fontFamily:"body",fontWeight:"body",fontSize:16,m:t(0),width:"100%"},title:{letterSpacing:"heading",wordBreak:"normal",color:"title",fontFamily:"heading",lineHeight:"heading",fontWeight:"heading"}},$a={alerts:br,breakpoints:["0px","250px","500px","700px","1000px","1260px","1580px"],buttons:vr,colors:dr(),fonts:{body:"Arial",heading:"inherit",monospace:"Menlo, monospace"},fontSizes:Array(60).fill(1).map((o,e)=>e),forms:_t(),layout:Ca,lineHeights:{body:1.5,heading:1.125},letterSpacings:{body:"0.01em",heading:"-0.015em"},radii:{alerts:0,buttons:0,default:0},shadows:{modals:"",tabs:""},space:[0,2,4,8,12,16,24,32,40,48,64,80,96,112,128],sizes:{applicationMenu:"350px",floatingNotifications:"min(550px, calc(100vw - 30px))",root:"992px",mainImage:"64px",twoColumns:"calc(992px + 350px)",twoColumnsCentered:"calc(992px + 350px + 16px)",iconXs:"12px",iconSm:"16px",iconMd:"22px",iconLg:"32px",iconXl:"48px"},text:Oa,zIndices:{stickyElements:600,menu:1e3,maximizedTables:1100,modal:1200,tooltip:1400,notifications:1600,contextMenu:1800},styles:{root:mo},useRootStyles:!0},_a=o=>o;let ja={};new class extends Q{};function go(o){return _a(O($a,{layout:ja},o??{}))}var Sa=Object.defineProperty,yo=Object.getOwnPropertySymbols,Pa=Object.prototype.hasOwnProperty,Ta=Object.prototype.propertyIsEnumerable,ho=(o,e,r)=>e in o?Sa(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,vo=(o,e)=>{for(var r in e||(e={}))Pa.call(e,r)&&ho(o,r,e[r]);if(yo)for(var r of yo(e))Ta.call(e,r)&&ho(o,r,e[r]);return o};const xo={},F=new class extends Q{};function wo(o){xo[o.path]=o.styles}F.on("newStyles",wo);function ko(o){const[e,r]=To(go(o));return Bo(()=>(r(i=>{F.off("newStyles",wo);let u=vo({},i);return Object.entries(xo).forEach(([l,b])=>{const y=M({},l,b);u=O(u,y)}),u}),F.on("newStyles",i=>{const u=M({},i.path,i.styles);r(l=>O(vo({},l),u))}))),e}var Ia=Object.defineProperty,Ra=Object.defineProperties,Ba=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,Da=Object.prototype.propertyIsEnumerable,Oo=(o,e,r)=>e in o?Ia(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ea=(o,e)=>{for(var r in e||(e={}))Wa.call(e,r)&&Oo(o,r,e[r]);if(Co)for(var r of Co(e))Da.call(e,r)&&Oo(o,r,e[r]);return o},Aa=(o,e)=>Ra(o,Ba(e));let $o=-1;function Fa(o){clearTimeout($o),$o=setTimeout(()=>{console.info({theme:o})},100)}const _o=Io({}),za=({children:o,customTheme:e})=>{const r=ko(e);return Fa(r),x(_o.Provider,{value:r,children:x(U,{theme:r,children:x(J,Aa(Ea({},H("layout.root")),{children:o}))})})};export{za as ThemeProvider,_o as ThemeProviderContext,ie as applyStates,E as applyStatesGetColor,I as buildColorsObject,j as focusOutline,p as getColorState,pe as getColorStates,er as getColorsAndStatesByDefinition,n as getColorsAndStatesByPath,ge as getColorsByDefinition,h as getColorsByPath,ue as getOneColorState,R as getPalette,H as getVariant,Yt as injectStyles,Vt as makeStyledComponent,be as parsePalette,c as responsive,C as smallButton,t as spacing,ko as useMainTheme};
1
+ import tinycolor from 'tinycolor2';
2
+ import { cloneDeep, merge } from 'lodash';
3
+ import { ThemeUIProvider, useThemeUI, Box, ThemeProvider } from 'theme-ui';
4
+ export { Alert, AspectImage, AspectRatio, Avatar, Badge, BaseStyles, Box, Button, Card, Checkbox, Close, CloseIcon, Container, Divider, Donut, Embed, Flex, Global, Grid, Heading, IconButton, Image, InitializeColorMode, Input, Label, Link, MenuButton, MenuIcon, Message, NavLink, Paragraph, Progress, Radio, Select, Slider, Spinner, Switch, Text, Textarea, createElement, css, get, jsx, merge, useColorMode, useThemeUI } from 'theme-ui';
5
+ export * from '@theme-ui/match-media';
6
+ import { EventEmitter, useMount, setValueByPath } from '@apia/util';
7
+ import { useState, useRef, useMemo, Suspense } from 'react';
8
+ import { jsx, Fragment } from 'react/jsx-runtime';
9
+
10
+ function defaultLighten(color, ratio) {
11
+ return tinycolor(color).lighten(ratio != null ? ratio : 20).toRgbString();
12
+ }
13
+ function defaultDarken(color, ratio) {
14
+ return tinycolor(color).darken(ratio != null ? ratio : 20).toRgbString();
15
+ }
16
+ function defaultGetContrastText(color) {
17
+ const current = tinycolor(color);
18
+ return tinycolor.readability("white", current) < tinycolor.readability("black", current) ? "black" : "white";
19
+ }
20
+ function getValueByPath(obj, path, separator = ".") {
21
+ const actualPath = typeof path === "string" ? path.split(separator) : path;
22
+ if (typeof obj !== "object" || !obj) {
23
+ if (actualPath.length === 0)
24
+ return obj;
25
+ return void 0;
26
+ }
27
+ const currentStep = actualPath.shift();
28
+ if (actualPath.length === 0)
29
+ return obj[currentStep];
30
+ return getValueByPath(
31
+ obj[currentStep],
32
+ actualPath,
33
+ separator
34
+ );
35
+ }
36
+
37
+ var __defProp$p = Object.defineProperty;
38
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
39
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
40
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
41
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
42
+ var __spreadValues$p = (a, b) => {
43
+ for (var prop in b || (b = {}))
44
+ if (__hasOwnProp$p.call(b, prop))
45
+ __defNormalProp$p(a, prop, b[prop]);
46
+ if (__getOwnPropSymbols$p)
47
+ for (var prop of __getOwnPropSymbols$p(b)) {
48
+ if (__propIsEnum$p.call(b, prop))
49
+ __defNormalProp$p(a, prop, b[prop]);
50
+ }
51
+ return a;
52
+ };
53
+ const getColorState = (definition, state, theme) => {
54
+ var _a, _b, _c, _d;
55
+ if (typeof state !== "string") {
56
+ console.log("getColorState", { definition, state, theme });
57
+ }
58
+ if (state === "default")
59
+ return theme.palette.buildColorsObject(definition);
60
+ const palette = theme.palette;
61
+ const opacity = palette.action[`${state}Opacity`];
62
+ const actualState = state === "checked" ? "selected" : state;
63
+ definition = Object.fromEntries(
64
+ Object.entries(definition).map(([name, value]) => {
65
+ if ([
66
+ "backgroundColor",
67
+ "borderColor",
68
+ "borderLeftColor",
69
+ "borderRightColor",
70
+ "borderBottomColor",
71
+ "borderTopColor",
72
+ "color"
73
+ ].includes(name) && (value != null ? value : "").startsWith("palette"))
74
+ value = getValueByPath(
75
+ palette,
76
+ value.slice("palette.".length)
77
+ );
78
+ return [name, value];
79
+ })
80
+ );
81
+ const calculatedBackgroundColor = tinycolor.mix(
82
+ (_a = definition.backgroundColor) != null ? _a : "",
83
+ tinycolor((_b = definition.backgroundColor) != null ? _b : "").isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
84
+ 100 * opacity
85
+ ).toRgbString();
86
+ return theme.palette.buildColorsObject(__spreadValues$p(__spreadValues$p({}, definition.backgroundColor ? {
87
+ backgroundColor: state === "checked" ? (_c = definition.backgroundColor) != null ? _c : "" : calculatedBackgroundColor,
88
+ color: state === "checked" ? tinycolor.mix(
89
+ tinycolor((_d = definition.color) != null ? _d : "black"),
90
+ tinycolor(palette.action.selected.dark),
91
+ 100 * palette.action.selectedOpacity
92
+ ).toRgbString() : theme.palette.getContrastText(calculatedBackgroundColor)
93
+ } : null), definition.borderColor ? {
94
+ borderColor: tinycolor.mix(
95
+ definition.borderColor,
96
+ tinycolor(definition.borderColor).isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
97
+ 100 * opacity
98
+ ).toRgbString()
99
+ } : null));
100
+ };
101
+
102
+ const applyStatesGetColor = (definition, theme, states) => {
103
+ const newStates = (states == null ? void 0 : states.default) !== false ? cloneDeep(definition) : {};
104
+ newStates.path = { fill: definition.color };
105
+ if ((states == null ? void 0 : states.active) !== false) {
106
+ newStates.active = getColorState(definition, "active", theme);
107
+ }
108
+ if ((states == null ? void 0 : states.disabled) !== false) {
109
+ newStates.disabled = getColorState(definition, "disabled", theme);
110
+ }
111
+ if ((states == null ? void 0 : states.focus) !== false) {
112
+ newStates.focus = getColorState(definition, "focus", theme);
113
+ }
114
+ if ((states == null ? void 0 : states.hover) !== false) {
115
+ newStates.hover = getColorState(definition, "hover", theme);
116
+ }
117
+ if ((states == null ? void 0 : states.readonly) !== false) {
118
+ newStates.readonly = getColorState(definition, "readonly", theme);
119
+ }
120
+ if ((states == null ? void 0 : states.selected) !== false) {
121
+ newStates.selected = getColorState(definition, "selected", theme);
122
+ }
123
+ if ((states == null ? void 0 : states.checked) !== false) {
124
+ newStates.checked = getColorState(definition, "checked", theme);
125
+ }
126
+ return newStates;
127
+ };
128
+
129
+ function applyStates(properties, theme, states) {
130
+ var _a;
131
+ (_a = properties.forEach) == null ? void 0 : _a.call(properties, (def) => {
132
+ Object.entries(def).forEach(([key, value]) => {
133
+ if (typeof value === "string")
134
+ return;
135
+ const definition = value;
136
+ if (typeof definition !== "string" && !definition.preventParse) {
137
+ if (!definition.active)
138
+ definition.active = {};
139
+ if (!definition.checked)
140
+ definition.checked = {};
141
+ if (!definition.focus)
142
+ definition.focus = {};
143
+ if (!definition.disabled)
144
+ definition.disabled = {};
145
+ if (!definition.hover)
146
+ definition.hover = {};
147
+ if (!definition.selected)
148
+ definition.selected = {};
149
+ const newDefinition = applyStatesGetColor(definition, theme, states);
150
+ def[key] = merge(newDefinition, definition);
151
+ }
152
+ });
153
+ });
154
+ }
155
+
156
+ function isColorDefinition(value) {
157
+ return !!value && typeof value === "object" && "main" in value;
158
+ }
159
+
160
+ const actions = { dark: "#cce5ff", light: "#557" };
161
+ const spacingArray = Array(50).fill(1).map((_, i) => {
162
+ return responsive$1({
163
+ 0: Math.ceil(i / 2.5),
164
+ 1: Math.ceil(i / 2.1),
165
+ 2: Math.ceil(i / 1.7),
166
+ 3: Math.ceil(i / 1.3),
167
+ 4: i
168
+ });
169
+ });
170
+ const defaultPalette = {
171
+ action: {
172
+ disabled: "#d9d9d9",
173
+ disabledOpacity: 1,
174
+ active: actions,
175
+ activeOpacity: 0.45,
176
+ focus: actions,
177
+ focusOpacity: 0.05,
178
+ hover: actions,
179
+ hoverOpacity: 0.1,
180
+ readonly: actions,
181
+ readonlyOpacity: 0.4,
182
+ selected: "rgb(204 214 222)",
183
+ selectedOpacity: 1
184
+ },
185
+ background: {
186
+ default: "#f4f4f4",
187
+ overlay: "rgba(0, 0, 0, 0.2)",
188
+ paper: "white"
189
+ },
190
+ border: {
191
+ article: "#cacaca",
192
+ field: "#444",
193
+ section: "#aaa"
194
+ },
195
+ common: {
196
+ black: "black",
197
+ white: "white"
198
+ },
199
+ info: {
200
+ main: "#fff"
201
+ },
202
+ primary: {
203
+ main: "#00496c"
204
+ },
205
+ secondary: {
206
+ main: "#6c757d"
207
+ },
208
+ spacing: (index) => {
209
+ return spacingArray[index];
210
+ },
211
+ text: {
212
+ accent: "#609",
213
+ disabled: "#555",
214
+ icon: "white",
215
+ link: "#00496c",
216
+ primary: "#4a4a4a",
217
+ secondary: "white",
218
+ title: "#00496c"
219
+ },
220
+ error: {
221
+ main: "rgb(187,12,15)",
222
+ light: "#fff2f4"
223
+ },
224
+ success: {
225
+ main: "#8bde8b",
226
+ light: "#e7ffd9"
227
+ },
228
+ warning: {
229
+ main: "#f8f588",
230
+ light: "#fffdd9"
231
+ },
232
+ darkenRatio: 15,
233
+ lightenRatio: 35,
234
+ responsive: responsive$1,
235
+ queryColumnsMultiplier: 2
236
+ };
237
+
238
+ function responsive$1(values) {
239
+ var _a;
240
+ const returnArray = [];
241
+ const max = 6;
242
+ for (let i = 0; i <= max; i++)
243
+ returnArray[i + 1] = (_a = values[i]) != null ? _a : null;
244
+ if (values.print)
245
+ returnArray[0] = values.print;
246
+ else {
247
+ for (let i = 5; i >= 0; i--) {
248
+ if (values[i] !== void 0)
249
+ returnArray[0] = values[i];
250
+ }
251
+ }
252
+ return returnArray;
253
+ }
254
+ function spacing(index) {
255
+ var _a;
256
+ return (_a = defaultPalette.spacing(index)) != null ? _a : index;
257
+ }
258
+ const smallButton = {
259
+ py: 2,
260
+ px: 4,
261
+ fontSize: "0.9em"
262
+ };
263
+ const focusOutline = {
264
+ outlineColor: "outlineColor",
265
+ outlineWidth: "3px",
266
+ outlineStyle: "solid",
267
+ outlineOffset: "-3px"
268
+ };
269
+ function getVariant(variant) {
270
+ return { variant, "data-variant": variant };
271
+ }
272
+
273
+ const buildStateObject = (props, state) => {
274
+ switch (state) {
275
+ case "active":
276
+ return {
277
+ "&:active": props,
278
+ "input[role]:active ~ &": props,
279
+ "input[role]:active ~ & path": props
280
+ };
281
+ case "checked":
282
+ return {
283
+ "&:checked": props,
284
+ "input[role]:checked ~ &": props,
285
+ "input[role]:checked ~ & path": props
286
+ };
287
+ case "disabled":
288
+ return {
289
+ "&:disabled": props,
290
+ "input[role]:disabled ~ &": props,
291
+ "input[role]:disabled ~ & path": props
292
+ };
293
+ case "focus": {
294
+ const focusObject = merge({}, focusOutline, props);
295
+ return {
296
+ "&:focus": focusObject,
297
+ "input[role]:focus ~ &": focusObject
298
+ };
299
+ }
300
+ case "hover": {
301
+ return {
302
+ '&:hover:not([readonly], :disabled,[aria-selected="true"],:active)': props,
303
+ 'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"])': props,
304
+ 'input[role]:hover:not([readonly], :active, :disabled) ~ &:not(:disabled,[aria-selected="true"]) path': props
305
+ };
306
+ }
307
+ case "readonly":
308
+ return {
309
+ "&[readonly]": props,
310
+ "input[role][readonly] ~ &": props,
311
+ "input[role][readonly] ~ & path": props,
312
+ "&.readonly input ~ &, &.readOnly input ~ &": props,
313
+ "&.readonly input ~ & path, &.readOnly input ~ & path": props,
314
+ "&.readonly, &.readOnly": props
315
+ };
316
+ case "selected":
317
+ return {
318
+ "&:selected": props,
319
+ "input[role]:selected ~ &": props,
320
+ "input[role]:selected ~ & path": props,
321
+ '&[aria-selected="true"]': props
322
+ };
323
+ default:
324
+ return props;
325
+ }
326
+ };
327
+
328
+ var __defProp$o = Object.defineProperty;
329
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
330
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
331
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
332
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
333
+ var __spreadValues$o = (a, b) => {
334
+ for (var prop in b || (b = {}))
335
+ if (__hasOwnProp$o.call(b, prop))
336
+ __defNormalProp$o(a, prop, b[prop]);
337
+ if (__getOwnPropSymbols$o)
338
+ for (var prop of __getOwnPropSymbols$o(b)) {
339
+ if (__propIsEnum$o.call(b, prop))
340
+ __defNormalProp$o(a, prop, b[prop]);
341
+ }
342
+ return a;
343
+ };
344
+ function buildColorsObject(definition) {
345
+ return __spreadValues$o(__spreadValues$o({}, definition), definition.borderColor ? {
346
+ borderLeftColor: definition.borderColor,
347
+ borderRightColor: definition.borderColor,
348
+ borderBottomColor: definition.borderColor,
349
+ borderTopColor: definition.borderColor
350
+ } : void 0);
351
+ }
352
+
353
+ function getColorsByPath(path, options) {
354
+ return merge(
355
+ buildColorsObject({
356
+ color: `${path}.color`,
357
+ backgroundColor: `${path}.backgroundColor`,
358
+ borderColor: `${path}.borderColor`
359
+ }),
360
+ options == null ? void 0 : options.mergeObject
361
+ );
362
+ }
363
+
364
+ var __defProp$n = Object.defineProperty;
365
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
366
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
367
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
368
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
369
+ var __spreadValues$n = (a, b) => {
370
+ for (var prop in b || (b = {}))
371
+ if (__hasOwnProp$n.call(b, prop))
372
+ __defNormalProp$n(a, prop, b[prop]);
373
+ if (__getOwnPropSymbols$n)
374
+ for (var prop of __getOwnPropSymbols$n(b)) {
375
+ if (__propIsEnum$n.call(b, prop))
376
+ __defNormalProp$n(a, prop, b[prop]);
377
+ }
378
+ return a;
379
+ };
380
+ function getColorsAndStatesByPath(incomingPath, options) {
381
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
382
+ const active = getColorsByPath(`${incomingPath}.active`, options);
383
+ const checked = getColorsByPath(`${incomingPath}.checked`, options);
384
+ const disabled = __spreadValues$n({
385
+ cursor: "not-allowed"
386
+ }, getColorsByPath(`${incomingPath}.disabled`, options));
387
+ const hover = getColorsByPath(`${incomingPath}.hover`, options);
388
+ const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) !== false ? getColorsByPath(`${incomingPath}.focus`, options) : {};
389
+ const readonly = __spreadValues$n({
390
+ cursor: "notAllowed"
391
+ }, getColorsByPath(`${incomingPath}.readonly`, options));
392
+ const selected = getColorsByPath(`${incomingPath}.selected`, options);
393
+ let path = {};
394
+ if ((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.path) {
395
+ path = { path: { fill: `${incomingPath}.color` } };
396
+ }
397
+ return merge(
398
+ __spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n({}, ((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.default) !== false ? getColorsByPath(incomingPath, options) : null), ((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.checked) !== false ? buildStateObject(checked, "checked") : null), buildStateObject(focus, "focus")), ((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.hover) !== false ? buildStateObject(hover, "hover") : null), ((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.selected) !== false ? buildStateObject(selected, "selected") : null), ((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.active) !== false ? buildStateObject(active, "active") : null), ((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.disabled) !== false ? buildStateObject(disabled, "disabled") : null), ((_i = options == null ? void 0 : options.states) == null ? void 0 : _i.readonly) !== false ? buildStateObject(readonly, "readonly") : null),
399
+ path,
400
+ options == null ? void 0 : options.mergeObject
401
+ );
402
+ }
403
+
404
+ var __defProp$m = Object.defineProperty;
405
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
406
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
407
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
408
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
409
+ var __spreadValues$m = (a, b) => {
410
+ for (var prop in b || (b = {}))
411
+ if (__hasOwnProp$m.call(b, prop))
412
+ __defNormalProp$m(a, prop, b[prop]);
413
+ if (__getOwnPropSymbols$m)
414
+ for (var prop of __getOwnPropSymbols$m(b)) {
415
+ if (__propIsEnum$m.call(b, prop))
416
+ __defNormalProp$m(a, prop, b[prop]);
417
+ }
418
+ return a;
419
+ };
420
+ const getColorStates = (definition, theme, states) => {
421
+ return __spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m(__spreadValues$m({}, (states == null ? void 0 : states.default) !== false ? definition : null), (states == null ? void 0 : states.checked) !== false ? buildStateObject(getColorState(definition, "checked", theme), "checked") : null), buildStateObject(getColorState(definition, "focus", theme), "focus")), (states == null ? void 0 : states.selected) !== false ? buildStateObject(
422
+ getColorState(definition, "selected", theme),
423
+ "selected"
424
+ ) : null), (states == null ? void 0 : states.hover) !== false ? buildStateObject(getColorState(definition, "hover", theme), "hover") : null), (states == null ? void 0 : states.active) !== false ? buildStateObject(getColorState(definition, "active", theme), "active") : null), (states == null ? void 0 : states.disabled) !== false ? buildStateObject(
425
+ getColorState(definition, "disabled", theme),
426
+ "disabled"
427
+ ) : null), (states == null ? void 0 : states.readonly) !== false ? buildStateObject(
428
+ getColorState(definition, "readonly", theme),
429
+ "readonly"
430
+ ) : null);
431
+ };
432
+
433
+ const getOneColorState = (color, state, theme) => {
434
+ if (typeof color !== "string")
435
+ return "";
436
+ if (state === "default")
437
+ return color;
438
+ const actualState = state === "checked" ? "selected" : state;
439
+ const palette = theme.palette;
440
+ const opacity = palette.action[`${state}Opacity`];
441
+ return tinycolor.mix(
442
+ color,
443
+ tinycolor(color).isLight() ? palette.action[actualState].light : palette.action[actualState].dark,
444
+ 100 * opacity
445
+ ).toRgbString();
446
+ };
447
+
448
+ var __defProp$l = Object.defineProperty;
449
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
450
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
451
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
452
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
453
+ var __spreadValues$l = (a, b) => {
454
+ for (var prop in b || (b = {}))
455
+ if (__hasOwnProp$l.call(b, prop))
456
+ __defNormalProp$l(a, prop, b[prop]);
457
+ if (__getOwnPropSymbols$l)
458
+ for (var prop of __getOwnPropSymbols$l(b)) {
459
+ if (__propIsEnum$l.call(b, prop))
460
+ __defNormalProp$l(a, prop, b[prop]);
461
+ }
462
+ return a;
463
+ };
464
+ function getColorsByDefinition(definition, options) {
465
+ return merge(
466
+ buildColorsObject(__spreadValues$l(__spreadValues$l(__spreadValues$l({}, definition.color ? { color: definition.color } : null), definition.backgroundColor ? { backgroundColor: definition.backgroundColor } : null), definition.borderColor ? {
467
+ borderColor: definition.borderColor
468
+ } : null)),
469
+ options == null ? void 0 : options.mergeObject
470
+ );
471
+ }
472
+
473
+ function getColorsAndStatesByDefinition(definition, theme, options) {
474
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
475
+ const active = getColorState(definition, "active", theme);
476
+ const checked = getColorState(definition, "checked", theme);
477
+ const disabled = getColorState(definition, "disabled", theme);
478
+ const focus = ((_a = options == null ? void 0 : options.states) == null ? void 0 : _a.focus) ? getColorState(definition, "focus", theme) : {};
479
+ const hover = getColorState(definition, "hover", theme);
480
+ const readonly = getColorState(definition, "readonly", theme);
481
+ const selected = getColorState(definition, "selected", theme);
482
+ return merge(
483
+ ((_b = options == null ? void 0 : options.states) == null ? void 0 : _b.default) !== false ? getColorsByDefinition(definition) : null,
484
+ ((_c = options == null ? void 0 : options.states) == null ? void 0 : _c.checked) !== false ? buildStateObject(checked, "checked") : {},
485
+ ((_d = options == null ? void 0 : options.states) == null ? void 0 : _d.focus) !== false ? buildStateObject(focus, "focus") : {},
486
+ ((_e = options == null ? void 0 : options.states) == null ? void 0 : _e.hover) !== false ? buildStateObject(hover, "hover") : {},
487
+ ((_f = options == null ? void 0 : options.states) == null ? void 0 : _f.active) !== false ? buildStateObject(active, "active") : {},
488
+ ((_g = options == null ? void 0 : options.states) == null ? void 0 : _g.selected) !== false ? buildStateObject(selected, "selected") : {},
489
+ ((_h = options == null ? void 0 : options.states) == null ? void 0 : _h.disabled) !== false ? buildStateObject(disabled, "disabled") : {},
490
+ ((_i = options == null ? void 0 : options.states) == null ? void 0 : _i.readonly) !== false ? buildStateObject(readonly, "readonly") : {},
491
+ options == null ? void 0 : options.mergeObject
492
+ );
493
+ }
494
+
495
+ function paletteFunction(callback) {
496
+ return (...args) => {
497
+ const firstParameter = args[0];
498
+ let isFirstParameterATheme = false;
499
+ const themeProps = [
500
+ "fontSizes",
501
+ "breakpoints",
502
+ "fonts",
503
+ "lineHeights",
504
+ "letterSpacings",
505
+ "radii",
506
+ "zIndices",
507
+ "useRootStyles"
508
+ ];
509
+ if (firstParameter instanceof Object && firstParameter !== null) {
510
+ const firstParameterKeys = Object.keys(firstParameter);
511
+ for (const key of firstParameterKeys) {
512
+ if (themeProps.includes(key)) {
513
+ isFirstParameterATheme = true;
514
+ break;
515
+ }
516
+ }
517
+ }
518
+ if (isFirstParameterATheme) ; else {
519
+ return callback(...args);
520
+ }
521
+ };
522
+ }
523
+ function parsePalette(palette, theme) {
524
+ var _a, _b, _c, _d, _e, _f, _g, _h;
525
+ const newPalette = cloneDeep(palette);
526
+ newPalette.lightenColor = paletteFunction(
527
+ (_a = palette.lightenColor) != null ? _a : (color, ratio) => {
528
+ return defaultLighten(color, ratio != null ? ratio : palette.lightenRatio);
529
+ }
530
+ );
531
+ newPalette.darkenColor = paletteFunction(
532
+ (_b = palette.darkenColor) != null ? _b : (color, ratio) => {
533
+ return defaultDarken(color, ratio != null ? ratio : palette.darkenRatio);
534
+ }
535
+ );
536
+ newPalette.getContrastText = paletteFunction(
537
+ (_c = palette.getContrastText) != null ? _c : defaultGetContrastText
538
+ );
539
+ Object.entries(palette).forEach(([key, value]) => {
540
+ var _a2, _b2, _c2;
541
+ const castedValue = value;
542
+ if (isColorDefinition(castedValue)) {
543
+ newPalette[key] = {
544
+ main: castedValue.main,
545
+ light: (_a2 = castedValue.light) != null ? _a2 : newPalette.lightenColor(castedValue.main),
546
+ dark: (_b2 = castedValue.dark) != null ? _b2 : newPalette.darkenColor(castedValue.main),
547
+ contrastText: (_c2 = castedValue.contrastText) != null ? _c2 : newPalette.getContrastText(castedValue.main)
548
+ };
549
+ } else {
550
+ newPalette[key] = value;
551
+ }
552
+ });
553
+ newPalette.border.article = (_d = newPalette.border.article) != null ? _d : newPalette.secondary.main;
554
+ newPalette.border.field = (_e = newPalette.border.field) != null ? _e : newPalette.text.primary;
555
+ newPalette.border.section = (_f = newPalette.border.section) != null ? _f : newPalette.primary.main;
556
+ function parseAction(action) {
557
+ var _a2, _b2;
558
+ if (typeof action === "string")
559
+ return {
560
+ dark: action,
561
+ light: action
562
+ };
563
+ return {
564
+ dark: (_a2 = action.dark) != null ? _a2 : action.light,
565
+ light: (_b2 = action.light) != null ? _b2 : action.dark
566
+ };
567
+ }
568
+ newPalette.action.active = parseAction(newPalette.action.active);
569
+ newPalette.action.disabled = parseAction(newPalette.action.disabled);
570
+ newPalette.action.focus = parseAction(newPalette.action.focus);
571
+ newPalette.action.hover = parseAction(newPalette.action.hover);
572
+ newPalette.action.readonly = parseAction(newPalette.action.readonly);
573
+ newPalette.action.selected = parseAction(newPalette.action.selected);
574
+ newPalette.gray = (_g = newPalette.gray) != null ? _g : {};
575
+ for (let i = 1; i <= 18; i++) {
576
+ const index = Math.round((255 - 255 / 18) / 18 * i);
577
+ newPalette.gray[i * 50] = (_h = newPalette.gray[i * 50]) != null ? _h : `rgb(${index},${index},${index})`;
578
+ }
579
+ newPalette.applyStates = paletteFunction(applyStates);
580
+ newPalette.buildColorsObject = paletteFunction(buildColorsObject);
581
+ newPalette.buildStateObject = paletteFunction(buildStateObject);
582
+ newPalette.getColor = paletteFunction(
583
+ (color, state) => getOneColorState(color, state, theme)
584
+ );
585
+ newPalette.getStatesForColors = paletteFunction(
586
+ (definition, states) => applyStatesGetColor(definition, theme, states)
587
+ );
588
+ newPalette.getOneState = paletteFunction(
589
+ (definition, state) => getColorState(definition, state, theme)
590
+ );
591
+ newPalette.getColorStates = paletteFunction(
592
+ (definition, state) => getColorStates(definition, theme, state)
593
+ );
594
+ newPalette.getStatesFromDefinition = paletteFunction(
595
+ (definition, states) => getColorsAndStatesByDefinition(definition, theme, states)
596
+ );
597
+ newPalette.getStatesFromPath = paletteFunction(getColorsAndStatesByPath);
598
+ newPalette.getSelectedColors = paletteFunction(
599
+ () => getSelectedColors(theme)
600
+ );
601
+ return newPalette;
602
+ }
603
+
604
+ const schemas = {
605
+ ocean: ["#008E1B", "#009155", "#009187", "#008EB1", "#006872", "#2F4858"],
606
+ sunset: ["#ae76de", "#D65DB1", "#FF6F91", "#FF9671", "#FFC75F", "#F9F871"],
607
+ red: ["#dc143c", "#ff2400", "#800020", "#b22222", "#e52b50", "#ff7f50"],
608
+ orange: ["#F76E11", "#FF9F45", "#FFBC80", "#FC4F4F", "#eb9605", "#964000"],
609
+ green: ["#a4de02", "#76ba1b", "#4c9a2a", "#acdf87", "#68bb59", "#1e5631"],
610
+ blue: ["#7ad6f4", "#45bdee", "#28a7ea", "#006cbb", "#034698", "#032f64"],
611
+ violet: ["#80007e", "#a02d9c", "#c37ecd", "#9e5fb8", "#7f3e98", "#4c197f"],
612
+ turquoise: ["#0ddbcc", "#43ebff", "#19ceeb", "#28acea", "#388ee9", "#3d76e0"],
613
+ yellow: ["#fff700", "#ffff9f", "#fef54f", "#f9e231", "#f6c616", "#eab200"],
614
+ grey: ["#b1b5ba", "#d2d5d6", "#dee0e0", "#bdbdbb", "#9fa19c", "#686e67"]
615
+ };
616
+
617
+ const components$1 = (theme) => {
618
+ const palette = theme.palette;
619
+ return {
620
+ datagrid: {
621
+ borderColor: palette.background.paper,
622
+ header: {
623
+ backgroundColor: palette.background.default,
624
+ color: palette.text.primary,
625
+ borderColor: palette.background.default
626
+ },
627
+ body: {
628
+ preventParse: true,
629
+ backgroundColor: palette.background.paper,
630
+ evenRowsBackgroundColor: palette.darkenColor(
631
+ palette.background.paper,
632
+ 3
633
+ ),
634
+ color: palette.text.primary,
635
+ borderColor: palette.gray["800"],
636
+ selectedRows: {
637
+ borderColor: palette.gray["800"],
638
+ backgroundColor: palette.getOneState(
639
+ { backgroundColor: palette.background.paper },
640
+ "selected"
641
+ ).backgroundColor,
642
+ color: palette.getContrastText(
643
+ palette.getOneState(
644
+ { backgroundColor: palette.background.paper },
645
+ "selected"
646
+ ).backgroundColor
647
+ )
648
+ }
649
+ }
650
+ },
651
+ pagination: {
652
+ backgroundColor: palette.primary.main,
653
+ icons: {
654
+ backgroundColor: palette.primary.main,
655
+ borderColor: palette.primary.main,
656
+ color: palette.primary.contrastText
657
+ },
658
+ pagesBox: {
659
+ preventParse: true,
660
+ backgroundColor: palette.background.paper,
661
+ borderColor: palette.border.field,
662
+ color: palette.text.primary
663
+ }
664
+ },
665
+ primaryTable: {
666
+ borderColor: palette.background.paper,
667
+ header: {
668
+ backgroundColor: palette.primary.main,
669
+ color: palette.primary.contrastText,
670
+ borderColor: palette.primary.main
671
+ },
672
+ body: {
673
+ preventParse: true,
674
+ backgroundColor: palette.background.paper,
675
+ evenRowsBackgroundColor: palette.darkenColor(
676
+ palette.background.paper,
677
+ 3
678
+ ),
679
+ color: palette.text.primary,
680
+ borderColor: palette.gray["800"],
681
+ selectedRows: {
682
+ borderColor: palette.gray["800"],
683
+ backgroundColor: palette.getOneState(
684
+ { backgroundColor: palette.background.paper },
685
+ "selected"
686
+ ).backgroundColor,
687
+ color: palette.getContrastText(
688
+ palette.getOneState(
689
+ { backgroundColor: palette.background.paper },
690
+ "selected"
691
+ ).backgroundColor
692
+ )
693
+ }
694
+ }
695
+ },
696
+ secondaryTable: {
697
+ borderColor: palette.background.paper,
698
+ header: {
699
+ backgroundColor: palette.background.default,
700
+ color: palette.text.primary,
701
+ borderColor: palette.background.default
702
+ },
703
+ body: {
704
+ preventParse: true,
705
+ backgroundColor: palette.background.paper,
706
+ evenRowsBackgroundColor: palette.darkenColor(
707
+ palette.background.paper,
708
+ 3
709
+ ),
710
+ color: palette.text.primary,
711
+ borderColor: palette.gray["800"],
712
+ selectedRows: {
713
+ borderColor: palette.gray["800"],
714
+ backgroundColor: palette.getOneState(
715
+ { backgroundColor: palette.background.paper },
716
+ "selected"
717
+ ).backgroundColor,
718
+ color: palette.getContrastText(
719
+ palette.getOneState(
720
+ { backgroundColor: palette.background.paper },
721
+ "selected"
722
+ ).backgroundColor
723
+ )
724
+ }
725
+ }
726
+ }
727
+ };
728
+ };
729
+
730
+ var __defProp$k = Object.defineProperty;
731
+ var __defProps$b = Object.defineProperties;
732
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
733
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
734
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
735
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
736
+ var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
737
+ var __spreadValues$k = (a, b) => {
738
+ for (var prop in b || (b = {}))
739
+ if (__hasOwnProp$k.call(b, prop))
740
+ __defNormalProp$k(a, prop, b[prop]);
741
+ if (__getOwnPropSymbols$k)
742
+ for (var prop of __getOwnPropSymbols$k(b)) {
743
+ if (__propIsEnum$k.call(b, prop))
744
+ __defNormalProp$k(a, prop, b[prop]);
745
+ }
746
+ return a;
747
+ };
748
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
749
+ const darkBlue = "#004085";
750
+ const lightBlue = "#cce5ff";
751
+ const white = "white";
752
+ function getSelectedColors(theme) {
753
+ return theme.palette.getColorStates(
754
+ {
755
+ backgroundColor: theme.palette.background.paper,
756
+ color: theme.palette.text.primary
757
+ },
758
+ {
759
+ active: false,
760
+ checked: false,
761
+ default: false,
762
+ disabled: false,
763
+ focus: false,
764
+ readonly: false
765
+ }
766
+ );
767
+ }
768
+ function getThemeColorsObject(theme) {
769
+ var _a;
770
+ const colors = merge(
771
+ {},
772
+ {
773
+ palette: __spreadProps$b(__spreadValues$k({}, theme.palette), {
774
+ lightenColor: void 0,
775
+ darkenColor: void 0,
776
+ getContrastText: void 0,
777
+ buildStateObject: void 0,
778
+ getColor: void 0,
779
+ getOneState: void 0,
780
+ getStatesForColors: void 0,
781
+ getStatesFromDefinition: void 0,
782
+ getStatesFromPath: void 0
783
+ }),
784
+ accordion: {
785
+ borderColor: theme.palette.border.section
786
+ },
787
+ buttons: {
788
+ accordion: {
789
+ backgroundColor: theme.palette.primary.main,
790
+ borderColor: theme.palette.border.section,
791
+ color: theme.palette.primary.contrastText
792
+ },
793
+ accordionPrimary: {
794
+ backgroundColor: theme.palette.primary.main,
795
+ borderColor: theme.palette.border.section,
796
+ color: theme.palette.primary.contrastText
797
+ },
798
+ close: __spreadProps$b(__spreadValues$k({}, applyStatesGetColor(
799
+ {
800
+ color: theme.palette.text.primary,
801
+ backgroundColor: theme.palette.background.paper
802
+ },
803
+ theme
804
+ )), {
805
+ backgroundColor: "transparent"
806
+ }),
807
+ collapsibleAsidePanelTitle: {
808
+ color: theme.palette.text.primary
809
+ },
810
+ deletableInputButton: {
811
+ backgroundColor: "transparent",
812
+ color: theme.palette.secondary.main,
813
+ active: {
814
+ color: theme.palette.darkenColor(theme.palette.secondary.main, 40)
815
+ },
816
+ disabled: {
817
+ color: theme.palette.secondary.main
818
+ },
819
+ focus: {
820
+ color: theme.palette.darkenColor(theme.palette.secondary.main, 20)
821
+ },
822
+ hover: {
823
+ color: theme.palette.darkenColor(theme.palette.secondary.main, 20)
824
+ }
825
+ },
826
+ icon: {
827
+ backgroundColor: theme.palette.secondary.main,
828
+ color: theme.palette.text.icon,
829
+ hover: {
830
+ color: theme.palette.secondary.contrastText
831
+ },
832
+ focus: {
833
+ color: theme.palette.secondary.contrastText
834
+ }
835
+ },
836
+ iconAlert: {
837
+ backgroundColor: "transparent",
838
+ color: theme.palette.text.icon,
839
+ active: {
840
+ backgroundColor: "transparent",
841
+ color: tinycolor("#e5c200").darken(10).toRgbString()
842
+ },
843
+ focus: {
844
+ backgroundColor: "transparent",
845
+ color: tinycolor("#e5c200").darken(5).toRgbString()
846
+ },
847
+ hover: {
848
+ backgroundColor: "transparent",
849
+ color: tinycolor("#e5c200").darken(5).toRgbString()
850
+ }
851
+ },
852
+ iconPrimary: {
853
+ backgroundColor: theme.palette.primary.main,
854
+ color: theme.palette.primary.contrastText,
855
+ active: {
856
+ color: theme.palette.primary.contrastText
857
+ },
858
+ focus: {
859
+ color: theme.palette.primary.contrastText
860
+ },
861
+ hover: {
862
+ color: theme.palette.primary.contrastText
863
+ },
864
+ disabled: {
865
+ color: theme.palette.gray["500"]
866
+ }
867
+ },
868
+ iconToggled: {
869
+ backgroundColor: theme.palette.primary.main,
870
+ color: theme.palette.primary.contrastText,
871
+ active: {
872
+ color: theme.palette.primary.contrastText
873
+ },
874
+ focus: {
875
+ color: theme.palette.common.white
876
+ },
877
+ hover: {
878
+ color: theme.palette.common.white
879
+ }
880
+ },
881
+ iconOutline: {
882
+ backgroundColor: theme.palette.background.paper,
883
+ color: theme.palette.primary.main,
884
+ borderColor: theme.palette.border.article
885
+ },
886
+ imagePreview: {
887
+ backgroundColor: theme.palette.background.paper,
888
+ color: theme.palette.text.primary,
889
+ borderColor: theme.palette.border.article
890
+ },
891
+ link: {
892
+ backgroundColor: "transparent",
893
+ color: theme.palette.text.primary,
894
+ borderColor: "transparent",
895
+ active: {
896
+ color: theme.palette.text.primary
897
+ },
898
+ focus: {
899
+ color: theme.palette.text.primary
900
+ },
901
+ hover: {
902
+ color: theme.palette.text.primary
903
+ }
904
+ },
905
+ openTab: {
906
+ backgroundColor: theme.palette.primary.main,
907
+ color: theme.palette.primary.contrastText,
908
+ borderColor: theme.palette.primary.dark
909
+ },
910
+ outline: {
911
+ backgroundColor: theme.palette.background.paper,
912
+ color: theme.palette.text.primary,
913
+ borderColor: theme.palette.primary.main
914
+ },
915
+ outlineDanger: {
916
+ backgroundColor: theme.palette.background.paper,
917
+ color: theme.palette.primary.main,
918
+ borderColor: theme.palette.primary.main,
919
+ active: {
920
+ borderColor: theme.palette.darkenColor(
921
+ theme.palette.error.dark,
922
+ theme.palette.action.activeOpacity * 80
923
+ ),
924
+ backgroundColor: theme.palette.darkenColor(
925
+ theme.palette.error.dark,
926
+ theme.palette.action.activeOpacity * 80
927
+ ),
928
+ color: theme.palette.getContrastText(
929
+ theme.palette.darkenColor(
930
+ theme.palette.error.dark,
931
+ theme.palette.action.activeOpacity * 80
932
+ )
933
+ )
934
+ },
935
+ focus: {
936
+ borderColor: theme.palette.darkenColor(
937
+ theme.palette.error.dark,
938
+ theme.palette.action.focusOpacity * 60
939
+ ),
940
+ backgroundColor: theme.palette.darkenColor(
941
+ theme.palette.error.dark,
942
+ theme.palette.action.focusOpacity * 60
943
+ ),
944
+ color: theme.palette.getContrastText(
945
+ theme.palette.darkenColor(
946
+ theme.palette.error.dark,
947
+ theme.palette.action.focusOpacity * 60
948
+ )
949
+ )
950
+ },
951
+ hover: {
952
+ borderColor: theme.palette.darkenColor(
953
+ theme.palette.error.dark,
954
+ theme.palette.action.hoverOpacity * 10
955
+ ),
956
+ backgroundColor: theme.palette.darkenColor(
957
+ theme.palette.error.dark,
958
+ theme.palette.action.hoverOpacity * 10
959
+ ),
960
+ color: theme.palette.getContrastText(
961
+ theme.palette.darkenColor(
962
+ theme.palette.error.dark,
963
+ theme.palette.action.hoverOpacity * 10
964
+ )
965
+ )
966
+ }
967
+ },
968
+ outlineWarning: {
969
+ backgroundColor: theme.palette.background.paper,
970
+ color: theme.palette.text.primary,
971
+ borderColor: theme.palette.primary.main,
972
+ active: {
973
+ borderColor: theme.palette.warning.main,
974
+ backgroundColor: theme.palette.warning.main,
975
+ color: theme.palette.warning.contrastText
976
+ },
977
+ focus: {
978
+ borderColor: theme.palette.warning.main,
979
+ backgroundColor: theme.palette.warning.main,
980
+ color: theme.palette.warning.contrastText
981
+ },
982
+ hover: {
983
+ borderColor: theme.palette.warning.main,
984
+ backgroundColor: theme.palette.warning.main,
985
+ color: theme.palette.warning.contrastText
986
+ }
987
+ },
988
+ paper: {
989
+ backgroundColor: theme.palette.background.paper,
990
+ color: theme.palette.text.primary,
991
+ borderColor: theme.palette.background.paper
992
+ },
993
+ primary: {
994
+ backgroundColor: theme.palette.primary.main,
995
+ color: theme.palette.primary.contrastText,
996
+ borderColor: theme.palette.primary.main
997
+ },
998
+ secondary: {
999
+ backgroundColor: theme.palette.secondary.main,
1000
+ color: theme.palette.secondary.contrastText,
1001
+ borderColor: theme.palette.secondary.main
1002
+ },
1003
+ tab: {
1004
+ backgroundColor: theme.palette.background.paper,
1005
+ color: theme.palette.text.primary,
1006
+ borderColor: theme.palette.border.article
1007
+ },
1008
+ toggleIcon: {
1009
+ color: theme.palette.secondary.contrastText,
1010
+ backgroundColor: theme.palette.secondary.main,
1011
+ borderColor: theme.palette.border.field,
1012
+ danger: {
1013
+ backgroundColor: theme.palette.error.main,
1014
+ borderColor: theme.palette.border.field,
1015
+ color: theme.palette.error.contrastText
1016
+ },
1017
+ toggled: {
1018
+ backgroundColor: theme.palette.primary.main,
1019
+ borderColor: theme.palette.border.field,
1020
+ color: theme.palette.primary.contrastText
1021
+ }
1022
+ },
1023
+ transparentIcon: {
1024
+ backgroundColor: "transparent",
1025
+ color: theme.palette.text.primary,
1026
+ hover: {
1027
+ color: theme.palette.primary.main
1028
+ },
1029
+ focus: {
1030
+ color: theme.palette.primary.main
1031
+ }
1032
+ }
1033
+ },
1034
+ components: components$1(theme),
1035
+ dropzone: {
1036
+ backgroundColor: theme.palette.background.paper,
1037
+ borderColor: theme.palette.border.section,
1038
+ color: theme.palette.background.default
1039
+ },
1040
+ form: {
1041
+ backgroundColor: theme.palette.background.paper,
1042
+ fields: {
1043
+ backgroundColor: theme.palette.background.paper,
1044
+ color: theme.palette.text.primary,
1045
+ borderColor: theme.palette.border.field
1046
+ },
1047
+ radio: {
1048
+ backgroundColor: "transparent",
1049
+ color: tinycolor(theme.palette.text.primary).lighten(15).toRgbString(),
1050
+ borderColor: theme.palette.text.primary,
1051
+ active: {
1052
+ backgroundColor: "transparent",
1053
+ color: tinycolor(theme.palette.text.primary).lighten(0).toRgbString()
1054
+ },
1055
+ checked: {
1056
+ backgroundColor: "transparent",
1057
+ color: tinycolor(theme.palette.text.primary).lighten(15).toRgbString()
1058
+ },
1059
+ disabled: {
1060
+ backgroundColor: "transparent",
1061
+ color: tinycolor(theme.palette.text.primary).lighten(55).toRgbString()
1062
+ },
1063
+ hover: {
1064
+ backgroundColor: "transparent",
1065
+ color: tinycolor(theme.palette.text.primary).lighten(7).toRgbString()
1066
+ },
1067
+ readonly: {
1068
+ color: tinycolor(theme.palette.text.primary).lighten(38).toRgbString(),
1069
+ backgroundColor: "transparent"
1070
+ }
1071
+ }
1072
+ },
1073
+ modal: {
1074
+ borderColor: theme.palette.border.section,
1075
+ backgroundColor: theme.palette.background.paper
1076
+ },
1077
+ notifications: {
1078
+ error: {
1079
+ backgroundColor: theme.palette.error.light,
1080
+ color: theme.palette.getContrastText(theme.palette.error.light),
1081
+ borderColor: theme.palette.error.main
1082
+ },
1083
+ success: {
1084
+ backgroundColor: theme.palette.success.light,
1085
+ color: theme.palette.getContrastText(theme.palette.success.light),
1086
+ borderColor: theme.palette.success.main
1087
+ },
1088
+ warning: {
1089
+ backgroundColor: theme.palette.warning.light,
1090
+ color: theme.palette.getContrastText(theme.palette.warning.light),
1091
+ borderColor: theme.palette.warning.main
1092
+ }
1093
+ },
1094
+ printView: {
1095
+ main: {
1096
+ backgroundColor: theme.palette.background.default,
1097
+ page: {
1098
+ backgroundColor: theme.palette.background.paper,
1099
+ borderColor: theme.palette.border.article
1100
+ }
1101
+ },
1102
+ list: {
1103
+ table: {
1104
+ borderColor: theme.palette.border.section
1105
+ },
1106
+ th: { backgroundColor: "#eee" },
1107
+ cell: {
1108
+ borderColor: theme.palette.border.article
1109
+ }
1110
+ }
1111
+ },
1112
+ schemas,
1113
+ scrollbars: {
1114
+ bar: {
1115
+ color: theme.palette.secondary.main,
1116
+ backgroundColor: theme.palette.background.default,
1117
+ hover: {
1118
+ backgroundColor: theme.palette.lightenColor(
1119
+ theme.palette.background.default,
1120
+ 10
1121
+ ),
1122
+ color: theme.palette.lightenColor(theme.palette.secondary.main, 10)
1123
+ },
1124
+ active: {
1125
+ backgroundColor: theme.palette.lightenColor(
1126
+ theme.palette.background.default,
1127
+ 10
1128
+ ),
1129
+ color: theme.palette.lightenColor(theme.palette.secondary.main, 20)
1130
+ }
1131
+ }
1132
+ },
1133
+ tab: {
1134
+ backgroundColor: theme.palette.background.paper,
1135
+ borderColor: theme.palette.border.section
1136
+ },
1137
+ topBar: {
1138
+ backgroundColor: theme.palette.primary.main
1139
+ },
1140
+ // Default ThemeUI colors
1141
+ accent: theme.palette.text.accent,
1142
+ background: theme.palette.background.default,
1143
+ iconWarning: "rgb(246 222 87)",
1144
+ muted: theme.palette.text.disabled,
1145
+ primary: theme.palette.primary.main,
1146
+ secondary: theme.palette.secondary.main,
1147
+ text: theme.palette.text.primary,
1148
+ warning: theme.palette.warning.main,
1149
+ danger: theme.palette.error.main,
1150
+ link: theme.palette.text.accent,
1151
+ success: theme.palette.success.main,
1152
+ title: theme.palette.text.title,
1153
+ selected: theme.palette.getOneState(
1154
+ { backgroundColor: theme.palette.background.paper },
1155
+ "selected"
1156
+ ).backgroundColor,
1157
+ // Meaningful colors
1158
+ lightBorder: "hsl(0, 12%, 85%)",
1159
+ outlineColor: "#00a8f6",
1160
+ touchedBorderColor: "orange",
1161
+ // Custom Apia colors
1162
+ baseGrey: "#dfdfdf",
1163
+ darkBorder: "hsl(247, 98%, 10%)",
1164
+ darkBlue,
1165
+ disabled: "#efefef",
1166
+ favorite: "#e5c200",
1167
+ filtersRowBackground: white,
1168
+ formBackground: white,
1169
+ grey: "#777",
1170
+ gridRowHighlight: "#e1f3ff",
1171
+ highlightButton: "hsl(61, 100%, 91%)",
1172
+ lightBlue,
1173
+ oddRow: "#f0f5ff",
1174
+ paginationBackground: "hsl(229deg, 75%, 90%)",
1175
+ readOnlyText: "#737373",
1176
+ required: "darkred",
1177
+ scrollbarBack: "rgb(206, 206, 206)",
1178
+ scrollbarFront: "rgb(156, 156, 156)",
1179
+ sysExceptionNotificationBg: "#f8d7da",
1180
+ sysMessageNotificationBg: "#fff3cd",
1181
+ tabBackground: "white",
1182
+ treeRuler: "#ccc",
1183
+ white,
1184
+ priorityNone: "gray",
1185
+ priorityLow: theme.palette.success.main,
1186
+ priorityNormal: "rgb(255 211 34)",
1187
+ priorityHigh: "rgb(255 150 0)",
1188
+ priorityUrgent: "red",
1189
+ // modes: {
1190
+ // dark: {
1191
+ // // TODO: dark-mode uhhhhhhh!!!
1192
+ // //text: '#fff',
1193
+ // },
1194
+ // },
1195
+ charts: {
1196
+ front: darkBlue
1197
+ }
1198
+ },
1199
+ (_a = theme.colors) != null ? _a : {}
1200
+ );
1201
+ applyStates(
1202
+ [
1203
+ colors == null ? void 0 : colors.buttons,
1204
+ colors == null ? void 0 : colors.form
1205
+ ],
1206
+ theme
1207
+ );
1208
+ return colors;
1209
+ }
1210
+
1211
+ var __defProp$j = Object.defineProperty;
1212
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
1213
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
1214
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
1215
+ var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1216
+ var __spreadValues$j = (a, b) => {
1217
+ for (var prop in b || (b = {}))
1218
+ if (__hasOwnProp$j.call(b, prop))
1219
+ __defNormalProp$j(a, prop, b[prop]);
1220
+ if (__getOwnPropSymbols$j)
1221
+ for (var prop of __getOwnPropSymbols$j(b)) {
1222
+ if (__propIsEnum$j.call(b, prop))
1223
+ __defNormalProp$j(a, prop, b[prop]);
1224
+ }
1225
+ return a;
1226
+ };
1227
+ const alerts = {
1228
+ primary: {
1229
+ border: "1px solid",
1230
+ borderLeft: "12px solid",
1231
+ borderRadius: "alerts",
1232
+ display: "flex",
1233
+ flexDirection: "column",
1234
+ fontWeight: "normal",
1235
+ maxHeight: "60vh",
1236
+ overflow: "auto",
1237
+ p: 0,
1238
+ "&:focus": {
1239
+ outline: "none"
1240
+ },
1241
+ ".notification__header": {
1242
+ display: "flex",
1243
+ alignItems: "center",
1244
+ justifyContent: "space-between",
1245
+ position: "sticky",
1246
+ top: 0,
1247
+ width: "100%",
1248
+ p: spacing(5)
1249
+ },
1250
+ ".notification__title": {
1251
+ fontSize: 18,
1252
+ fontWeight: "bold",
1253
+ color: "palette.text.primary",
1254
+ display: "flex",
1255
+ gap: spacing(5),
1256
+ alignItems: "center"
1257
+ },
1258
+ ".notification__closeButton": {
1259
+ flexShrink: 0
1260
+ },
1261
+ ".notification__body": {
1262
+ alignItems: "center",
1263
+ display: "flex",
1264
+ flexDirection: "row",
1265
+ gap: spacing(5),
1266
+ width: "100%",
1267
+ p: spacing(5)
1268
+ },
1269
+ ".notification__header ~ .notification__body": {
1270
+ pt: 0
1271
+ },
1272
+ ".notification__content": {
1273
+ display: "flex",
1274
+ alignItems: "stretch",
1275
+ flexDirection: "column",
1276
+ gap: spacing(5),
1277
+ width: "100%"
1278
+ },
1279
+ ".notification__icon": {
1280
+ flexShrink: 0,
1281
+ height: "iconMd",
1282
+ svg: {
1283
+ height: "iconMd",
1284
+ width: "iconMd"
1285
+ }
1286
+ },
1287
+ ".notification__message": {
1288
+ display: "flex",
1289
+ flexDirection: "column",
1290
+ fontWeight: "normal",
1291
+ gap: spacing(3),
1292
+ width: "100%",
1293
+ wordBreak: "break-word"
1294
+ },
1295
+ ".notification__trace": {
1296
+ maxWidth: "100%",
1297
+ overflow: "hidden",
1298
+ maxHeight: "30vh",
1299
+ flexShrink: 0,
1300
+ backgroundColor: "rgba(10,10,10,0.02)",
1301
+ pt: spacing(5),
1302
+ ".notification__traceLabel": {
1303
+ pl: spacing(5),
1304
+ display: "flex",
1305
+ gap: 2
1306
+ },
1307
+ ".notification__traceText": {
1308
+ fontWeight: "normal",
1309
+ p: spacing(5),
1310
+ maxHeight: "30vh",
1311
+ overflow: "auto",
1312
+ maxWidth: "100%",
1313
+ position: "relative"
1314
+ }
1315
+ },
1316
+ "&:focus .notification__closeButton": focusOutline
1317
+ },
1318
+ warning: {
1319
+ variant: "alerts.primary",
1320
+ "&, & .notification__header": __spreadValues$j({}, getColorsByPath("notifications.warning"))
1321
+ },
1322
+ danger: {
1323
+ variant: "alerts.primary",
1324
+ "&, & .notification__header": __spreadValues$j({}, getColorsByPath("notifications.error"))
1325
+ },
1326
+ success: {
1327
+ variant: "alerts.primary",
1328
+ "&, & .notification__header": __spreadValues$j({}, getColorsByPath("notifications.success"))
1329
+ }
1330
+ };
1331
+
1332
+ var __defProp$i = Object.defineProperty;
1333
+ var __defProps$a = Object.defineProperties;
1334
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
1335
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
1336
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
1337
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
1338
+ var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1339
+ var __spreadValues$i = (a, b) => {
1340
+ for (var prop in b || (b = {}))
1341
+ if (__hasOwnProp$i.call(b, prop))
1342
+ __defNormalProp$i(a, prop, b[prop]);
1343
+ if (__getOwnPropSymbols$i)
1344
+ for (var prop of __getOwnPropSymbols$i(b)) {
1345
+ if (__propIsEnum$i.call(b, prop))
1346
+ __defNormalProp$i(a, prop, b[prop]);
1347
+ }
1348
+ return a;
1349
+ };
1350
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
1351
+ const buttons = {
1352
+ inherit: {
1353
+ color: "inherit",
1354
+ background: "inherit",
1355
+ border: "none",
1356
+ borderRadius: 0,
1357
+ font: "inherit",
1358
+ cursor: "pointer",
1359
+ padding: 0,
1360
+ margin: 0
1361
+ },
1362
+ collapsibleAsidePanelTitle: __spreadValues$i({
1363
+ variant: "buttons.inherit",
1364
+ display: "flex",
1365
+ justifyContent: "space-between",
1366
+ alignItems: "center",
1367
+ width: "100%"
1368
+ }, getColorsAndStatesByPath("buttons.collapsibleAsidePanelTitle")),
1369
+ primary: __spreadProps$a(__spreadValues$i({
1370
+ borderWidth: "2px",
1371
+ borderStyle: "solid",
1372
+ variant: "text.default",
1373
+ py: responsive$1({ 0: 3, 4: 4 }),
1374
+ px: responsive$1({ 0: 5, 4: 6 }),
1375
+ display: "inline-block",
1376
+ width: responsive$1({ 0: "100%", 1: "auto" }),
1377
+ cursor: "pointer",
1378
+ borderRadius: "buttons",
1379
+ fontWeight: "normal",
1380
+ userSelect: "none",
1381
+ transition: "background-color 300ms ease-out, color 300ms ease-out",
1382
+ wordBreak: "keep-all"
1383
+ }, getColorsAndStatesByPath("buttons.primary")), {
1384
+ "&:focus, &:focus-visible": {
1385
+ outlineColor: "#00daff"
1386
+ }
1387
+ }),
1388
+ "primary-sm": __spreadValues$i({
1389
+ variant: "buttons.primary",
1390
+ "&:focus, &:focus-visible": {}
1391
+ }, smallButton),
1392
+ secondary: __spreadValues$i({
1393
+ variant: "buttons.primary",
1394
+ "&:focus, &:focus-visible": {},
1395
+ borderWidth: "0px",
1396
+ borderStyle: "solid"
1397
+ }, getColorsAndStatesByPath("buttons.secondary")),
1398
+ "secondary-sm": __spreadValues$i({
1399
+ variant: "buttons.secondary"
1400
+ }, smallButton),
1401
+ "light-secondary": __spreadValues$i({
1402
+ variant: "buttons.secondary"
1403
+ }, getColorsAndStatesByPath("buttons.lightSecondary")),
1404
+ danger: __spreadValues$i({
1405
+ variant: "buttons.primary",
1406
+ "&:focus, &:focus-visible": {}
1407
+ }, getColorsAndStatesByPath("buttons.danger")),
1408
+ "danger-sm": __spreadValues$i({
1409
+ variant: "buttons.danger"
1410
+ }, smallButton),
1411
+ warning: __spreadValues$i({
1412
+ variant: "buttons.primary",
1413
+ "&:focus, &:focus-visible": {}
1414
+ }, getColorsAndStatesByPath("buttons.warning")),
1415
+ "warning-sm": __spreadValues$i({
1416
+ variant: "buttons.warning"
1417
+ }, smallButton),
1418
+ close: __spreadValues$i({
1419
+ cursor: "pointer",
1420
+ ml: "auto",
1421
+ mr: "2",
1422
+ borderRadius: "buttons"
1423
+ }, getColorsAndStatesByPath("buttons.close")),
1424
+ accordion: {
1425
+ variant: "buttons.primary",
1426
+ "&:focus, &:focus-visible": {},
1427
+ cursor: "pointer",
1428
+ m: spacing(0),
1429
+ py: responsive$1({ 0: 3, 4: 4 }),
1430
+ px: responsive$1({ 0: 5, 4: 6 }),
1431
+ width: "100%",
1432
+ display: "flex",
1433
+ alignItems: "center",
1434
+ justifyContent: "space-between",
1435
+ borderRadius: "buttons",
1436
+ textAlign: "left",
1437
+ fontFamily: "heading",
1438
+ fontSize: "text.default",
1439
+ textDecoration: "none",
1440
+ textTransform: "none",
1441
+ fontWeight: "bold",
1442
+ border: "none",
1443
+ transition: "background-color 300ms ease-out, color 300ms ease-out",
1444
+ userSelect: "text",
1445
+ "&, *": getColorsAndStatesByPath("buttons.accordion"),
1446
+ "h3.toggleAccordionElementLabel": {
1447
+ variant: "text.default",
1448
+ color: "inherit",
1449
+ margin: 0,
1450
+ wordBreak: "break-word"
1451
+ }
1452
+ },
1453
+ "accordion-primary": __spreadValues$i({
1454
+ variant: "buttons.accordion",
1455
+ border: "none"
1456
+ }, getColorsAndStatesByPath("buttons.accordionPrimary")),
1457
+ icon: __spreadProps$a(__spreadValues$i({
1458
+ display: "flex",
1459
+ justifyContent: "center",
1460
+ alignItems: "center",
1461
+ p: spacing(0),
1462
+ m: spacing(0),
1463
+ bg: "secondary",
1464
+ cursor: "pointer",
1465
+ transition: "background-color 300ms ease-out, color 300ms ease-out",
1466
+ borderRadius: "buttons",
1467
+ border: "none"
1468
+ }, getColorsAndStatesByPath("buttons.icon")), {
1469
+ path: {
1470
+ width: "auto",
1471
+ height: "20px",
1472
+ display: "block",
1473
+ fill: getColorsAndStatesByPath("buttons.icon").color
1474
+ },
1475
+ "&.isToggled": __spreadProps$a(__spreadValues$i({}, getColorsAndStatesByPath("buttons.iconToggled")), {
1476
+ path: {
1477
+ fill: getColorsAndStatesByPath("buttons.iconToggled").color
1478
+ }
1479
+ })
1480
+ }),
1481
+ "icon-primary": __spreadProps$a(__spreadValues$i({
1482
+ variant: "buttons.icon"
1483
+ }, getColorsAndStatesByPath("buttons.iconPrimary")), {
1484
+ path: {
1485
+ fill: getColorsAndStatesByPath("buttons.iconPrimary").color
1486
+ }
1487
+ }),
1488
+ "icon-outline": __spreadProps$a(__spreadValues$i({
1489
+ variant: "buttons.icon",
1490
+ bg: "white",
1491
+ border: "1px solid"
1492
+ }, getColorsAndStatesByPath("buttons.iconOutline")), {
1493
+ path: {
1494
+ fill: getColorsAndStatesByPath("buttons.iconOutline").color
1495
+ }
1496
+ }),
1497
+ "icon-outline-danger": __spreadValues$i({
1498
+ variant: "buttons.icon",
1499
+ bg: "white",
1500
+ border: "1px solid"
1501
+ }, getColorsAndStatesByPath("buttons.outlineDanger")),
1502
+ "icon-only": __spreadProps$a(__spreadValues$i({
1503
+ variant: "buttons.icon"
1504
+ }, getColorsAndStatesByPath("buttons.iconOnly")), {
1505
+ path: {
1506
+ fill: getColorsAndStatesByPath("buttons.iconOnly").color
1507
+ }
1508
+ }),
1509
+ link: __spreadValues$i({
1510
+ variant: "inherit",
1511
+ width: "auto",
1512
+ border: "none",
1513
+ textDecoration: "underline",
1514
+ px: 2,
1515
+ py: 1,
1516
+ borderRadius: "buttons",
1517
+ cursor: "pointer",
1518
+ textTransform: "none",
1519
+ transition: "background-color 300ms ease-out, color 300ms ease-out"
1520
+ }, getColorsAndStatesByPath("buttons.link")),
1521
+ "link-sm": __spreadValues$i({
1522
+ variant: "buttons.link"
1523
+ }, smallButton),
1524
+ outline: __spreadValues$i({
1525
+ variant: "buttons.primary",
1526
+ borderWidth: "2px",
1527
+ borderStyle: "solid",
1528
+ borderRadius: "buttons",
1529
+ "&:focus, &:focus-visible": {}
1530
+ }, getColorsAndStatesByPath("buttons.outline", {
1531
+ states: {
1532
+ active: false,
1533
+ checked: false,
1534
+ disabled: false,
1535
+ focus: false,
1536
+ hover: false,
1537
+ readonly: false,
1538
+ selected: false
1539
+ }
1540
+ })),
1541
+ "outline-sm": __spreadValues$i({
1542
+ variant: "buttons.outline"
1543
+ }, smallButton),
1544
+ "transparent-sm": __spreadValues$i({
1545
+ variant: "buttons.outline",
1546
+ "&:focus, &:focus-visible": {},
1547
+ bg: "transparent",
1548
+ color: "inherit",
1549
+ border: "none",
1550
+ font: "inherit",
1551
+ textTransform: "inherit"
1552
+ }, smallButton),
1553
+ "outline-danger": __spreadValues$i({
1554
+ variant: "buttons.outline",
1555
+ "&:focus, &:focus-visible": {}
1556
+ }, getColorsAndStatesByPath("buttons.outlineDanger")),
1557
+ "outline-danger-sm": __spreadValues$i({
1558
+ variant: "buttons.outline-danger"
1559
+ }, smallButton),
1560
+ "outline-warning": __spreadValues$i({
1561
+ variant: "buttons.outline",
1562
+ "&:focus, &:focus-visible": {}
1563
+ }, getColorsAndStatesByPath("buttons.outlineWarning")),
1564
+ "outline-warning-sm": __spreadValues$i({
1565
+ variant: "buttons.outline-warning"
1566
+ }, smallButton),
1567
+ "outline-extended": {
1568
+ variant: "buttons.outline",
1569
+ gridColumnStart: 1,
1570
+ gridColumnEnd: 3,
1571
+ width: "100%"
1572
+ },
1573
+ "outline-danger-extended": {
1574
+ variant: "buttons.outline-danger",
1575
+ gridColumnStart: 1,
1576
+ gridColumnEnd: 3,
1577
+ width: "100%"
1578
+ },
1579
+ "primary-extended": {
1580
+ variant: "buttons.primary",
1581
+ "&:focus, &:focus-visible": {},
1582
+ gridColumnStart: 1,
1583
+ gridColumnEnd: 3,
1584
+ width: "100%"
1585
+ },
1586
+ query: {
1587
+ extended: {
1588
+ variant: "buttons.outline",
1589
+ "&:focus, &:focus-visible": {},
1590
+ gridColumnStart: 1,
1591
+ gridColumnEnd: 3
1592
+ }
1593
+ },
1594
+ tableAccordion: __spreadValues$i({
1595
+ variant: "buttons.accordion",
1596
+ fontSize: "text.default",
1597
+ p: spacing(3),
1598
+ wordBreak: "keep-all",
1599
+ a: {
1600
+ color: "background"
1601
+ }
1602
+ }, getColorsAndStatesByPath("buttons.tableAccordion")),
1603
+ tableHeader: __spreadValues$i({
1604
+ variant: "buttons.tableAccordion",
1605
+ alignItems: "center",
1606
+ justifyContent: "center",
1607
+ height: "100%",
1608
+ border: "none",
1609
+ svg: {
1610
+ ml: spacing(2)
1611
+ }
1612
+ }, getColorsAndStatesByPath("buttons.tableHeader")),
1613
+ paper: __spreadValues$i({
1614
+ variant: "buttons.primary",
1615
+ borderWidth: "2px",
1616
+ borderStyle: "solid",
1617
+ borderRadius: "buttons"
1618
+ }, getColorsAndStatesByPath("buttons.paper")),
1619
+ "paper-sm": __spreadValues$i(__spreadValues$i({
1620
+ variant: "buttons.primary",
1621
+ borderWidth: "2px",
1622
+ borderStyle: "solid",
1623
+ borderRadius: "buttons"
1624
+ }, getColorsAndStatesByPath("buttons.paper")), smallButton)
1625
+ };
1626
+
1627
+ const text = {
1628
+ default: {
1629
+ color: "palette.text.primary",
1630
+ fontFamily: "body",
1631
+ fontWeight: "body",
1632
+ fontSize: 16,
1633
+ m: spacing(0),
1634
+ width: "100%"
1635
+ },
1636
+ title: {
1637
+ letterSpacing: "heading",
1638
+ wordBreak: "normal",
1639
+ color: "title",
1640
+ fontFamily: "heading",
1641
+ lineHeight: "heading",
1642
+ fontWeight: "heading"
1643
+ }
1644
+ };
1645
+
1646
+ const transitions = {
1647
+ "@keyframes growHorizontal": {
1648
+ from: { transform: "scaleX(0)" },
1649
+ to: { transform: "scaleY(100%)" }
1650
+ },
1651
+ ".hamburguerMenu": { display: "none" },
1652
+ ".hamburguerMenu-enter,\n.hamburguerMenu-appear": {
1653
+ display: "block",
1654
+ transform: "scale(0.7)",
1655
+ opacity: 0
1656
+ },
1657
+ ".hamburguerMenu-enter-active,\n.hamburguerMenu-appear-active": {
1658
+ transform: "translateX(0)",
1659
+ transition: "opacity 150ms, transform 150ms",
1660
+ transformOrigin: "right top",
1661
+ opacity: 1
1662
+ },
1663
+ ".hamburguerMenu-enter-done,\n.hamburguerMenu-appear-done": {
1664
+ display: "block"
1665
+ },
1666
+ ".hamburguerMenu-exit": {
1667
+ display: "block",
1668
+ transform: "scale(1)",
1669
+ opacity: 1
1670
+ },
1671
+ ".hamburguerMenu-exit-active": {
1672
+ transform: "scale(0.7) translateX(0)",
1673
+ transition: "opacity 150ms, transform 150ms",
1674
+ display: "block",
1675
+ opacity: 0,
1676
+ transformOrigin: "right top"
1677
+ },
1678
+ ".hamburguerMenu-exit-done": { display: "none" },
1679
+ ".modal-enter,\n.modal-appear": { opacity: 0, transform: "scale(0.8)" },
1680
+ ".modal-enter-active,\n.modal-appear-active": {
1681
+ opacity: 1,
1682
+ transform: "translateX(0)",
1683
+ transition: "opacity 150ms, transform 150ms",
1684
+ transitionDelay: "0"
1685
+ },
1686
+ ".modal-exit": { opacity: 0 },
1687
+ ".modal-exit-done": { opacity: 0, display: "none" },
1688
+ ".modal-exit-active": {
1689
+ opacity: 0,
1690
+ transform: "scale(100)",
1691
+ transition: "opacity 150ms, transform 150ms",
1692
+ transitionDelay: "0"
1693
+ },
1694
+ ".overlayAnimation-enter .overlayAnimation:not(.not-released),\n.overlayAnimation-appear .overlayAnimation:not(.not-released)": {
1695
+ opacity: 0
1696
+ },
1697
+ ".overlayAnimation-enter-active .overlayAnimation:not(.not-released),\n.overlayAnimation-appear-active .overlayAnimation:not(.not-released)": {
1698
+ opacity: 1,
1699
+ transition: "opacity 150ms"
1700
+ },
1701
+ ".overlayAnimation-exit": { opacity: 1 },
1702
+ ".overlayAnimation-exit-active": { opacity: 0, transition: "opacity 150ms" },
1703
+ ".fromRight-enter,\n.fromRight-appear": { transform: "translateX(550px)" },
1704
+ ".fromRight-enter-active,\n.fromRight-appear-active": {
1705
+ transition: "transform 150ms",
1706
+ transform: "translateX(0)"
1707
+ },
1708
+ ".fromRight-exit": { transform: "translateX(0)" },
1709
+ ".fromRight-exit-active": {
1710
+ transition: "transform 150ms",
1711
+ transform: "translateX(550px)"
1712
+ },
1713
+ ".notification-enter,\n.notification-appear": {
1714
+ opacity: 0,
1715
+ transform: "scale(0.8)"
1716
+ },
1717
+ ".notification-enter-active,\n.notification-appear-active": {
1718
+ opacity: 1,
1719
+ transform: "translateX(0)",
1720
+ transition: "opacity 150ms, transform 150ms",
1721
+ transitionDelay: "0"
1722
+ },
1723
+ ".notification-exit": { opacity: 1 },
1724
+ ".notification-exit-active": {
1725
+ opacity: 0,
1726
+ transform: "scale(0.8)",
1727
+ transition: "opacity 150ms, transform 150ms",
1728
+ transitionDelay: "0"
1729
+ }
1730
+ };
1731
+
1732
+ var __defProp$h = Object.defineProperty;
1733
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
1734
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
1735
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
1736
+ var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1737
+ var __spreadValues$h = (a, b) => {
1738
+ for (var prop in b || (b = {}))
1739
+ if (__hasOwnProp$h.call(b, prop))
1740
+ __defNormalProp$h(a, prop, b[prop]);
1741
+ if (__getOwnPropSymbols$h)
1742
+ for (var prop of __getOwnPropSymbols$h(b)) {
1743
+ if (__propIsEnum$h.call(b, prop))
1744
+ __defNormalProp$h(a, prop, b[prop]);
1745
+ }
1746
+ return a;
1747
+ };
1748
+ const root = __spreadValues$h({
1749
+ height: "100%",
1750
+ "*": {
1751
+ fontFamily: "body",
1752
+ fontWeight: "body",
1753
+ code: {
1754
+ fontFamily: "monospace"
1755
+ },
1756
+ "&:focus": focusOutline
1757
+ },
1758
+ body: {
1759
+ minHeight: "100vh"
1760
+ },
1761
+ h1: {
1762
+ fontSize: responsive$1({ 0: 26, 3: 32 })
1763
+ },
1764
+ h2: {
1765
+ fontSize: responsive$1({ 0: 22, 3: 28 })
1766
+ },
1767
+ h3: {
1768
+ fontSize: responsive$1({ 0: 19, 3: 25 })
1769
+ },
1770
+ h4: {
1771
+ fontSize: responsive$1({ 0: 18, 3: 22 })
1772
+ },
1773
+ h5: {
1774
+ fontSize: responsive$1({ 0: 18, 3: 22 })
1775
+ },
1776
+ h6: {
1777
+ fontSize: responsive$1({ 0: 17, 3: 17 })
1778
+ },
1779
+ "h1,h2,h3,h4,h5,h6": {
1780
+ letterSpacing: "heading",
1781
+ lineHeight: "heading",
1782
+ variant: "text.title"
1783
+ },
1784
+ "*:not(h1, h2, h3, h4, h5, h6, code)": {
1785
+ fontFamily: "body",
1786
+ fontSize: 16,
1787
+ fontWeight: "body",
1788
+ letterSpacing: "body",
1789
+ lineHeight: "body"
1790
+ },
1791
+ a: {
1792
+ textDecoration: "underline"
1793
+ },
1794
+ "textarea,a": {
1795
+ transition: "color 200ms ease-out",
1796
+ ":focus": __spreadValues$h({}, focusOutline),
1797
+ ":focus-visible": __spreadValues$h({}, focusOutline)
1798
+ },
1799
+ "*:focus": focusOutline,
1800
+ ul: {
1801
+ listStyle: "none",
1802
+ listStyleType: "none",
1803
+ margin: 0,
1804
+ padding: 0
1805
+ },
1806
+ abbr: {
1807
+ "&.required": {
1808
+ textDecoration: "none",
1809
+ border: "none",
1810
+ mx: 1,
1811
+ alignSelf: "baseline",
1812
+ fontWeight: "bold",
1813
+ color: "danger"
1814
+ }
1815
+ },
1816
+ table: {
1817
+ borderCollapse: "separate",
1818
+ borderSpacing: 0
1819
+ },
1820
+ "& label": {
1821
+ display: "flex",
1822
+ "& > span": {
1823
+ mb: spacing(1),
1824
+ fontWeight: "bold"
1825
+ },
1826
+ "&.required": {
1827
+ position: "relative",
1828
+ "&::before": {
1829
+ color: "danger",
1830
+ position: "absolute",
1831
+ content: '"*"',
1832
+ top: 0,
1833
+ left: "-10px"
1834
+ },
1835
+ "*:invalid": {
1836
+ borderColor: "danger"
1837
+ }
1838
+ }
1839
+ },
1840
+ ".bold": {
1841
+ fontWeight: "bold"
1842
+ },
1843
+ ".light": {
1844
+ fontWeight: "light"
1845
+ },
1846
+ ".Left": {
1847
+ textAlign: "left !important"
1848
+ },
1849
+ ".Center": {
1850
+ textAlign: "center !important"
1851
+ },
1852
+ ".Right": {
1853
+ textAlign: "right !important"
1854
+ },
1855
+ ".Justify": {
1856
+ textAlign: "justify !important"
1857
+ },
1858
+ ".Bottom": {
1859
+ verticalAlign: "bottom !important"
1860
+ },
1861
+ ".Middle": {
1862
+ verticalAlign: "middle !important"
1863
+ },
1864
+ ".Top": {
1865
+ verticalAlign: "top !important"
1866
+ },
1867
+ ".hidden": {
1868
+ display: "none"
1869
+ }
1870
+ }, transitions);
1871
+
1872
+ const baseTheme = () => {
1873
+ return {
1874
+ alerts,
1875
+ breakpoints: [
1876
+ "0px",
1877
+ "250px",
1878
+ "500px",
1879
+ "700px",
1880
+ "1000px",
1881
+ "1260px",
1882
+ "1580px"
1883
+ ],
1884
+ buttons,
1885
+ colors: {},
1886
+ fonts: {
1887
+ body: "Arial",
1888
+ heading: "inherit",
1889
+ monospace: "Menlo, monospace"
1890
+ },
1891
+ fontSizes: Array(60).fill(1).map((_, i) => {
1892
+ return i;
1893
+ }),
1894
+ forms: {},
1895
+ layout: {
1896
+ root
1897
+ },
1898
+ lineHeights: {
1899
+ body: 1.5,
1900
+ heading: 1.125
1901
+ },
1902
+ letterSpacings: {
1903
+ body: "0.01em",
1904
+ heading: "-0.015em"
1905
+ },
1906
+ radii: {
1907
+ alerts: 0,
1908
+ buttons: 0,
1909
+ default: 0
1910
+ },
1911
+ shadows: {
1912
+ modals: "",
1913
+ tabs: ""
1914
+ },
1915
+ space: [0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, 112, 128],
1916
+ sizes: {
1917
+ // Layout
1918
+ applicationMenu: "350px",
1919
+ floatingNotifications: "min(550px, calc(100vw - 30px))",
1920
+ root: "992px",
1921
+ mainImage: "64px",
1922
+ twoColumns: "calc(992px + 350px)",
1923
+ twoColumnsCentered: "calc(992px + 350px + 16px)",
1924
+ // Icons
1925
+ iconXs: "12px",
1926
+ iconSm: "16px",
1927
+ iconMd: "22px",
1928
+ iconLg: "32px",
1929
+ iconXl: "48px"
1930
+ },
1931
+ text,
1932
+ zIndices: {
1933
+ stickyElements: 600,
1934
+ menu: 1e3,
1935
+ maximizedTables: 1100,
1936
+ modal: 1200,
1937
+ tooltip: 1400,
1938
+ notifications: 1600,
1939
+ contextMenu: 1800
1940
+ },
1941
+ useRootStyles: true
1942
+ };
1943
+ };
1944
+
1945
+ var __defProp$g = Object.defineProperty;
1946
+ var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
1947
+ var __hasOwnProp$g = Object.prototype.hasOwnProperty;
1948
+ var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
1949
+ var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1950
+ var __spreadValues$g = (a, b) => {
1951
+ for (var prop in b || (b = {}))
1952
+ if (__hasOwnProp$g.call(b, prop))
1953
+ __defNormalProp$g(a, prop, b[prop]);
1954
+ if (__getOwnPropSymbols$g)
1955
+ for (var prop of __getOwnPropSymbols$g(b)) {
1956
+ if (__propIsEnum$g.call(b, prop))
1957
+ __defNormalProp$g(a, prop, b[prop]);
1958
+ }
1959
+ return a;
1960
+ };
1961
+ const customCheckbox = __spreadValues$g({
1962
+ display: "inline-flex",
1963
+ borderRadius: "default",
1964
+ flexBasis: "32px",
1965
+ flexShrink: 0,
1966
+ width: "32px",
1967
+ height: "32px",
1968
+ alignItems: "center",
1969
+ justifyContent: "center",
1970
+ p: "3px",
1971
+ border: "1px solid",
1972
+ svg: {
1973
+ width: "20px"
1974
+ }
1975
+ }, getColorsAndStatesByPath("form.fields", {
1976
+ states: {
1977
+ active: false,
1978
+ hover: false,
1979
+ focus: false
1980
+ }
1981
+ }));
1982
+
1983
+ var __defProp$f = Object.defineProperty;
1984
+ var __defProps$9 = Object.defineProperties;
1985
+ var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
1986
+ var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
1987
+ var __hasOwnProp$f = Object.prototype.hasOwnProperty;
1988
+ var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
1989
+ var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1990
+ var __spreadValues$f = (a, b) => {
1991
+ for (var prop in b || (b = {}))
1992
+ if (__hasOwnProp$f.call(b, prop))
1993
+ __defNormalProp$f(a, prop, b[prop]);
1994
+ if (__getOwnPropSymbols$f)
1995
+ for (var prop of __getOwnPropSymbols$f(b)) {
1996
+ if (__propIsEnum$f.call(b, prop))
1997
+ __defNormalProp$f(a, prop, b[prop]);
1998
+ }
1999
+ return a;
2000
+ };
2001
+ var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
2002
+ const checkbox = __spreadProps$9(__spreadValues$f({
2003
+ borderRadius: "default"
2004
+ }, getColorsAndStatesByPath("form.fields", {
2005
+ states: {
2006
+ active: false,
2007
+ focus: false,
2008
+ hover: false
2009
+ }
2010
+ })), {
2011
+ backgroundColor: "unset",
2012
+ alignItems: "center",
2013
+ "&.nativeCheckbox": {
2014
+ appearance: "none",
2015
+ width: "25px",
2016
+ height: "25px",
2017
+ border: "solid 1px #cccccc",
2018
+ marginRight: "8px",
2019
+ position: "relative",
2020
+ cursor: "pointer",
2021
+ "&:checked::before": {
2022
+ content: '"\u2713"',
2023
+ color: "palette.text.primary",
2024
+ position: "absolute",
2025
+ display: "flex",
2026
+ alignItems: "center",
2027
+ justifyContent: "center",
2028
+ top: 0,
2029
+ left: 0,
2030
+ right: 0,
2031
+ bottom: 0,
2032
+ fontSize: "larger",
2033
+ fontWeight: "bolder",
2034
+ borderRadius: "5px",
2035
+ cursor: "pointer"
2036
+ },
2037
+ "&:indeterminate::before": {
2038
+ content: '"-"',
2039
+ color: "palette.text.primary",
2040
+ position: "absolute",
2041
+ display: "flex",
2042
+ alignItems: "center",
2043
+ justifyContent: "center",
2044
+ top: "-1px",
2045
+ left: 0,
2046
+ right: 0,
2047
+ bottom: 0,
2048
+ fontSize: "xx-large",
2049
+ fontWeight: "600",
2050
+ borderRadius: "5px",
2051
+ cursor: "pointer"
2052
+ }
2053
+ }
2054
+ });
2055
+
2056
+ var __defProp$e = Object.defineProperty;
2057
+ var __defProps$8 = Object.defineProperties;
2058
+ var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
2059
+ var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
2060
+ var __hasOwnProp$e = Object.prototype.hasOwnProperty;
2061
+ var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
2062
+ var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2063
+ var __spreadValues$e = (a, b) => {
2064
+ for (var prop in b || (b = {}))
2065
+ if (__hasOwnProp$e.call(b, prop))
2066
+ __defNormalProp$e(a, prop, b[prop]);
2067
+ if (__getOwnPropSymbols$e)
2068
+ for (var prop of __getOwnPropSymbols$e(b)) {
2069
+ if (__propIsEnum$e.call(b, prop))
2070
+ __defNormalProp$e(a, prop, b[prop]);
2071
+ }
2072
+ return a;
2073
+ };
2074
+ var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));
2075
+ const dateInput = __spreadProps$8(__spreadValues$e({
2076
+ display: "flex",
2077
+ flexDirection: "column",
2078
+ alignItems: "stretch",
2079
+ justifyContent: "stretch",
2080
+ gap: spacing(2),
2081
+ width: "100%",
2082
+ "&.readOnly": {
2083
+ input: {
2084
+ color: "Text.fields",
2085
+ bg: "Background.fields"
2086
+ }
2087
+ },
2088
+ ".iconInput": {
2089
+ width: "100%",
2090
+ position: "relative"
2091
+ },
2092
+ 'input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]), input:hover~.delete_date_button:not(:disabled,[aria-selected="true"]) path, .delete_date_button': __spreadValues$e({
2093
+ position: "absolute",
2094
+ right: "59px",
2095
+ padding: 0,
2096
+ top: "calc(50% - 10px)",
2097
+ margin: 0,
2098
+ marginRight: 0,
2099
+ borderRadius: "100%",
2100
+ width: "20px",
2101
+ height: "20px"
2102
+ }, getColorsAndStatesByPath("buttons.icon-outline")),
2103
+ input: {
2104
+ flexShrink: 1
2105
+ },
2106
+ "& > div": {
2107
+ display: "flex",
2108
+ gap: spacing(2),
2109
+ flexShrink: 0,
2110
+ width: "auto",
2111
+ maxWidth: "100%",
2112
+ minWidth: 0,
2113
+ button: {
2114
+ width: "45px",
2115
+ flexShrink: 0
2116
+ }
2117
+ }
2118
+ }, getColorsAndStatesByPath("form.fields", {
2119
+ states: {
2120
+ hover: false,
2121
+ active: false,
2122
+ focus: false
2123
+ }
2124
+ })), {
2125
+ backgroundColor: void 0
2126
+ });
2127
+
2128
+ var __defProp$d = Object.defineProperty;
2129
+ var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
2130
+ var __hasOwnProp$d = Object.prototype.hasOwnProperty;
2131
+ var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
2132
+ var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2133
+ var __spreadValues$d = (a, b) => {
2134
+ for (var prop in b || (b = {}))
2135
+ if (__hasOwnProp$d.call(b, prop))
2136
+ __defNormalProp$d(a, prop, b[prop]);
2137
+ if (__getOwnPropSymbols$d)
2138
+ for (var prop of __getOwnPropSymbols$d(b)) {
2139
+ if (__propIsEnum$d.call(b, prop))
2140
+ __defNormalProp$d(a, prop, b[prop]);
2141
+ }
2142
+ return a;
2143
+ };
2144
+ const iconInput = {
2145
+ display: "flex",
2146
+ gap: spacing(1),
2147
+ justifyContent: "stretch",
2148
+ alignItems: "center",
2149
+ "&.readOnly": {
2150
+ input: __spreadValues$d({}, getColorsByPath("form.fields"))
2151
+ },
2152
+ input: {
2153
+ height: "50px",
2154
+ width: "100%"
2155
+ },
2156
+ button: {
2157
+ display: "flex",
2158
+ width: "45px",
2159
+ flexShrink: 0,
2160
+ height: "50px"
2161
+ }
2162
+ };
2163
+
2164
+ var __defProp$c = Object.defineProperty;
2165
+ var __defProps$7 = Object.defineProperties;
2166
+ var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
2167
+ var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
2168
+ var __hasOwnProp$c = Object.prototype.hasOwnProperty;
2169
+ var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
2170
+ var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2171
+ var __spreadValues$c = (a, b) => {
2172
+ for (var prop in b || (b = {}))
2173
+ if (__hasOwnProp$c.call(b, prop))
2174
+ __defNormalProp$c(a, prop, b[prop]);
2175
+ if (__getOwnPropSymbols$c)
2176
+ for (var prop of __getOwnPropSymbols$c(b)) {
2177
+ if (__propIsEnum$c.call(b, prop))
2178
+ __defNormalProp$c(a, prop, b[prop]);
2179
+ }
2180
+ return a;
2181
+ };
2182
+ var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
2183
+ const input = __spreadProps$7(__spreadValues$c({
2184
+ variant: "text.default",
2185
+ border: "1px solid",
2186
+ borderRadius: "default",
2187
+ padding: responsive$1({ 0: 3, 3: 4 }),
2188
+ "::placeholder": {
2189
+ color: "#b0b0b0"
2190
+ }
2191
+ }, getColorsAndStatesByPath("form.fields", {
2192
+ states: {
2193
+ active: false,
2194
+ hover: false,
2195
+ focus: false
2196
+ }
2197
+ })), {
2198
+ material: {
2199
+ input: {
2200
+ borderLeft: "none",
2201
+ borderRight: "none",
2202
+ borderTop: "none",
2203
+ borderBottomColor: "palette.border.section",
2204
+ "& + .input__underline": {
2205
+ transform: "scale(1)"
2206
+ },
2207
+ "&:focus": {
2208
+ outline: "none",
2209
+ "~::after": {
2210
+ animationName: "growHorizontal",
2211
+ animationDuration: "150ms",
2212
+ animationTimingFunction: "ease-out",
2213
+ content: '""',
2214
+ display: "block",
2215
+ height: "0",
2216
+ outlineColor: "palette.primary.main",
2217
+ outlineStyle: "solid",
2218
+ outlineWidth: "1.5px",
2219
+ outlineOffset: 0,
2220
+ position: "fixed",
2221
+ transformOrigin: "center center",
2222
+ width: "100%"
2223
+ }
2224
+ }
2225
+ }
2226
+ }
2227
+ });
2228
+
2229
+ const label = {
2230
+ variant: "text.default",
2231
+ alignItems: "center",
2232
+ width: "auto",
2233
+ textTransform: "none",
2234
+ cursor: "pointer",
2235
+ "&:not(.radio-label)": {
2236
+ fontWeight: "bold"
2237
+ },
2238
+ "&.required": {
2239
+ position: "relative",
2240
+ "&::before": {
2241
+ color: "danger",
2242
+ position: "absolute",
2243
+ content: '"*"',
2244
+ top: 0,
2245
+ left: "-10px"
2246
+ }
2247
+ },
2248
+ "&:last-of-type": {
2249
+ "input, textarea, select": {
2250
+ mb: spacing(0)
2251
+ }
2252
+ }
2253
+ };
2254
+
2255
+ var __defProp$b = Object.defineProperty;
2256
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
2257
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
2258
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
2259
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2260
+ var __spreadValues$b = (a, b) => {
2261
+ for (var prop in b || (b = {}))
2262
+ if (__hasOwnProp$b.call(b, prop))
2263
+ __defNormalProp$b(a, prop, b[prop]);
2264
+ if (__getOwnPropSymbols$b)
2265
+ for (var prop of __getOwnPropSymbols$b(b)) {
2266
+ if (__propIsEnum$b.call(b, prop))
2267
+ __defNormalProp$b(a, prop, b[prop]);
2268
+ }
2269
+ return a;
2270
+ };
2271
+ const radio = __spreadValues$b({
2272
+ width: "32px",
2273
+ height: "32px",
2274
+ input: {
2275
+ height: "32px !important"
2276
+ }
2277
+ }, getColorsAndStatesByPath("form.radio"));
2278
+
2279
+ var __defProp$a = Object.defineProperty;
2280
+ var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
2281
+ var __hasOwnProp$a = Object.prototype.hasOwnProperty;
2282
+ var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
2283
+ var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2284
+ var __spreadValues$a = (a, b) => {
2285
+ for (var prop in b || (b = {}))
2286
+ if (__hasOwnProp$a.call(b, prop))
2287
+ __defNormalProp$a(a, prop, b[prop]);
2288
+ if (__getOwnPropSymbols$a)
2289
+ for (var prop of __getOwnPropSymbols$a(b)) {
2290
+ if (__propIsEnum$a.call(b, prop))
2291
+ __defNormalProp$a(a, prop, b[prop]);
2292
+ }
2293
+ return a;
2294
+ };
2295
+ const select = __spreadValues$a({
2296
+ variant: "text.default",
2297
+ display: "inline-block",
2298
+ fontFamily: "body",
2299
+ p: spacing(4),
2300
+ pr: 7,
2301
+ borderRadius: "default",
2302
+ width: "100%",
2303
+ maxWidth: "100%"
2304
+ }, getColorsAndStatesByPath("form.fields", {
2305
+ states: {
2306
+ active: false,
2307
+ hover: false,
2308
+ focus: false
2309
+ }
2310
+ }));
2311
+
2312
+ var __defProp$9 = Object.defineProperty;
2313
+ var __defProps$6 = Object.defineProperties;
2314
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
2315
+ var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
2316
+ var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
2317
+ var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
2318
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2319
+ var __spreadValues$9 = (a, b) => {
2320
+ for (var prop in b || (b = {}))
2321
+ if (__hasOwnProp$9.call(b, prop))
2322
+ __defNormalProp$9(a, prop, b[prop]);
2323
+ if (__getOwnPropSymbols$9)
2324
+ for (var prop of __getOwnPropSymbols$9(b)) {
2325
+ if (__propIsEnum$9.call(b, prop))
2326
+ __defNormalProp$9(a, prop, b[prop]);
2327
+ }
2328
+ return a;
2329
+ };
2330
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
2331
+ function selectMultiple(theme) {
2332
+ return __spreadValues$9({
2333
+ variant: "text.default",
2334
+ height: "100%",
2335
+ padding: "4px",
2336
+ borderRadius: "default",
2337
+ border: "1px solid",
2338
+ width: "100%",
2339
+ transition: "background-color 100ms ease-out, color 100ms ease-out",
2340
+ overflow: "auto",
2341
+ option: __spreadProps$6(__spreadValues$9({
2342
+ padding: 2
2343
+ }, getSelectedColors(theme)), {
2344
+ "&:checked": {
2345
+ backgroundColor: theme.palette.getColor(
2346
+ theme.palette.background.paper,
2347
+ "selected"
2348
+ ),
2349
+ color: theme.palette.getContrastText(
2350
+ theme.palette.getColor(theme.palette.background.paper, "selected")
2351
+ )
2352
+ }
2353
+ }),
2354
+ "+ svg": {
2355
+ display: "none"
2356
+ }
2357
+ }, theme.palette.getStatesFromPath("form.fields", {
2358
+ states: {
2359
+ active: false,
2360
+ hover: false,
2361
+ focus: false
2362
+ }
2363
+ }));
2364
+ }
2365
+
2366
+ const Switch = {
2367
+ "+ span": {
2368
+ fontSize: 14,
2369
+ fontWeight: "normal",
2370
+ wordBreak: "break-all"
2371
+ },
2372
+ backgroundColor: "form.fields.checked.borderColor"
2373
+ };
2374
+
2375
+ const textarea = {
2376
+ "&, & textarea": {
2377
+ height: "100%",
2378
+ minHeight: "130px",
2379
+ resize: "vertical"
2380
+ },
2381
+ textarea: {
2382
+ variant: "forms.input"
2383
+ }
2384
+ };
2385
+
2386
+ var __defProp$8 = Object.defineProperty;
2387
+ var __defProps$5 = Object.defineProperties;
2388
+ var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
2389
+ var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
2390
+ var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
2391
+ var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
2392
+ var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2393
+ var __spreadValues$8 = (a, b) => {
2394
+ for (var prop in b || (b = {}))
2395
+ if (__hasOwnProp$8.call(b, prop))
2396
+ __defNormalProp$8(a, prop, b[prop]);
2397
+ if (__getOwnPropSymbols$8)
2398
+ for (var prop of __getOwnPropSymbols$8(b)) {
2399
+ if (__propIsEnum$8.call(b, prop))
2400
+ __defNormalProp$8(a, prop, b[prop]);
2401
+ }
2402
+ return a;
2403
+ };
2404
+ var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
2405
+ const deletableInput = {
2406
+ border: "1px solid",
2407
+ borderColor: "palette.border.field",
2408
+ display: "inline-block",
2409
+ position: "relative",
2410
+ pr: "45px",
2411
+ ".deletableInput__input": {
2412
+ border: "none"
2413
+ },
2414
+ ".deletableInput__deleteButton": __spreadValues$8({
2415
+ height: "100%",
2416
+ outlineOffset: "-2px",
2417
+ position: "absolute",
2418
+ right: 0,
2419
+ top: 0,
2420
+ width: "45px"
2421
+ }, getColorsAndStatesByPath("buttons.deletableInputButton")),
2422
+ "&:focus-within:not(.asMaterial)": __spreadProps$5(__spreadValues$8({}, focusOutline), {
2423
+ ".deletableInput__input:focus": {
2424
+ outline: "none"
2425
+ },
2426
+ ".deletableInput__deleteButton:focus": {
2427
+ outline: "none"
2428
+ }
2429
+ }),
2430
+ "&.asMaterial": {
2431
+ borderLeft: "none",
2432
+ borderRight: "none",
2433
+ borderTop: "none",
2434
+ borderBottomColor: "palette.border.section",
2435
+ "& + .input__underline": {
2436
+ transform: "scale(1)"
2437
+ },
2438
+ ".deletableInput__input:focus": {
2439
+ outline: "none",
2440
+ "~.input__underline::after": {
2441
+ animationName: "growHorizontal",
2442
+ animationDuration: "150ms",
2443
+ animationTimingFunction: "ease-out",
2444
+ content: '""',
2445
+ display: "block",
2446
+ height: "0",
2447
+ outlineColor: "palette.primary.main",
2448
+ outlineStyle: "solid",
2449
+ outlineWidth: "1.5px",
2450
+ outlineOffset: 0,
2451
+ position: "absolute",
2452
+ transformOrigin: "center center",
2453
+ left: 0,
2454
+ right: 0
2455
+ }
2456
+ }
2457
+ }
2458
+ };
2459
+
2460
+ const forms$1 = (theme) => {
2461
+ return {
2462
+ checkbox,
2463
+ customCheckbox,
2464
+ dateInput,
2465
+ deletableInput,
2466
+ iconInput,
2467
+ input,
2468
+ label,
2469
+ radio,
2470
+ select,
2471
+ selectMultiple: selectMultiple(theme),
2472
+ switch: Switch,
2473
+ textarea,
2474
+ /* PREPEND HERE */
2475
+ 'input[type="date"]': {
2476
+ variant: "forms.input"
2477
+ }
2478
+ };
2479
+ };
2480
+
2481
+ const overlay = {
2482
+ overlay: {
2483
+ position: "fixed",
2484
+ overflow: "hidden",
2485
+ top: "0",
2486
+ right: "0",
2487
+ bottom: "0",
2488
+ left: "0",
2489
+ width: "100vw",
2490
+ height: "100vh",
2491
+ display: "flex",
2492
+ justifyContent: "center",
2493
+ alignItems: "center",
2494
+ backgroundColor: `palette.background.overlay`,
2495
+ zIndex: "modal",
2496
+ "&:not(.screenLock) .modal-enter-done": {
2497
+ boxShadow: "modals"
2498
+ }
2499
+ },
2500
+ "overlay--stretch": {
2501
+ variant: "layout.common.modals.overlay",
2502
+ alignItems: responsive$1({ 0: "stretch", 2: "center" })
2503
+ }
2504
+ };
2505
+
2506
+ const apiaApi = {
2507
+ display: "flex",
2508
+ width: "100%",
2509
+ ".handler__form": {
2510
+ display: "flex",
2511
+ flexDirection: "column",
2512
+ width: "100%",
2513
+ gap: spacing(6),
2514
+ ".handler__form__elements": {
2515
+ flexShrink: 1,
2516
+ overflow: "auto"
2517
+ },
2518
+ ".handler__form__elements__section__content": {
2519
+ display: "flex",
2520
+ flexDirection: "column",
2521
+ wordBreak: "break-word",
2522
+ background: "palette.background.paper",
2523
+ p: 0,
2524
+ gap: spacing(3)
2525
+ },
2526
+ ".content .handler__form__elements__section__content": {
2527
+ border: "1px solid",
2528
+ borderColor: "palette.border.section",
2529
+ borderTop: "none",
2530
+ p: spacing(6)
2531
+ },
2532
+ ".handler__form__buttons": {
2533
+ display: "flex",
2534
+ flexDirection: "row",
2535
+ justifyContent: "end",
2536
+ p: 0,
2537
+ gap: "0px"
2538
+ },
2539
+ ".radio": {
2540
+ display: "flex",
2541
+ flexDirection: "column",
2542
+ flexWrap: "wrap",
2543
+ listStyle: "none",
2544
+ variant: "layout.execution.form.fields.radio"
2545
+ },
2546
+ ".handler__checkbox, .handler__radio": {
2547
+ "label span": {
2548
+ fontWeight: "normal"
2549
+ }
2550
+ },
2551
+ ".checkbox": {
2552
+ flexDirection: "row-reverse",
2553
+ alignItems: "center",
2554
+ justifyContent: "start",
2555
+ gap: spacing(4),
2556
+ ".semicolon": {
2557
+ display: "none"
2558
+ },
2559
+ input: {
2560
+ width: "100%"
2561
+ }
2562
+ },
2563
+ ".handler__hidden": {
2564
+ display: "none"
2565
+ },
2566
+ "label.select > div": {
2567
+ width: "100%"
2568
+ },
2569
+ ".spacer": {
2570
+ height: spacing(7)
2571
+ }
2572
+ },
2573
+ ".progressBox": {
2574
+ p: spacing(5),
2575
+ pt: spacing(0)
2576
+ }
2577
+ /* PREPEND HERE */
2578
+ };
2579
+
2580
+ var __defProp$7 = Object.defineProperty;
2581
+ var __defProps$4 = Object.defineProperties;
2582
+ var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
2583
+ var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
2584
+ var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
2585
+ var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
2586
+ var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2587
+ var __spreadValues$7 = (a, b) => {
2588
+ for (var prop in b || (b = {}))
2589
+ if (__hasOwnProp$7.call(b, prop))
2590
+ __defNormalProp$7(a, prop, b[prop]);
2591
+ if (__getOwnPropSymbols$7)
2592
+ for (var prop of __getOwnPropSymbols$7(b)) {
2593
+ if (__propIsEnum$7.call(b, prop))
2594
+ __defNormalProp$7(a, prop, b[prop]);
2595
+ }
2596
+ return a;
2597
+ };
2598
+ var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
2599
+ const modals = __spreadProps$4(__spreadValues$7({
2600
+ apiaApi
2601
+ }, overlay), {
2602
+ main: __spreadValues$7({
2603
+ zIndex: "modal",
2604
+ display: "flex",
2605
+ flexDirection: "column",
2606
+ p: spacing(6),
2607
+ alignItems: "center",
2608
+ justifyItems: "center",
2609
+ maxHeight: "100vh",
2610
+ maxWidth: "calc(100vw - 10px)",
2611
+ resize: "both",
2612
+ overflow: "auto",
2613
+ border: "1px solid",
2614
+ gap: spacing(5),
2615
+ "&>div": {
2616
+ overflow: "hidden",
2617
+ flexGrow: 0,
2618
+ flexShrink: 0,
2619
+ p: "3px",
2620
+ width: "100%"
2621
+ },
2622
+ "&>div.modal__header": {
2623
+ alignItems: responsive$1({ 0: "end", 4: "center" }),
2624
+ flexShrink: 0,
2625
+ overflow: "visible",
2626
+ ".modal__headerBar": {
2627
+ display: "flex",
2628
+ flexDirection: "row",
2629
+ alignItems: "center",
2630
+ gap: spacing(3)
2631
+ }
2632
+ },
2633
+ "&>div.modal__content, &>div.modal__content>form": {
2634
+ overflow: "auto",
2635
+ width: "100%",
2636
+ flexBasis: "100%",
2637
+ flexShrink: 1,
2638
+ display: "flex",
2639
+ justifyContent: "stretch",
2640
+ alignItems: "stretch"
2641
+ }
2642
+ }, getColorsByPath("modal")),
2643
+ finder: {
2644
+ variant: "layout.common.modals.main",
2645
+ height: responsive$1({ 0: "100vh", 3: "80vh" }),
2646
+ width: responsive$1({ 0: "95vw", 3: "80vw", 4: "70vw" }),
2647
+ ".modal__content": {
2648
+ p: spacing(2),
2649
+ overflow: "hidden",
2650
+ ".confirm__content": {
2651
+ overflow: "hidden",
2652
+ ".finder__content": {
2653
+ display: "flex",
2654
+ alignItems: "stretch"
2655
+ },
2656
+ ".selection__keyHandler": {
2657
+ overflow: "hidden",
2658
+ height: "100%",
2659
+ ".responsiveTable__wrapper": {
2660
+ height: "100%",
2661
+ border: "1px solid",
2662
+ borderColor: "palette.border.article",
2663
+ backgroundColor: "palette.gray.900"
2664
+ }
2665
+ }
2666
+ }
2667
+ }
2668
+ },
2669
+ sm: {
2670
+ variant: "layout.common.modals.main",
2671
+ maxWidth: "min(350px, calc(100vw - 10px))"
2672
+ },
2673
+ md: {
2674
+ variant: "layout.common.modals.main",
2675
+ maxWidth: "min(500px, calc(100vw - 10px))"
2676
+ },
2677
+ "md-fixed": {
2678
+ variant: "layout.common.modals.main",
2679
+ width: "min(500px, calc(100vw - 10px))",
2680
+ maxHeight: responsive$1({ 0: "95vh", 2: "80vh" })
2681
+ },
2682
+ lg: {
2683
+ variant: "layout.common.modals.main",
2684
+ maxWidth: "min(640px, calc(100vw - 10px))"
2685
+ },
2686
+ "lg-fixed": {
2687
+ variant: "layout.common.modals.main",
2688
+ width: "640px",
2689
+ height: "60vh"
2690
+ },
2691
+ xl: {
2692
+ variant: "layout.common.modals.main",
2693
+ maxWidth: "min(730px, calc(100vw - 10px))"
2694
+ },
2695
+ "xl-fixed": {
2696
+ variant: "layout.common.modals.main",
2697
+ width: responsive$1({ 0: "95vw", 2: "60vw" }),
2698
+ height: responsive$1({ 0: "95vh", 2: "80vh" })
2699
+ },
2700
+ xxl: {
2701
+ variant: "layout.common.modals.main",
2702
+ width: responsive$1({ 0: "95vw", 2: "80vw" }),
2703
+ maxHeight: responsive$1({ 0: "95vh", 2: "80vh" })
2704
+ },
2705
+ "xxl-fixed": {
2706
+ variant: "layout.common.modals.main",
2707
+ width: responsive$1({ 0: "95vw", 2: "80vw" }),
2708
+ height: responsive$1({ 0: "95vh", 2: "80vh" })
2709
+ },
2710
+ xxxl: {
2711
+ variant: "layout.common.modals.main",
2712
+ width: responsive$1({ 0: "95vw", 2: "95vw" }),
2713
+ maxHeight: responsive$1({ 0: "95vh", 2: "95vh" })
2714
+ },
2715
+ "xxxl-fixed": {
2716
+ variant: "layout.common.modals.main",
2717
+ width: responsive$1({ 0: "95vw", 2: "95vw" }),
2718
+ height: responsive$1({ 0: "95vh", 2: "95vh" })
2719
+ },
2720
+ flex: {
2721
+ variant: "layout.common.modals.main",
2722
+ maxWidth: "95vw",
2723
+ maxHeight: "95vh",
2724
+ ".modal__content": {
2725
+ p: spacing(2),
2726
+ overflow: "auto"
2727
+ }
2728
+ },
2729
+ cal: {
2730
+ variant: "layout.common.modals.sm",
2731
+ width: "350px"
2732
+ },
2733
+ editGrid: {
2734
+ variant: "layout.common.modals.main",
2735
+ width: "root",
2736
+ maxHeight: "90vh"
2737
+ }
2738
+ /* PREPEND HERE */
2739
+ });
2740
+
2741
+ var __defProp$6 = Object.defineProperty;
2742
+ var __defProps$3 = Object.defineProperties;
2743
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
2744
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
2745
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
2746
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
2747
+ var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2748
+ var __spreadValues$6 = (a, b) => {
2749
+ for (var prop in b || (b = {}))
2750
+ if (__hasOwnProp$6.call(b, prop))
2751
+ __defNormalProp$6(a, prop, b[prop]);
2752
+ if (__getOwnPropSymbols$6)
2753
+ for (var prop of __getOwnPropSymbols$6(b)) {
2754
+ if (__propIsEnum$6.call(b, prop))
2755
+ __defNormalProp$6(a, prop, b[prop]);
2756
+ }
2757
+ return a;
2758
+ };
2759
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
2760
+ function getSelectionStyles() {
2761
+ return {
2762
+ 'td[data-focused="false"], th[data-focused="false"]': {
2763
+ "*:focus-visible, &:focus, &:focus-visible": {
2764
+ outline: "none"
2765
+ },
2766
+ "*:focus": __spreadValues$6({}, focusOutline)
2767
+ },
2768
+ '[data-focused="true"]:not(.row__separator__cell)': {
2769
+ '&:not([data-editionmode="true"])': {
2770
+ "&:focus, & > *:focus, *:focus-visible": __spreadProps$3(__spreadValues$6({}, focusOutline), {
2771
+ "&.cell__download__document": {
2772
+ outlineOffset: 0
2773
+ }
2774
+ })
2775
+ },
2776
+ '&[data-editionmode="true"]': {
2777
+ "&:focus, *:focus, *:focus-visible": __spreadProps$3(__spreadValues$6({}, focusOutline), {
2778
+ outlineStyle: "dotted",
2779
+ outlineWidth: "6px",
2780
+ outlineOffset: "-4px"
2781
+ })
2782
+ }
2783
+ },
2784
+ '[data-focused="true"].row__separator__cell': {
2785
+ backgroundColor: "palette.secondary.main",
2786
+ outline: "none"
2787
+ }
2788
+ };
2789
+ }
2790
+
2791
+ var __defProp$5 = Object.defineProperty;
2792
+ var __defProps$2 = Object.defineProperties;
2793
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
2794
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
2795
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
2796
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
2797
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2798
+ var __spreadValues$5 = (a, b) => {
2799
+ for (var prop in b || (b = {}))
2800
+ if (__hasOwnProp$5.call(b, prop))
2801
+ __defNormalProp$5(a, prop, b[prop]);
2802
+ if (__getOwnPropSymbols$5)
2803
+ for (var prop of __getOwnPropSymbols$5(b)) {
2804
+ if (__propIsEnum$5.call(b, prop))
2805
+ __defNormalProp$5(a, prop, b[prop]);
2806
+ }
2807
+ return a;
2808
+ };
2809
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
2810
+ const primary$1 = (theme) => {
2811
+ return __spreadProps$2(__spreadValues$5({
2812
+ variant: "colors.tables.primary",
2813
+ width: "100%",
2814
+ backgroundColor: "components.primaryTable.body.backgroundColor",
2815
+ border: "1px solid",
2816
+ borderColor: "components.primaryTable.borderColor",
2817
+ borderCollapse: "separate",
2818
+ borderSpacing: 0,
2819
+ tableLayout: "fixed",
2820
+ thead: {
2821
+ zIndex: 1,
2822
+ position: "sticky",
2823
+ insetBlockStart: 0,
2824
+ backgroundColor: "palette.background.paper",
2825
+ "tr:not(.filtersRow):not(.responsiveTable__filters__row)": {
2826
+ "th, td": __spreadProps$2(__spreadValues$5({
2827
+ variant: "buttons.primary",
2828
+ py: responsive$1({ 0: 3, 4: 4 }),
2829
+ px: responsive$1({ 0: 3, 4: 4 }),
2830
+ width: "breakWidth",
2831
+ backgroundColor: "palette.primary.main",
2832
+ borderColor: "palette.primary.dark",
2833
+ borderRadius: 0,
2834
+ borderStyle: "solid",
2835
+ borderWidth: "1px",
2836
+ color: "palette.primary.contrastText",
2837
+ display: "table-cell",
2838
+ verticalAlign: "center",
2839
+ wordBreak: "break-word",
2840
+ '&[role="presentation"]': {
2841
+ display: "none"
2842
+ }
2843
+ }, theme.palette.getStatesFromPath("components.primaryTable.header")), {
2844
+ "& *": {
2845
+ color: "inherit"
2846
+ },
2847
+ ".headButton__label": {
2848
+ textAlign: "left",
2849
+ d: ""
2850
+ },
2851
+ ".headButton__resizer": {
2852
+ width: "20px",
2853
+ cursor: "ew-resize",
2854
+ zIndex: 1e3,
2855
+ position: "absolute",
2856
+ right: "-10px",
2857
+ height: "100%"
2858
+ },
2859
+ "&:last-of-type .headButton__resizer": {
2860
+ right: "0px"
2861
+ },
2862
+ "&:last-of-type:not(td)": {
2863
+ maxWidth: "100%",
2864
+ width: "100%"
2865
+ },
2866
+ "&.additionalColumn": {
2867
+ minWidth: "50px",
2868
+ maxWidth: "50px",
2869
+ width: "50px",
2870
+ p: 0,
2871
+ textAlign: "center",
2872
+ verticalAlign: "center"
2873
+ },
2874
+ ".headButton__container": {
2875
+ width: "100%",
2876
+ display: "flex",
2877
+ alignItems: "center",
2878
+ justifyContent: "space-between",
2879
+ gap: 3,
2880
+ svg: {
2881
+ flexShrink: 0
2882
+ }
2883
+ },
2884
+ // '&>div': {
2885
+ // color: 'components.primaryTable.header.color',
2886
+ // svg: {
2887
+ // color: 'components.primaryTable.body.color',
2888
+ // },
2889
+ // },
2890
+ "&:not(:last-of-type)": {
2891
+ "&>div": {
2892
+ borderRightWidth: "1px"
2893
+ }
2894
+ }
2895
+ }),
2896
+ "th.requiredFilterColumn": {
2897
+ borderLeft: "4px solid !important",
2898
+ borderLeftColor: "palette.error.main !important"
2899
+ }
2900
+ },
2901
+ "tr.filtersRow, tr.responsiveTable__filters__row": {
2902
+ backgroundColor: "components.primaryTable.body.backgroundColor",
2903
+ "th.noFilter": {
2904
+ background: "transparent"
2905
+ },
2906
+ "td.requiredFilter__Border": {
2907
+ borderLeftStyle: "solid !important",
2908
+ borderLeftWidth: "4px !important",
2909
+ borderLeftColor: "palette.error.main"
2910
+ },
2911
+ td: {
2912
+ "input:not([disabled]), select:not([disabled])": {
2913
+ border: "1px solid white"
2914
+ },
2915
+ background: "transparent",
2916
+ border: "1px solid",
2917
+ borderColor: "components.primaryTable.body.borderColor",
2918
+ p: 0
2919
+ },
2920
+ transition: "height 0.3s",
2921
+ "&.hidden": {
2922
+ height: "0",
2923
+ overflow: "hidden",
2924
+ p: spacing(0),
2925
+ border: "none",
2926
+ "& *": {
2927
+ height: "0",
2928
+ overflow: "hidden",
2929
+ fontSize: 0,
2930
+ lineHeight: 0,
2931
+ p: spacing(0),
2932
+ border: "none"
2933
+ }
2934
+ }
2935
+ }
2936
+ },
2937
+ tbody: {
2938
+ tr: __spreadProps$2(__spreadValues$5(__spreadProps$2(__spreadValues$5({
2939
+ borderBottomWidth: "1px",
2940
+ borderBottomStyle: "solid"
2941
+ }, theme.palette.getStatesFromPath("components.primaryTable.body", {
2942
+ states: {
2943
+ disabled: false,
2944
+ readonly: false,
2945
+ active: false,
2946
+ hover: false,
2947
+ checked: false,
2948
+ focus: false,
2949
+ selected: false
2950
+ }
2951
+ })), {
2952
+ "&:nth-of-type(2n)": {
2953
+ backgroundColor: "components.primaryTable.body.evenRowsBackgroundColor"
2954
+ },
2955
+ "&.non-selectable": {
2956
+ cursor: "not-allowed"
2957
+ },
2958
+ "&.hidden": {
2959
+ display: "none"
2960
+ },
2961
+ "&.locked": {
2962
+ background: "palette.gray.900",
2963
+ td: {
2964
+ borderColor: "palette.gray.850"
2965
+ }
2966
+ }
2967
+ }), getSelectedColors(theme)), {
2968
+ "&.draggingRow": {
2969
+ outline: "3px dotted",
2970
+ outlineColor: "components.primaryTable.header.borderColor",
2971
+ outlineOffset: "-3px",
2972
+ "*": {
2973
+ outline: "none !important"
2974
+ }
2975
+ },
2976
+ borderColor: "components.primaryTable.body.borderColor",
2977
+ ".rowStatesList": {
2978
+ display: "flex",
2979
+ gap: spacing(3),
2980
+ alignItems: "center",
2981
+ svg: {
2982
+ width: "smallIcon",
2983
+ height: "smallIcon",
2984
+ cursor: "pointer"
2985
+ }
2986
+ },
2987
+ td: {
2988
+ verticalAlign: "top",
2989
+ wordBreak: "break-word",
2990
+ border: "1px solid",
2991
+ borderColor: "components.primaryTable.body.borderColor",
2992
+ "&.stickyColumn": {
2993
+ position: "sticky",
2994
+ left: 0,
2995
+ backgroundColor: "components.primaryTable.body.backgroundColor"
2996
+ },
2997
+ ".moreInformationButton": {
2998
+ width: "30px",
2999
+ height: "30px",
3000
+ padding: "3px",
3001
+ border: "none",
3002
+ background: "transparent"
3003
+ }
3004
+ }
3005
+ }),
3006
+ td: {
3007
+ p: spacing(3)
3008
+ },
3009
+ ".responsiveTable__additionalInfoContainer": {
3010
+ display: "grid",
3011
+ gridTemplateColumns: responsive$1({
3012
+ 0: "repeat(2, 1fr)",
3013
+ 5: "repeat(4, 1fr)"
3014
+ }),
3015
+ columnGap: 3,
3016
+ rowGap: 2
3017
+ },
3018
+ ".responsiveTable__additionalInfoContainer .responsiveTable__additionalInfoItem.separator": {
3019
+ gridColumnStart: "1",
3020
+ gridColumnEnd: "5",
3021
+ borderBottom: "1px solid",
3022
+ borderBottomColor: "palette.gray.700",
3023
+ height: "auto"
3024
+ }
3025
+ },
3026
+ ".editionMode": {
3027
+ border: "3px solid",
3028
+ borderColor: "components.primaryTable.header.borderColor",
3029
+ borderWidth: "1.5px",
3030
+ borderStyle: "dotted"
3031
+ },
3032
+ ".stateCell": {
3033
+ width: "50px",
3034
+ maxWidth: "50px",
3035
+ minWidth: "50px",
3036
+ textAlign: "center",
3037
+ verticalAlign: "middle"
3038
+ }
3039
+ }, getSelectionStyles()), {
3040
+ ".no__registers": {
3041
+ py: 6,
3042
+ minWidth: "200px"
3043
+ },
3044
+ ".requiredFilter__Column": {
3045
+ fontWeight: "bold"
3046
+ },
3047
+ ".bold": {
3048
+ fontWeight: "bold"
3049
+ },
3050
+ ".light": {
3051
+ color: "#6a6a6a"
3052
+ },
3053
+ ".additionalInfo__cell, .stateCell": {
3054
+ verticalAlign: "middle"
3055
+ }
3056
+ });
3057
+ };
3058
+
3059
+ const information = {
3060
+ width: "100%",
3061
+ border: "1px solid",
3062
+ borderColor: "primary",
3063
+ borderCollapse: "collapse",
3064
+ thead: {
3065
+ tr: {
3066
+ th: {
3067
+ bg: "primary",
3068
+ color: "white",
3069
+ textAlign: "center",
3070
+ fontWeight: "bold",
3071
+ p: spacing(4)
3072
+ }
3073
+ }
3074
+ },
3075
+ tbody: {
3076
+ tr: {
3077
+ "td,th": {
3078
+ borderColor: "muted",
3079
+ p: spacing(4)
3080
+ },
3081
+ "&:not(tr:last-of-type)": {
3082
+ "td,th": {
3083
+ borderBottom: "1px solid"
3084
+ }
3085
+ },
3086
+ "td:not(td:last-child),th:not(th:last-child)": {
3087
+ borderRight: "1px solid"
3088
+ },
3089
+ th: {
3090
+ textAlign: "left",
3091
+ whiteSpace: "nowrap",
3092
+ minWidth: "min-content",
3093
+ width: 0
3094
+ }
3095
+ }
3096
+ }
3097
+ };
3098
+
3099
+ const accordion$1 = {
3100
+ display: "flex",
3101
+ flexDirection: "column",
3102
+ gap: spacing(2),
3103
+ ".responsiveTable__accordionElement__toggler": {
3104
+ variant: "buttons.outline",
3105
+ borderWidth: "1px",
3106
+ display: "flex",
3107
+ gap: spacing(3),
3108
+ alignItems: "stretch",
3109
+ width: "100%",
3110
+ px: 4,
3111
+ py: 3,
3112
+ "&:hover h3": {
3113
+ color: "palette.primary.contrastText"
3114
+ },
3115
+ ".accordionElement__toggler__checkbox": {
3116
+ flexShrink: 0,
3117
+ m: spacing(2)
3118
+ },
3119
+ ".accordionElement__toggler__button": {
3120
+ flexGrow: 100,
3121
+ display: "flex",
3122
+ justifyContent: "space-between",
3123
+ py: 2,
3124
+ pr: spacing(2),
3125
+ alignItems: "center",
3126
+ ".accordionElement__toggler__label": {
3127
+ flexGrow: 100,
3128
+ m: spacing(0),
3129
+ textAlign: "left",
3130
+ fontSize: 16
3131
+ },
3132
+ ".accordionElement__toggler__expandIcon": {
3133
+ flexShrink: 0,
3134
+ svg: {
3135
+ width: "32px"
3136
+ }
3137
+ }
3138
+ }
3139
+ },
3140
+ ".responsiveTable__accordionElement__content": {
3141
+ "& > div": {
3142
+ backgroundColor: "palette.background.paper",
3143
+ transition: "padding-bottom 300ms, padding-top 300ms",
3144
+ px: 5
3145
+ },
3146
+ "&.rah-static--height-zero": {
3147
+ "& > div": { py: 0 }
3148
+ },
3149
+ "&.rah-static--height-auto, &.rah-animating--down": {
3150
+ "& > div": { py: 5 }
3151
+ },
3152
+ ".priority_container": { display: "flex", alignItems: "center" },
3153
+ ".priority": { display: "flex" }
3154
+ }
3155
+ };
3156
+
3157
+ const print = {
3158
+ border: "2px solid",
3159
+ borderColor: "printView.list.table.borderColor",
3160
+ "td, th": {
3161
+ p: 3,
3162
+ textAlign: "left"
3163
+ }
3164
+ };
3165
+
3166
+ const responsive = (theme) => {
3167
+ return {
3168
+ maxHeight: "100%",
3169
+ overflow: "auto",
3170
+ position: "relative",
3171
+ "&.isLoading": {
3172
+ overflow: "hidden"
3173
+ },
3174
+ ".responsiveTable__isLoading": {
3175
+ position: "absolute",
3176
+ top: 0,
3177
+ left: 0,
3178
+ right: 0,
3179
+ bottom: 0,
3180
+ background: tinycolor(theme.palette.background.paper).setAlpha(0.7).toRgbString(),
3181
+ zIndex: 1,
3182
+ display: "flex",
3183
+ alignItems: "center",
3184
+ justifyContent: "center"
3185
+ },
3186
+ ".cell__download__document": {
3187
+ display: "flex",
3188
+ gap: 3,
3189
+ alignItems: "center",
3190
+ justifyContent: "start",
3191
+ "&, *": {
3192
+ color: "palette.primary.main"
3193
+ },
3194
+ svg: {
3195
+ flexShrink: 0
3196
+ }
3197
+ }
3198
+ /* PREPEND HERE */
3199
+ };
3200
+ };
3201
+
3202
+ var __defProp$4 = Object.defineProperty;
3203
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
3204
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
3205
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
3206
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3207
+ var __spreadValues$4 = (a, b) => {
3208
+ for (var prop in b || (b = {}))
3209
+ if (__hasOwnProp$4.call(b, prop))
3210
+ __defNormalProp$4(a, prop, b[prop]);
3211
+ if (__getOwnPropSymbols$4)
3212
+ for (var prop of __getOwnPropSymbols$4(b)) {
3213
+ if (__propIsEnum$4.call(b, prop))
3214
+ __defNormalProp$4(a, prop, b[prop]);
3215
+ }
3216
+ return a;
3217
+ };
3218
+ const secondary = {
3219
+ variant: "layout.common.tables.primary",
3220
+ borderColor: "components.secondaryTable.borderColor",
3221
+ "& thead": {
3222
+ "tr:not(.filtersRow):not(.responsiveTable__filters__row)": {
3223
+ "& th, & td": () => __spreadValues$4({}, getColorsAndStatesByPath("components.secondaryTable.header"))
3224
+ }
3225
+ },
3226
+ "& tbody": {
3227
+ tr: __spreadValues$4({
3228
+ "&:nth-of-type(2n)": {
3229
+ backgroundColor: "components.secondaryTable.body.evenRowsBackgroundColor"
3230
+ },
3231
+ td: {
3232
+ borderColor: "components.secondaryTable.body.borderColor"
3233
+ },
3234
+ '&[aria-selected="true"]': {
3235
+ backgroundColor: "components.secondaryTable.body.selectedRows.backgroundColor",
3236
+ "& td": {
3237
+ borderColor: "components.secondaryTable.body.selectedRows.borderColor"
3238
+ },
3239
+ color: "components.secondaryTable.body.selectedRows.color"
3240
+ },
3241
+ borderBottomWidth: "1px",
3242
+ borderBottomStyle: "solid"
3243
+ }, getColorsAndStatesByPath("components.secondaryTable.body", {
3244
+ states: {
3245
+ disabled: false,
3246
+ readonly: false,
3247
+ active: false,
3248
+ hover: false,
3249
+ checked: false,
3250
+ focus: false,
3251
+ selected: false
3252
+ }
3253
+ }))
3254
+ }
3255
+ };
3256
+
3257
+ const tables = (theme) => {
3258
+ return {
3259
+ accordion: accordion$1,
3260
+ information,
3261
+ primary: primary$1(theme),
3262
+ print,
3263
+ responsive: responsive(theme),
3264
+ secondary
3265
+ /* PREPEND HERE */
3266
+ };
3267
+ };
3268
+
3269
+ const captcha = {
3270
+ display: "flex",
3271
+ flexDirection: "column",
3272
+ gap: spacing(2),
3273
+ ".captcha__imageContainer": {
3274
+ border: "1px solid",
3275
+ borderColor: "palette.border.field",
3276
+ p: spacing(4)
3277
+ },
3278
+ ".captcha__inputContainer": {
3279
+ display: "flex",
3280
+ gap: spacing(2),
3281
+ justifyContent: "stretch",
3282
+ input: {
3283
+ flexGrow: 1,
3284
+ width: "100%"
3285
+ },
3286
+ ".captcha__buttons": {
3287
+ width: "24px",
3288
+ flexDirection: "column",
3289
+ display: "flex",
3290
+ gap: spacing(2),
3291
+ flexShrink: 0,
3292
+ button: {
3293
+ width: "24px",
3294
+ height: "24px",
3295
+ p: "5px",
3296
+ variant: "buttons.icon-outline",
3297
+ svg: {
3298
+ color: "palette.text.primary",
3299
+ height: "16px",
3300
+ width: "16px"
3301
+ }
3302
+ }
3303
+ }
3304
+ }
3305
+ };
3306
+
3307
+ const forms = {
3308
+ captcha
3309
+ /* PREPEND HERE */
3310
+ };
3311
+
3312
+ var __defProp$3 = Object.defineProperty;
3313
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
3314
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
3315
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
3316
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3317
+ var __spreadValues$3 = (a, b) => {
3318
+ for (var prop in b || (b = {}))
3319
+ if (__hasOwnProp$3.call(b, prop))
3320
+ __defNormalProp$3(a, prop, b[prop]);
3321
+ if (__getOwnPropSymbols$3)
3322
+ for (var prop of __getOwnPropSymbols$3(b)) {
3323
+ if (__propIsEnum$3.call(b, prop))
3324
+ __defNormalProp$3(a, prop, b[prop]);
3325
+ }
3326
+ return a;
3327
+ };
3328
+ const primary = (theme) => {
3329
+ return {
3330
+ /* PREPEND HERE */
3331
+ position: "relative",
3332
+ '[role="tree"]:focus': {
3333
+ outline: "none",
3334
+ ".focus": focusOutline
3335
+ },
3336
+ ul: {
3337
+ listStyle: "none",
3338
+ p: 0
3339
+ },
3340
+ ".tree__searchLabelBox": {
3341
+ alignItems: "center",
3342
+ borderRadius: "2px",
3343
+ display: "flex",
3344
+ float: "right",
3345
+ gap: spacing(3),
3346
+ justifyContent: "center",
3347
+ position: "sticky",
3348
+ right: "4px",
3349
+ top: "4px",
3350
+ transform: "translateX(0)",
3351
+ width: "100%",
3352
+ zIndex: "stickyElements",
3353
+ ".tree__loading": {
3354
+ position: "fixed",
3355
+ top: 0,
3356
+ right: "4px",
3357
+ height: "iconMd",
3358
+ width: "iconMd",
3359
+ background: "palette.background.paper"
3360
+ },
3361
+ button: {
3362
+ cursor: "pointer",
3363
+ "&:hover": {
3364
+ textDecoration: "underline"
3365
+ }
3366
+ }
3367
+ },
3368
+ ".tree__searchLabel": __spreadValues$3({
3369
+ alignItems: "center",
3370
+ display: "flex",
3371
+ gap: spacing(3),
3372
+ justifyContent: "center",
3373
+ position: "fixed",
3374
+ p: "2px 5px",
3375
+ right: 0,
3376
+ top: 0
3377
+ }, theme.palette.getOneState(
3378
+ { backgroundColor: "palette.background.paper" },
3379
+ "selected"
3380
+ )),
3381
+ '[role="treeitem"]': {
3382
+ '&[aria-expanded="false"] ul': {
3383
+ display: "none"
3384
+ },
3385
+ '&[aria-selected="true"] > .tree__nodeItemLabel': theme.palette.getOneState(
3386
+ { backgroundColor: "palette.background.paper" },
3387
+ "selected"
3388
+ ),
3389
+ background: "transparent"
3390
+ },
3391
+ ".tree__nodeItemLabel": {
3392
+ display: "flex",
3393
+ flexWrap: "nowrap",
3394
+ gap: 3,
3395
+ alignItems: "center",
3396
+ wordBreak: "break-all",
3397
+ button: {
3398
+ cursor: "pointer",
3399
+ "&:hover": {
3400
+ textDecoration: "underline"
3401
+ },
3402
+ span: {
3403
+ textOverflow: "ellipsis",
3404
+ overflow: "hidden",
3405
+ whiteSpace: "nowrap"
3406
+ }
3407
+ },
3408
+ ".tree__nodeItemLabelRenderer": {
3409
+ display: "flex",
3410
+ overflow: " hidden",
3411
+ width: "100%"
3412
+ },
3413
+ ".button__content": {
3414
+ textAlign: "left"
3415
+ },
3416
+ "& > *:not(.tree__nodeItemLabelRenderer)": {
3417
+ flexShrink: 0,
3418
+ textAlign: "left"
3419
+ },
3420
+ "&:hover": theme.palette.getOneState(
3421
+ { backgroundColor: "palette.background.paper" },
3422
+ "hover"
3423
+ )
3424
+ },
3425
+ ".spacer": {
3426
+ borderLeft: "1px solid",
3427
+ borderLeftColor: "palette.border.section",
3428
+ width: "20px",
3429
+ alignSelf: "stretch"
3430
+ }
3431
+ };
3432
+ };
3433
+
3434
+ const trees = {
3435
+ primary
3436
+ };
3437
+
3438
+ var __defProp$2 = Object.defineProperty;
3439
+ var __defProps$1 = Object.defineProperties;
3440
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
3441
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
3442
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
3443
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
3444
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3445
+ var __spreadValues$2 = (a, b) => {
3446
+ for (var prop in b || (b = {}))
3447
+ if (__hasOwnProp$2.call(b, prop))
3448
+ __defNormalProp$2(a, prop, b[prop]);
3449
+ if (__getOwnPropSymbols$2)
3450
+ for (var prop of __getOwnPropSymbols$2(b)) {
3451
+ if (__propIsEnum$2.call(b, prop))
3452
+ __defNormalProp$2(a, prop, b[prop]);
3453
+ }
3454
+ return a;
3455
+ };
3456
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
3457
+ const pagination = __spreadProps$1(__spreadValues$2({}, getColorsByPath("components.pagination")), {
3458
+ gap: spacing(1),
3459
+ justifyContent: "stretch",
3460
+ "&.onlyRefresh": {
3461
+ justifyContent: "end"
3462
+ },
3463
+ alignItems: "center",
3464
+ padding: 1,
3465
+ display: "flex",
3466
+ ".pagination__leftToolbar": {
3467
+ alignItems: "center",
3468
+ display: "flex",
3469
+ width: "100%"
3470
+ },
3471
+ ".pagination__deleteLabels": {
3472
+ overflow: "hidden",
3473
+ textOverflow: "ellipsis",
3474
+ whiteSpace: "nowrap"
3475
+ },
3476
+ ".pagination__selectPage": {
3477
+ width: "80px",
3478
+ top: "80px",
3479
+ textAlign: "center"
3480
+ },
3481
+ ".iconButton": __spreadProps$1(__spreadValues$2({
3482
+ height: "36px",
3483
+ width: "36px"
3484
+ }, getColorsAndStatesByPath("components.pagination.icons", {
3485
+ states: { disabled: false, path: true }
3486
+ })), {
3487
+ "&:disabled": {
3488
+ background: "transparent"
3489
+ }
3490
+ }),
3491
+ ".recordsCounter": {
3492
+ color: "palette.primary.contrastText",
3493
+ pl: spacing(3)
3494
+ },
3495
+ ".reachedMax": {
3496
+ color: "red",
3497
+ pl: 2
3498
+ },
3499
+ ".pagination__controls": {
3500
+ flexGrow: 1,
3501
+ justifyContent: "center",
3502
+ flexShrink: 0,
3503
+ "&.onlyRefresh": {
3504
+ justifyContent: "end"
3505
+ },
3506
+ alignItems: "stretch",
3507
+ padding: 1,
3508
+ display: "flex",
3509
+ width: responsive$1({ 0: "max-content", 2: "auto" }),
3510
+ "select ~ svg": {
3511
+ display: "none"
3512
+ },
3513
+ ".input": __spreadProps$1(__spreadValues$2({
3514
+ display: "flex",
3515
+ alignItems: "center",
3516
+ gap: spacing(3),
3517
+ fontSize: "1em",
3518
+ border: "1px solid",
3519
+ paddingY: 1,
3520
+ paddingX: 4
3521
+ }, getColorsByPath("components.pagination.pagesBox")), {
3522
+ input: {
3523
+ font: "inherit",
3524
+ background: "none",
3525
+ border: "none",
3526
+ width: "30px",
3527
+ padding: 0,
3528
+ textAlign: "center"
3529
+ },
3530
+ span: {
3531
+ font: "inherit",
3532
+ display: "block",
3533
+ width: "30px"
3534
+ }
3535
+ })
3536
+ },
3537
+ ".infoTooltip": {
3538
+ position: "relative",
3539
+ display: "inline-block",
3540
+ borderBottom: "1px dotted black",
3541
+ cursor: "pointer",
3542
+ backgroundColor: "#f7d97f"
3543
+ },
3544
+ ".pagination__information": {
3545
+ p: 1,
3546
+ ".pagination__infoIcon": {
3547
+ display: "flex"
3548
+ }
3549
+ },
3550
+ ".pagination__alertInfo": __spreadValues$2({
3551
+ variant: "buttons.icon-primary"
3552
+ }, getColorsAndStatesByPath("buttons.iconAlert")),
3553
+ ".pagination__rightToolbar": {
3554
+ display: "flex",
3555
+ gap: 0,
3556
+ width: "100%",
3557
+ justifyContent: "end",
3558
+ ".pagination__deleteFiltersButton": {
3559
+ variant: "buttons.primary-sm",
3560
+ textDecoration: "none",
3561
+ px: 3,
3562
+ ".button__content": {
3563
+ display: "flex",
3564
+ flexDirection: "row",
3565
+ gap: 3
3566
+ },
3567
+ ".pagination__appliedFiltersLabel": {
3568
+ backgroundColor: "palette.primary.contrastText",
3569
+ color: "palette.text.title",
3570
+ borderRadius: "100%",
3571
+ display: "inline-flex",
3572
+ alignItems: "center",
3573
+ justifyContent: "center",
3574
+ minWidth: "1.5em",
3575
+ "&.withFilters": {
3576
+ backgroundColor: "favorite",
3577
+ color: "palette.text.primary"
3578
+ }
3579
+ }
3580
+ }
3581
+ }
3582
+ });
3583
+
3584
+ const accordion = {
3585
+ primary: {
3586
+ "&, .accordion__item": {
3587
+ display: "flex",
3588
+ flexDirection: "column",
3589
+ alignItems: "stretch"
3590
+ },
3591
+ ".accordion__item__button__leftGroup, .accordion__item__button__rightGroup": {
3592
+ alignItems: "center",
3593
+ display: "flex",
3594
+ gap: 3,
3595
+ "& > *": {
3596
+ flexShrink: 0,
3597
+ "&.accordion__item__button__label": {
3598
+ flexShrink: 1
3599
+ }
3600
+ }
3601
+ },
3602
+ ".accordion__item__button__label": {
3603
+ overflow: "hidden",
3604
+ textOverflow: "ellipsis",
3605
+ whiteSpace: "nowrap",
3606
+ flexShrink: 1,
3607
+ color: "palette.primary.contrastText",
3608
+ fontSize: 16
3609
+ },
3610
+ ".accordion__item__button__check": {
3611
+ width: "32px",
3612
+ height: "32px",
3613
+ background: "palette.background.paper",
3614
+ border: "1px solid",
3615
+ borderColor: "palette.border.field",
3616
+ cursor: "pointer",
3617
+ display: "flex",
3618
+ alignItems: "stretch",
3619
+ justifyContent: "stretch",
3620
+ p: 2,
3621
+ svg: {
3622
+ color: "palette.text.primary",
3623
+ height: "100%",
3624
+ width: "100%"
3625
+ }
3626
+ },
3627
+ ".accordion__item:last-of-type > *": {
3628
+ borderBottom: "1px solid",
3629
+ borderBottomColor: "palette.border.section"
3630
+ },
3631
+ ".accordion__item__content > *": {
3632
+ p: spacing(3),
3633
+ borderLeft: "1px solid",
3634
+ borderRight: "1px solid",
3635
+ borderLeftColor: "palette.border.section",
3636
+ borderRightColor: "palette.border.section"
3637
+ },
3638
+ ".accordion__item__button": {
3639
+ width: "100%",
3640
+ p: 3,
3641
+ ".button__content": {
3642
+ alignItems: "center",
3643
+ display: "flex",
3644
+ gap: spacing(3),
3645
+ justifyContent: "space-between",
3646
+ width: "100%"
3647
+ }
3648
+ }
3649
+ }
3650
+ };
3651
+
3652
+ const components = {
3653
+ accordion,
3654
+ pagination
3655
+ };
3656
+
3657
+ const common = (theme) => {
3658
+ return {
3659
+ forms,
3660
+ modals,
3661
+ tables: tables(theme),
3662
+ components,
3663
+ trees
3664
+ /* PREPEND HERE */
3665
+ };
3666
+ };
3667
+
3668
+ const layout = (theme) => {
3669
+ return {
3670
+ common: common(theme)
3671
+ /* PREPEND HERE */
3672
+ };
3673
+ };
3674
+
3675
+ const makeTheme = (t) => {
3676
+ return t;
3677
+ };
3678
+ let declaredStyles = {};
3679
+ function getMainTheme(customTheme, customPalette) {
3680
+ const theme = makeTheme(
3681
+ merge(baseTheme(), { layout: declaredStyles }, customTheme != null ? customTheme : {}, {
3682
+ palette: {}
3683
+ })
3684
+ );
3685
+ const palette = parsePalette(
3686
+ merge({}, defaultPalette, customPalette != null ? customPalette : theme.palette),
3687
+ theme
3688
+ );
3689
+ theme.palette = palette;
3690
+ theme.colors = getThemeColorsObject(theme);
3691
+ theme.forms = forms$1(theme);
3692
+ theme.layout = merge(layout(theme), theme.layout);
3693
+ theme.styles = merge({}, customTheme == null ? void 0 : customTheme.styles, { root: theme.layout.root });
3694
+ return theme;
3695
+ }
3696
+
3697
+ var __defProp$1 = Object.defineProperty;
3698
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
3699
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
3700
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
3701
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3702
+ var __spreadValues$1 = (a, b) => {
3703
+ for (var prop in b || (b = {}))
3704
+ if (__hasOwnProp$1.call(b, prop))
3705
+ __defNormalProp$1(a, prop, b[prop]);
3706
+ if (__getOwnPropSymbols$1)
3707
+ for (var prop of __getOwnPropSymbols$1(b)) {
3708
+ if (__propIsEnum$1.call(b, prop))
3709
+ __defNormalProp$1(a, prop, b[prop]);
3710
+ }
3711
+ return a;
3712
+ };
3713
+ const injectedStyles = {};
3714
+ const mainThemeEmitter = new class MainThemeEmitter extends EventEmitter {
3715
+ }();
3716
+ function handleNewStyles(ev) {
3717
+ injectedStyles[ev.path] = ev.styles;
3718
+ }
3719
+ mainThemeEmitter.on("newStyles", handleNewStyles);
3720
+ function useMainTheme(customTheme, customPalette) {
3721
+ const [theme, setTheme] = useState(
3722
+ getMainTheme(customTheme, customPalette)
3723
+ );
3724
+ const previousTheme = useRef(customTheme);
3725
+ const previousPalette = useRef(customPalette);
3726
+ if (previousTheme.current !== customTheme)
3727
+ setTheme(getMainTheme(customTheme));
3728
+ previousTheme.current = customTheme;
3729
+ if (previousPalette.current !== customPalette)
3730
+ setTheme(getMainTheme(customTheme, customPalette));
3731
+ previousPalette.current = customPalette;
3732
+ useMount(() => {
3733
+ setTheme((current) => {
3734
+ mainThemeEmitter.off("newStyles", handleNewStyles);
3735
+ let initialTheme = __spreadValues$1({}, current);
3736
+ Object.entries(injectedStyles).forEach(([path, styles]) => {
3737
+ const newStyles = setValueByPath({}, path, styles);
3738
+ initialTheme = merge(initialTheme, newStyles);
3739
+ });
3740
+ return initialTheme;
3741
+ });
3742
+ return mainThemeEmitter.on("newStyles", (ev) => {
3743
+ const newStyles = setValueByPath({}, ev.path, ev.styles);
3744
+ setTheme((current) => merge(__spreadValues$1({}, current), newStyles));
3745
+ });
3746
+ });
3747
+ return theme;
3748
+ }
3749
+
3750
+ const CustomThemeProvider = ({
3751
+ children,
3752
+ customTheme
3753
+ }) => {
3754
+ const theme = getMainTheme(customTheme);
3755
+ return /* @__PURE__ */ jsx(ThemeUIProvider, { theme, children });
3756
+ };
3757
+
3758
+ var __defProp = Object.defineProperty;
3759
+ var __defProps = Object.defineProperties;
3760
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3761
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3762
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
3763
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
3764
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3765
+ var __spreadValues = (a, b) => {
3766
+ for (var prop in b || (b = {}))
3767
+ if (__hasOwnProp.call(b, prop))
3768
+ __defNormalProp(a, prop, b[prop]);
3769
+ if (__getOwnPropSymbols)
3770
+ for (var prop of __getOwnPropSymbols(b)) {
3771
+ if (__propIsEnum.call(b, prop))
3772
+ __defNormalProp(a, prop, b[prop]);
3773
+ }
3774
+ return a;
3775
+ };
3776
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
3777
+ function makeStyledComponent(displayName, stylesPath, styles, Component, unwraped = false) {
3778
+ return Object.assign(
3779
+ (props) => {
3780
+ const avoidFirstRender = useRef(0);
3781
+ const { theme: tuiTheme } = useThemeUI();
3782
+ const theme = useMemo(
3783
+ () => __spreadValues(__spreadValues({}, tuiTheme), setValueByPath({}, stylesPath, styles)),
3784
+ [tuiTheme]
3785
+ );
3786
+ if (unwraped) {
3787
+ return /* @__PURE__ */ jsx(CustomThemeProvider, { customTheme: theme, children: /* @__PURE__ */ jsx(NoThemePrevent, { avoidFirstRender, children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Component, __spreadValues({}, props)) }) }) });
3788
+ }
3789
+ return /* @__PURE__ */ jsx(CustomThemeProvider, { customTheme: theme, children: /* @__PURE__ */ jsx(NoThemePrevent, { avoidFirstRender, children: /* @__PURE__ */ jsx(Box, __spreadProps(__spreadValues({ className: "variant__holder" }, getVariant(stylesPath)), { children: /* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(Component, __spreadValues({}, props)) }) })) }) });
3790
+ },
3791
+ { displayName }
3792
+ );
3793
+ }
3794
+ const NoThemePrevent = ({
3795
+ avoidFirstRender,
3796
+ children
3797
+ }) => {
3798
+ avoidFirstRender.current++;
3799
+ if (avoidFirstRender.current <= 1)
3800
+ return null;
3801
+ return /* @__PURE__ */ jsx(Fragment, { children });
3802
+ };
3803
+
3804
+ function injectStyles(par1, par2) {
3805
+ const path = typeof par1 === "string" ? par1 : "";
3806
+ const styles = typeof par1 === "string" ? par2 : par1;
3807
+ mainThemeEmitter.emit("newStyles", { path, styles });
3808
+ }
3809
+
3810
+ let timeout = -1;
3811
+ function logTheme(theme) {
3812
+ clearTimeout(timeout);
3813
+ timeout = setTimeout(() => {
3814
+ console.info("Theme log: ", { theme });
3815
+ }, 100);
3816
+ }
3817
+ const ApiaThemeProvider = ({
3818
+ children,
3819
+ customTheme,
3820
+ customPalette
3821
+ }) => {
3822
+ const theme = useMainTheme(customTheme, customPalette);
3823
+ logTheme(theme);
3824
+ return /* @__PURE__ */ jsx(ThemeProvider, { theme, children });
3825
+ };
3826
+
3827
+ export { ApiaThemeProvider, applyStatesGetColor, focusOutline, getColorState, getColorStates, getColorsAndStatesByDefinition, getColorsAndStatesByPath, getColorsByDefinition, getColorsByPath, getOneColorState, getVariant, injectStyles, makeStyledComponent, parsePalette, responsive$1 as responsive, smallButton, spacing, useMainTheme };