omnieye-theme-studio 1.3.1 → 1.3.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.esm.js CHANGED
@@ -3970,7 +3970,7 @@ const Wr = (e) => (r) => {
3970
3970
  logoMode: "icon",
3971
3971
  logoUrl: "",
3972
3972
  iconColor: "#4F6BFF",
3973
- presetId: "corporate",
3973
+ presetId: "emerald",
3974
3974
  mode: "light",
3975
3975
  primaryHex: "#4F6BFF",
3976
3976
  secondaryHex: "#22D3EE",
@@ -4005,7 +4005,7 @@ const Wr = (e) => (r) => {
4005
4005
  textSize: "df",
4006
4006
  baseFontPx: 15,
4007
4007
  bodyLineHeight: 0,
4008
- bodyWeight: 0,
4008
+ bodyWeight: 300,
4009
4009
  letterSpace: 0,
4010
4010
  scaleRatio: "default",
4011
4011
  scaleRatioCustom: 0,
@@ -4021,7 +4021,7 @@ const Wr = (e) => (r) => {
4021
4021
  h4Weight: 0,
4022
4022
  h5Weight: 0,
4023
4023
  h6Weight: 0,
4024
- headingWeight: 400,
4024
+ headingWeight: 300,
4025
4025
  headingLH: 0,
4026
4026
  radiusPreset: "rounded",
4027
4027
  radiusVal: 9,
package/dist/index.js CHANGED
@@ -71,4 +71,4 @@ theme.transitions = createTransitions(theme.transitions || {});
71
71
 
72
72
  export default theme;`}function Sn(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const Bs=e=>{if(!Number.isNaN(+e))return+e;const r=e.match(/\d*\.?\d+/g);if(!r)return 0;let t=0;for(let o=0;o<r.length;o+=1)t+=+r[o];return t};function Rs(e){Object.assign(e,{alpha(r,t){const o=this||e;return o.colorSpace?`oklch(from ${r} l c h / ${typeof t=="string"?`calc(${t})`:t})`:o.vars?`rgba(${r.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof t=="string"?`calc(${t})`:t})`:Jn(r,Bs(t))},lighten(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #fff ${Sn(t)})`:er(r,t)},darken(r,t){const o=this||e;return o.colorSpace?`color-mix(in ${o.colorSpace}, ${r}, #000 ${Sn(t)})`:Zt(r,t)}})}function Sr(e={},...r){const{breakpoints:t,mixins:o={},spacing:i,palette:s={},transitions:a={},typography:l={},shape:d,colorSpace:g,...f}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":rt(20));const x=Er({...s,colorSpace:g}),m=Ln(e);let h=je(m,{mixins:hs(m.breakpoints,o),palette:x,shadows:vs.slice(),typography:xs(x,l),transitions:js(a),zIndex:{...ks}});if(h=je(h,f),h=r.reduce((b,u)=>je(b,u),h),process.env.NODE_ENV!=="production"){const b=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],u=(y,v)=>{let k;for(k in y){const R=y[k];if(b.includes(k)&&Object.keys(R).length>0){if(process.env.NODE_ENV!=="production"){const S=Br("",k);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${k}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:R}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
73
73
  `))}y[k]={}}}};Object.keys(h.components).forEach(y=>{const v=h.components[y].styleOverrides;v&&y.startsWith("Mui")&&u(v,y)})}return h.unstable_sxConfig={...Xt,...f==null?void 0:f.unstable_sxConfig},h.unstable_sx=function(u){return ut({sx:u,theme:this})},h.toRuntimeSource=Qn,Rs(h),h}function Es(e){let r;return e<1?r=5.11916*e**2:r=4.5*Math.log(e+1)+2,Math.round(r*10)/1e3}const Hs=[...Array(25)].map((e,r)=>{if(r===0)return"none";const t=Es(r);return`linear-gradient(rgba(255 255 255 / ${t}), rgba(255 255 255 / ${t}))`});function Zn(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function eo(e){return e==="dark"?Hs:[]}function Ps(e){const{palette:r={mode:"light"},opacity:t,overlays:o,colorSpace:i,...s}=e,a=Er({...r,colorSpace:i});return{palette:a,opacity:{...Zn(a.mode),...t},overlays:o||eo(a.mode),...s}}function $s(e){var r;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((r=e[1])!=null&&r.match(/(mode|contrastThreshold|tonalOffset)/))}const As=e=>[...[...Array(25)].map((r,t)=>`--${e?`${e}-`:""}overlays-${t}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Is=e=>(r,t)=>{const o=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===r){if(r==="dark"){const a={};return As(e.cssVarPrefix).forEach(l=>{a[l]=t[l],delete t[l]}),s==="media"?{[o]:t,"@media (prefers-color-scheme: dark)":{[o]:a}}:s?{[s.replace("%s",r)]:a,[`${o}, ${s.replace("%s",r)}`]:t}:{[o]:{...t,...a}}}if(s&&s!=="media")return`${o}, ${s.replace("%s",String(r))}`}else if(r){if(s==="media")return{[`@media (prefers-color-scheme: ${String(r)})`]:{[o]:t}};if(s)return s.replace("%s",String(r))}return o};function Ds(e,r){r.forEach(t=>{e[t]||(e[t]={})})}function j(e,r,t){!e[r]&&t&&(e[r]=t)}function bt(e){return typeof e!="string"||!e.startsWith("hsl")?e:Yn(e)}function $e(e,r){`${r}Channel`in e||(e[`${r}Channel`]=yt(bt(e[r]),`MUI: Can't create \`palette.${r}Channel\` because \`palette.${r}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
74
- To suppress this warning, you need to explicitly provide the \`palette.${r}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Fs(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const He=e=>{try{return e()}catch{}},Os=(e="mui")=>es(e);function fr(e,r,t,o,i){if(!t)return;t=t===!0?{}:t;const s=i==="dark"?"dark":"light";if(!o){r[i]=Ps({...t,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return}const{palette:a,...l}=Sr({...o,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return r[i]={...t,palette:a,opacity:{...Zn(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||eo(s)},l}function Ms(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:o,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=$s,colorSchemeSelector:d=t.light&&t.dark?"media":void 0,rootSelector:g=":root",...f}=e,x=Object.keys(t)[0],m=o||(t.light&&x!=="light"?"light":x),h=Os(s),{[m]:b,light:u,dark:y,...v}=t,k={...v};let R=b;if((m==="dark"&&!("dark"in t)||m==="light"&&!("light"in t))&&(R=!0),!R)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:rt(21,m));let S;a&&(S="oklch");const w=fr(S,k,R,f,m);u&&!k.light&&fr(S,k,u,void 0,"light"),y&&!k.dark&&fr(S,k,y,void 0,"dark");let T={defaultColorScheme:m,...w,cssVarPrefix:s,colorSchemeSelector:d,rootSelector:g,getCssVar:h,colorSchemes:k,font:{...fs(w.typography),...w.font},spacing:Fs(f.spacing)};Object.keys(T.colorSchemes).forEach(Y=>{const c=T.colorSchemes[Y].palette,$=z=>{const N=z.split("-"),J=N[1],L=N[2];return h(z,c[J][L])};c.mode==="light"&&(j(c.common,"background","#fff"),j(c.common,"onBackground","#000")),c.mode==="dark"&&(j(c.common,"background","#000"),j(c.common,"onBackground","#fff"));function H(z,N,J){if(S){let L;return z===Qe&&(L=`transparent ${((1-J)*100).toFixed(0)}%`),z===ie&&(L=`#000 ${(J*100).toFixed(0)}%`),z===ae&&(L=`#fff ${(J*100).toFixed(0)}%`),`color-mix(in ${S}, ${N}, ${L})`}return z(N,J)}if(Ds(c,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),c.mode==="light"){j(c.Alert,"errorColor",H(ie,a?h("palette-error-light"):c.error.light,.6)),j(c.Alert,"infoColor",H(ie,a?h("palette-info-light"):c.info.light,.6)),j(c.Alert,"successColor",H(ie,a?h("palette-success-light"):c.success.light,.6)),j(c.Alert,"warningColor",H(ie,a?h("palette-warning-light"):c.warning.light,.6)),j(c.Alert,"errorFilledBg",$("palette-error-main")),j(c.Alert,"infoFilledBg",$("palette-info-main")),j(c.Alert,"successFilledBg",$("palette-success-main")),j(c.Alert,"warningFilledBg",$("palette-warning-main")),j(c.Alert,"errorFilledColor",He(()=>c.getContrastText(c.error.main))),j(c.Alert,"infoFilledColor",He(()=>c.getContrastText(c.info.main))),j(c.Alert,"successFilledColor",He(()=>c.getContrastText(c.success.main))),j(c.Alert,"warningFilledColor",He(()=>c.getContrastText(c.warning.main))),j(c.Alert,"errorStandardBg",H(ae,a?h("palette-error-light"):c.error.light,.9)),j(c.Alert,"infoStandardBg",H(ae,a?h("palette-info-light"):c.info.light,.9)),j(c.Alert,"successStandardBg",H(ae,a?h("palette-success-light"):c.success.light,.9)),j(c.Alert,"warningStandardBg",H(ae,a?h("palette-warning-light"):c.warning.light,.9)),j(c.Alert,"errorIconColor",$("palette-error-main")),j(c.Alert,"infoIconColor",$("palette-info-main")),j(c.Alert,"successIconColor",$("palette-success-main")),j(c.Alert,"warningIconColor",$("palette-warning-main")),j(c.AppBar,"defaultBg",$("palette-grey-100")),j(c.Avatar,"defaultBg",$("palette-grey-400")),j(c.Button,"inheritContainedBg",$("palette-grey-300")),j(c.Button,"inheritContainedHoverBg",$("palette-grey-A100")),j(c.Chip,"defaultBorder",$("palette-grey-400")),j(c.Chip,"defaultAvatarColor",$("palette-grey-700")),j(c.Chip,"defaultIconColor",$("palette-grey-700")),j(c.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(c.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(c.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(c.LinearProgress,"primaryBg",H(ae,a?h("palette-primary-main"):c.primary.main,.62)),j(c.LinearProgress,"secondaryBg",H(ae,a?h("palette-secondary-main"):c.secondary.main,.62)),j(c.LinearProgress,"errorBg",H(ae,a?h("palette-error-main"):c.error.main,.62)),j(c.LinearProgress,"infoBg",H(ae,a?h("palette-info-main"):c.info.main,.62)),j(c.LinearProgress,"successBg",H(ae,a?h("palette-success-main"):c.success.main,.62)),j(c.LinearProgress,"warningBg",H(ae,a?h("palette-warning-light"):c.warning.main,.62)),j(c.Skeleton,"bg",S?H(Qe,a?h("palette-text-primary"):c.text.primary,.11):`rgba(${$("palette-text-primaryChannel")} / 0.11)`),j(c.Slider,"primaryTrack",H(ae,a?h("palette-primary-main"):c.primary.main,.62)),j(c.Slider,"secondaryTrack",H(ae,a?h("palette-secondary-main"):c.secondary.main,.62)),j(c.Slider,"errorTrack",H(ae,a?h("palette-error-main"):c.error.main,.62)),j(c.Slider,"infoTrack",H(ae,a?h("palette-info-main"):c.info.main,.62)),j(c.Slider,"successTrack",H(ae,a?h("palette-success-main"):c.success.main,.62)),j(c.Slider,"warningTrack",H(ae,a?h("palette-warning-main"):c.warning.main,.62));const z=S?H(ie,a?h("palette-background-default"):c.background.default,.6825):At(c.background.default,.8);j(c.SnackbarContent,"bg",z),j(c.SnackbarContent,"color",He(()=>S?vr.text.primary:c.getContrastText(z))),j(c.SpeedDialAction,"fabHoverBg",At(c.background.paper,.15)),j(c.StepConnector,"border",$("palette-grey-400")),j(c.StepContent,"border",$("palette-grey-400")),j(c.Switch,"defaultColor",$("palette-common-white")),j(c.Switch,"defaultDisabledColor",$("palette-grey-100")),j(c.Switch,"primaryDisabledColor",H(ae,a?h("palette-primary-main"):c.primary.main,.62)),j(c.Switch,"secondaryDisabledColor",H(ae,a?h("palette-secondary-main"):c.secondary.main,.62)),j(c.Switch,"errorDisabledColor",H(ae,a?h("palette-error-main"):c.error.main,.62)),j(c.Switch,"infoDisabledColor",H(ae,a?h("palette-info-main"):c.info.main,.62)),j(c.Switch,"successDisabledColor",H(ae,a?h("palette-success-main"):c.success.main,.62)),j(c.Switch,"warningDisabledColor",H(ae,a?h("palette-warning-main"):c.warning.main,.62)),j(c.TableCell,"border",H(ae,Qe(a?h("palette-divider"):c.divider,1),.88)),j(c.Tooltip,"bg",H(Qe,a?h("palette-grey-700"):c.grey[700],.92))}if(c.mode==="dark"){j(c.Alert,"errorColor",H(ae,a?h("palette-error-light"):c.error.light,.6)),j(c.Alert,"infoColor",H(ae,a?h("palette-info-light"):c.info.light,.6)),j(c.Alert,"successColor",H(ae,a?h("palette-success-light"):c.success.light,.6)),j(c.Alert,"warningColor",H(ae,a?h("palette-warning-light"):c.warning.light,.6)),j(c.Alert,"errorFilledBg",$("palette-error-dark")),j(c.Alert,"infoFilledBg",$("palette-info-dark")),j(c.Alert,"successFilledBg",$("palette-success-dark")),j(c.Alert,"warningFilledBg",$("palette-warning-dark")),j(c.Alert,"errorFilledColor",He(()=>c.getContrastText(c.error.dark))),j(c.Alert,"infoFilledColor",He(()=>c.getContrastText(c.info.dark))),j(c.Alert,"successFilledColor",He(()=>c.getContrastText(c.success.dark))),j(c.Alert,"warningFilledColor",He(()=>c.getContrastText(c.warning.dark))),j(c.Alert,"errorStandardBg",H(ie,a?h("palette-error-light"):c.error.light,.9)),j(c.Alert,"infoStandardBg",H(ie,a?h("palette-info-light"):c.info.light,.9)),j(c.Alert,"successStandardBg",H(ie,a?h("palette-success-light"):c.success.light,.9)),j(c.Alert,"warningStandardBg",H(ie,a?h("palette-warning-light"):c.warning.light,.9)),j(c.Alert,"errorIconColor",$("palette-error-main")),j(c.Alert,"infoIconColor",$("palette-info-main")),j(c.Alert,"successIconColor",$("palette-success-main")),j(c.Alert,"warningIconColor",$("palette-warning-main")),j(c.AppBar,"defaultBg",$("palette-grey-900")),j(c.AppBar,"darkBg",$("palette-background-paper")),j(c.AppBar,"darkColor",$("palette-text-primary")),j(c.Avatar,"defaultBg",$("palette-grey-600")),j(c.Button,"inheritContainedBg",$("palette-grey-800")),j(c.Button,"inheritContainedHoverBg",$("palette-grey-700")),j(c.Chip,"defaultBorder",$("palette-grey-700")),j(c.Chip,"defaultAvatarColor",$("palette-grey-300")),j(c.Chip,"defaultIconColor",$("palette-grey-300")),j(c.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(c.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(c.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(c.LinearProgress,"primaryBg",H(ie,a?h("palette-primary-main"):c.primary.main,.5)),j(c.LinearProgress,"secondaryBg",H(ie,a?h("palette-secondary-main"):c.secondary.main,.5)),j(c.LinearProgress,"errorBg",H(ie,a?h("palette-error-main"):c.error.main,.5)),j(c.LinearProgress,"infoBg",H(ie,a?h("palette-info-main"):c.info.main,.5)),j(c.LinearProgress,"successBg",H(ie,a?h("palette-success-main"):c.success.main,.5)),j(c.LinearProgress,"warningBg",H(ie,a?h("palette-warning-main"):c.warning.main,.5)),j(c.Skeleton,"bg",S?H(Qe,a?h("palette-text-primary"):c.text.primary,.13):`rgba(${$("palette-text-primaryChannel")} / 0.13)`),j(c.Slider,"primaryTrack",H(ie,a?h("palette-primary-main"):c.primary.main,.5)),j(c.Slider,"secondaryTrack",H(ie,a?h("palette-secondary-main"):c.secondary.main,.5)),j(c.Slider,"errorTrack",H(ie,a?h("palette-error-main"):c.error.main,.5)),j(c.Slider,"infoTrack",H(ie,a?h("palette-info-main"):c.info.main,.5)),j(c.Slider,"successTrack",H(ie,a?h("palette-success-main"):c.success.main,.5)),j(c.Slider,"warningTrack",H(ie,a?h("palette-warning-light"):c.warning.main,.5));const z=S?H(ae,a?h("palette-background-default"):c.background.default,.985):At(c.background.default,.98);j(c.SnackbarContent,"bg",z),j(c.SnackbarContent,"color",He(()=>S?Kn.text.primary:c.getContrastText(z))),j(c.SpeedDialAction,"fabHoverBg",At(c.background.paper,.15)),j(c.StepConnector,"border",$("palette-grey-600")),j(c.StepContent,"border",$("palette-grey-600")),j(c.Switch,"defaultColor",$("palette-grey-300")),j(c.Switch,"defaultDisabledColor",$("palette-grey-600")),j(c.Switch,"primaryDisabledColor",H(ie,a?h("palette-primary-main"):c.primary.main,.55)),j(c.Switch,"secondaryDisabledColor",H(ie,a?h("palette-secondary-main"):c.secondary.main,.55)),j(c.Switch,"errorDisabledColor",H(ie,a?h("palette-error-main"):c.error.main,.55)),j(c.Switch,"infoDisabledColor",H(ie,a?h("palette-info-main"):c.info.main,.55)),j(c.Switch,"successDisabledColor",H(ie,a?h("palette-success-main"):c.success.main,.55)),j(c.Switch,"warningDisabledColor",H(ie,a?h("palette-warning-light"):c.warning.main,.55)),j(c.TableCell,"border",H(ie,Qe(a?h("palette-divider"):c.divider,1),.68)),j(c.Tooltip,"bg",H(Qe,a?h("palette-grey-700"):c.grey[700],.92))}a||($e(c.background,"default"),$e(c.background,"paper"),$e(c.common,"background"),$e(c.common,"onBackground"),$e(c,"divider")),Object.keys(c).forEach(z=>{const N=c[z];z!=="tonalOffset"&&!a&&N&&typeof N=="object"&&(N.main&&j(c[z],"mainChannel",yt(bt(N.main))),N.light&&j(c[z],"lightChannel",yt(bt(N.light))),N.dark&&j(c[z],"darkChannel",yt(bt(N.dark))),N.contrastText&&j(c[z],"contrastTextChannel",yt(bt(N.contrastText))),z==="text"&&($e(c[z],"primary"),$e(c[z],"secondary")),z==="action"&&(N.active&&$e(c[z],"active"),N.selected&&$e(c[z],"selected")))})}),T=r.reduce((Y,c)=>je(Y,c),T);const M={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:l,getSelector:Is(T),enableContrastVars:a},{vars:P,generateThemeVars:X,generateStyleSheets:Q}=ns(T,M);return T.vars=P,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([Y,c])=>{T[Y]=c}),T.generateThemeVars=X,T.generateStyleSheets=Q,T.generateSpacing=function(){return _n(f.spacing,kr(this))},T.getColorSchemeSelector=os(d),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=l,T.unstable_sxConfig={...Xt,...f==null?void 0:f.unstable_sxConfig},T.unstable_sx=function(c){return ut({sx:c,theme:this})},T.toRuntimeSource=Qn,T}function Cn(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:Er({...t===!0?{}:t.palette,mode:r})})}function to(e={},...r){const{palette:t,cssVariables:o=!1,colorSchemes:i=t?void 0:{light:!0},defaultColorScheme:s=t==null?void 0:t.mode,...a}=e,l=s||"light",d=i==null?void 0:i[l],g={...i,...t?{[l]:{...typeof d!="boolean"&&d,palette:t}}:void 0};if(o===!1){if(!("colorSchemes"in e))return Sr(e,...r);let f=t;"palette"in e||g[l]&&(g[l]!==!0?f=g[l].palette:l==="dark"&&(f={mode:"dark"}));const x=Sr({...e,palette:f},...r);return x.defaultColorScheme=l,x.colorSchemes=g,x.palette.mode==="light"&&(x.colorSchemes.light={...g.light!==!0&&g.light,palette:x.palette},Cn(x,"dark",g.dark)),x.palette.mode==="dark"&&(x.colorSchemes.dark={...g.dark!==!0&&g.dark,palette:x.palette},Cn(x,"light",g.light)),x}return!t&&!("light"in g)&&l==="light"&&(g.light=!0),Ms({...a,colorSchemes:g,defaultColorScheme:l,...typeof o!="boolean"&&o},...r)}const Ws=to(),zs="$$material";function _s(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ls=e=>_s(e)&&e!=="classes",Ns=_a({themeId:zs,defaultTheme:Ws,rootShouldForwardProp:Ls}),Vs=Za;process.env.NODE_ENV!=="production"&&(te.node,te.object.isRequired);function Gs(e){return Qa(e)}function Us(e){return Br("MuiSvgIcon",e)}Fa("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ys=e=>{const{color:r,fontSize:t,classes:o}=e,i={root:["root",r!=="inherit"&&`color${nt(r)}`,`fontSize${nt(t)}`]};return Bi(i,Us,o)},Js=Ns("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color!=="inherit"&&r[`color${nt(t.color)}`],r[`fontSize${nt(t.fontSize)}`]]}})(Vs(({theme:e})=>{var r,t,o,i,s,a,l,d,g,f,x,m,h,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(r=e.transitions)==null?void 0:r.create)==null?void 0:i.call(r,"fill",{duration:(o=(t=(e.vars??e).transitions)==null?void 0:t.duration)==null?void 0:o.shorter}),variants:[{props:u=>!u.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((d=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:d.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(g=e.typography)==null?void 0:g.pxToRem)==null?void 0:f.call(g,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,u])=>u&&u.main).map(([u])=>{var y,v;return{props:{color:u},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y[u])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(b=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),_t=Ge.forwardRef(function(r,t){const o=Gs({props:r,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:l="svg",fontSize:d="medium",htmlColor:g,inheritViewBox:f=!1,titleAccess:x,viewBox:m="0 0 24 24",...h}=o,b=Ge.isValidElement(i)&&i.type==="svg",u={...o,color:a,component:l,fontSize:d,instanceFontSize:r.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},y={};f||(y.viewBox=m);const v=Ys(u);return n.jsxs(Js,{as:l,className:On(v.root,s),focusable:"false",color:g,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:t,...y,...h,...b&&i.props,ownerState:u,children:[b?i.props.children:i,x?n.jsx("title",{children:x}):null]})});process.env.NODE_ENV!=="production"&&(_t.propTypes={children:te.node,classes:te.object,className:te.string,color:te.oneOfType([te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),te.string]),component:te.elementType,fontSize:te.oneOfType([te.oneOf(["inherit","large","medium","small"]),te.string]),htmlColor:te.string,inheritViewBox:te.bool,shapeRendering:te.string,sx:te.oneOfType([te.arrayOf(te.oneOfType([te.func,te.object,te.bool])),te.func,te.object]),titleAccess:te.string,viewBox:te.string});_t.muiName="SvgIcon";function kt(e,r){function t(o,i){return n.jsx(_t,{"data-testid":process.env.NODE_ENV!=="production"?`${r}Icon`:void 0,ref:i,...o,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${r}Icon`),t.muiName=_t.muiName,Ge.memo(Ge.forwardRef(t))}const qs=kt(n.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded"),Ks=kt(n.jsx("path",{d:"M12 5V3.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V7c3.31 0 6 2.69 6 6 0 2.72-1.83 5.02-4.31 5.75-.42.12-.69.52-.69.95 0 .65.62 1.16 1.25.97C17.57 19.7 20 16.64 20 13c0-4.42-3.58-8-8-8m-6 8c0-1.34.44-2.58 1.19-3.59.3-.4.26-.95-.09-1.31-.42-.42-1.14-.38-1.5.1-1 1.34-1.6 3-1.6 4.8 0 3.64 2.43 6.7 5.75 7.67.63.19 1.25-.32 1.25-.97 0-.43-.27-.83-.69-.95C7.83 18.02 6 15.72 6 13"}),"RestartAltRounded"),Xs=kt(n.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkModeOutlined"),Qs=kt(n.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightModeOutlined"),wn=e=>{let r;const t=new Set,o=(g,f)=>{const x=typeof g=="function"?g(r):g;if(!Object.is(x,r)){const m=r;r=f??(typeof x!="object"||x===null)?x:Object.assign({},r,x),t.forEach(h=>h(r,m))}},i=()=>r,l={setState:o,getState:i,getInitialState:()=>d,subscribe:g=>(t.add(g),()=>t.delete(g))},d=r=e(o,i,l);return l},Zs=(e=>e?wn(e):wn),el=e=>e;function tl(e,r=el){const t=_.useSyncExternalStore(e.subscribe,_.useCallback(()=>r(e.getState()),[e,r]),_.useCallback(()=>r(e.getInitialState()),[e,r]));return _.useDebugValue(t),t}const jn=e=>{const r=Zs(e),t=o=>tl(r,o);return Object.assign(t,r),t},ro=(e=>e?jn(e):jn);function rl(e,r){let t;try{t=e()}catch{return}return{getItem:i=>{var s;const a=d=>d===null?null:JSON.parse(d,void 0),l=(s=t.getItem(i))!=null?s:null;return l instanceof Promise?l.then(a):a(l)},setItem:(i,s)=>t.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>t.removeItem(i)}}const Cr=e=>r=>{try{const t=e(r);return t instanceof Promise?t:{then(o){return Cr(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return Cr(o)(t)}}}},nl=(e,r)=>(t,o,i)=>{let s={storage:rl(()=>window.localStorage),partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...r},a=!1,l=0;const d=new Set,g=new Set;let f=s.storage;if(!f)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...y)},o,i);const x=()=>{const y=s.partialize({...o()});return f.setItem(s.name,{state:y,version:s.version})},m=i.setState;i.setState=(y,v)=>(m(y,v),x());const h=e((...y)=>(t(...y),x()),o,i);i.getInitialState=()=>h;let b;const u=()=>{var y,v;if(!f)return;const k=++l;a=!1,d.forEach(S=>{var w;return S((w=o())!=null?w:h)});const R=((v=s.onRehydrateStorage)==null?void 0:v.call(s,(y=o())!=null?y:h))||void 0;return Cr(f.getItem.bind(f))(s.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==s.version){if(s.migrate){const w=s.migrate(S.state,S.version);return w instanceof Promise?w.then(T=>[!0,T]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var w;if(k!==l)return;const[T,M]=S;if(b=s.merge(M,(w=o())!=null?w:h),t(b,!0),T)return x()}).then(()=>{k===l&&(R==null||R(o(),void 0),b=o(),a=!0,g.forEach(S=>S(b)))}).catch(S=>{k===l&&(R==null||R(void 0,S))})};return i.persist={setOptions:y=>{s={...s,...y},y.storage&&(f=y.storage)},clearStorage:()=>{f==null||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>u(),hasHydrated:()=>a,onHydrate:y=>(d.add(y),()=>{d.delete(y)}),onFinishHydration:y=>(g.add(y),()=>{g.delete(y)})},s.skipHydration||u(),b||h},ol=nl,Ct=[{id:"corporate",name:"Corporate Blue",snap:{primaryHex:"#4F6BFF",secondaryHex:"#22D3EE",iconColor:"#4F6BFF",highlightHex:"#6D86FF",cardStyle:"soft",cardShadowPx:20,h1Size:28,h2Size:25,h3Size:22,h4Size:20,h5Size:17,h6Size:14,baseFontPx:15,videoShadowLight:"0px 4px 66px 0px #0409D8",videoShadowDark:"0px 4px 63.7px 0px #00136f"}},{id:"emerald",name:"Emerald",snap:{primaryHex:"#10B981",secondaryHex:"#F5A524",iconColor:"#10B981",highlightHex:"#2EE6A6",cardStyle:"soft",cardShadowPx:20,videoShadowLight:"0px 4px 66.3px 0px #0C3726",videoShadowDark:"0px 4px 66.3px 14px #0C3726",ccBadge:"#14b8a6",hdBadge:"#f59e0b",h1Size:28}},{id:"indigo",name:"Indigo Violet",snap:{primaryHex:"#A97BFF",secondaryHex:"#FF5FA2",iconColor:"#A97BFF",highlightHex:"#A97BFF",cardStyle:"soft",cardShadowPx:20,videoShadowLight:"0px 4px 66px 0px #F50079",videoShadowDark:"0px 4px 63.7px 0px #9F0087",h1Size:28}},{id:"slate",name:"Graphite",snap:{primaryHex:"#455a64",secondaryHex:"#78909c",iconColor:"#455a64",cardStyle:"floating",cardShadowPx:16}},{id:"teal",name:"Ocean Teal",snap:{primaryHex:"#00838f",secondaryHex:"#0277bd",iconColor:"#00838f",cardStyle:"floating",cardShadowPx:20}},{id:"amber",name:"Amber",snap:{primaryHex:"#e65100",secondaryHex:"#d84315",iconColor:"#e65100",cardStyle:"floating",cardShadowPx:20}}],kn={appName:"Crystal Ball",appTagline:"Run your whole business in one place",logoMode:"icon",logoUrl:"",iconColor:"#4F6BFF",presetId:"corporate",mode:"light",primaryHex:"#4F6BFF",secondaryHex:"#22D3EE",highlightHex:"",videoShadowLight:"",videoShadowDark:"",ccBadge:"",hdBadge:"",errorHex:"#d32f2f",warningHex:"#ed6c02",infoHex:"#0288d1",successHex:"#2e7d32",cardBgHex:"",cardHdrHex:"",pageBgHex:"",notifCardHex:"",textPrimaryHex:"",textSecondaryHex:"",dividerHex:"",btnColorHex:"",btnTextHex:"",h1Color:"",h2Color:"",h3Color:"",h4Color:"",h5Color:"",h6Color:"",fontFamily:"Roboto",headingFont:"Inter",customFonts:[],customHeadFonts:[],textSize:"df",baseFontPx:15,bodyLineHeight:0,bodyWeight:0,letterSpace:0,scaleRatio:"default",scaleRatioCustom:0,h1Size:0,h2Size:0,h3Size:0,h4Size:0,h5Size:0,h6Size:0,h1Weight:0,h2Weight:0,h3Weight:0,h4Weight:0,h5Weight:0,h6Weight:0,headingWeight:400,headingLH:0,radiusPreset:"rounded",radiusVal:9,density:"default",densityScale:0,cardShadowPx:-1,contrast:"medium",contrastMode:"auto",containerPadPx:0,edgePadPx:0,cardGapPx:0,cardStyle:"soft",cardHeader:"plain",surfaceTint:"snow",nestedStyle:"recessed",nestedDepth:-1,headerStrength:-1,tintIntensity:-1,btnCase:"upper",accentGradient:!1,statusBold:!1,mapGlass:"light",chartScheme:"brand",tableDensity:"default",tableColDensity:"default",tableDividers:!1,tableColDividers:!1,tableRowDivW:1,tableColDivW:1,tableStripe:!1,tableHeaderStyle:"tinted",tableCellAlignH:"left",tableCellAlignV:"middle",notifPosition:"bottom-right",notifStyle:"toast",notifAccent:"severity",notifBadge:!0,notifAutoDismiss:!1,autoDismissSec:8,toastW:0,navPattern:"sidebar",sidebarWidth:220,appBarH:0,loginLayout:"split",loginImage:"",loginShowTagline:!0,loginPanelColor:"",loginImgOpacity:0,loginCardW:0};var An;const Ee={...kn,...((An=Ct.find(e=>e.id===kn.presetId))==null?void 0:An.snap)??{}},il=["primaryHex","secondaryHex","highlightHex"],Ae=e=>{const{mode:r,...t}=e;return JSON.stringify(t)};function hr(e){const r={...Ee};if(e&&typeof e=="object")for(const t of Object.keys(Ee)){const o=e[t];o!==void 0&&typeof o==typeof Ee[t]&&(r[t]=o)}return r}function al(e){if(!e||typeof e!="object")return!1;const r=Object.keys(Ee);let t=0;for(const o of r){const i=e[o];i!==void 0&&typeof i==typeof Ee[o]&&t++}return t/r.length>=.5}const V=ro()(ol((e,r)=>({settings:{...Ee},savedThemes:[],baseline:Ae(Ee),editingSavedId:null,lastImportedId:null,set:t=>e(o=>{const i=Object.keys(t).some(s=>il.includes(s));return{settings:{...o.settings,...t,...i?{presetId:"custom"}:{}}}}),applyPreset:(t,o)=>e(i=>{const s={...i.settings,...o,presetId:t};return{settings:s,baseline:Ae(s),editingSavedId:null,lastImportedId:null}}),reset:()=>e(()=>({settings:{...Ee},baseline:Ae(Ee),editingSavedId:null,lastImportedId:null})),captureBaseline:()=>e(t=>({baseline:Ae(t.settings)})),restoreBaseline:()=>e(t=>{try{return{settings:{...JSON.parse(t.baseline),mode:t.settings.mode}}}catch{return{}}}),isDirty:()=>Ae(r().settings)!==r().baseline,saveTheme:t=>e(o=>{const i="cust"+Date.now(),s={...o.settings};return{savedThemes:[...o.savedThemes,{id:i,name:t,snap:s}],settings:{...o.settings,presetId:i},baseline:Ae({...o.settings,presetId:i}),editingSavedId:i,lastImportedId:null}}),updateSaved:(t,o,i)=>e(s=>{const a={...i,presetId:t};return{savedThemes:s.savedThemes.map(l=>l.id===t?{...l,name:o,snap:i}:l),settings:a,baseline:Ae(a),editingSavedId:t,lastImportedId:null}}),applySaved:t=>e(()=>{const o={...hr(t.snap),presetId:t.id};return{settings:o,baseline:Ae(o),editingSavedId:t.id,lastImportedId:null}}),renameSaved:(t,o)=>e(i=>({savedThemes:i.savedThemes.map(s=>s.id===t?{...s,name:o}:s)})),deleteSaved:t=>e(o=>({savedThemes:o.savedThemes.filter(i=>i.id!==t),editingSavedId:o.editingSavedId===t?null:o.editingSavedId,lastImportedId:o.lastImportedId===t?null:o.lastImportedId})),importTheme:(t,o)=>{const i=hr(o),s={id:"imp"+Date.now(),name:t,snap:i};return e(a=>{const l={...i,presetId:s.id};return{savedThemes:[s,...a.savedThemes],settings:l,baseline:Ae(l),editingSavedId:s.id,lastImportedId:s.id}}),s}}),{name:"omnieye-theme-studio",merge:(e,r)=>{const t=e??{};return{...r,...t,settings:hr(t.settings),savedThemes:Array.isArray(t.savedThemes)?t.savedThemes:r.savedThemes}}}));function Pe(e){const r=e==="dark";return{studioBg:r?"#15181d":"#f5f7fa",studioBd:r?"#2a2f38":"#d8dee6",card:r?"#1e222a":"#ffffff",cardBd:r?"#2b313b":"#e6eaf0",inset:r?"#262b34":"#f7f9fb",insetBd:r?"#363d48":"#e9edf2",divider:r?"#262b34":"#f0f3f7",iconTile:r?"#2b313b":"#eef1f6",text:r?"rgba(255,255,255,0.92)":"#1c2127",label:r?"rgba(255,255,255,0.5)":"#9aa4b0",label2:r?"rgba(255,255,255,0.6)":"#7a8593",body:r?"rgba(255,255,255,0.78)":"#5a6573",muted:r?"rgba(255,255,255,0.42)":"#aeb6c0",chevron:r?"rgba(255,255,255,0.42)":"#b3bcc7"}}function wr(e){if(!e||e.length<7)return[210,60,45];const r=parseInt(e.slice(1,3),16)/255,t=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255,i=Math.max(r,t,o),s=Math.min(r,t,o),a=i-s;let l=0,d=0;const g=(i+s)/2;return a&&(d=a/(1-Math.abs(2*g-1)),i===r?l=(t-o)/a%6:i===t?l=(o-r)/a+2:l=(r-t)/a+4,l=Math.round(l*60),l<0&&(l+=360)),[l,Math.round(d*100),Math.round(g*100)]}function re(e,r,t){r/=100,t/=100;const o=i=>{const s=(i+e/30)%12,a=r*Math.min(t,1-t);return Math.round((t-a*Math.max(-1,Math.min(s-3,Math.min(9-s,1))))*255).toString(16).padStart(2,"0")};return"#"+o(0)+o(8)+o(4)}function Se(e){try{const[r,t]=wr(e),o=Math.max(t,18);return{50:re(r,Math.max(Math.round(o*.3),10),96),100:re(r,Math.max(Math.round(o*.42),12),91),200:re(r,Math.max(Math.round(o*.55),16),82),300:re(r,Math.max(Math.round(o*.7),20),70),400:re(r,o,60),500:e,600:re(r,Math.min(o+4,100),44),700:re(r,Math.min(o+8,100),36),800:re(r,Math.max(Math.round(o*.92),16),26),900:re(r,Math.max(Math.round(o*.8),14),16)}}catch{return{50:"#eef",100:"#dde",200:"#bbd",300:"#99c",400:"#77b",500:e||"#4F6BFF",600:"#1257a8",700:"#0e4488",800:"#0a3266",900:"#062044"}}}function gr(e,r){try{const t=l=>{const d=[1,3,5].map(g=>{const f=parseInt(l.slice(g,g+2),16)/255;return f<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)});return .2126*d[0]+.7152*d[1]+.0722*d[2]},o=t(e),i=t(r),s=Math.max(o,i),a=Math.min(o,i);return(s+.05)/(a+.05)}catch{return 1}}function ce(e,r){if(!e||e[0]!=="#"||e.length<7)return"rgba(20,30,48,"+r+")";const t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba("+t+","+o+","+i+","+r+")"}const sl={corporate:{light:{angle:0,colors:["#141b3c"]},dark:{angle:0,colors:["#141b3c"]}},"corporate-blue":{light:{angle:0,colors:["#141b3c"]},dark:{angle:0,colors:["#141b3c"]}},emerald:{light:{angle:0,colors:["#0d2a20"]},dark:{angle:0,colors:["#041610"]}},indigo:{light:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]},dark:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]}},"indigo-violet":{light:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]},dark:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]}}},ll={corporate:{angle:180,colors:["#070A1B","#111734","#090D22"]},"corporate-blue":{angle:180,colors:["#070A1B","#111734","#090D22"]},emerald:{angle:180,colors:["#06140E","#082318","#061910"]},indigo:{angle:180,colors:["#0D0620","#221236","#2E1F4F"]},"indigo-violet":{angle:180,colors:["#0D0620","#221236","#2E1F4F"]}},Tn={corporate:{angle:90,colors:["#000000","#03205F"]},"corporate-blue":{angle:90,colors:["#000000","#03205F"]}},cl={corporate:{angle:90,colors:["#6CA4FF","#C9D8F2"]},"corporate-blue":{angle:90,colors:["#6CA4FF","#C9D8F2"]},emerald:{angle:90,colors:["#97E1B2","#E6E6E6"]},indigo:{angle:90,colors:["#FCB3D8","#E6E6E6"]},"indigo-violet":{angle:90,colors:["#FCB3D8","#E6E6E6"]}},dl={corporate:{angle:90,colors:["#010D27","#03205F"]},"corporate-blue":{angle:90,colors:["#010D27","#03205F"]},emerald:{angle:90,colors:["#001909","#0A4821"]},indigo:{angle:90,colors:["#010D27","#37107A"]},"indigo-violet":{angle:90,colors:["#010D27","#37107A"]}},pl={corporate:{light:{angle:90,colors:["#0029ff","#00144b"]},dark:{angle:90,colors:["#4f6bff","#22d3ee"]}},"corporate-blue":{light:{angle:90,colors:["#0029ff","#00144b"]},dark:{angle:90,colors:["#4f6bff","#22d3ee"]}},emerald:{light:{angle:90,colors:["#01b979","#d88b00"]},dark:{angle:90,colors:["#2ee6a6","#ffc255"]}},indigo:{light:{angle:90,colors:["#4300c1","#ff388c"]},dark:{angle:90,colors:["#4300c1","#ff388c"]}},"indigo-violet":{light:{angle:90,colors:["#4300c1","#ff388c"]},dark:{angle:90,colors:["#4300c1","#ff388c"]}}},ul={corporate:{light:{angle:135,colors:["#00ddff","#0c26b1"]},dark:{angle:162,colors:["#22d3ee","#126673"],stops:[11.886,91.492]}},emerald:{light:{angle:135,colors:["#F5A524","#10B981"]},dark:{angle:180,colors:["#FFC255","#997433"],overlay:"linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%)"}}},fl={corporate:{angle:0,colors:["#4f6bff","#3f5adb","#2e49b7","#1e3892","#0d276e","#07153f"],stops:[0,13.75,27.5,41.25,55,100]},emerald:{angle:0,colors:["#2EE6A6","#21AB7B","#1A8D65","#146F4F","#0D4E37","#072D20"],stops:[0,27.5,41.25,55,77.5,100]},indigo:{angle:0,colors:["#A97BFF","#4E22A0","#16013E"],stops:[0,50,100]}},hl={emerald:{angle:169,colors:["#28C78F","#18855F"]}},gl={corporate:{angle:136.6683374482933,colors:["#3f5bff","#4b48e6","#7c5cf5"],stops:[0,45,100]}},mt="#0f172a";function no(e,r){const t=r??e.map((o,i)=>e.length===1?0:i/(e.length-1)*100);return e.map((o,i)=>`${o} ${t[i]}%`).join(", ")}function Ie(e){if(e.colors.length===1)return e.colors[0];const r=`linear-gradient(${e.angle}deg, ${no(e.colors,e.stops)})`;return e.overlay?`${e.overlay}, ${r}`:r}function Bn(e,r){return`radial-gradient(${r}, ${no(e.colors,e.stops)})`}function Hr(e){const r=Se(e.primaryHex),t=Se(e.secondaryHex),o=e.mode==="dark",i=o?r[300]:e.primaryHex,s=o?t[300]:e.secondaryHex,a={pMain:i,pDark:r[700],pLight:r[300],highlight:e.highlightHex||i,highlightSoft:ce(e.highlightHex||i,o?.22:.14),highlightBd:ce(e.highlightHex||i,o?.45:.32),pContrast:e.contrastMode==="light"?"#ffffff":e.contrastMode==="dark"?"rgba(0,0,0,0.87)":gr(i,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",pContainer:o?ce(e.primaryHex,.26):r[50],onPContainer:o?r[100]:r[800],sMain:s,sContrast:gr(s,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",bgDefault:o?"#121212":"#f3f5f8",paper:o?"#1e1e1e":"#ffffff",paper2:o?"#262630":"#f6f8fb",frameGutterBg:o?"#0a0a0a":"#e3e7ec",footerBg:o?"#17171c":"#eceef2",textPrimary:o?"rgba(255,255,255,0.92)":"rgba(0,0,0,0.87)",textSecondary:o?"rgba(255,255,255,0.62)":"rgba(0,0,0,0.6)",textDisabled:o?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.38)",divider:o?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)",outline:o?"rgba(255,255,255,0.23)":"rgba(0,0,0,0.23)"},l=e.statusBold,d=l?e.errorHex:ce(e.errorHex,o?.22:.13),g=l?e.warningHex:ce(e.warningHex,o?.22:.14),f=l?e.infoHex:ce(e.infoHex,o?.22:.13),x=l?e.successHex:ce(e.successHex,o?.22:.13),m=l?"#ffffff":o?Se(e.errorHex)[300]:e.errorHex,h=l?"#ffffff":o?Se(e.warningHex)[300]:Se(e.warningHex)[700],b=l?"#ffffff":o?Se(e.infoHex)[300]:e.infoHex,u=l?"#ffffff":o?Se(e.successHex)[300]:Se(e.successHex)[700],y=wr(e.primaryHex)[0],v={neutral:[220,6],warm:[32,26],cool:[210,30],brand:[y,42],slate:[214,16],snow:[0,0]},k=v[e.surfaceTint]||v.neutral,R=e.tintIntensity>=0?e.tintIntensity:100,S=[k[0],Math.round(k[1]*R/100)];o?(a.bgDefault=re(S[0],Math.round(S[1]*.7),7),a.paper=re(S[0],Math.round(S[1]*.7),13),a.paper2=re(S[0],Math.round(S[1]*.85),19)):(a.bgDefault="#ffffff",a.paper="#ffffff",a.paper2=re(S[0],Math.round(S[1]*.85),e.surfaceTint==="brand"?95:96.5)),e.pageBgHex&&(a.bgDefault=e.pageBgHex),e.cardBgHex&&(a.paper=e.cardBgHex);const w={soft:0,standard:1,medium:2,high:3},T=w[e.contrast]!==void 0?w[e.contrast]:1,M=o?[["rgba(255,255,255,0.82)","rgba(255,255,255,0.55)","rgba(255,255,255,0.09)","rgba(255,255,255,0.16)"],["rgba(255,255,255,0.92)","rgba(255,255,255,0.62)","rgba(255,255,255,0.12)","rgba(255,255,255,0.23)"],["rgba(255,255,255,0.96)","rgba(255,255,255,0.74)","rgba(255,255,255,0.18)","rgba(255,255,255,0.34)"],["#ffffff","rgba(255,255,255,0.87)","rgba(255,255,255,0.26)","rgba(255,255,255,0.46)"]]:[["rgba(0,0,0,0.72)","rgba(0,0,0,0.5)","rgba(0,0,0,0.08)","rgba(0,0,0,0.16)"],["rgba(0,0,0,0.87)","rgba(0,0,0,0.6)","rgba(0,0,0,0.12)","rgba(0,0,0,0.23)"],["rgba(0,0,0,0.92)","rgba(0,0,0,0.7)","rgba(0,0,0,0.18)","rgba(0,0,0,0.34)"],["#000000","rgba(0,0,0,0.8)","rgba(0,0,0,0.24)","rgba(0,0,0,0.46)"]];a.textPrimary=M[T][0],a.textSecondary=M[T][1],a.divider=M[T][2],a.outline=M[T][3],e.textPrimaryHex&&(a.textPrimary=e.textPrimaryHex),e.textSecondaryHex&&(a.textSecondary=e.textSecondaryHex),e.dividerHex&&(a.divider=e.dividerHex),e.nestedStyle==="lighter"?a.paper2=o?re(S[0],Math.round(S[1]*.9),22):re(S[0],Math.max(Math.round(S[1]*.3),4),100):e.nestedStyle==="bordered"?a.paper2=a.paper:a.paper2=o?re(S[0],Math.round(S[1]*.9),Math.max(3,5)):re(S[0],Math.min(Math.round(S[1]*1.1),60),Math.max(88,94-S[1]*.18));const P=e.btnColorHex||i,X=e.accentGradient?"linear-gradient(135deg,"+P+","+(e.btnColorHex?Se(e.btnColorHex)[700]:r[o?500:700])+")":P,Q=e.btnTextHex||(gr(P,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)"),Y=e.h1Color||null,c=e.h2Color||null,$=e.h3Color||null,H=e.h4Color||null,z=e.h5Color||null,N=e.h6Color||null,J=[{key:"sm",px:13},{key:"df",px:12},{key:"lg",px:18}],L=J.find(ge=>ge.key===e.textSize)||J[1],q=e.baseFontPx>0?e.baseFontPx:L.px,E=e.bodyLineHeight>0?e.bodyLineHeight:1.5,I=e.h1Size>0?e.h1Size:20,K=Math.round(I*1.1),G=I,U=Math.max(Math.round(I*.9),11),D=Math.max(Math.round(I*.8),11),C=Math.max(Math.round(I*.7),10),A=Math.max(Math.round(I*.6),10),F=Math.max(Math.round(I*.5),9),B=q,O=Math.round(q*.92),ee=Math.round(q*.8),W=Math.round(q*.72),fe=e.headingWeight,Me=e.headingLH>0?e.headingLH:1.2,We=e.bodyWeight>0?e.bodyWeight:400,Je=Math.min(900,We+200),qe={compact:.82,default:1,comfortable:1.16},Be=e.densityScale>0?e.densityScale/100:qe[e.density]??1,tr=Math.round(20*Be),ze=Math.round(14*Be),Tt=e.cardGapPx>0?e.cardGapPx:Math.round(16*Be),Ke=Math.round(11*Be*({compact:.66,default:1,comfortable:1.32}[e.tableDensity]??1)),_e=e.containerPadPx>0?e.containerPadPx:Math.round(10*Be),Z=e.radiusVal,ft=Z+"px",ht=Math.max(Math.round(Z*.6),2)+"px",Le=ce(i,o?.22:.14),Ne={0:"none",1:o?`0 2px 8px -1px ${Le}, 0 2px 4px 0 rgba(0,0,0,0.28)`:`0 2px 6px -1px ${Le}, 0 1px 3px 0 rgba(0,0,0,0.08)`,2:o?`0 4px 14px -2px ${Le}, 0 3px 8px 0 rgba(0,0,0,0.32)`:`0 3px 8px -2px ${Le}, 0 2px 6px 0 rgba(0,0,0,0.08)`,4:o?`0 6px 20px -3px ${Le}, 0 4px 12px 0 rgba(0,0,0,0.38)`:`0 4px 12px -2px ${Le}, 0 3px 8px 0 rgba(0,0,0,0.1)`,8:o?`0 8px 32px -4px ${Le}, 0 16px 36px 0 rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08)`:`0 6px 22px -2px ${Le}, 0 8px 24px 0 rgba(0,0,0,0.08)`},$r="1px solid rgba(255,255,255,0.06)";let gt,Xe,Bt;if(e.cardStyle==="outlined"?(gt="none",Xe="1.5px solid "+a.outline,Bt="none"):e.cardStyle==="soft"?(gt=Ne[1],Xe=o?$r:"none",Bt=Ne[1]):(gt=Ne[8],Xe=o?$r:"none",Bt=Ne[4]),e.cardShadowPx>=0){const ge=ce(i,o?Math.min(.38,.12+e.cardShadowPx/80):Math.min(.24,.08+e.cardShadowPx/130));gt=`0 ${Math.round(e.cardShadowPx*.4)}px ${Math.round(e.cardShadowPx*1.3)}px ${ge}, 0 ${Math.round(e.cardShadowPx*.6)}px ${Math.round(e.cardShadowPx*1.8)}px rgba(0,0,0,${o?.52:.08})`}let Rt="transparent",Ar="1px solid "+a.divider,rr="none";e.cardHeader==="plain"?Ar="none":e.cardHeader==="tinted"?Rt=a.pContainer:e.cardHeader==="accent"&&(rr="inset 3px 0 0 "+i),e.headerStrength>=0&&(e.cardHeader==="tinted"?Rt=ce(e.primaryHex,(o?.14:.08)*(e.headerStrength/100)):e.cardHeader==="accent"&&(rr="inset "+Math.round(e.headerStrength*.06)+"px 0 0 "+i)),e.cardHdrHex&&(Rt=e.cardHdrHex);const ao=o?"none":Ne[4],so=o?"1px solid "+a.divider:"none",lo=e.nestedStyle==="bordered"?"1.5px solid "+a.outline:"1px solid "+a.divider,co=e.nestedDepth>0?"inset 3px 0 0 "+ce(e.primaryHex,.55)+", 0 "+Math.round(e.nestedDepth*.4)+"px "+e.nestedDepth+"px rgba(16,24,40,"+(o?.42:.1)+")":"none",po=(e.appName||"").trim().split(/\s+/).slice(0,2).map(ge=>ge[0]||"").join("").toUpperCase()||"AP",uo=!!(e.logoMode==="image"&&e.logoUrl),fo=!!e.loginImage,Ir=ge=>{const be=ge||"Roboto";return be.includes(" ")&&!be.startsWith('"')&&!be.startsWith("'")?`"${be}"`:be},ho=Ir(e.headingFont||e.fontFamily),go=Ir(e.fontFamily),ye=wr(e.primaryHex)[0],me=(ge,be)=>re((ge%360+360)%360,62,o?60:46),Dr={brand:[i,s,me(ye+42),me(ye+205),me(ye+120)],categorical:[me(ye),me(ye+72),me(ye+144),me(ye+216),me(ye+288)],sequential:[re(ye,55,o?40:78),re(ye,60,o?50:64),i,re(ye,70,o?70:38),re(ye,78,o?82:26)],cbsafe:["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9"],warm:[me(8),me(28),me(45),me(350),me(18)],cool:[me(200),me(220),me(255),me(180),me(235)]},xo=Dr[e.chartScheme]||Dr.brand,mo=[r[600],t[600],re((ye+42)%360,55,46),re((ye+205)%360,50,46)],yo={error:{cb:d,cc:m},success:{cb:x,cc:u},info:{cb:f,cc:b},warning:{cb:g,cc:h}},nr=e.mapGlass==="light",bo=nr?"rgba(255,255,255,0.84)":"rgba(15,20,28,0.74)",vo=nr?"#1c2733":"#f3f6fa",So=nr?"rgba(0,0,0,0.12)":"rgba(255,255,255,0.18)",Co="repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 11px, rgba(255,255,255,0) 11px, rgba(255,255,255,0) 22px), radial-gradient(circle at 50% 38%, "+ce(i,.22)+", rgba(0,0,0,0) 60%), "+"#0f141c",wo="linear-gradient(135deg,"+i+","+r[700]+")",jo="linear-gradient(180deg,"+ce(r[900],.12)+","+ce(r[900],.55)+")",ko="linear-gradient(135deg,"+r[700]+","+r[900]+")",To="linear-gradient(135deg,"+ce(r[900],.55)+","+ce(e.primaryHex,.45)+")",Re=e.presetId,Bo=ll[Re]||{angle:180,colors:[re(y,32,5),re(y,32,10),re(y,32,6)]},Fr=Ie(Bo),Or=sl[Re],Ro=Or?Or[o?"dark":"light"]:{angle:0,colors:[re(y,38,6.5)]},Eo=Ie(Ro),Ho=e.pageBgHex||(o?Fr:"#ffffff"),Po=e.pageBgHex||(o?Tn[Re]?Ie(Tn[Re]):Fr:a.bgDefault),$o=o?dl[Re]||{angle:90,colors:[`color-mix(in srgb, ${e.primaryHex} 25%, black)`,`color-mix(in srgb, ${e.secondaryHex} 55%, black)`]}:cl[Re]||{angle:90,colors:[`color-mix(in srgb, ${e.primaryHex} 45%, white)`,`color-mix(in srgb, ${e.secondaryHex} 15%, white)`]},Ao=Ie($o),Mr=pl[Re],Io=Mr?Mr[o?"dark":"light"]:{angle:90,colors:[e.primaryHex,e.secondaryHex]},Do=Ie(Io),Wr=ul[Re],Fo=Wr?Wr[o?"dark":"light"]:o?{angle:162,colors:[e.secondaryHex,`color-mix(in srgb, ${e.secondaryHex} 48%, black)`],stops:[11.886,91.492]}:{angle:135,colors:[e.secondaryHex,e.primaryHex]},Oo=Ie(Fo),Mo=fl[Re]||{colors:[e.primaryHex,`color-mix(in srgb, ${e.primaryHex} 78%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 57%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 36%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 16%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 20%, ${mt})`],stops:[0,13.75,27.5,41.25,55,100]},Wo=Bn(Mo,"circle at 50% 30%"),zo=hl[Re]||{angle:135,colors:[r[300],r[700]]},_o=Ie(zo),zr=gl[Re]||{angle:136.6683374482933,colors:[e.secondaryHex,e.primaryHex]},Lo=Ie(zr),No=Ie({...zr,angle:165.45289138562782}),Vo="inset 0px 1px 2px 0px rgba(255,255,255,0.3)",Go={colors:[re(y,45,14),re(y,35,9),re(y,10,4)]},Uo=e.loginPanelColor||(o?Bn(Go,"ellipse 70% 65% at 50% 77%"):"#ffffff"),_r={"top-right":{top:"14px",right:"14px"},"top-center":{top:"14px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"14px",right:"14px"},"bottom-left":{bottom:"14px",left:"14px"}},Yo=_r[e.notifPosition]||_r["top-right"],Lr=e.notifAccent==="primary"?{bar:i,icbg:a.pContainer,icc:a.onPContainer,dot:i}:e.notifAccent==="mono"?{bar:a.textSecondary,icbg:a.paper2,icc:a.textPrimary,dot:a.textSecondary}:{bar:e.warningHex,icbg:g,icc:h,dot:e.warningHex};let Et;e.notifStyle==="toast"?Et={boxShadow:Ne[8],border:typeof Xe=="string"&&Xe!=="none"?Xe:"none"}:e.notifStyle==="banner"?Et={boxShadow:Ne[2],borderLeft:"4px solid "+Lr.bar}:Et={boxShadow:"none",border:"1px solid "+a.divider};const Jo=e.notifCardHex||(o?"#1e1e1e":"#ffffff"),qo={compact:"7px",default:"11px",comfortable:"16px"},Ko={compact:"6px",default:"12px",comfortable:"22px"},Xo={top:"flex-start",middle:"center",bottom:"flex-end"},Qo={left:"flex-start",center:"center",right:"flex-end"},Zo={plain:"transparent",tinted:a.paper2,accent:a.highlightSoft},ei={rowPy:qo[e.tableDensity]||"11px",cellPx:Ko[e.tableColDensity]||"12px",rowBorder:e.tableDividers?(e.tableRowDivW||1)+"px solid "+a.divider:"none",colBorder:e.tableColDividers?(e.tableColDivW||1)+"px solid "+a.divider:"none",headBg:Zo[e.tableHeaderStyle]||a.paper2,cellAI:Xo[e.tableCellAlignV]||"center",cellJC:Qo[e.tableCellAlignH]||"flex-start",stripeBg:o?"rgba(255,255,255,0.035)":"rgba(0,0,0,0.028)",statusMap:{Delivered:{sb:x,sc:u},Processing:{sb:a.pContainer,sc:o?a.pLight:a.pDark},Pending:{sb:g,sc:h},Shipped:{sb:f,sc:b}},filters:["All","Delivered","Processing","Pending"].map((ge,be)=>({label:ge,bg:be===0?a.highlightSoft:"transparent",c:be===0?a.textPrimary:a.textSecondary,brd:be===0?a.highlightBd:a.outline}))},ti={sm:"Small",df:"Default",lg:"Large"},ri={compact:"Compact",default:"Default",comfortable:"Comfortable"},ni={outlined:"Outlined",soft:"Soft",floating:"Floating"},oi={sharp:"Sharp",rounded:"Rounded",round:"Round"},ii=[{key:"sidebar",label:"Sidebar",desc:"Full drawer",ic:"▤"},{key:"rail",label:"Rail",desc:"Icons only",ic:"▥"},{key:"topbar",label:"Top Bar",desc:"Horizontal",ic:"▦"}],ai=e.fontFamily+" · "+(ti[e.textSize]||"Default"),si=(oi[e.radiusPreset]||"Custom")+" · "+(ri[e.density]||"Default")+" · "+(ni[e.cardStyle]||"Soft"),li=[{label:"General",ic:"◉"},{label:"Appearance",ic:"◧"},{label:"Modules",ic:"◫"},{label:"Team",ic:"◍"},{label:"Security",ic:"▣"},{label:"Billing",ic:"◳"}].map((ge,be)=>({...ge,on:be===1,bg:be===1?a.highlightSoft:"transparent",c:be===1?a.textPrimary:a.textSecondary,bar:be===1?"3px solid "+a.highlight:"3px solid transparent"})),ci=ii.map(ge=>({...ge,active:e.navPattern===ge.key,brd:e.navPattern===ge.key?i:a.divider,bg:e.navPattern===ge.key?a.pContainer:a.paper,color:e.navPattern===ge.key?a.onPContainer:a.textPrimary})),di=e.sidebarWidth,pi=e.appBarH>0?e.appBarH:56,ui=e.appBarH>0?e.appBarH+"px":"Auto (56px)";return{pal:r,spal:t,isDark:o,pMain:i,sMain:s,t:a,errSoft:d,warnSoft:g,infoSoft:f,sucSoft:x,errTxt:m,warnTxt:h,infoTxt:b,sucTxt:u,sevMap:yo,accentBg:X,btnText:Q,hc1:Y,hc2:c,hc3:$,hc4:H,hc5:z,hc6:N,base:q,bodyLH:E,h1base:I,tDisplay:K,tH1:G,tH2:U,tTitle:D,tH4:C,tH5:A,tH6:F,tBody:B,tBodySm:O,tCaption:ee,tOverline:W,wH1:fe,wH2:fe,wH3:fe,wH4:fe,wH5:fe,wH6:fe,headLH:Me,bodyWeightEff:We,bwEmph:Je,pad:tr,padSm:ze,gap:Tt,rowPy:Ke,screenPad:_e,r:Z,rad:ft,radSm:ht,SH:Ne,cardShadow:gt,cardBorder:Xe,btnShadow:Bt,cardHdrBg:Rt,cardHdrBorder:Ar,cardHdrAccent:rr,appbarShadow:ao,appbarBorder:so,nestBorder:lo,nestShadow:co,iconInitials:po,hasLogo:uo,hasLoginImage:fo,headFam:ho,bodyFam:go,chartHue:ye,chartPalette:xo,avatarColors:mo,overlaySurface:bo,onOverlay:vo,overlayBorder:So,mediaBg:Co,loginBrandGrad:wo,loginScrimGrad:jo,loginCenteredGrad:ko,loginScrimGradC:To,headerBg:Eo,canvasBg:Ho,accountPageBg:Po,accountCardBg:Ao,brandGradient:Do,gsAccentGradient:Oo,gsModalBgDark:Wo,gsArrowGradient:_o,loginPanelGradient:Uo,reportsAccentTileGradient:Lo,reportsAccentCtaGradient:No,reportsModalInnerHighlight:Vo,npos:Yo,nacc:Lr,toastDeco:Et,toastBg:Jo,btnCase:e.btnCase!=="none"?"uppercase":"none",table:ei,typeSummary:ai,shapeSummary:si,settingsCats:li,navSettingsChips:ci,sidebarWidth:di,appBarHEff:pi,appBarHLabel:ui}}function xl({icon:e,title:r,info:t,open:o,dimmed:i,onToggle:s,onPreviewMenu:a,children:l}){const d=V(v=>v.settings),g=d.mode==="dark",f=d.primaryHex||"#4F6BFF",x=Pe(d.mode),m=Se(f),h=Hr(d),b=o?g?ce(f,.22):ce(f,.1):"transparent",u=o?g?m[200]:m[700]:x.text,y=o?f:x.chevron;return n.jsxs(p.Box,{sx:{background:b,opacity:i?.3:1,transform:o?"translateY(-2px)":"none",transition:"opacity .22s ease, transform .22s ease",borderBottom:`1px solid ${x.divider}`,overflow:"hidden"},children:[n.jsxs(p.Box,{component:"button",onClick:s,sx:{width:"100%",display:"flex",alignItems:"center",gap:"9px",p:"7px 11px",background:"transparent",border:"none",textAlign:"left",cursor:"pointer",fontFamily:"inherit"},children:[n.jsx(p.Box,{sx:{width:32,height:32,borderRadius:"10px",background:x.iconTile,color:x.body,display:"grid",placeItems:"center",flexShrink:0,position:"relative"},children:e}),n.jsx(p.Box,{sx:{flex:1,minWidth:0},children:n.jsx(p.Box,{sx:{fontSize:`${h.tH5}px`,fontWeight:h.wH5,fontFamily:`${h.headFam},sans-serif`,lineHeight:1.25,color:u,letterSpacing:"-.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),a&&n.jsx(p.Box,{component:"span",title:"Change preview screen",onClick:v=>{v.stopPropagation(),a()},sx:{width:16,height:16,mr:"6px",flexShrink:0,cursor:"pointer",display:"grid",placeItems:"center",color:x.chevron,transition:"filter .15s ease, transform .1s ease","&:hover":{filter:"brightness(1.15)",transform:"scale(1.12)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),n.jsx("path",{d:"M8 21h8M12 17v4"})]})}),t&&n.jsx(p.Box,{component:"span",title:t,sx:{width:15,height:15,borderRadius:"50%",border:`1.2px solid ${x.chevron}`,color:x.chevron,fontSize:"9px",fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"grid",placeItems:"center",mr:"7px",flexShrink:0,cursor:"help"},children:"i"}),n.jsx(p.Box,{sx:{width:20,height:20,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:"9px",color:y,flexShrink:0,transition:"background .18s, border-color .18s"},children:n.jsx(p.Box,{component:"span",sx:{display:"block",lineHeight:1,transform:o?"rotate(180deg)":"none",transition:"transform .2s"},children:"▼"})})]}),n.jsx(p.Collapse,{in:o,unmountOnExit:!0,timeout:280,children:n.jsx(p.Box,{sx:{p:"2px 13px 12px",borderTop:`1px solid ${x.divider}`},children:l})})]})}function ve(){const e=V(r=>r.settings);return _.useMemo(()=>Hr(e),[e])}function ot({tabs:e,active:r,onChange:t}){const o=V(m=>m.settings.mode),i=V(m=>m.settings.primaryHex)||"#4F6BFF",s=V(m=>m.settings.highlightHex)||"#ffd400",a=V(m=>m.settings.bodyWeight)||400,l=o==="dark",d=Math.min(900,a+200),g=ve(),f=l?"#e6edf3":"#1c2127",x=l?"#cdd4de":"#5a6573";return n.jsx(p.Box,{sx:{display:"flex",gap:"2px",mb:"2px",px:"2px",borderBottom:"1.5px solid rgba(120,130,145,0.5)"},children:e.map(m=>{const h=m.key===r,b=n.jsx(p.Button,{onClick:()=>t(m.key),disableRipple:!0,sx:{flex:1,minWidth:0,px:"2px",pt:"9px",pb:"8px",minHeight:44,borderRadius:"6px 6px 0 0",mb:"-1px",fontSize:`${g.tBodySm}px`,fontFamily:`${g.headFam},sans-serif`,fontWeight:h?d:a,letterSpacing:0,textTransform:"none",whiteSpace:"normal",lineHeight:1.15,textAlign:"center",color:h?f:x,opacity:h?1:.3,bgcolor:h?ce(s,l?.26:.18):"transparent",borderBottom:h?`3px solid ${i}`:"2px solid transparent",transition:"color .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease","&:hover":h?{bgcolor:ce(s,l?.26:.18)}:{opacity:1,bgcolor:"rgba(150,160,175,0.35)",borderRadius:"8px",boxShadow:"0 6px 18px rgba(0,0,0,0.35)",transform:"translateY(-2px)"}},children:m.label},m.key);return m.info?n.jsx(p.Tooltip,{title:m.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:b},m.key):b})})}function ml(){var U,D;const[e,r]=_.useState("presets"),t=V(C=>C.settings),o=t.mode==="dark",i=t.highlightHex||"#ffd400",s=ce(i,o?.3:.18),a=o?"#e6edf3":"#1c2127",l=o?"rgba(255,255,255,0.82)":"#2c333d",d=V(C=>C.savedThemes),g=V(C=>C.applyPreset),f=V(C=>C.applySaved),x=V(C=>C.saveTheme),m=V(C=>C.updateSaved),h=V(C=>C.renameSaved),b=V(C=>C.deleteSaved),u=V(C=>C.importTheme),y=V(C=>C.set),v=V(C=>C.isDirty),k=V(C=>C.editingSavedId),R=V(C=>C.lastImportedId),S=d.find(C=>C.id===k),w=(C,A)=>{const F=new Blob([JSON.stringify({name:C,snap:A},null,2)],{type:"application/json"}),B=URL.createObjectURL(F),O=document.createElement("a");O.href=B,O.download=`${C.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}.theme.json`,O.click(),URL.revokeObjectURL(B)},[T,M]=_.useState("");_.useEffect(()=>{if(!T)return;const C=setTimeout(()=>M(""),5e3);return()=>clearTimeout(C)},[T]);const[P,X]=_.useState(null),Q=C=>{const A=d.map(O=>O.name.toLowerCase());let F=C,B=2;for(;A.includes(F.toLowerCase());)F=`${C} ${B++}`;return F},Y=C=>{var B;const A=(B=C.target.files)==null?void 0:B[0];if(!A)return;const F=new FileReader;F.onload=()=>{try{const O=JSON.parse(F.result),ee=O.snap??O;if(!al(ee)){M("Invalid theme file. The selected file is not a valid Theme Studio export.");return}const W=O.name||"Imported Theme";if(d.some(fe=>fe.name.toLowerCase()===W.toLowerCase())){X({name:W,snap:ee});return}M(""),u(W,ee)}catch{M("Invalid theme file. The selected file is not a valid Theme Studio export.")}},F.readAsText(A),C.target.value=""},[c,$]=_.useState(null),[H,z]=_.useState(!1),[N,J]=_.useState(""),[L,q]=_.useState(null),[E,I]=_.useState(null),K=(S==null?void 0:S.name)||((U=Ct.find(C=>C.id===t.presetId))==null?void 0:U.name)||((D=d.find(C=>C.id===t.presetId))==null?void 0:D.name)||"Custom Theme",G=(C,A)=>{const F=C.trim();return F?d.some(B=>B.name.toLowerCase()===F.toLowerCase()&&B.id!==A)?"Name already exists":"":"Name required"};return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"presets",label:"Presets",info:"Ready-made colour themes."},{key:"saved",label:"My Themes",info:"Your saved custom themes."},{key:"mode",label:"Mode",info:"Light / Dark."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="presets"&&n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:Ct.map(C=>{const A=t.presetId===C.id;return n.jsxs(p.Box,{onClick:()=>g(C.id,C.snap),title:`${C.name} — applies this colour palette`,sx:{display:"flex",alignItems:"center",gap:"9px",p:"9px 10px",borderRadius:"11px",cursor:"pointer",textAlign:"left",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:C.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:C.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{fontSize:"11px",fontWeight:600,color:A?a:l,lineHeight:1.3},children:C.name})]},C.id)})}),e==="saved"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[d.length===0&&n.jsx(p.Typography,{variant:"caption",sx:{color:"text.secondary",py:2,textAlign:"center"},children:"No saved themes yet."}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:.9},children:d.map(C=>{const A=k===C.id;return n.jsxs(p.Box,{onClick:()=>f(C),title:"Apply this saved theme",sx:{display:"flex",flexDirection:"column",gap:.9,p:"9px 10px",borderRadius:"11px",cursor:"pointer",position:"relative",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[A&&R===C.id&&n.jsx(p.Tooltip,{title:"recently upload",arrow:!0,children:n.jsx(p.Box,{component:"span",sx:{position:"absolute",top:-2,right:0,width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:C.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:C.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:"11px",fontWeight:600,color:A?a:l,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal"},children:C.name}),n.jsx(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:n.jsx(p.Box,{component:"span",onClick:F=>{F.stopPropagation(),$({el:F.currentTarget,id:C.id})},sx:{cursor:"pointer",color:"text.muted",px:.5},children:"⋮"})})]})]},C.id)})}),T&&n.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1,bgcolor:"rgba(211,47,47,0.08)",border:"1px solid rgba(211,47,47,0.35)",borderRadius:"10px",px:1.5,py:1.25,color:"#b3261e"},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:15,lineHeight:1.4},children:"!"}),n.jsx(p.Box,{sx:{fontSize:12.5,lineHeight:1.4},children:T})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1,mt:1},children:[n.jsxs(p.Button,{size:"small",variant:"outlined",component:"label",sx:{flex:1,textTransform:"none"},children:["↑ Import",n.jsx("input",{hidden:!0,type:"file",accept:".json,application/json",onChange:Y})]}),n.jsx(p.Button,{size:"small",variant:"outlined",onClick:()=>w(K,t),sx:{flex:1,textTransform:"none"},children:"⤓ Download"}),n.jsx(p.Button,{size:"small",variant:"contained",disabled:!v(),onClick:()=>{J(S?S.name:""),z(!0)},sx:{flex:1,textTransform:"none"},children:"+ Save"})]})]}),e==="mode"&&n.jsx(p.Box,{sx:{display:"flex",gap:1},children:["light","dark"].map(C=>n.jsx(p.Button,{onClick:()=>y({mode:C}),variant:t.mode===C?"contained":"outlined",sx:{flex:1,textTransform:"capitalize"},children:C},C))})]}),n.jsxs(p.Menu,{open:!!c,anchorEl:c==null?void 0:c.el,onClose:()=>$(null),children:[n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);f(C),$(null)},children:"✏️ Edit"}),n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);q({id:C.id,name:C.name}),$(null)},children:"✎ Rename"}),n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);I({id:C.id,name:C.name}),$(null)},children:"🗑 Delete"}),n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);w(C.name,C.snap),$(null)},children:"⤓ Download"})]}),n.jsxs(p.Dialog,{open:H,onClose:()=>z(!1),children:[n.jsx(p.DialogTitle,{children:S?`Save changes to “${S.name}”`:"Save theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"Theme name",value:N,onChange:C=>J(C.target.value),error:!!G(N,S==null?void 0:S.id),helperText:G(N,S==null?void 0:S.id),sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>z(!1),children:"Cancel"}),S&&n.jsx(p.Button,{variant:"contained",disabled:!!G(N,S.id),onClick:()=>{m(S.id,N.trim(),t),z(!1)},children:"Update"}),n.jsx(p.Button,{variant:S?"outlined":"contained",disabled:!!G(N),onClick:()=>{x(N.trim()),z(!1)},children:S?"Save as New":"Save"})]})]}),n.jsxs(p.Dialog,{open:!!L,onClose:()=>q(null),children:[n.jsx(p.DialogTitle,{children:"Rename theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"New name",value:(L==null?void 0:L.name)??"",onChange:C=>q(A=>A&&{...A,name:C.target.value}),error:!!(L&&G(L.name,L.id)),helperText:L?G(L.name,L.id):"",sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>q(null),children:"Cancel"}),n.jsx(p.Button,{variant:"contained",disabled:!!(L&&G(L.name,L.id)),onClick:()=>{h(L.id,L.name.trim()),q(null)},children:"Rename"})]})]}),n.jsxs(p.Dialog,{open:!!P,onClose:()=>X(null),children:[n.jsx(p.DialogTitle,{children:"Theme already exists"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["A theme named “",P==null?void 0:P.name,"” is already in My Themes. Upload it anyway as a copy?"]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>{X(null),M("You’ve selected a duplicate file — it already exists.")},children:"Cancel"}),n.jsx(p.Button,{variant:"contained",onClick:()=>{u(Q(P.name),P.snap),X(null)},children:"Yes, continue"})]})]}),n.jsxs(p.Dialog,{open:!!E,onClose:()=>I(null),children:[n.jsx(p.DialogTitle,{children:"Delete theme"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["Delete “",E==null?void 0:E.name,"”? This cannot be undone."]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>I(null),children:"Cancel"}),n.jsx(p.Button,{color:"error",variant:"contained",onClick:()=>{b(E.id),I(null)},children:"Delete"})]})]})]})}function yl({tip:e,sk:r}){return n.jsx(p.Box,{component:"span",title:e,sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${r.chevron}`,color:r.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",flexShrink:0,cursor:"help",verticalAlign:"middle"},children:"i"})}function Ze({children:e,tip:r,sk:t,mt:o}){const i=ve();return n.jsxs(p.Box,{sx:{fontSize:`${i.tCaption}px`,fontWeight:i.bwEmph,fontFamily:`${i.bodyFam},sans-serif`,color:t.label2,textTransform:"uppercase",letterSpacing:".5px",mb:"6px",mt:o?`${o}px`:0,display:"flex",alignItems:"center",gap:"5px"},children:[e,r&&n.jsx(yl,{tip:r,sk:t})]})}function dt({value:e,onChange:r,w:t=30,h:o=24,r:i=7,border:s,sk:a}){return n.jsx(p.Box,{sx:{width:t,height:o,borderRadius:`${i}px`,position:"relative",overflow:"hidden",flexShrink:0,background:e,border:s?`1px solid ${a.insetBd}`:"none"},children:n.jsx(p.Box,{component:"input",type:"color",value:e,onChange:l=>r(l.target.value),sx:{position:"absolute",top:-4,left:-4,width:t+10,height:o+10,opacity:0,cursor:"pointer",border:"none",p:0}})})}const bl=/^#[0-9a-fA-F]{6}$/;function vl({value:e,onCommit:r,onWarnChange:t}){const[o,i]=_.useState(!1),[s,a]=_.useState(e),[l,d]=_.useState(""),g=_.useRef(void 0);_.useEffect(()=>{o||a(e)},[e,o]),_.useEffect(()=>()=>clearTimeout(g.current),[]);const f=m=>{clearTimeout(g.current),d(m),t==null||t(m),m&&(g.current=setTimeout(()=>{d(""),t==null||t("")},3e3))},x=m=>{const h=m.trim();return bl.test(h)?(f(""),r(h),!0):(f("Enter a valid hex colour, e.g. #4F6BFF"),!1)};return o?n.jsx(p.InputBase,{autoFocus:!0,value:s,title:l||void 0,onChange:m=>{a(m.target.value)},onBlur:()=>{x(s)||a(e),i(!1)},onKeyDown:m=>{m.key==="Enter"&&x(s)&&i(!1),m.key==="Escape"&&(a(e),f(""),i(!1))},sx:{color:l?"#ffcdd2":"#fff",fontSize:"12.5px",fontWeight:700,width:100,position:"relative",zIndex:1}}):n.jsxs(p.Box,{component:"span",title:l||void 0,onClick:()=>{a(e),i(!0)},sx:{color:l?"#ffcdd2":"rgba(255,255,255,.85)",fontSize:"12.5px",fontWeight:700,cursor:"text",position:"relative",zIndex:1},children:[e," · tap to change"]})}function Sl(){const[e,r]=_.useState("brand"),[t,o]=_.useState(""),i=V(v=>v.settings),s=V(v=>v.set),a=Pe(i.mode),l=ve(),d={fontSize:"11.5px",color:a.body,fontWeight:600},g={fontSize:`${l.tBodySm}px`,color:a.body,fontWeight:l.bodyWeightEff,fontFamily:`${l.bodyFam},sans-serif`,lineHeight:l.bodyLH},f=i.primaryHex||"#4F6BFF",x=Se(f),m=[50,100,200,300,400,500,600,700,800,900].map(v=>x[v]),h=v=>s({...v,presetId:"custom"}),b=[{key:"h1Color",label:"H1 · Page Title"},{key:"h2Color",label:"H2 · Metric"},{key:"h3Color",label:"H3 · Card Title"},{key:"h4Color",label:"H4 · Section Label"},{key:"h5Color",label:"H5 · Caption"},{key:"h6Color",label:"H6 · Overline"}],u=[{key:"successHex",label:"Success"},{key:"warningHex",label:"Warning"},{key:"infoHex",label:"Info"},{key:"errorHex",label:"Error"}],y=[{key:"cardBgHex",label:"Card background",fb:"#ffffff"},{key:"cardHdrHex",label:"Card header",fb:"#f6f8fb"},{key:"pageBgHex",label:"Page background",fb:"#f4f6f9"},{key:"notifCardHex",label:"Notification background",fb:"#ffffff"}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"brand",label:"Brand",info:"Core brand colours — primary, secondary and the selection highlight colour used across the app."},{key:"text",label:"Text",info:"Heading and body text colours"},{key:"status",label:"Status",info:"Status colours & surface overrides"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px",display:"flex",flexDirection:"column",gap:"11px"},children:[e==="brand"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Primary brand colour — main/filled buttons, active sidebar item, links, focus rings, first chart series, and the login Sign-in button.",children:"Brand Color"}),n.jsxs(p.Box,{sx:{position:"relative",height:46,borderRadius:"11px",background:f,overflow:"hidden",display:"flex",alignItems:"center",px:"14px",boxShadow:`0 3px 10px ${f}44`},children:[n.jsx(vl,{value:f,onCommit:v=>h({primaryHex:v}),onWarnChange:o}),n.jsx(p.Box,{component:"input",type:"color",value:f,onChange:v=>h({primaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})]}),n.jsx(p.Box,{sx:{display:"flex",gap:"2px",borderRadius:"7px",overflow:"hidden",height:14,mt:"7px"},children:m.map((v,k)=>n.jsx(p.Box,{sx:{flex:1,background:v}},k))}),t&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:l.warnSoft,border:`1px solid ${l.warnTxt}`,color:l.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),t]})]}),n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Secondary accent — secondary/outlined buttons, switches & toggles, selected chips, and the second data series in charts.",children:"Secondary / Accent"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"9px",background:i.secondaryHex,overflow:"hidden"},children:n.jsx(p.Box,{component:"input",type:"color",value:i.secondaryHex,onChange:v=>h({secondaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]}),n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Accent colour used to draw attention — highlight panels, featured badges, callouts. Defaults to the brand colour.",children:"Highlight Colour"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"8px",background:i.highlightHex||i.primaryHex,overflow:"hidden",border:`1px solid ${a.insetBd}`},children:n.jsx(p.Box,{component:"input",type:"color",value:i.highlightHex||i.primaryHex,onChange:v=>h({highlightHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]})]}),e==="text"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(Ze,{sk:a,children:"Heading Text Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:b.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i[v.key]||"#1c2127",onChange:k=>s({[v.key]:k})}),n.jsx(p.Box,{component:"span",sx:g,children:v.label})]},v.key))}),n.jsx(Ze,{sk:a,children:"Body Text Colors"}),n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i.textPrimaryHex||"#1c2127",onChange:v=>s({textPrimaryHex:v})}),n.jsx(p.Box,{component:"span",sx:d,title:"Main body text colour.",children:"Primary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i.textSecondaryHex||"#5a6573",onChange:v=>s({textSecondaryHex:v})}),n.jsx(p.Box,{component:"span",sx:d,title:"Muted text colour.",children:"Secondary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i.dividerHex||"#e3e8ee",onChange:v=>s({dividerHex:v})}),n.jsx(p.Box,{component:"span",sx:d,title:"Divider / border colour.",children:"Divider"})]})]})]}),e==="status"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"7px"},children:[n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Success, warning, error & info colours — used for alerts, status pills, toasts and validation states.",children:"Status Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:u.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"7px"},children:[n.jsx(dt,{sk:a,w:22,h:22,r:6,value:i[v.key],onChange:k=>s({[v.key]:k})}),n.jsx(p.Box,{component:"span",sx:d,children:v.label})]},v.key))})]}),n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Override the auto-generated surface colours. Leave on Auto to follow the surface tint & mode.",children:"Surfaces"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:y.map(v=>{const k=!!i[v.key];return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"5px"},children:[n.jsx(dt,{sk:a,w:22,h:22,r:6,border:!0,value:i[v.key]||v.fb,onChange:R=>s({[v.key]:R})}),n.jsx(p.Box,{component:"span",sx:{...d,flex:1},children:v.label}),k&&n.jsx(p.Box,{component:"button",title:"Reset to Auto",onClick:()=>s({[v.key]:""}),sx:{background:"transparent",border:`1px solid ${a.insetBd}`,borderRadius:"6px",color:a.muted,fontSize:"10px",fontWeight:700,px:"7px",py:"3px",cursor:"pointer"},children:"Auto"})]},v.key)})})]})]})]})]})}function xe(e){const{label:r,info:t,value:o,effective:i,min:s,max:a,step:l=1,unit:d="",autoLabel:g,autoValue:f=0,softMin:x,softMax:m,floorValue:h,floorReset:b,floorMessage:u,extra:y,onChange:v}=e,k=Pe(V(J=>J.settings.mode)),R=ve(),S=`${R.bodyFam},sans-serif`,[w,T]=_.useState(!1),[M,P]=_.useState(String(i)),[X,Q]=_.useState(""),Y=_.useRef(void 0);_.useEffect(()=>{w||P(String(i))},[i,w]),_.useEffect(()=>()=>clearTimeout(Y.current),[]);const c=J=>{clearTimeout(Y.current),Q(J),J&&(Y.current=setTimeout(()=>Q(""),3e3))},$=J=>x!=null&&J<x?`Below ${x}${d} may break the UI`:m!=null&&J>m?`Above ${m}${d} may break the UI`:"",H=()=>{c(u??`Minimum is ${b}${d} — reset`),v(b),P(String(b))},z=J=>{const L=parseFloat(J);if(isNaN(L)){c("Enter a number"),P(String(i));return}if(h!=null&&b!=null&&L<=h){H();return}const q=Math.min(a,Math.max(s,L));c(q!==L?`Must be between ${s}${d} and ${a}${d} — clamped to ${q}${d}`:$(q)),P(String(q)),v(q)},N=o===f&&g?g:`${i}${d}`;return n.jsxs(p.Box,{sx:{mb:1.5},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"8px"},children:[n.jsxs(p.Typography,{sx:{fontSize:`${R.tBodySm}px`,fontWeight:R.bwEmph,fontFamily:S,lineHeight:R.bodyLH,color:k.label2,display:"flex",alignItems:"center",gap:"5px"},children:[r,t&&n.jsx(p.Tooltip,{title:t,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${k.chevron}`,color:k.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"5px",flexShrink:0},children:[w?n.jsx(p.InputBase,{autoFocus:!0,value:M,onChange:J=>P(J.target.value),onBlur:()=>{z(M),T(!1)},onKeyDown:J=>{J.key==="Enter"&&(z(M),T(!1)),J.key==="Escape"&&T(!1)},sx:{width:56,fontSize:`${R.tBodySm}px`,fontWeight:700,fontFamily:S,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsxs(p.Box,{component:"button",onClick:()=>{P(String(i)),T(!0)},sx:{display:"inline-flex",alignItems:"center",gap:"5px",fontFamily:S,fontSize:`${R.tBodySm}px`,fontWeight:800,color:k.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"7px",py:"2px",cursor:"pointer",lineHeight:1.3,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:[N,n.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block",flexShrink:0},children:[n.jsx("path",{d:"M12 20h9"}),n.jsx("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"})]})]}),y]})]}),n.jsx(p.Box,{component:"input",type:"range",min:s,max:a,step:l,value:i,onChange:J=>{const L=parseFloat(J.target.value);if(h!=null&&b!=null&&L<=h){H();return}c($(L)),v(L)},sx:{WebkitAppearance:"none",appearance:"none",width:"100%",height:"4px",m:0,p:0,display:"block",borderRadius:"2px",outline:"none",cursor:"pointer",background:"#dde3ea",accentColor:"primary.main","&::-webkit-slider-thumb":{WebkitAppearance:"none",width:18,height:18,borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"},"&::-moz-range-thumb":{width:18,height:18,border:"none",borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"}}}),X&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:R.warnSoft,border:`1px solid ${R.warnTxt}`,color:R.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),X]})]})}const Rn=new Set;function oo(e,r){if(Rn.has(e))return;Rn.add(e);const t=document.createElement("style");t.textContent=`@font-face{font-family:'${e}';src:url('${r}');font-display:swap;}`,document.head.appendChild(t)}function En(e){e.forEach(r=>oo(r.name,r.dataUrl))}const Cl=[{key:"Roboto",label:"Roboto",sub:"Material"},{key:"Inter",label:"Inter",sub:"Enterprise"},{key:"DM Sans",label:"DM Sans",sub:"Modern"},{key:"Manrope",label:"Manrope",sub:"Geometric"},{key:"Plus Jakarta Sans",label:"Jakarta",sub:"Friendly"},{key:"Nunito Sans",label:"Nunito",sub:"Rounded"}],wl=[{key:"Figtree",label:"Google Sans"},{key:"Roboto",label:"Roboto"},{key:"Inter",label:"Inter"},{key:"Arial",label:"Arial"},{key:"Manrope",label:"Manrope"},{key:"Plus Jakarta Sans",label:"Jakarta"}];function It({label:e,fam:r,active:t,onClick:o}){const i=V(f=>f.settings.mode),s=V(f=>f.settings.primaryHex)||"#4F6BFF",a=V(f=>f.settings.highlightHex)||"#ffd400",l=i==="dark",d=Se(s),g=ce(a,l?.3:.18);return n.jsx(p.Box,{onClick:o,sx:{py:"17px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",border:`1px solid ${t?l?d[400]:s:l?"#363d48":"#e3e8ee"}`,bgcolor:t?g:l?"#262b34":"#ffffff",transition:"all .14s ease","&:hover":t?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:n.jsx(p.Box,{sx:{fontFamily:`${r}, sans-serif`,fontSize:13,fontWeight:700,lineHeight:1,color:t?l?d[200]:d[700]:l?"#aeb6c0":"#5a6573"},children:e})})}const jl=["woff2","woff","ttf","otf"],kl=10*1024*1024,Tl=e=>new Promise((r,t)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>t(o.error),o.readAsDataURL(e)}),Bl=e=>new Promise(r=>{const t=setTimeout(()=>r(!1),5e3),o=new FileReader;o.onload=()=>{var a;clearTimeout(t);const i=new Uint8Array(o.result),s=((a=e.name.split(".").pop())==null?void 0:a.toLowerCase())||"";if(s==="woff2"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===50||s==="woff"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===70||s==="otf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79||s==="ttf"&&i[0]===0&&i[1]===1&&i[2]===0&&i[3]===0||s==="ttf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79)return r(!0);r(!1)},o.onerror=()=>{clearTimeout(t),r(!1)};try{o.readAsArrayBuffer(e.slice(0,4))}catch{clearTimeout(t),r(!1)}});function Hn({label:e,list:r,onAdd:t}){const o=Pe(V(f=>f.settings.mode)),i=ve(),[s,a]=_.useState(""),l=_.useRef(void 0);_.useEffect(()=>()=>clearTimeout(l.current),[]);const d=f=>{clearTimeout(l.current),a(f),f&&(l.current=setTimeout(()=>a(""),3e3))},g=async f=>{var k;const x=Array.from(f.target.files??[]);if(f.target.value="",!x.length)return;const m=[],h=[],b=[],u=[],y=[];for(const R of x){const S=((k=R.name.split(".").pop())==null?void 0:k.toLowerCase())||"";if(!jl.includes(S)){b.push(R.name);continue}if(R.size>kl){u.push(R.name);continue}if(!await Bl(R)){y.push(R.name);continue}const w=R.name.replace(/\.[^.]+$/,""),T=P=>P.toLowerCase()===w.toLowerCase();if(r.some(P=>T(P.name))||m.some(P=>T(P.name))){h.push(w);continue}const M=await Tl(R);oo(w,M),m.push({name:w,dataUrl:M})}m.length&&t(m);const v=[];h.length&&v.push(`Already added: ${h.join(", ")}`),b.length&&v.push(`Unsupported file type: ${b.join(", ")}`),u.length&&v.push(`Too large (max 10MB): ${u.join(", ")}`),y.length&&v.push(`Invalid font file: ${y.join(", ")}`),d(v.join(" · "))};return n.jsxs(p.Box,{sx:{mt:1.5},children:[n.jsxs(p.Box,{component:"label",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.75,bgcolor:o.inset,border:`1.5px dashed ${o.insetBd}`,borderRadius:"9px",p:1.5,cursor:"pointer",color:o.body,fontSize:11.5,fontWeight:600,fontFamily:`${i.bodyFam},sans-serif`,textAlign:"center"},children:["⬆ ",e,n.jsx(p.Box,{component:"span",sx:{color:o.muted},children:".woff2 / .ttf / .otf"}),n.jsx("input",{type:"file",accept:".woff2,.woff,.ttf,.otf",multiple:!0,onChange:g,style:{display:"none"}})]}),s&&n.jsxs(p.Box,{sx:{mt:.9,display:"flex",alignItems:"center",gap:.9,bgcolor:"error.main",borderRadius:2,px:1.4,py:.9,color:"error.contrastText",fontFamily:`${i.bodyFam},sans-serif`},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:12},children:"✕"}),n.jsx(p.Box,{component:"span",sx:{fontSize:11.5},children:s})]})]})}const Rl={compact:1.15,default:1.25,airy:1.414};function El(){const e=V(f=>f.settings),r=V(f=>f.set),t=Pe(e.mode),o=ve(),[i,s]=_.useState(!1),a=e.scaleRatioCustom>0?e.scaleRatioCustom:Rl[e.scaleRatio]??1.25,[l,d]=_.useState(a.toFixed(2));_.useEffect(()=>{i||d(a.toFixed(2))},[a,i]);const g=()=>{const f=parseFloat(l);isNaN(f)||r({scaleRatioCustom:f}),s(!1)};return i?n.jsx(p.InputBase,{autoFocus:!0,value:l,onChange:f=>d(f.target.value),onBlur:g,onKeyDown:f=>{f.key==="Enter"&&g(),f.key==="Escape"&&s(!1)},sx:{width:56,fontSize:"11.5px",fontWeight:700,fontFamily:`${o.bodyFam},sans-serif`,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsx(p.Box,{component:"button",title:"Configure scale ratio — each heading is the one above ÷ this value",onClick:()=>{d(a.toFixed(2)),s(!0)},sx:{display:"inline-grid",placeItems:"center",color:t.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"6px",py:"3px",cursor:"pointer",fontFamily:`${o.bodyFam},sans-serif`,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})})}function Hl(){const[e,r]=_.useState("bodyFont"),t=V(i=>i.settings),o=V(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"bodyFont",label:"Body Font",info:"Typeface used for body / paragraph text (headings use the Heading Font)"},{key:"headFont",label:"Heading Font",info:"Choose a separate typeface for headings (or match the body font)"},{key:"headText",label:"Heading Text",info:"Fine-tune size & weight per heading level (H1–H4)"},{key:"bodyText",label:"Body Text",info:"Adjust base font size and line height for body copy"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="bodyFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[Cl.map(i=>n.jsx(It,{label:i.label,sub:i.sub,fam:i.key,active:t.fontFamily===i.key,onClick:()=>o({fontFamily:i.key})},i.key)),t.customFonts.map(i=>n.jsx(It,{label:i.name,sub:"Custom",fam:i.name,active:t.fontFamily===i.name,onClick:()=>o({fontFamily:i.name})},i.name))]}),n.jsx(Hn,{label:"Upload custom font",list:t.customFonts,onAdd:i=>o({customFonts:[...i,...t.customFonts],fontFamily:i[0].name})})]}),e==="headFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[wl.map(i=>n.jsx(It,{label:i.label,fam:i.key,active:t.headingFont===i.key,onClick:()=>o({headingFont:i.key})},i.key)),t.customHeadFonts.map(i=>n.jsx(It,{label:i.name,sub:"Custom",fam:i.name,active:t.headingFont===i.name,onClick:()=>o({headingFont:i.name})},i.name))]}),n.jsx(Hn,{label:"Upload heading font",list:t.customHeadFonts,onAdd:i=>o({customHeadFonts:[...i,...t.customHeadFonts],headingFont:i[0].name})})]}),e==="headText"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"H1 size",info:"All heading levels scale from H1 by a modular ratio (configurable via the gear icon).",value:t.h1Size,effective:t.h1Size||20,min:18,max:56,unit:"px",extra:n.jsx(El,{}),onChange:i=>o({h1Size:i})}),n.jsx(xe,{label:"Weight (all headings)",value:t.headingWeight,effective:t.headingWeight,min:300,max:900,step:100,onChange:i=>o({headingWeight:i})}),n.jsx(xe,{label:"Line height (all headings)",value:t.headingLH,effective:t.headingLH||1.2,min:.9,max:2,step:.05,autoLabel:"Auto (1.20)",onChange:i=>o({headingLH:i})})]}),e==="bodyText"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"Base font size",info:"Root body text size.",value:t.baseFontPx,effective:t.baseFontPx||12,min:9,max:20,unit:"px",softMin:9,onChange:i=>o({baseFontPx:i})}),n.jsx(xe,{label:"Body weight",value:t.bodyWeight,effective:t.bodyWeight||400,min:300,max:900,step:100,autoLabel:"Auto (400)",onChange:i=>o({bodyWeight:i})}),n.jsx(xe,{label:"Body line height",value:t.bodyLineHeight,effective:t.bodyLineHeight||1.5,min:1.2,max:2,step:.05,autoLabel:"Auto (1.50)",onChange:i=>o({bodyLineHeight:i})})]})]})]})}function we({options:e,value:r,columns:t=3,onChange:o}){const i=V(v=>v.settings.mode),s=V(v=>v.settings.primaryHex)||"#4F6BFF",a=V(v=>v.settings.highlightHex)||"#ffd400",l=i==="dark",d=Se(s),g=ve(),f=`${g.bodyFam},sans-serif`,x=ce(a,l?.3:.18),m=l?d[400]:s,h=l?d[200]:d[700],b=l?"#262b34":"#ffffff",u=l?"#363d48":"#e3e8ee",y=l?"#aeb6c0":"#5a6573";return n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"6px"},children:e.map(v=>{const k=v.key===r,R=n.jsx(p.Box,{onClick:()=>o(v.key),sx:{py:"9px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",userSelect:"none",fontSize:`${g.tCaption}px`,fontWeight:k?g.bwEmph:g.bodyWeightEff,fontFamily:f,border:`1px solid ${k?m:u}`,bgcolor:k?x:b,color:k?h:y,transition:"color .14s ease, background .14s ease, border-color .14s ease","&:hover":k?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:v.label},v.key);return v.info?n.jsx(p.Tooltip,{title:v.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:R},v.key):R})})}const Dt={outlined:0,soft:6,floating:24},Ft={plain:0,tinted:40,accent:60},Pl={bordered:0,recessed:6,lighter:4};function $l(){const[e,r]=_.useState("style"),t=V(d=>d.settings),o=V(d=>d.set),i=t.cardShadowPx>=0?t.cardShadowPx:Dt[t.cardStyle]??24,s=t.headerStrength>=0?t.headerStrength:Ft[t.cardHeader]??45,a=t.nestedDepth>=0?t.nestedDepth:Pl[t.nestedStyle]??6,l=t.tintIntensity>=0?t.tintIntensity:100;return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"style",label:"Style",info:"Card border vs shadow depth."},{key:"header",label:"Header",info:"Card header treatment."},{key:"nested",label:"Nested",info:"How cards-within-cards look."},{key:"tint",label:"Tint",info:"Overall surface tint colour & strength."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="style"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.cardStyle,onChange:d=>{const g=d;o({cardStyle:g,cardShadowPx:Dt[g]})},options:[{key:"outlined",label:"Outlined"},{key:"soft",label:"Soft"},{key:"floating",label:"Floating"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Shadow depth",info:"Card elevation (px).",value:t.cardShadowPx,effective:i,min:0,max:32,unit:"px",autoValue:-1,autoLabel:`Auto (${i}px)`,softMin:t.cardStyle==="outlined"?void 0:1,softMax:32,floorValue:t.cardStyle==="outlined"?void 0:0,floorReset:Dt[t.cardStyle],floorMessage:`${t.cardStyle==="soft"?"Soft":"Floating"} cards need shadow - reset to ${Dt[t.cardStyle]}px`,onChange:d=>o({cardShadowPx:d})})})]}),e==="header"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.cardHeader,onChange:d=>{const g=d;o({cardHeader:g,headerStrength:Ft[g]})},options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Header strength",info:"Header tint / accent intensity.",value:t.headerStrength,effective:s,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${s}%)`,softMin:t.cardHeader==="plain"?void 0:1,floorValue:t.cardHeader==="plain"?void 0:0,floorReset:Ft[t.cardHeader],floorMessage:`${t.cardHeader==="tinted"?"Tinted":"Accent"} headers need strength - reset to ${Ft[t.cardHeader]}%`,onChange:d=>o({headerStrength:d})})})]}),e==="nested"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.nestedStyle,onChange:d=>o({nestedStyle:d}),options:[{key:"recessed",label:"Recessed"},{key:"lighter",label:"Lighter"},{key:"bordered",label:"Bordered"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Nested depth",info:"Inset depth of cards-within-cards.",value:t.nestedDepth,effective:a,min:0,max:24,unit:"px",autoValue:-1,autoLabel:`Auto (${a}px)`,onChange:d=>o({nestedDepth:d})})})]}),e==="tint"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.surfaceTint,onChange:d=>o({surfaceTint:d}),options:[{key:"snow",label:"None"},{key:"neutral",label:"Low"},{key:"brand",label:"High"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Tint intensity",info:"Strength of the page surface tint.",value:t.tintIntensity,effective:l,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${l}%)`,onChange:d=>o({tintIntensity:d})})})]})]})]})}function Al(){const[e,r]=_.useState("rows"),t=V(i=>i.settings),o=V(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"rows",label:"Rows",info:"Row density & dividers."},{key:"cols",label:"Columns",info:"Column density & dividers."},{key:"cells",label:"Cells",info:"Cell text & vertical alignment."},{key:"styling",label:"Styling",info:"Header background & row striping."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="rows"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableDensity,onChange:i=>o({tableDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableDividers,onChange:i=>o({tableDividers:i.target.checked})}),label:"Row dividers"}),t.tableDividers&&n.jsx(xe,{label:"Divider width",value:t.tableRowDivW,effective:t.tableRowDivW,min:1,max:4,unit:"px",onChange:i=>o({tableRowDivW:i})})]}),e==="cols"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableColDensity,onChange:i=>o({tableColDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableColDividers,onChange:i=>o({tableColDividers:i.target.checked})}),label:"Column dividers"}),t.tableColDividers&&n.jsx(xe,{label:"Divider width",value:t.tableColDivW,effective:t.tableColDivW,min:1,max:4,unit:"px",onChange:i=>o({tableColDivW:i})})]}),e==="cells"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableCellAlignH,onChange:i=>o({tableCellAlignH:i}),options:[{key:"left",label:"Left"},{key:"center",label:"Center"},{key:"right",label:"Right"}]}),n.jsx(p.Box,{sx:{mt:1},children:n.jsx(we,{value:t.tableCellAlignV,onChange:i=>o({tableCellAlignV:i}),options:[{key:"top",label:"Top"},{key:"middle",label:"Middle"},{key:"bottom",label:"Bottom"}]})})]}),e==="styling"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableHeaderStyle,onChange:i=>o({tableHeaderStyle:i}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableStripe,onChange:i=>o({tableStripe:i.target.checked})}),label:"Striped rows"})]})]})]})}const xr={compact:.82,default:1,comfortable:1.16};function Il(){const[e,r]=_.useState("shape"),t=V(d=>d.settings),o=V(d=>d.set),i=Pe(t.mode),s=t.densityScale>0?t.densityScale:Math.round((xr[t.density]??1)*100),a=t.cardGapPx>0?t.cardGapPx:Math.round(16*(xr[t.density]??1)),l=t.containerPadPx>0?t.containerPadPx:Math.round(10*(xr[t.density]??1));return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"shape",label:"Shape",info:"Corner radius & layout density."},{key:"effects",label:"Effects",info:"Spacing, button case & status chips."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="shape"&&n.jsxs(n.Fragment,{children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Corner Radius"}),n.jsx(we,{value:t.radiusPreset,onChange:d=>o({radiusPreset:d,radiusVal:d==="sharp"?0:d==="round"?18:9}),options:[{key:"sharp",label:"Sharp"},{key:"rounded",label:"Rounded"},{key:"round",label:"Round"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(xe,{label:"Exact radius",value:t.radiusVal,effective:t.radiusVal,min:0,max:28,unit:"px",onChange:d=>o({radiusVal:d,radiusPreset:"rounded"})})}),n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75,mt:.5},children:"Density"}),n.jsx(we,{value:t.densityScale>0?"":t.density,onChange:d=>o({density:d,densityScale:0}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(xe,{label:"Exact density",info:"Fine-tune spacing scale (%).",value:t.densityScale,effective:s,min:60,max:140,unit:"%",onChange:d=>o({densityScale:d})})})]}),e==="effects"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"Card-to-card gap",value:t.cardGapPx,effective:a,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${a}px)`,onChange:d=>o({cardGapPx:d})}),n.jsx(xe,{label:"Container padding",value:t.containerPadPx,effective:l,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${l}px)`,onChange:d=>o({containerPadPx:d})}),n.jsx(xe,{label:"Edge gap",info:"Space between the preview frame and the outer app card.",value:t.edgePadPx,effective:t.edgePadPx,min:0,max:40,step:2,unit:"px",autoLabel:"0px (flush)",onChange:d=>o({edgePadPx:d})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:1},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2},children:"Uppercase button labels"}),n.jsx(p.Switch,{size:"small",checked:t.btnCase==="upper",onChange:d=>o({btnCase:d.target.checked?"upper":"none"})})]}),n.jsxs(p.Box,{sx:{mt:1.25},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Status Chips"}),n.jsx(we,{columns:2,value:t.statusBold?"bold":"soft",onChange:d=>o({statusBold:d==="bold"}),options:[{key:"soft",label:"Soft"},{key:"bold",label:"Bold"}]})]})]})]})]})}function Dl(){const[e,r]=_.useState("placement"),t=V(i=>i.settings),o=V(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"placement",label:"Placement",info:"Where toasts appear."},{key:"behaviour",label:"Behaviour",info:"Width & auto-dismiss."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="placement"&&n.jsx(we,{columns:2,value:t.notifPosition,onChange:i=>o({notifPosition:i}),options:[{key:"top-center",label:"Top Center"},{key:"top-right",label:"Top Right"},{key:"bottom-left",label:"Bottom Left"},{key:"bottom-right",label:"Bottom Right"}]}),e==="behaviour"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"Toast width",value:t.toastW,effective:t.toastW||252,min:200,max:500,unit:"px",softMax:500,onChange:i=>o({toastW:i})}),n.jsx(p.FormControlLabel,{sx:{mt:.5},control:n.jsx(p.Switch,{checked:t.notifBadge,onChange:i=>o({notifBadge:i.target.checked})}),label:"Show unread badge"}),n.jsx(p.FormControlLabel,{sx:{mt:.5,display:"flex"},control:n.jsx(p.Switch,{checked:t.notifAutoDismiss,onChange:i=>o({notifAutoDismiss:i.target.checked})}),label:"Auto-dismiss toasts"}),t.notifAutoDismiss&&n.jsx(xe,{label:"Dismiss after",value:t.autoDismissSec,effective:t.autoDismissSec||5,min:5,max:30,unit:"s",onChange:i=>o({autoDismissSec:i})})]})]})]})}function Fl({label:e,info:r,value:t,fallback:o,onChange:i,onReset:s}){const a=Pe(V(f=>f.settings.mode)),[l,d]=_.useState(null),g=t||o;return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[n.jsx(p.Box,{onClick:f=>d(f.currentTarget),sx:{width:22,height:22,borderRadius:1.5,border:`1px solid ${a.insetBd}`,bgcolor:g,cursor:"pointer",flexShrink:0}}),n.jsxs(p.Typography,{variant:"caption",sx:{flex:1,color:a.body,display:"flex",alignItems:"center",gap:.5},children:[e,r&&n.jsx(p.Tooltip,{title:r,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${a.chevron}`,color:a.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),t&&s&&n.jsx(p.Box,{component:"span",onClick:s,title:"Reset to theme default",sx:{fontSize:13,color:a.muted,cursor:"pointer"},children:"↺"}),n.jsx(p.Popover,{open:!!l,anchorEl:l,onClose:()=>d(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:n.jsx(p.Box,{sx:{p:1},children:n.jsx("input",{type:"color",value:g,onChange:f=>i(f.target.value),style:{width:160,height:40,border:"none",background:"none"}})})})]})}function Ol({src:e,aspect:r,onCancel:t,onConfirm:o}){const[i,s]=_.useState(1),[a,l]=_.useState({x:0,y:0}),d=_.useRef(null),g=_.useRef(null),f=_.useRef(null),x=_.useRef(null);_.useEffect(()=>{const b=y=>{x.current&&l({x:x.current.ox+(y.clientX-x.current.sx),y:x.current.oy+(y.clientY-x.current.sy)})},u=()=>{x.current=null};return document.addEventListener("pointermove",b),document.addEventListener("pointerup",u),()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",u)}},[]);const m=b=>{b.preventDefault(),x.current={sx:b.clientX,sy:b.clientY,ox:a.x,oy:a.y}},h=()=>{const b=d.current,u=g.current,y=f.current;if(!b||!u){o(e);return}const v=(y||b).getBoundingClientRect(),k=1e3,R=Math.round(k*r),S=R/v.width,w=document.createElement("canvas");w.width=R,w.height=k;const T=w.getContext("2d");if(!T){o(e);return}const M=u.getBoundingClientRect(),P=(M.left-v.left)*S,X=(M.top-v.top)*S,Q=M.width*S,Y=M.height*S;try{T.drawImage(u,P,X,Q,Y),o(w.toDataURL("image/png"))}catch{o(e)}};return hi.createPortal(n.jsx(p.Box,{sx:{position:"fixed",inset:0,zIndex:1400,bgcolor:"rgba(15,23,42,.6)",display:"flex",alignItems:"center",justifyContent:"center",p:2.25,overflow:"auto"},children:n.jsxs(p.Box,{sx:{width:"100%",maxWidth:320,bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 20px 50px rgba(15,23,42,.4)",p:2},children:[n.jsx(p.Typography,{sx:{fontSize:14,fontWeight:800,mb:.5},children:"Adjust brand image"}),n.jsx(p.Typography,{sx:{fontSize:11.5,color:"text.secondary",mb:1.5,lineHeight:1.45},children:"Drag and zoom to fit your image inside the bright frame. Anything in the dimmed area is cropped out."}),n.jsxs(p.Box,{ref:d,onPointerDown:m,sx:{position:"relative",width:"100%",aspectRatio:String(r),borderRadius:2.5,overflow:"hidden",bgcolor:"#e9edf2",cursor:"grab",touchAction:"none",display:"grid",placeItems:"center","&:active":{cursor:"grabbing"}},children:[n.jsx("img",{ref:g,src:e,alt:"",draggable:!1,style:{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%,-50%) translate(${a.x}px,${a.y}px) scale(${i})`,transformOrigin:"center",maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto",userSelect:"none",pointerEvents:"none"}}),n.jsx(p.Box,{ref:f,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"72%",aspectRatio:String(r),maxWidth:"90%",boxShadow:"0 0 0 9999px rgba(10,15,25,.62)",border:"2px solid #fff",borderRadius:"3px",pointerEvents:"none"}})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,my:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:12,fontWeight:700,color:"text.secondary"},children:"Zoom"}),n.jsx(p.Slider,{size:"small",min:.3,max:4,step:.02,value:i,onChange:(b,u)=>s(u)})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:t,sx:{flex:1,p:1.25,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Cancel"}),n.jsx(p.Box,{component:"button",onClick:h,sx:{flex:1,p:1.25,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Confirm"})]})]})}),document.body)}function Ml(){const e=V(f=>f.settings),r=V(f=>f.set),t=Pe(e.mode),[o,i]=_.useState(null),s=(f,x)=>{var b;const m=(b=f.target.files)==null?void 0:b[0];if(!m)return;const h=new FileReader;h.onload=()=>i({src:h.result,aspect:x==="logoUrl"?3.5:1.55,target:x}),h.readAsDataURL(m),f.target.value=""},a=f=>{o&&(o.target==="logoUrl"?r({logoUrl:f,logoMode:"image"}):r({loginImage:f}),i(null))},l={fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:".6px"},d={display:"flex",alignItems:"center",justifyContent:"center",gap:1,border:`1.5px dashed ${t.insetBd}`,borderRadius:2.5,p:1.75,cursor:"pointer",color:t.body,fontSize:12.5,fontWeight:600,bgcolor:t.inset},g=(f,x)=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:1,p:.9,bgcolor:t.inset,border:`1px solid ${t.insetBd}`,borderRadius:2},children:[n.jsx(p.Typography,{variant:"caption",sx:{flex:1,minWidth:0,color:t.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f}),n.jsx(p.Box,{component:"button",onClick:x,title:"Remove",sx:{border:"none",background:"transparent",color:t.muted,cursor:"pointer",fontSize:14},children:"✕"})]});return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1.75},children:[n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Brand Image"}),n.jsxs(p.Box,{component:"label",sx:d,children:["⬆ Choose image",n.jsx("input",{hidden:!0,type:"file",accept:"image/*",onChange:f=>s(f,"loginImage")})]}),e.loginImage&&g("Uploaded image",()=>r({loginImage:""}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Logo"}),n.jsxs(p.Box,{component:"label",sx:d,children:["⬆ Choose logo file",n.jsx("input",{hidden:!0,type:"file",accept:"image/png,image/jpeg,image/svg+xml,image/webp",onChange:f=>s(f,"logoUrl")})]}),e.logoMode==="image"&&e.logoUrl&&g("Uploaded logo",()=>r({logoUrl:"",logoMode:"icon"}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:.5},children:"Panel Colour"}),n.jsx(Fl,{label:"Login panel background",value:e.loginPanelColor,fallback:e.primaryHex,onChange:f=>r({loginPanelColor:f}),onReset:()=>r({loginPanelColor:""})})]}),o&&n.jsx(Ol,{src:o.src,aspect:o.aspect,onCancel:()=>i(null),onConfirm:a})]})}const Wl=[{key:"dashboard",label:"Dashboard"},{key:"orders",label:"Orders"},{key:"reports",label:"Reports"},{key:"cameras",label:"Cameras"},{key:"operations",label:"Operations"},{key:"components",label:"Components"},{key:"login",label:"Login"}],zl=[{key:"dashboard",label:"Dashboard"},{key:"operations",label:"Operations"},{key:"cameras",label:"Cameras"},{key:"reports",label:"Reports"},{key:"orders",label:"Orders"},{key:"components",label:"Components"}],De=ro(e=>({openSection:"",setOpenSection:r=>e({openSection:r}),previewScreen:"dashboard",setPreviewScreen:r=>e({previewScreen:r}),previewMenuOpen:!1,setPreviewMenuOpen:r=>e({previewMenuOpen:r}),studioOpen:!0,setStudioOpen:r=>e({studioOpen:r}),defaultLoginImage:"",setDefaultLoginImage:r=>e({defaultLoginImage:r})}));function _l({onClose:e}){var D,C,A,F;const r=De(B=>B.openSection),t=De(B=>B.setOpenSection),o=De(B=>B.setPreviewScreen),i=De(B=>B.previewScreen),s=De(B=>B.previewMenuOpen),a=De(B=>B.setPreviewMenuOpen),l=V(B=>B.settings),d=V(B=>B.savedThemes),g=V(B=>B.editingSavedId),f=V(B=>B.isDirty),x=V(B=>B.set),m=V(B=>B.reset),h=Pe(l.mode),b=_.useRef("theme"),[u,y]=_.useState(!1),v=(B,O)=>{const ee=r!==B;t(ee?B:""),a(!1),ee&&b.current!==B&&(o(O),b.current=B)},k=((D=d.find(B=>B.id===g))==null?void 0:D.name)||((C=Ct.find(B=>B.id===l.presetId))==null?void 0:C.name)||((A=d.find(B=>B.id===l.presetId))==null?void 0:A.name)||"Custom Theme",R=f(),S=((F=Ct.find(B=>B.id===Ee.presetId))==null?void 0:F.name)??"default",w={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},T=({children:B})=>n.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",...w,children:B}),M=n.jsxs(T,{children:[n.jsx("circle",{cx:"13.5",cy:"6.5",r:"2.5"}),n.jsx("circle",{cx:"17.5",cy:"10.5",r:"2.5"}),n.jsx("circle",{cx:"8.5",cy:"7.5",r:"2.5"}),n.jsx("circle",{cx:"6.5",cy:"12.5",r:"2.5"}),n.jsx("path",{d:"M12 2a10 10 0 0 0 0 20 3 3 0 0 0 0-6 2 2 0 0 1 0-4 4 4 0 0 0 4-4 6 6 0 0 0-4-6z"})]}),P=n.jsxs(p.Box,{sx:{display:"flex",gap:"2px",width:14,height:14},children:[n.jsx(p.Box,{sx:{flex:1,background:l.secondaryHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.errorHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.successHex,borderRadius:"2px"}})]}),X=n.jsxs(T,{children:[n.jsx("path",{d:"M4 20 9 5l5 15M6 14h6"}),n.jsx("path",{d:"M15 20l3-9 3 9M16.2 17h3.6"})]}),Q=n.jsxs(T,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18"})]}),Y=n.jsxs(T,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18M3 15h18M9 3v18"})]}),c=n.jsx(T,{children:n.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4"})}),$=n.jsxs(n.Fragment,{children:[n.jsxs(T,{children:[n.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"}),n.jsx("path",{d:"M10 21a2 2 0 0 0 4 0"})]}),n.jsx(p.Box,{sx:{position:"absolute",top:"6px",right:"6px",width:7,height:7,borderRadius:"50%",background:l.primaryHex,border:`1.5px solid ${h.iconTile}`}})]}),H=n.jsxs(T,{children:[n.jsx("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),n.jsx("path",{d:"M10 17l5-5-5-5"}),n.jsx("path",{d:"M15 12H3"})]}),z=l.mode==="dark",N=B=>B.charAt(0).toUpperCase()+B.slice(1),J={sm:"Small",df:"Default",lg:"Large"},L={sharp:"Sharp",rounded:"Rounded",round:"Round"},q={compact:"Compact",default:"Default",comfortable:"Comfortable"},E={flat:"Flat",outlined:"Outlined",soft:"Soft",raised:"Raised",elevated:"Elevated",floating:"Floating"},I={split:"Split Brand",centered:"Centered Card"},K={"top-center":"Top Center","top-right":"Top Right","bottom-left":"Bottom Left","bottom-right":"Bottom Right"},G={theme:`${k} · ${z?"Dark":"Light"}`,color:"Secondary & status colours",type:`${l.fontFamily} · ${J[l.textSize]??"Default"}`,cards:"Card style, header, nesting & surface tint",tables:"Table row density, dividers, striping & header style — previewed on the Orders screen",shape:`${L[l.radiusPreset]??"Custom"} · ${q[l.density]??"Default"} · ${E[l.cardStyle]??""}`,notif:`${K[l.notifPosition]??""} · ${N(l.notifStyle)}`,login:`${I[l.loginLayout]??""}${l.loginImage?" · image":""}`},U=[{id:"theme",title:"Theme Settings",info:"Presets, saved themes & light/dark mode.",icon:M,screen:"dashboard",body:n.jsx(ml,{})},{id:"color",title:"Colour Settings",info:"Brand, text & status colours.",icon:P,screen:"components",body:n.jsx(Sl,{})},{id:"type",title:"Typography",info:"Fonts, sizes, weight & line-height.",icon:X,screen:"components",body:n.jsx(Hl,{})},{id:"cards",title:"Cards",info:"Card style, header, nesting & tint.",icon:Q,screen:"dashboard",body:n.jsx($l,{})},{id:"tables",title:"Tables",info:"Row/column density, dividers & alignment.",icon:Y,screen:"orders",body:n.jsx(Al,{})},{id:"shape",title:"Surface & Shape",info:"Radius, density, elevation & spacing.",icon:c,screen:"dashboard",body:n.jsx(Il,{})},{id:"notif",title:"Notifications",info:"Toast placement & behaviour.",icon:$,screen:"operations",body:n.jsx(Dl,{})},{id:"login",title:"Login Screen",info:"Brand image, logo & panel colour.",icon:H,screen:"login",body:n.jsx(Ml,{})}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.1,borderBottom:`1px solid ${h.divider}`,bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",gap:.5,flexShrink:0},children:[n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.primaryHex}}),n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.secondaryHex}})]}),n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:"6px"},children:[n.jsx(p.Typography,{variant:"caption",sx:{minWidth:0,fontWeight:800,color:h.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k}),R&&n.jsx(p.Tooltip,{title:"Unsaved changes",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})})]}),n.jsx(p.Tooltip,{title:"Reset to defaults",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>y(!0),sx:{bgcolor:"action.selected"},children:n.jsx(Ks,{sx:{fontSize:16}})})}),n.jsx(p.Tooltip,{title:l.mode==="dark"?"Switch to light":"Switch to dark",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>x({mode:l.mode==="dark"?"light":"dark"}),sx:{bgcolor:"action.selected"},children:l.mode==="dark"?n.jsx(Qs,{sx:{fontSize:16}}):n.jsx(Xs,{sx:{fontSize:16}})})})]}),s&&n.jsxs(p.Box,{sx:{borderBottom:"1px solid",borderColor:"divider",borderLeft:"3px solid #eab308",bgcolor:B=>B.palette.mode==="dark"?"rgba(234,179,8,0.14)":"#fef9c3",px:1.6,py:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:10,fontWeight:800,textTransform:"uppercase",letterSpacing:".6px",color:B=>B.palette.mode==="dark"?"#f2cd5c":"#854d0e",mb:1},children:"Previewing Screen"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:.75},children:zl.map(B=>{const O=i===B.key;return n.jsx(p.Box,{component:"button",onClick:()=>{i!==B.key&&o(B.key),a(!1)},sx:{px:.75,py:1,borderRadius:2,cursor:"pointer",fontSize:11,fontWeight:O?800:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:"1.5px solid",borderColor:O?"#d4a915":"#e6dca8",bgcolor:O?"#fde68a":"background.paper",color:O?"#713f12":"text.secondary"},children:B.label},B.key)})})]}),U.map(B=>n.jsx(xl,{icon:B.icon,title:B.title,info:G[B.id]??B.info,open:r===B.id,dimmed:r!==""&&r!==B.id,onToggle:()=>v(B.id,B.screen),onPreviewMenu:()=>a(!s),children:B.body},B.id)),n.jsxs(p.Dialog,{open:u,onClose:()=>y(!1),PaperProps:{sx:{borderRadius:3,width:320,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Reset everything?"}),n.jsxs(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:["This reverts every change you've made — theme preset, light/dark mode, brand colours, logo, typography, cards, surface & shape, notifications and login screen — back to the default ",S," preset. This can't be undone."]}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{m(),y(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"error.main",color:"error.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Reset to defaults"}),n.jsx(p.Box,{component:"button",onClick:()=>y(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Cancel"})]})]})]})}const Ll=kt(n.jsx("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H3V4h18z"}),"DesktopWindowsOutlined");function Pr(e,r,t){const o=_.useRef(null),[i,s]=_.useState(e);return _.useLayoutEffect(()=>{const a=o.current;if(!a)return;const l=()=>{const x=a.children.length;if(!x)return;const m=parseFloat(getComputedStyle(a).rowGap)||0;let h=0;for(const y of Array.from(a.children))h+=y.offsetHeight;const b=h/x,u=a.clientHeight;u<=0||b<=0||s(Math.max(r,Math.min(t,Math.floor((u+m)/(b+m)))))};l();const d=requestAnimationFrame(l),g=setTimeout(l,300),f=new ResizeObserver(l);return f.observe(a),()=>{cancelAnimationFrame(d),clearTimeout(g),f.disconnect()}},[r,t]),[o,i]}function io(e,r,t){const o=_.useRef(null),i=_.useRef(null),[s,a]=_.useState(e);return _.useLayoutEffect(()=>{const l=i.current;if(!l)return;const d=()=>{var u;const m=Array.from(l.children).filter(y=>getComputedStyle(y).position!=="absolute"),h=m.length?m[0].offsetHeight:((u=o.current)==null?void 0:u.offsetHeight)||36,b=l.clientHeight;b<=0||h<=0||a(Math.max(r,Math.min(t,Math.floor(b/h))))};d();const g=requestAnimationFrame(d),f=setTimeout(d,300),x=new ResizeObserver(d);return x.observe(l),()=>{cancelAnimationFrame(g),clearTimeout(f),x.disconnect()}},[r,t]),[o,i,s]}const Nl=["Jan","Feb","Mar","Apr","May","Jun"],Vl=[44,60,50,74,88,96],Gl=[24,32,30,42,52,60];function Ul(){const e=ve(),r=V(D=>D.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,tH4:m,wH1:h,headFam:b,headLH:u,accentBg:y,btnText:v,tBodySm:k,bwEmph:R,btnCase:S,bodyWeightEff:w,bodyLH:T,tCaption:M,pMain:P,sMain:X}=e,Q=b+",sans-serif",Y=r.fontFamily+",sans-serif",c=e.hc1||t.textPrimary,$=e.hc2||t.textPrimary,H=e.hc3||t.textPrimary,z=[{label:"Revenue",val:"$2.41M",chg:"+12.5%",up:!0},{label:"Open Orders",val:"1,284",chg:"+3.2%",up:!0},{label:"Inventory",val:"8,540",chg:"-1.8%",up:!1},{label:"Active Users",val:"342",chg:"+5",up:!0}].map(D=>({...D,cc:D.up?e.sucTxt:e.errTxt,cb:D.up?e.sucSoft:e.errSoft,arrow:D.up?"▲":"▼"})),N=D=>D==="✓"?{cb:e.sucSoft,cc:e.sucTxt}:D==="!"?{cb:e.warnSoft,cc:e.warnTxt}:D==="+"?{cb:e.infoSoft,cc:e.infoTxt}:{cb:t.pContainer,cc:e.isDark?t.pLight:t.pDark},J=[{title:"Order ORD-1042 delivered to Acme Corp",time:"2m ago",ic:"✓"},{title:"Invoice #4821 paid — $12,400",time:"18m ago",ic:"$"},{title:"Low stock alert: Widget Pro (12 left)",time:"1h ago",ic:"!"},{title:"New customer onboarded: Globex Ltd",time:"3h ago",ic:"+"},{title:'Report "Q2 Summary" exported to PDF',time:"5h ago",ic:"▤"},{title:"Shipment SHP-2093 dispatched — Initech",time:"6h ago",ic:"✓"},{title:"Refund processed — $840 to Umbrella Co",time:"7h ago",ic:"$"},{title:"Payment overdue: Waystar Royco",time:"8h ago",ic:"!"},{title:"New support ticket — Stark Industries",time:"9h ago",ic:"+"},{title:"Backup completed — 12,480 records",time:"11h ago",ic:"✓"},{title:"Purchase order PO-771 approved",time:"13h ago",ic:"$"},{title:"Inventory reconciled — Warehouse 3",time:"15h ago",ic:"▤"},{title:"SLA breach warning — Hooli Inc",time:"17h ago",ic:"!"},{title:"New user invited — M. Fernandez",time:"19h ago",ic:"+"},{title:"Quarterly report scheduled",time:"21h ago",ic:"▤"},{title:"Order ORD-1039 delivered to Oscorp",time:"23h ago",ic:"✓"}].map(D=>({...D,...N(D.ic)})),[L,q]=Pr(5,4,J.length),E=J.slice(0,q),I=e.cardBorder==="none"?"none":e.cardBorder,K={background:t.paper,border:I,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},G={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},U={fontSize:x,lineHeight:u,fontWeight:h,color:H,fontFamily:Q};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:I,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Y,fontWeight:w,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:u,fontWeight:h,color:c,letterSpacing:"-.3px",fontFamily:Q},children:"Dashboard"}),n.jsx("span",{title:"Good morning, Admin · Jun 21, 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:R,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:y,color:v,fontSize:k,fontWeight:R,textTransform:S,letterSpacing:".4px",boxShadow:e.btnShadow,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New"})]}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{...K,marginBottom:l},children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:{...U},children:"Performance Overview"}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary,fontWeight:R},children:"This month"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l},children:z.map(D=>n.jsxs("div",{style:{background:t.paper2,border:e.nestBorder,borderRadius:i,boxShadow:e.nestShadow,padding:a},children:[n.jsx("div",{style:{fontSize:m,color:t.textSecondary,fontWeight:h,fontFamily:Q,textTransform:"uppercase",letterSpacing:".6px",marginBottom:8},children:D.label}),n.jsx("div",{style:{fontSize:f,fontWeight:h,color:$,letterSpacing:"-.8px",lineHeight:1,marginBottom:6},children:D.val}),n.jsxs("span",{style:{fontSize:M,fontWeight:R,color:D.cc,background:D.cb,padding:"3px 9px",borderRadius:999},children:[D.arrow," ",D.chg]})]},D.label))})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...K,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:U,children:"Revenue Trend"}),n.jsx("div",{style:{display:"flex",gap:12},children:[["Revenue",P],["Profit",X]].map(([D,C])=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[n.jsx("div",{style:{width:10,height:10,borderRadius:2,background:C}}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:D})]},D))})]}),n.jsx("div",{style:{padding:`${a}px ${s}px`,display:"flex",alignItems:"flex-end",gap:12,flex:1,minHeight:200},children:Nl.map((D,C)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:Gl[C]+"%",background:X,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:Vl[C]+"%",background:P,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:D})]},D))})]}),n.jsxs("div",{style:{...K,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:U,children:"Recent Activity"})}),n.jsx("div",{ref:L,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:4,flex:1,minHeight:0},children:E.map((D,C)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:8,borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:D.cb,color:D.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:R},children:D.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:k,color:t.textPrimary,fontFamily:Y,fontWeight:w,lineHeight:T,marginBottom:2},children:D.title}),n.jsx("div",{style:{fontSize:M,color:t.textSecondary,fontFamily:Y},children:D.time})]})]},C))})]})]})]})]})}const Yl=[{id:"ORD-1042",cust:"Acme Corporation",status:"Delivered",amt:"$12,400",date:"Jun 18"},{id:"ORD-1041",cust:"Globex Ltd",status:"Processing",amt:"$8,750",date:"Jun 17"},{id:"ORD-1040",cust:"Initech",status:"Pending",amt:"$5,200",date:"Jun 16"},{id:"ORD-1039",cust:"Umbrella Co",status:"Shipped",amt:"$22,100",date:"Jun 15"},{id:"ORD-1038",cust:"Waystar Royco",status:"Delivered",amt:"$9,800",date:"Jun 14"},{id:"ORD-1037",cust:"Stark Industries",status:"Processing",amt:"$31,500",date:"Jun 13"},{id:"ORD-1036",cust:"Wayne Enterprises",status:"Delivered",amt:"$18,240",date:"Jun 12"},{id:"ORD-1035",cust:"Soylent Corp",status:"Pending",amt:"$4,120",date:"Jun 11"},{id:"ORD-1034",cust:"Hooli Inc",status:"Shipped",amt:"$27,900",date:"Jun 10"},{id:"ORD-1033",cust:"Cyberdyne Systems",status:"Delivered",amt:"$14,650",date:"Jun 09"},{id:"ORD-1032",cust:"Massive Dynamic",status:"Processing",amt:"$10,300",date:"Jun 08"},{id:"ORD-1031",cust:"Tyrell Corp",status:"Delivered",amt:"$16,780",date:"Jun 07"},{id:"ORD-1030",cust:"Oscorp",status:"Shipped",amt:"$7,940",date:"Jun 06"},{id:"ORD-1029",cust:"Nakatomi Trading",status:"Pending",amt:"$3,560",date:"Jun 05"},{id:"ORD-1028",cust:"Gekko & Co",status:"Delivered",amt:"$25,300",date:"Jun 04"},{id:"ORD-1027",cust:"Bluth Company",status:"Processing",amt:"$6,410",date:"Jun 03"}],mr="100px 1fr 120px 100px 80px 70px";function Jl(){const e=ve(),r=V(q=>q.settings),{t,rad:o,radSm:i,pad:s,padSm:a,screenPad:l,rowPy:d,tH1:g,wH1:f,headFam:x,headLH:m,accentBg:h,btnText:b,btnShadow:u,tBody:y,tBodySm:v,tCaption:k,tOverline:R,bwEmph:S,btnCase:w,bodyWeightEff:T,pMain:M,table:P}=e,X=x+",sans-serif",Q=r.fontFamily+",sans-serif",Y=e.hc1||t.textPrimary,[c,$,H]=io(12,3,16),z=Yl.slice(0,H).map((q,E)=>({...q,...P.statusMap[q.status]||{sb:t.divider,sc:t.textSecondary},rowBg:r.tableStripe&&E%2===1?P.stripeBg:"transparent"})),N=e.cardBorder==="none"?"none":e.cardBorder,J=q=>({fontSize:R,fontWeight:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px",borderRight:P.colBorder,alignSelf:"stretch",display:"flex",alignItems:P.cellAI,justifyContent:P.cellJC,padding:`${P.rowPy} ${P.cellPx}`}),L={alignSelf:"stretch",display:"flex",alignItems:P.cellAI,justifyContent:P.cellJC,padding:`${P.rowPy} ${P.cellPx}`};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:N,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Q,fontWeight:T,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:m,fontWeight:f,color:Y,letterSpacing:"-.3px",fontFamily:X},children:"Orders"}),n.jsx("span",{title:"1,284 orders · June 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:S,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:h,color:b,fontSize:v,fontWeight:S,textTransform:w,letterSpacing:".4px",boxShadow:u,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New Order"})]}),n.jsx("div",{style:{padding:l,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:N,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",flex:1,minHeight:0},children:[n.jsxs("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",gap:9,alignItems:"center",flexWrap:"wrap"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:t.paper,border:"1.5px solid "+t.divider,borderRadius:999,padding:"8px 15px",flex:1,minWidth:170},children:[n.jsx("span",{style:{color:t.textSecondary,fontSize:13},children:"⌕"}),n.jsx("span",{style:{fontSize:v,color:t.textSecondary},children:"Search orders…"})]}),P.filters.map(q=>n.jsx("button",{style:{padding:"7px 14px",borderRadius:999,border:"1px solid "+q.brd,background:q.bg,color:q.c,fontSize:k,fontWeight:S,whiteSpace:"nowrap",cursor:"pointer"},children:q.label},q.label))]}),n.jsxs("div",{ref:c,style:{display:"grid",gridTemplateColumns:mr,padding:`0 ${s}px`,borderBottom:P.rowBorder,background:P.headBg},children:[["Order ID","Customer","Status","Amount","Date"].map(q=>n.jsx("div",{style:J(),children:q},q)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${P.rowPy} 0`}})]}),n.jsxs("div",{ref:$,style:{position:"relative",display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{position:"absolute",inset:0,padding:`0 ${s}px`,display:"grid",gridTemplateColumns:mr,pointerEvents:"none",zIndex:2},children:[n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{})]}),z.map(q=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:mr,padding:`0 ${s}px`,borderBottom:P.rowBorder,alignItems:"stretch",background:q.rowBg},children:[n.jsx("div",{style:{...L,fontSize:v,fontWeight:S,color:M,fontFamily:Q},children:q.id}),n.jsx("div",{style:{...L,fontSize:y,color:t.textPrimary,fontWeight:S},children:q.cust}),n.jsx("div",{style:L,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:k,fontWeight:S,background:q.sb,color:q.sc,whiteSpace:"nowrap"},children:q.status})}),n.jsx("div",{style:{...L,fontSize:y,color:t.textPrimary,fontWeight:S},children:q.amt}),n.jsx("div",{style:{...L,fontSize:v,color:t.textSecondary},children:q.date}),n.jsx("div",{style:L,children:n.jsx("button",{style:{fontSize:k,color:M,background:t.pContainer,border:"none",fontWeight:S,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"View"})})]},q.id))]}),n.jsxs("div",{style:{padding:`${d}px ${s}px`,display:"flex",alignItems:"center",gap:7,borderTop:"1px solid "+t.divider},children:[n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,flex:1},children:["Showing 1–",z.length," of 1,284"]}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"‹"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"none",background:h,color:b,fontWeight:S,cursor:"pointer"},children:"1"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"2"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"›"})]})]})})]})}function ql(){const e=ve(),r=V(Z=>Z.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,tH4:m,tH5:h,tH6:b,tBody:u,tBodySm:y,tCaption:v,wH1:k,headFam:R,headLH:S,accentBg:w,btnText:T,btnShadow:M,bwEmph:P,btnCase:X,bodyWeightEff:Q,bodyLH:Y,pMain:c,errSoft:$,errTxt:H,warnSoft:z,warnTxt:N,infoSoft:J,infoTxt:L,sucSoft:q,sucTxt:E}=e,I=R+",sans-serif",K=r.fontFamily+",sans-serif",G=e.t.highlight,U=e.t.highlightSoft,D=e.t.highlightBd,C=t.pContainer,A=t.onPContainer,F=t.pContrast,B=e.hc1||t.textPrimary,O=e.hc2||t.textPrimary,ee=e.hc3||t.textPrimary,W=e.hc4||t.textPrimary,fe=e.hc5||t.textPrimary,Me=e.hc6||t.textPrimary,We=e.cardBorder==="none"?"none":e.cardBorder,Je={display:"flex",flexDirection:"column",background:t.paper,border:We,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",height:"100%"},qe={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},Be={fontSize:x,lineHeight:S,fontWeight:k,color:ee,fontFamily:I},tr=[{label:"Dashboard Overview",size:g,w:k,color:B,lh:1.1,ls:"-.5px",name:"H1",border:!0},{label:"Revenue Report",size:f,w:k,color:O,lh:1.1,ls:"-.4px",name:"H2",border:!0},{label:"Performance Overview",size:x,w:k,color:ee,lh:1.15,name:"H3",border:!0},{label:"Active Users",size:m,w:k,color:W,lh:1.2,name:"H4",border:!0},{label:"Last updated 2m ago",size:h,w:k,color:fe,lh:1.25,name:"H5",border:!0},{label:"Status · Live",size:b,w:k,color:Me,lh:1.3,name:"H6",border:!0}],ze=Z=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"11px 12px",borderBottom:"1px solid "+t.divider,background:Z?U:"transparent",boxShadow:Z?"inset 3px 0 0 "+G:"none"},children:[n.jsx("div",{style:{width:16,height:16,borderRadius:"50%",border:"2px solid "+(Z?G:t.outline),display:"grid",placeItems:"center",flexShrink:0},children:Z&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:G}})}),n.jsx("span",{style:{flex:1,fontSize:y,fontFamily:K,fontWeight:Z?P:Q,color:t.textPrimary},children:Z?"Selected item":"Unselected item"}),Z&&n.jsx("span",{style:{fontSize:v,fontFamily:K,fontWeight:P,color:t.textSecondary},children:"Active"})]}),Tt=(Z,ft,ht)=>n.jsxs("div",{style:{position:"relative",border:Z?"2px solid "+c:"1.5px solid "+t.outline,borderRadius:i,padding:"12px 13px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:10,background:t.paper,padding:"0 5px",fontSize:v,color:Z?c:t.textSecondary,fontWeight:Z?P:void 0},children:ft}),n.jsx("span",{style:{fontSize:u,color:Z?t.textPrimary:t.textSecondary},children:ht})]}),Ke=(Z,ft,ht)=>n.jsx("span",{style:{padding:"5px 13px",borderRadius:999,background:Z,color:ft,fontSize:v,fontWeight:P},children:ht}),_e=Z=>({padding:"9px 20px",borderRadius:i,fontSize:y,fontWeight:P,textTransform:X,letterSpacing:".4px",cursor:"pointer",...Z});return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:We,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:K,fontWeight:Q,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:S,fontWeight:k,color:B,letterSpacing:"-.3px",fontFamily:I},children:"Component Library"}),n.jsx("span",{title:"Every Material UI component reflects your live theme",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:P,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Typography Scale"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,minHeight:0,gap:6},children:[tr.map(Z=>n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,borderBottom:"1px solid "+t.divider,paddingBottom:14},children:[n.jsx("span",{style:{fontSize:Z.size,lineHeight:Z.lh,fontWeight:Z.w,color:Z.color,fontFamily:I,letterSpacing:Z.ls},children:Z.label}),n.jsxs("span",{style:{fontSize:Z.size,color:t.textSecondary,fontWeight:Z.w,whiteSpace:"nowrap",flexShrink:0,fontFamily:I},children:[Z.name," · ",Z.size]})]},Z.name)),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:u,lineHeight:Y,color:t.textPrimary,fontFamily:K,fontWeight:Q},children:"Body text — the quick brown fox jumps over the lazy dog."}),n.jsxs("span",{style:{fontSize:u,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:K},children:["Body · ",u]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:v,lineHeight:Y,color:t.textSecondary,fontFamily:K,fontWeight:Q},children:"Caption & helper text style"}),n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:K},children:["Caption · ",v]})]})]})]}),n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Selection States"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{display:"flex",gap:2,borderBottom:"1.5px solid "+t.divider},children:[n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textPrimary,background:U,borderBottom:"2.5px solid "+c,marginBottom:-1.5,borderRadius:"6px 6px 0 0"},children:"Overview"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textSecondary},children:"Activity"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textSecondary},children:"Settings"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",border:"1px solid "+t.divider,borderRadius:i,overflow:"hidden"},children:[ze(!0),ze(!1),ze(!1),ze(!1),ze(!0),ze(!1)]}),n.jsx("div",{style:{display:"inline-flex",alignSelf:"flex-start",padding:"6px 12px",borderRadius:i,background:U,border:"1px solid "+D},children:n.jsx("span",{style:{fontSize:v,fontWeight:P,color:G},children:"2 selected items"})})]})]})]}),n.jsxs("div",{style:{...Je,height:"auto"},children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Inputs & Selection"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,marginBottom:l},children:[Tt(!1,"Outlined","Placeholder…"),Tt(!0,"Focused","Active value")]}),n.jsxs("div",{style:{display:"flex",gap:22,alignItems:"center",flexWrap:"wrap",paddingTop:a,borderTop:"1px solid "+t.divider},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:4,background:c,display:"grid",placeItems:"center",color:F,fontSize:11,fontWeight:P},children:"✓"}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Checkbox"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:"50%",border:"2px solid "+c,display:"grid",placeItems:"center"},children:n.jsx("div",{style:{width:9,height:9,borderRadius:"50%",background:c}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Radio"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:38,height:22,borderRadius:999,background:c,position:"relative"},children:n.jsx("div",{style:{position:"absolute",top:3,right:3,width:16,height:16,borderRadius:"50%",background:"#fff"}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Switch"})]})]})]})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Buttons"})}),n.jsxs("div",{style:{padding:s,display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[n.jsx("button",{style:_e({border:"none",background:w,color:T,boxShadow:M}),children:"Contained"}),n.jsx("button",{style:_e({border:"1.5px solid "+c,background:"transparent",color:c}),children:"Outlined"}),n.jsx("button",{style:_e({border:"none",background:"transparent",color:c}),children:"Text"}),n.jsx("button",{style:_e({border:"none",background:C,color:A}),children:"Tonal"}),n.jsx("button",{style:_e({border:"none",background:w,color:T,boxShadow:M,borderRadius:999}),children:"Rounded"}),n.jsx("button",{style:_e({border:"none",background:$,color:H}),children:"Error"})]})]}),n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Chips, Alerts & Progress"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:l},children:[Ke(C,A,"Primary"),Ke(q,E,"Success"),Ke(z,N,"Warning"),Ke(J,L,"Info"),Ke($,H,"Error")]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:7},children:[n.jsx("span",{style:{fontSize:y,color:t.textPrimary,fontWeight:P},children:"Revenue goal"}),n.jsx("span",{style:{fontSize:y,color:c,fontWeight:P},children:"74%"})]}),n.jsx("div",{style:{height:8,background:t.paper2,border:"1px solid "+t.divider,borderRadius:999,overflow:"hidden"},children:n.jsx("div",{style:{height:"100%",width:"74%",background:c,borderRadius:999}})})]})]})]})]})]})}const Kl=[{label:"Cameras Online",val:"5 / 6"},{label:"Recording",val:"4"},{label:"Motion Alerts",val:"2"},{label:"Storage Used",val:"82%"}],Xl=[{name:"CAM 01",loc:"Main Lobby",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 02",loc:"North Gate",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 03",loc:"Loading Bay",rec:!1,online:!0,time:"14:32:07"},{name:"CAM 04",loc:"Rooftop",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 05",loc:"Parking Deck",rec:!1,online:!1,time:"—"},{name:"CAM 06",loc:"Server Room",rec:!0,online:!0,time:"14:32:08"}],Ql=[{cam:"CAM 04",label:"Motion detected — Rooftop",time:"just now",sev:"error"},{cam:"CAM 02",label:"Person identified — North Gate",time:"6m ago",sev:"info"},{cam:"CAM 01",label:"Loitering cleared — Main Lobby",time:"22m ago",sev:"success"},{cam:"CAM 06",label:"Door forced — Server Room",time:"34m ago",sev:"error"},{cam:"CAM 03",label:"Vehicle detected — Loading Bay",time:"48m ago",sev:"info"},{cam:"CAM 05",label:"Signal restored — Parking Deck",time:"1h ago",sev:"success"},{cam:"CAM 02",label:"Tailgating flagged — North Gate",time:"1h ago",sev:"error"},{cam:"CAM 04",label:"Crowd density normal — Rooftop",time:"2h ago",sev:"success"},{cam:"CAM 01",label:"Object left behind — Main Lobby",time:"2h ago",sev:"info"},{cam:"CAM 03",label:"Motion detected — Loading Bay",time:"3h ago",sev:"error"},{cam:"CAM 06",label:"Access granted — Server Room",time:"3h ago",sev:"success"},{cam:"CAM 05",label:"Camera offline — Parking Deck",time:"4h ago",sev:"error"},{cam:"CAM 02",label:"Face match — North Gate",time:"5h ago",sev:"info"},{cam:"CAM 01",label:"Queue length normal — Main Lobby",time:"6h ago",sev:"success"},{cam:"CAM 04",label:"Perimeter breach — Rooftop",time:"7h ago",sev:"error"},{cam:"CAM 03",label:"Package scanned — Loading Bay",time:"8h ago",sev:"info"}];function Zl(){const e=ve(),r=V(F=>F.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,wH1:m,headFam:h,headLH:b,accentBg:u,btnText:y,btnShadow:v,tBodySm:k,tCaption:R,tOverline:S,bwEmph:w,btnCase:T,bodyWeightEff:M,errSoft:P,errTxt:X,mediaBg:Q,overlaySurface:Y,overlayBorder:c,onOverlay:$,sevMap:H}=e,z=h+",sans-serif",N=r.fontFamily+",sans-serif",J=e.hc1||t.textPrimary,L=e.hc2||t.textPrimary,q=e.hc3||t.textPrimary,E=e.cardBorder==="none"?"none":e.cardBorder,I=Xl.map(F=>({...F,dotC:F.online?r.successHex:t.textDisabled})),[K,G]=Pr(3,3,16),U=Ql.slice(0,G).map(F=>({...F,...H[F.sev]})),D={background:t.paper,border:E,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},C={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},A={fontSize:x,lineHeight:b,fontWeight:m,color:q,fontFamily:z};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:E,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:N,fontWeight:M,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:b,fontWeight:m,color:J,letterSpacing:"-.3px",fontFamily:z},children:"Camera Surveillance"}),n.jsx("span",{title:"6 feeds · live monitoring & recording",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:w,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:R,fontWeight:w,color:X,background:P,padding:"6px 12px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]}),n.jsx("button",{style:{padding:"10px 18px",borderRadius:i,border:"none",background:u,color:y,fontSize:k,fontWeight:w,textTransform:T,letterSpacing:".4px",boxShadow:v,whiteSpace:"nowrap",cursor:"pointer"},children:"+ Add Camera"})]})]}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:Kl.map(F=>n.jsxs("div",{style:D,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:w},children:F.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:f,fontWeight:m,color:L,letterSpacing:"-.8px",lineHeight:1},children:F.val})})]},F.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...D,display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:C,children:[n.jsx("span",{style:A,children:"Camera Wall"}),n.jsx("span",{style:{fontSize:R,color:t.textSecondary,fontWeight:w},children:"2 × 3 grid"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridAutoRows:"1fr",gap:l},children:I.map(F=>n.jsxs("div",{style:{position:"relative",borderRadius:i,overflow:"hidden",background:Q,minHeight:104,border:"1px solid "+t.divider},children:[n.jsx("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center"},children:n.jsx("span",{style:{fontFamily:"monospace",fontSize:R,color:"rgba(255,255,255,.3)",letterSpacing:1},children:F.loc})}),n.jsxs("div",{style:{position:"absolute",top:7,left:7,display:"flex",alignItems:"center",gap:5,background:Y,border:"1px solid "+c,borderRadius:999,padding:"2px 8px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:F.dotC}}),n.jsx("span",{style:{color:$,fontSize:R,fontWeight:700,letterSpacing:".4px"},children:F.name})]}),F.rec&&n.jsxs("div",{style:{position:"absolute",top:7,right:7,display:"flex",alignItems:"center",gap:4,background:Y,borderRadius:999,padding:"2px 7px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:r.errorHex}}),n.jsx("span",{style:{color:$,fontSize:8,fontWeight:800,letterSpacing:".5px"},children:"REC"})]}),F.online&&n.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,padding:"5px 8px",background:"linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,0))",display:"flex",justifyContent:"space-between",alignItems:"center"},children:n.jsx("span",{style:{color:"#fff",fontSize:R,fontWeight:600,fontFamily:"monospace"},children:F.time})})]},F.name))})]}),n.jsxs("div",{style:{...D,display:"flex",flexDirection:"column"},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:A,children:"Recent Detections"})}),n.jsx("div",{ref:K,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:2,flex:1,minHeight:0},children:U.map((F,B)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:F.cb,color:F.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:11,fontWeight:800,fontFamily:"monospace"},children:"●"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:k,color:t.textPrimary,fontWeight:M,lineHeight:1.35},children:F.label}),n.jsxs("div",{style:{fontSize:R,color:t.textSecondary,marginTop:2},children:[F.cam," · ",F.time]})]})]},B))})]})]})]})]})}const ec=[{ic:"!",label:"Camera 04 motion detected — Loading Bay",time:"just now",sev:"error",unread:!0},{ic:"✓",label:"Stream reconnected — North Gate feed",time:"4m ago",sev:"success",unread:!0},{ic:"i",label:"Access request — J. Okoro (Operator)",time:"22m ago",sev:"info",unread:!1},{ic:"!",label:"Report archive storage 82% full",time:"1h ago",sev:"warning",unread:!1},{ic:"✓",label:"Backup completed — 12,480 clips archived",time:"2h ago",sev:"success",unread:!1},{ic:"i",label:"Firmware update available — 3 devices",time:"3h ago",sev:"info",unread:!1},{ic:"!",label:"Camera 02 lens obstruction detected",time:"5h ago",sev:"error",unread:!1},{ic:"✓",label:"Nightly health check passed — all nodes",time:"6h ago",sev:"success",unread:!1},{ic:"i",label:"New operator invited — M. Fernandez",time:"7h ago",sev:"info",unread:!1},{ic:"!",label:"Bandwidth spike on West Wing uplink",time:"8h ago",sev:"warning",unread:!1},{ic:"✓",label:"Retention policy applied — 30 day window",time:"9h ago",sev:"success",unread:!1},{ic:"i",label:"Scheduled maintenance — Sat 02:00 UTC",time:"11h ago",sev:"info",unread:!1},{ic:"!",label:"Motion zone breach — Perimeter Gate 3",time:"12h ago",sev:"error",unread:!1},{ic:"✓",label:"Clip export finished — Incident #4821",time:"14h ago",sev:"success",unread:!1},{ic:"i",label:"Analytics model updated — v2.4.1",time:"16h ago",sev:"info",unread:!1},{ic:"!",label:"Disk latency elevated — NVR-02",time:"18h ago",sev:"warning",unread:!1}];function tc(){const e=ve(),r=V(A=>A.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tTitle:f,wH1:x,headFam:m,headLH:h,accentBg:b,btnText:u,tBodySm:y,tCaption:v,tOverline:k,bwEmph:R,bodyWeightEff:S,bodyLH:w,errSoft:T,errTxt:M,pMain:P,mediaBg:X,overlaySurface:Q,overlayBorder:Y,onOverlay:c,sevMap:$}=e,H=m+",sans-serif",z=r.fontFamily+",sans-serif",N=e.hc1||t.textPrimary,J=e.hc3||t.textPrimary,L=e.cardBorder==="none"?"none":e.cardBorder,[q,E]=Pr(7,4,16),I=ec.slice(0,E).map(A=>({...A,...$[A.sev],rowBg:A.unread?ce(r.primaryHex,e.isDark?.12:.05):"transparent"})),K=I.filter(A=>A.unread).length,G={display:"flex",flexDirection:"column",minHeight:0,background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},U={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},D={fontSize:f,lineHeight:h,fontWeight:x,color:J,fontFamily:H},C={height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:c,fontSize:v,fontWeight:R,cursor:"pointer",fontFamily:"inherit"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:z,fontWeight:S,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:h,fontWeight:x,color:N,letterSpacing:"-.3px",fontFamily:H},children:"Operations Center"}),n.jsx("span",{title:"Live map, camera feeds, alerts & access — every module themed end to end",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:R,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsx("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 320px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:G,children:[n.jsxs("div",{style:U,children:[n.jsx("span",{style:D,children:"Live Map · Street View"}),n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:v,fontWeight:R,color:M,background:T,padding:"3px 10px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]})]}),n.jsxs("div",{style:{position:"relative",flex:1,minHeight:320,background:X,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx("span",{style:{fontFamily:"monospace",fontSize:v,color:"rgba(255,255,255,.42)",letterSpacing:1.5},children:"◍ GOOGLE STREET VIEW / EARTH EMBED"}),n.jsx("div",{style:{position:"absolute",top:12,left:12,display:"flex",alignItems:"center",gap:7,background:Q,border:"1px solid "+Y,borderRadius:999,padding:"6px 12px"},children:n.jsx("span",{style:{color:c,fontSize:v,fontWeight:R},children:"◎ 40.7128, -74.0060 · Manhattan"})}),n.jsxs("div",{style:{position:"absolute",bottom:12,left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:4,background:Q,border:"1px solid "+Y,borderRadius:i,padding:5},children:[n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:b,color:u,fontSize:16,fontWeight:R,cursor:"pointer"},children:"+"}),n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:c,fontSize:16,fontWeight:R,cursor:"pointer"},children:"−"}),n.jsx("div",{style:{width:1,height:18,background:Y,margin:"0 3px"}}),n.jsx("button",{style:{...C,padding:"0 12px"},children:"Layers"}),n.jsx("button",{style:{...C,padding:"0 12px"},children:"◎ Locate"})]})]})]}),n.jsxs("div",{style:G,children:[n.jsxs("div",{style:U,children:[n.jsx("span",{style:D,children:"Notifications"}),n.jsxs("span",{style:{fontSize:k,fontWeight:R,color:t.pContrast,background:P,padding:"2px 9px",borderRadius:999},children:[K," NEW"]})]}),n.jsx("div",{ref:q,style:{padding:a,display:"flex",flexDirection:"column",gap:2,flex:1,minHeight:0},children:I.map((A,F)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i,background:A.rowBg},children:[n.jsx("div",{style:{width:26,height:26,borderRadius:i,background:A.cb,color:A.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:R},children:A.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:y,color:t.textPrimary,fontWeight:S,lineHeight:w},children:A.label}),n.jsx("div",{style:{fontSize:v,color:t.textSecondary,marginTop:2},children:A.time})]}),A.unread&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:P,flexShrink:0,marginTop:6}})]},F))})]})]})})]})}const rc=[{label:"Reports Generated",val:"248"},{label:"Avg Generation",val:"1.2s"},{label:"Data Points",val:"84.2K"},{label:"Scheduled",val:"12"}],nc=["Jan","Feb","Mar","Apr","May","Jun"],oc=[44,60,50,74,88,96],ic=[24,32,30,42,52,60],ac=[{l:"Reports",h:72},{l:"Cameras",h:92},{l:"Alerts",h:40},{l:"Users",h:58},{l:"Storage",h:80}],sc=[{name:"Q2 Revenue Summary",type:"Financial",date:"Jun 20",status:"Ready"},{name:"Camera Uptime Audit",type:"Operations",date:"Jun 19",status:"Ready"},{name:"User Access Log",type:"Security",date:"Jun 18",status:"Ready"},{name:"Inventory Forecast",type:"Analytics",date:"Jun 17",status:"Processing"},{name:"Monthly KPI Digest",type:"Executive",date:"Jun 15",status:"Ready"},{name:"Incident Response Log",type:"Security",date:"Jun 14",status:"Ready"},{name:"Storage Utilization Report",type:"Operations",date:"Jun 13",status:"Ready"},{name:"Weekly Traffic Analysis",type:"Analytics",date:"Jun 12",status:"Processing"},{name:"Vendor SLA Compliance",type:"Financial",date:"Jun 11",status:"Ready"},{name:"Motion Event Rollup",type:"Operations",date:"Jun 10",status:"Ready"},{name:"Quarterly Audit Trail",type:"Security",date:"Jun 09",status:"Ready"},{name:"Energy Consumption Digest",type:"Analytics",date:"Jun 08",status:"Processing"},{name:"Executive Board Pack",type:"Executive",date:"Jun 07",status:"Ready"},{name:"Device Firmware Ledger",type:"Operations",date:"Jun 06",status:"Ready"},{name:"Access Anomaly Report",type:"Security",date:"Jun 05",status:"Ready"},{name:"Cost Allocation Summary",type:"Financial",date:"Jun 04",status:"Ready"}],Pn="1fr 130px 110px 90px 70px";function lc(){const e=ve(),r=V(O=>O.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,wH1:m,headFam:h,headLH:b,accentBg:u,btnText:y,btnShadow:v,tBody:k,tBodySm:R,tCaption:S,tOverline:w,bwEmph:T,btnCase:M,bodyWeightEff:P,pMain:X,sMain:Q,chartPalette:Y,table:c}=e,$=h+",sans-serif",H=r.fontFamily+",sans-serif",z=e.hc1||t.textPrimary,N=e.hc2||t.textPrimary,J=e.hc3||t.textPrimary,L=e.cardBorder==="none"?"none":e.cardBorder,[q,E,I]=io(5,3,16),K=sc.slice(0,I).map((O,ee)=>({...O,sb:O.status==="Ready"?e.sucSoft:e.warnSoft,sc:O.status==="Ready"?e.sucTxt:e.warnTxt,rowBg:r.tableStripe&&ee%2===1?c.stripeBg:"transparent"})),G=ac.map((O,ee)=>({...O,c:Y[ee%Y.length]})),U={borderRight:c.colBorder,alignSelf:"stretch",display:"flex",alignItems:c.cellAI,justifyContent:c.cellJC,padding:`${c.rowPy} ${c.cellPx}`},D={alignSelf:"stretch",display:"flex",alignItems:c.cellAI,justifyContent:c.cellJC,padding:`${c.rowPy} ${c.cellPx}`},C={background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},A={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},F={fontSize:x,lineHeight:b,fontWeight:m,color:J,fontFamily:$},B={fontSize:w,fontWeight:T,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:H,fontWeight:P,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:b,fontWeight:m,color:z,letterSpacing:"-.3px",fontFamily:$},children:"Reports"}),n.jsx("span",{title:"Generated insights across every module",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:T,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:u,color:y,fontSize:R,fontWeight:T,textTransform:M,letterSpacing:".4px",boxShadow:v,whiteSpace:"nowrap",cursor:"pointer"},children:"↓ Export PDF"})]}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:rc.map(O=>n.jsxs("div",{style:C,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:w,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:T},children:O.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:f,fontWeight:m,color:N,letterSpacing:"-.8px",lineHeight:1},children:O.val})})]},O.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,marginBottom:l},children:[n.jsxs("div",{style:C,children:[n.jsxs("div",{style:A,children:[n.jsx("span",{style:F,children:"Revenue & Profit Trend"}),n.jsx("span",{style:{fontSize:S,color:t.textSecondary,fontWeight:T},children:"6 months"})]}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:12,height:160},children:nc.map((O,ee)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:ic[ee]+"%",background:Q,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:oc[ee]+"%",background:X,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:S,color:t.textSecondary},children:O})]},O))})]}),n.jsxs("div",{style:C,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:F,children:"By Module"})}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:10,height:128},children:G.map(O=>n.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:n.jsx("div",{style:{width:"100%",height:O.h+"%",background:O.c,borderRadius:`${i} ${i} 0 0`}})},O.l))})]})]}),n.jsxs("div",{style:{...C,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:F,children:"Recent Reports"})}),n.jsxs("div",{ref:q,style:{display:"grid",gridTemplateColumns:Pn,padding:`0 ${s}px`,borderBottom:c.rowBorder,background:c.headBg},children:[["Report","Type","Status","Date"].map(O=>n.jsx("div",{style:{...B,...U},children:O},O)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${c.rowPy} 0`}})]}),n.jsx("div",{ref:E,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:K.map(O=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:Pn,padding:`0 ${s}px`,borderBottom:c.rowBorder,background:O.rowBg},children:[n.jsx("div",{style:{...D,fontSize:k,color:t.textPrimary,fontWeight:T},children:O.name}),n.jsx("div",{style:{...D,fontSize:R,color:t.textSecondary},children:O.type}),n.jsx("div",{style:D,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:S,fontWeight:T,background:O.sb,color:O.sc,whiteSpace:"nowrap"},children:O.status})}),n.jsx("div",{style:{...D,fontSize:R,color:t.textSecondary},children:O.date}),n.jsx("div",{style:D,children:n.jsx("button",{style:{fontSize:S,color:X,background:t.pContainer,border:"none",fontWeight:T,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"↓ PDF"})})]},O.name))})]})]})]})}const $n=({size:e})=>n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),n.jsx("path",{d:"m21 15-5-5L5 21"})]});function cc(){const e=ve(),r=V(L=>L.settings),t=De(L=>L.defaultLoginImage),{t:o,rad:i,radSm:s,pad:a,tH1:l,tBody:d,tBodySm:g,tCaption:f,wH1:x,headLH:m,accentBg:h,btnText:b,btnShadow:u,bwEmph:y,pMain:v,iconInitials:k,loginCenteredGrad:R,loginScrimGradC:S}=e,w=r.fontFamily+",sans-serif",T=e.hc1||o.textPrimary,M=o.pContrast,P=e.cardBorder==="none"?"none":e.cardBorder,X=r.logoMode==="image"&&!!r.logoUrl,Q=e.isDark?o.paper2:"#ffffff",Y=r.loginPanelColor||o.bgDefault,c=r.loginImgOpacity>0?r.loginImgOpacity:1,$=r.loginImage||t,H=!!$,z=H?n.jsx("img",{src:$,alt:"",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",zIndex:0,opacity:c}}):null,N={background:o.paper,border:P,borderRadius:i,boxShadow:e.cardShadow,padding:a,display:"flex",flexDirection:"column",gap:20},J=L=>({position:"relative",background:o.paper2,border:"1.5px solid "+(L?v:o.outline),borderRadius:s});return r.loginLayout==="centered"?n.jsxs("div",{style:{minHeight:560,background:R,display:"flex",alignItems:"center",justifyContent:"center",padding:40,position:"relative",overflow:"hidden",fontFamily:w,borderRadius:i},children:[z,H&&n.jsx("div",{style:{position:"absolute",inset:0,background:S,zIndex:0}}),n.jsxs("div",{style:{position:"relative",zIndex:1,width:"100%",maxWidth:380,background:o.paper,border:P,borderRadius:i,boxShadow:"0 24px 60px rgba(0,0,0,.35)",padding:a,display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[n.jsx("div",{style:{width:72,height:72,borderRadius:20,background:r.iconColor,display:"grid",placeItems:"center",boxShadow:"0 6px 18px "+r.iconColor+"55"},children:n.jsx("span",{style:{color:"#fff",fontSize:24,fontWeight:y,letterSpacing:"-1px"},children:k})}),n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+o.outline,borderRadius:s,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:o.paper,padding:"0 5px",fontSize:11,color:o.textSecondary},children:"Email"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary},children:"admin@company.com"})]}),n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+o.outline,borderRadius:s,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:o.paper,padding:"0 5px",fontSize:11,color:o.textSecondary},children:"Password"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary,letterSpacing:3},children:"••••••••"})]}),n.jsx("button",{style:{padding:13,borderRadius:s,border:"none",background:h,color:b,fontSize:d,fontWeight:y,textTransform:"uppercase",letterSpacing:".5px",boxShadow:u,cursor:"pointer"},children:"Sign in"})]})]})]}):n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"3fr 1fr",minHeight:560,fontFamily:w,borderRadius:i,overflow:"hidden"},children:[n.jsxs("div",{style:{background:Q,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 40px",gap:22,position:"relative",overflow:"hidden"},children:[z,!H&&n.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,color:o.textSecondary,border:"1.5px dashed "+o.outline,padding:24,boxSizing:"border-box"},children:[n.jsx($n,{size:46}),n.jsx("div",{style:{fontSize:14,fontWeight:y,color:o.textPrimary},children:"No brand image"}),n.jsx("div",{style:{fontSize:12,color:o.textSecondary,textAlign:"center",maxWidth:220},children:"Upload an image in the Login Screen settings to fill this panel."})]})]}),n.jsxs("div",{style:{background:Y,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:22,padding:"48px 40px"},children:[X?n.jsx("img",{src:r.logoUrl,alt:r.appName,style:{maxHeight:64,maxWidth:200,objectFit:"contain"}}):n.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6,maxWidth:200,maxHeight:64,border:"1.5px dashed "+o.outline,borderRadius:s,boxSizing:"border-box",color:o.textSecondary,padding:"8px 16px"},children:[n.jsx($n,{size:20}),n.jsx("span",{style:{fontSize:f,fontWeight:y,color:o.textSecondary,whiteSpace:"nowrap"},children:"No logo uploaded"})]}),n.jsxs("div",{style:{width:"100%",maxWidth:340,...N},children:[n.jsxs("div",{style:{textAlign:"center"},children:[n.jsx("div",{style:{fontSize:l,lineHeight:m,fontWeight:x,color:T,letterSpacing:"-.4px",marginBottom:5},children:"Welcome back"}),n.jsx("div",{style:{fontSize:g,color:o.textSecondary},children:"Sign in to continue"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:f,fontWeight:y,color:o.textPrimary,marginBottom:7},children:"Email Address"}),n.jsxs("div",{style:{...J(!1),padding:"12px 14px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:o.textSecondary,fontSize:14},children:"✉"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary},children:"admin@company.com"})]})]}),n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:f,fontWeight:y,color:o.textPrimary,marginBottom:7},children:"Password"}),n.jsxs("div",{style:{...J(!0),padding:"12px 40px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:o.textSecondary,fontSize:14},children:"🔒"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary,letterSpacing:3},children:"••••••••"}),n.jsx("span",{style:{position:"absolute",right:13,top:"50%",transform:"translateY(-50%)",color:o.textSecondary,fontSize:14},children:"👁"})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:17,height:17,borderRadius:4,background:v,display:"grid",placeItems:"center",color:M,fontSize:11,fontWeight:y},children:"✓"}),n.jsx("span",{style:{fontSize:g,color:o.textPrimary},children:"Remember me"})]}),n.jsx("span",{style:{fontSize:g,color:v,fontWeight:y},children:"Forgot password?"})]}),n.jsxs("button",{style:{padding:13,borderRadius:s,border:"none",background:h,color:b,fontSize:d,fontWeight:y,letterSpacing:".3px",boxShadow:u,marginTop:2,display:"flex",alignItems:"center",justifyContent:"center",gap:8,cursor:"pointer"},children:["Login ",n.jsx("span",{style:{fontSize:15},children:"→"})]})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:f,color:o.textSecondary},children:["Powered by ",n.jsx("span",{style:{color:v,fontWeight:y},children:r.appName})," © 2026"]})]})]})]})}function dc(){const e=ve(),r=V(b=>b.settings),[t,o]=_.useState(!1);if(t)return null;const{t:i,npos:s,nacc:a,toastDeco:l,toastBg:d,rad:g,radSm:f,tBodySm:x,tCaption:m}=e,h=(r.toastW>0?r.toastW:252)+"px";return n.jsxs("div",{style:{position:"absolute",zIndex:40,width:h,maxWidth:"70%",boxSizing:"border-box",background:d,borderRadius:g,display:"flex",gap:"10px",alignItems:"flex-start",padding:"12px 13px",fontFamily:r.fontFamily+",sans-serif",...s,...l},children:[n.jsx("div",{style:{width:"30px",height:"30px",borderRadius:f,background:a.icbg,color:a.icc,display:"grid",placeItems:"center",flexShrink:0,fontSize:"15px",fontWeight:800},children:"!"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:x+"px",fontWeight:700,color:i.textPrimary,marginBottom:"2px"},children:"Low stock alert"}),n.jsx("div",{style:{fontSize:m+"px",color:i.textSecondary,lineHeight:1.4},children:"Widget Pro is down to 12 units left."})]}),r.notifAutoDismiss&&n.jsx("div",{title:"Auto-dismiss countdown",style:{flexShrink:0,marginTop:"1px",minWidth:"26px",height:"20px",padding:"0 7px",borderRadius:"999px",background:ce(a.dot,.14),color:a.dot,fontSize:m-.5+"px",fontWeight:800,display:"grid",placeItems:"center",fontVariantNumeric:"tabular-nums"},children:(r.autoDismissSec>0?r.autoDismissSec:8)+"s"}),n.jsx("button",{title:"Dismiss notification",onClick:()=>o(!0),style:{flexShrink:0,width:"20px",height:"20px",marginTop:"1px",border:"none",background:"transparent",color:i.textSecondary,cursor:"pointer",borderRadius:"6px",display:"grid",placeItems:"center",padding:0,lineHeight:1},children:n.jsx("svg",{width:13,height:13,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.4,strokeLinecap:"round",children:n.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})})]})}const pc=[75,90,100,125];function uc(){var f;const e=De(x=>x.previewScreen),r=V(x=>x.settings.edgePadPx)||0,t=e==="operations"?0:r,[o,i]=_.useState("fit"),s=_.useRef(null),a=_.useRef(null),[l,d]=_.useState(100);_.useLayoutEffect(()=>{const x=s.current,m=a.current;if(!x||!m)return;const h=()=>{const k=getComputedStyle(x),R=(parseFloat(k.paddingTop)||0)+(parseFloat(k.paddingBottom)||0);if(o!=="fit"){const c=o/100;m.style.zoom=String(c);const $=x.clientHeight-R;m.style.minHeight=($>0?Math.floor($/c):0)+"px",d(o);return}m.style.zoom="1",m.style.minHeight="0px",m.offsetHeight;const S=(parseFloat(k.paddingLeft)||0)+(parseFloat(k.paddingRight)||0),w=x.clientWidth-S,T=x.clientHeight-R,M=m.scrollWidth,P=m.scrollHeight;if(M<=0||P<=0||w<=0||T<=0)return;const X=Math.min(w/M,T/P,1),Q=X<.985?Math.max(.36,X):1;m.style.zoom=String(Q);const Y=Math.min(w/M,1);m.style.minHeight=Math.floor(T/Math.max(Y,.36))+"px",d(Math.round(Q*100))};let b=0,u=0;const y=()=>{h(),++u<36&&(b=requestAnimationFrame(y))};y();const v=new ResizeObserver(h);return v.observe(x),v.observe(m),()=>{cancelAnimationFrame(b),v.disconnect()}},[o,t,e]);const g=((f=Wl.find(x=>x.key===e))==null?void 0:f.label)??"";return n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",bgcolor:"background.default"},children:[n.jsxs(p.Box,{sx:{px:2.5,py:1.25,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,bgcolor:"background.paper"},children:[n.jsx(Ll,{sx:{fontSize:22,color:"text.secondary"}}),n.jsxs(p.Typography,{variant:"h5",sx:{flex:1,fontSize:18,fontWeight:700,letterSpacing:"-.2px"},children:["Previewing ",g]}),n.jsxs(p.Select,{size:"small",value:o,onChange:x=>i(x.target.value==="fit"?"fit":Number(x.target.value)),sx:{minWidth:128,fontSize:13,fontWeight:600,"& .MuiSelect-select":{py:.75}},children:[n.jsxs(p.MenuItem,{value:"fit",children:["Fit (",l,"%)"]}),pc.map(x=>n.jsxs(p.MenuItem,{value:x,children:[x,"%"]},x))]})]}),n.jsxs(p.Box,{ref:s,sx:{flex:1,overflow:"auto",p:`${t}px`,position:"relative",bgcolor:"background.default"},children:[n.jsxs(p.Box,{ref:a,sx:{width:"100%",display:"flex",flexDirection:"column","& > *":{flex:"1 1 0%",minHeight:0}},children:[e==="dashboard"&&n.jsx(Ul,{}),e==="orders"&&n.jsx(Jl,{}),e==="reports"&&n.jsx(lc,{}),e==="cameras"&&n.jsx(Zl,{}),e==="operations"&&n.jsx(tc,{}),e==="components"&&n.jsx(ql,{}),e==="login"&&n.jsx(cc,{})]}),e!=="login"&&n.jsx(dc,{})]})]})}const fc=300,hc=520;function gc({defaultLoginImage:e}={}){const[r,t]=_.useState(!0),o=De(k=>k.setDefaultLoginImage);_.useEffect(()=>{o(e||"")},[e,o]);const[i,s]=_.useState(300),[a,l]=_.useState(!1),d=V(k=>k.isDirty),g=V(k=>k.captureBaseline),f=V(k=>k.restoreBaseline),x=Pe(V(k=>k.settings.mode)),m=V(k=>k.settings.customFonts),h=V(k=>k.settings.customHeadFonts),b=_.useRef(null);_.useEffect(()=>{En(m),En(h)},[m,h]);const u=k=>{k.preventDefault(),b.current={x:k.clientX,w:i};const R=w=>{if(!b.current)return;const T=Math.max(fc,Math.min(hc,b.current.w+(w.clientX-b.current.x)));s(T)},S=()=>{b.current=null,window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",S)};window.addEventListener("mousemove",R),window.addEventListener("mouseup",S)},y=()=>{d()?l(!0):t(!1)},v=()=>{t(!0),g()};return n.jsxs(p.Box,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",bgcolor:"background.paper"},children:[n.jsx(p.Box,{sx:{flex:1,minHeight:0,display:"flex"},children:n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",bgcolor:"background.default",borderTop:"1px solid",borderColor:"divider"},children:[r?n.jsxs(p.Box,{sx:{display:"flex",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:i,flexShrink:0,borderRight:`1px solid ${x.studioBd}`,display:"flex",flexDirection:"column",bgcolor:x.card,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},children:n.jsx(_l,{onClose:y})}),n.jsx(p.Box,{onMouseDown:u,sx:{width:5,cursor:"col-resize",flexShrink:0,bgcolor:"divider",opacity:.4,"&:hover":{opacity:1,bgcolor:"primary.main"}}})]}):n.jsx(p.Tooltip,{title:"Open Theme Studio",placement:"right",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{onClick:v,sx:{position:"absolute",left:68,bottom:56,zIndex:10,bgcolor:"primary.main",color:"primary.contrastText",boxShadow:4,"&:hover":{bgcolor:"primary.dark"}},children:n.jsx(qs,{})})}),n.jsx(uc,{})]})}),n.jsxs(p.Dialog,{open:a,onClose:()=>l(!1),PaperProps:{sx:{borderRadius:3,width:300,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Save changes?"}),n.jsx(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:"You've made changes to the theme. Do you want to save them before leaving?"}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{g(),l(!1),t(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Save & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>{f(),l(!1),t(!1)},sx:{p:1.4,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:13,fontWeight:600,cursor:"pointer"},children:"Discard & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>l(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Keep editing"})]})]})]})}function xc(e){var a,l;const r=Hr(e),t=r.t,o=`${r.headFam},sans-serif`,i=`${r.bodyFam},sans-serif`,s=(d,g)=>({fontFamily:o,fontSize:d,fontWeight:r.wH1,lineHeight:r.headLH,color:g||t.textPrimary});if(typeof window<"u"&&typeof document<"u"){const d=["Roboto","Inter","DM Sans","Manrope","Plus Jakarta Sans","Nunito Sans","Figtree"],f=[e.fontFamily,e.headingFont].filter(Boolean).map(m=>m.replace(/"/g,"").replace(/'/g,"")),x=Array.from(new Set(f)).filter(m=>d.includes(m));if(x.length>0){const m="dynamic-google-fonts";let h=document.getElementById(m);const u=`https://fonts.googleapis.com/css2?${x.map(y=>`family=${y.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900`).join("&")}&display=swap`;h||(h=document.createElement("link"),h.id=m,h.rel="stylesheet",document.head.appendChild(h)),h.href!==u&&(h.href=u,(l=(a=document.fonts)==null?void 0:a.ready)==null||l.then(()=>window.dispatchEvent(new Event("resize"))))}}return to({palette:{mode:e.mode,primary:{main:r.pMain,dark:r.pal[700],light:r.pal[300],contrastText:t.pContrast},secondary:{main:r.sMain,dark:r.spal[700],light:r.spal[300],contrastText:t.sContrast},success:{main:e.successHex},warning:{main:e.warningHex},info:{main:e.infoHex},error:{main:e.errorHex},background:{default:t.bgDefault,paper:t.paper},text:{primary:t.textPrimary,secondary:t.textSecondary,disabled:t.textDisabled},divider:t.divider},shape:{borderRadius:r.r},typography:{fontFamily:i,fontSize:r.base,h1:s(r.tH1,r.hc1),h2:s(r.tH2,r.hc2),h3:s(r.tTitle,r.hc3),h4:s(r.tH4,r.hc4),h5:s(r.tH5,r.hc5),h6:s(r.tH6,r.hc6),body1:{fontFamily:i,fontSize:r.tBody,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},body2:{fontFamily:i,fontSize:r.tBodySm,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},caption:{fontFamily:i,fontSize:r.tCaption,lineHeight:r.bodyLH},button:{textTransform:r.btnCase,fontWeight:r.bwEmph}},components:{MuiCssBaseline:{styleOverrides:{"button, input, textarea, select":{fontFamily:"inherit"}}},MuiCard:{styleOverrides:{root:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiCardHeader:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiDialog:{styleOverrides:{paper:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiDialogTitle:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiButton:{styleOverrides:{root:{borderRadius:r.r,boxShadow:"none"}},defaultProps:{disableElevation:!0},variants:e.accentGradient?[{props:{variant:"contained"},style:{backgroundImage:r.accentBg}}]:[]},MuiChip:{styleOverrides:{root:{borderRadius:999,fontWeight:e.statusBold?700:500}}}},urmTable:{rowPaddingY:r.table.rowPy,cellPaddingX:r.table.cellPx,headerBg:r.table.headBg,rowDivider:r.table.rowBorder,colDivider:r.table.colBorder,cellAlignH:e.tableCellAlignH,cellAlignV:e.tableCellAlignV,striped:e.tableStripe,stripeBg:r.table.stripeBg},tokens:{toastW:e.toastW>0?e.toastW:void 0,cardBorder:r.toastDeco.border,cardShadow:r.toastDeco.boxShadow,cardBodyBorder:r.cardBorder==="none"?"none":r.cardBorder,cardBodyShadow:r.cardShadow,cardHdrBg:r.cardHdrBg,cardHdrBorder:r.cardHdrBorder,cardHdrAccent:r.cardHdrAccent,cardHeader:e.cardHeader,status:{errSoft:r.errSoft,warnSoft:r.warnSoft,infoSoft:r.infoSoft,sucSoft:r.sucSoft,errTxt:r.errTxt,warnTxt:r.warnTxt,infoTxt:r.infoTxt,sucTxt:r.sucTxt},notifPosition:e.notifPosition,notifStyle:e.notifStyle,notifAccent:e.notifAccent,notifAutoDismiss:e.notifAutoDismiss,toastBg:r.toastBg,autoDismissSec:e.autoDismissSec>0?e.autoDismissSec:void 0,statusBold:e.statusBold,cardHdrHex:e.cardHdrHex||void 0,containerPad:r.screenPad,cardGap:r.gap,edgePad:e.edgePadPx,highlight:t.highlight,highlightSoft:t.highlightSoft,highlightBd:t.highlightBd,headerBg:r.headerBg,canvasBg:r.canvasBg,accountPageBg:r.accountPageBg,accountCardBg:r.accountCardBg,brandGradient:r.brandGradient,gsAccentGradient:r.gsAccentGradient,gsModalBgDark:r.gsModalBgDark,gsArrowGradient:r.gsArrowGradient,loginPanelGradient:r.loginPanelGradient,reportsAccentTileGradient:r.reportsAccentTileGradient,reportsAccentCtaGradient:r.reportsAccentCtaGradient,reportsModalInnerHighlight:r.reportsModalInnerHighlight}})}exports.DEFAULT_SETTINGS=Ee;exports.ThemeStudio=gc;exports.buildMuiTheme=xc;exports.useThemeStore=V;
74
+ To suppress this warning, you need to explicitly provide the \`palette.${r}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Fs(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const He=e=>{try{return e()}catch{}},Os=(e="mui")=>es(e);function fr(e,r,t,o,i){if(!t)return;t=t===!0?{}:t;const s=i==="dark"?"dark":"light";if(!o){r[i]=Ps({...t,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return}const{palette:a,...l}=Sr({...o,palette:{mode:s,...t==null?void 0:t.palette},colorSpace:e});return r[i]={...t,palette:a,opacity:{...Zn(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||eo(s)},l}function Ms(e={},...r){const{colorSchemes:t={light:!0},defaultColorScheme:o,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:l=$s,colorSchemeSelector:d=t.light&&t.dark?"media":void 0,rootSelector:g=":root",...f}=e,x=Object.keys(t)[0],m=o||(t.light&&x!=="light"?"light":x),h=Os(s),{[m]:b,light:u,dark:y,...v}=t,k={...v};let R=b;if((m==="dark"&&!("dark"in t)||m==="light"&&!("light"in t))&&(R=!0),!R)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:rt(21,m));let S;a&&(S="oklch");const w=fr(S,k,R,f,m);u&&!k.light&&fr(S,k,u,void 0,"light"),y&&!k.dark&&fr(S,k,y,void 0,"dark");let T={defaultColorScheme:m,...w,cssVarPrefix:s,colorSchemeSelector:d,rootSelector:g,getCssVar:h,colorSchemes:k,font:{...fs(w.typography),...w.font},spacing:Fs(f.spacing)};Object.keys(T.colorSchemes).forEach(Y=>{const c=T.colorSchemes[Y].palette,$=z=>{const N=z.split("-"),J=N[1],L=N[2];return h(z,c[J][L])};c.mode==="light"&&(j(c.common,"background","#fff"),j(c.common,"onBackground","#000")),c.mode==="dark"&&(j(c.common,"background","#000"),j(c.common,"onBackground","#fff"));function H(z,N,J){if(S){let L;return z===Qe&&(L=`transparent ${((1-J)*100).toFixed(0)}%`),z===ie&&(L=`#000 ${(J*100).toFixed(0)}%`),z===ae&&(L=`#fff ${(J*100).toFixed(0)}%`),`color-mix(in ${S}, ${N}, ${L})`}return z(N,J)}if(Ds(c,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),c.mode==="light"){j(c.Alert,"errorColor",H(ie,a?h("palette-error-light"):c.error.light,.6)),j(c.Alert,"infoColor",H(ie,a?h("palette-info-light"):c.info.light,.6)),j(c.Alert,"successColor",H(ie,a?h("palette-success-light"):c.success.light,.6)),j(c.Alert,"warningColor",H(ie,a?h("palette-warning-light"):c.warning.light,.6)),j(c.Alert,"errorFilledBg",$("palette-error-main")),j(c.Alert,"infoFilledBg",$("palette-info-main")),j(c.Alert,"successFilledBg",$("palette-success-main")),j(c.Alert,"warningFilledBg",$("palette-warning-main")),j(c.Alert,"errorFilledColor",He(()=>c.getContrastText(c.error.main))),j(c.Alert,"infoFilledColor",He(()=>c.getContrastText(c.info.main))),j(c.Alert,"successFilledColor",He(()=>c.getContrastText(c.success.main))),j(c.Alert,"warningFilledColor",He(()=>c.getContrastText(c.warning.main))),j(c.Alert,"errorStandardBg",H(ae,a?h("palette-error-light"):c.error.light,.9)),j(c.Alert,"infoStandardBg",H(ae,a?h("palette-info-light"):c.info.light,.9)),j(c.Alert,"successStandardBg",H(ae,a?h("palette-success-light"):c.success.light,.9)),j(c.Alert,"warningStandardBg",H(ae,a?h("palette-warning-light"):c.warning.light,.9)),j(c.Alert,"errorIconColor",$("palette-error-main")),j(c.Alert,"infoIconColor",$("palette-info-main")),j(c.Alert,"successIconColor",$("palette-success-main")),j(c.Alert,"warningIconColor",$("palette-warning-main")),j(c.AppBar,"defaultBg",$("palette-grey-100")),j(c.Avatar,"defaultBg",$("palette-grey-400")),j(c.Button,"inheritContainedBg",$("palette-grey-300")),j(c.Button,"inheritContainedHoverBg",$("palette-grey-A100")),j(c.Chip,"defaultBorder",$("palette-grey-400")),j(c.Chip,"defaultAvatarColor",$("palette-grey-700")),j(c.Chip,"defaultIconColor",$("palette-grey-700")),j(c.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),j(c.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),j(c.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),j(c.LinearProgress,"primaryBg",H(ae,a?h("palette-primary-main"):c.primary.main,.62)),j(c.LinearProgress,"secondaryBg",H(ae,a?h("palette-secondary-main"):c.secondary.main,.62)),j(c.LinearProgress,"errorBg",H(ae,a?h("palette-error-main"):c.error.main,.62)),j(c.LinearProgress,"infoBg",H(ae,a?h("palette-info-main"):c.info.main,.62)),j(c.LinearProgress,"successBg",H(ae,a?h("palette-success-main"):c.success.main,.62)),j(c.LinearProgress,"warningBg",H(ae,a?h("palette-warning-light"):c.warning.main,.62)),j(c.Skeleton,"bg",S?H(Qe,a?h("palette-text-primary"):c.text.primary,.11):`rgba(${$("palette-text-primaryChannel")} / 0.11)`),j(c.Slider,"primaryTrack",H(ae,a?h("palette-primary-main"):c.primary.main,.62)),j(c.Slider,"secondaryTrack",H(ae,a?h("palette-secondary-main"):c.secondary.main,.62)),j(c.Slider,"errorTrack",H(ae,a?h("palette-error-main"):c.error.main,.62)),j(c.Slider,"infoTrack",H(ae,a?h("palette-info-main"):c.info.main,.62)),j(c.Slider,"successTrack",H(ae,a?h("palette-success-main"):c.success.main,.62)),j(c.Slider,"warningTrack",H(ae,a?h("palette-warning-main"):c.warning.main,.62));const z=S?H(ie,a?h("palette-background-default"):c.background.default,.6825):At(c.background.default,.8);j(c.SnackbarContent,"bg",z),j(c.SnackbarContent,"color",He(()=>S?vr.text.primary:c.getContrastText(z))),j(c.SpeedDialAction,"fabHoverBg",At(c.background.paper,.15)),j(c.StepConnector,"border",$("palette-grey-400")),j(c.StepContent,"border",$("palette-grey-400")),j(c.Switch,"defaultColor",$("palette-common-white")),j(c.Switch,"defaultDisabledColor",$("palette-grey-100")),j(c.Switch,"primaryDisabledColor",H(ae,a?h("palette-primary-main"):c.primary.main,.62)),j(c.Switch,"secondaryDisabledColor",H(ae,a?h("palette-secondary-main"):c.secondary.main,.62)),j(c.Switch,"errorDisabledColor",H(ae,a?h("palette-error-main"):c.error.main,.62)),j(c.Switch,"infoDisabledColor",H(ae,a?h("palette-info-main"):c.info.main,.62)),j(c.Switch,"successDisabledColor",H(ae,a?h("palette-success-main"):c.success.main,.62)),j(c.Switch,"warningDisabledColor",H(ae,a?h("palette-warning-main"):c.warning.main,.62)),j(c.TableCell,"border",H(ae,Qe(a?h("palette-divider"):c.divider,1),.88)),j(c.Tooltip,"bg",H(Qe,a?h("palette-grey-700"):c.grey[700],.92))}if(c.mode==="dark"){j(c.Alert,"errorColor",H(ae,a?h("palette-error-light"):c.error.light,.6)),j(c.Alert,"infoColor",H(ae,a?h("palette-info-light"):c.info.light,.6)),j(c.Alert,"successColor",H(ae,a?h("palette-success-light"):c.success.light,.6)),j(c.Alert,"warningColor",H(ae,a?h("palette-warning-light"):c.warning.light,.6)),j(c.Alert,"errorFilledBg",$("palette-error-dark")),j(c.Alert,"infoFilledBg",$("palette-info-dark")),j(c.Alert,"successFilledBg",$("palette-success-dark")),j(c.Alert,"warningFilledBg",$("palette-warning-dark")),j(c.Alert,"errorFilledColor",He(()=>c.getContrastText(c.error.dark))),j(c.Alert,"infoFilledColor",He(()=>c.getContrastText(c.info.dark))),j(c.Alert,"successFilledColor",He(()=>c.getContrastText(c.success.dark))),j(c.Alert,"warningFilledColor",He(()=>c.getContrastText(c.warning.dark))),j(c.Alert,"errorStandardBg",H(ie,a?h("palette-error-light"):c.error.light,.9)),j(c.Alert,"infoStandardBg",H(ie,a?h("palette-info-light"):c.info.light,.9)),j(c.Alert,"successStandardBg",H(ie,a?h("palette-success-light"):c.success.light,.9)),j(c.Alert,"warningStandardBg",H(ie,a?h("palette-warning-light"):c.warning.light,.9)),j(c.Alert,"errorIconColor",$("palette-error-main")),j(c.Alert,"infoIconColor",$("palette-info-main")),j(c.Alert,"successIconColor",$("palette-success-main")),j(c.Alert,"warningIconColor",$("palette-warning-main")),j(c.AppBar,"defaultBg",$("palette-grey-900")),j(c.AppBar,"darkBg",$("palette-background-paper")),j(c.AppBar,"darkColor",$("palette-text-primary")),j(c.Avatar,"defaultBg",$("palette-grey-600")),j(c.Button,"inheritContainedBg",$("palette-grey-800")),j(c.Button,"inheritContainedHoverBg",$("palette-grey-700")),j(c.Chip,"defaultBorder",$("palette-grey-700")),j(c.Chip,"defaultAvatarColor",$("palette-grey-300")),j(c.Chip,"defaultIconColor",$("palette-grey-300")),j(c.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),j(c.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),j(c.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),j(c.LinearProgress,"primaryBg",H(ie,a?h("palette-primary-main"):c.primary.main,.5)),j(c.LinearProgress,"secondaryBg",H(ie,a?h("palette-secondary-main"):c.secondary.main,.5)),j(c.LinearProgress,"errorBg",H(ie,a?h("palette-error-main"):c.error.main,.5)),j(c.LinearProgress,"infoBg",H(ie,a?h("palette-info-main"):c.info.main,.5)),j(c.LinearProgress,"successBg",H(ie,a?h("palette-success-main"):c.success.main,.5)),j(c.LinearProgress,"warningBg",H(ie,a?h("palette-warning-main"):c.warning.main,.5)),j(c.Skeleton,"bg",S?H(Qe,a?h("palette-text-primary"):c.text.primary,.13):`rgba(${$("palette-text-primaryChannel")} / 0.13)`),j(c.Slider,"primaryTrack",H(ie,a?h("palette-primary-main"):c.primary.main,.5)),j(c.Slider,"secondaryTrack",H(ie,a?h("palette-secondary-main"):c.secondary.main,.5)),j(c.Slider,"errorTrack",H(ie,a?h("palette-error-main"):c.error.main,.5)),j(c.Slider,"infoTrack",H(ie,a?h("palette-info-main"):c.info.main,.5)),j(c.Slider,"successTrack",H(ie,a?h("palette-success-main"):c.success.main,.5)),j(c.Slider,"warningTrack",H(ie,a?h("palette-warning-light"):c.warning.main,.5));const z=S?H(ae,a?h("palette-background-default"):c.background.default,.985):At(c.background.default,.98);j(c.SnackbarContent,"bg",z),j(c.SnackbarContent,"color",He(()=>S?Kn.text.primary:c.getContrastText(z))),j(c.SpeedDialAction,"fabHoverBg",At(c.background.paper,.15)),j(c.StepConnector,"border",$("palette-grey-600")),j(c.StepContent,"border",$("palette-grey-600")),j(c.Switch,"defaultColor",$("palette-grey-300")),j(c.Switch,"defaultDisabledColor",$("palette-grey-600")),j(c.Switch,"primaryDisabledColor",H(ie,a?h("palette-primary-main"):c.primary.main,.55)),j(c.Switch,"secondaryDisabledColor",H(ie,a?h("palette-secondary-main"):c.secondary.main,.55)),j(c.Switch,"errorDisabledColor",H(ie,a?h("palette-error-main"):c.error.main,.55)),j(c.Switch,"infoDisabledColor",H(ie,a?h("palette-info-main"):c.info.main,.55)),j(c.Switch,"successDisabledColor",H(ie,a?h("palette-success-main"):c.success.main,.55)),j(c.Switch,"warningDisabledColor",H(ie,a?h("palette-warning-light"):c.warning.main,.55)),j(c.TableCell,"border",H(ie,Qe(a?h("palette-divider"):c.divider,1),.68)),j(c.Tooltip,"bg",H(Qe,a?h("palette-grey-700"):c.grey[700],.92))}a||($e(c.background,"default"),$e(c.background,"paper"),$e(c.common,"background"),$e(c.common,"onBackground"),$e(c,"divider")),Object.keys(c).forEach(z=>{const N=c[z];z!=="tonalOffset"&&!a&&N&&typeof N=="object"&&(N.main&&j(c[z],"mainChannel",yt(bt(N.main))),N.light&&j(c[z],"lightChannel",yt(bt(N.light))),N.dark&&j(c[z],"darkChannel",yt(bt(N.dark))),N.contrastText&&j(c[z],"contrastTextChannel",yt(bt(N.contrastText))),z==="text"&&($e(c[z],"primary"),$e(c[z],"secondary")),z==="action"&&(N.active&&$e(c[z],"active"),N.selected&&$e(c[z],"selected")))})}),T=r.reduce((Y,c)=>je(Y,c),T);const M={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:l,getSelector:Is(T),enableContrastVars:a},{vars:P,generateThemeVars:X,generateStyleSheets:Q}=ns(T,M);return T.vars=P,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([Y,c])=>{T[Y]=c}),T.generateThemeVars=X,T.generateStyleSheets=Q,T.generateSpacing=function(){return _n(f.spacing,kr(this))},T.getColorSchemeSelector=os(d),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=l,T.unstable_sxConfig={...Xt,...f==null?void 0:f.unstable_sxConfig},T.unstable_sx=function(c){return ut({sx:c,theme:this})},T.toRuntimeSource=Qn,T}function Cn(e,r,t){e.colorSchemes&&t&&(e.colorSchemes[r]={...t!==!0&&t,palette:Er({...t===!0?{}:t.palette,mode:r})})}function to(e={},...r){const{palette:t,cssVariables:o=!1,colorSchemes:i=t?void 0:{light:!0},defaultColorScheme:s=t==null?void 0:t.mode,...a}=e,l=s||"light",d=i==null?void 0:i[l],g={...i,...t?{[l]:{...typeof d!="boolean"&&d,palette:t}}:void 0};if(o===!1){if(!("colorSchemes"in e))return Sr(e,...r);let f=t;"palette"in e||g[l]&&(g[l]!==!0?f=g[l].palette:l==="dark"&&(f={mode:"dark"}));const x=Sr({...e,palette:f},...r);return x.defaultColorScheme=l,x.colorSchemes=g,x.palette.mode==="light"&&(x.colorSchemes.light={...g.light!==!0&&g.light,palette:x.palette},Cn(x,"dark",g.dark)),x.palette.mode==="dark"&&(x.colorSchemes.dark={...g.dark!==!0&&g.dark,palette:x.palette},Cn(x,"light",g.light)),x}return!t&&!("light"in g)&&l==="light"&&(g.light=!0),Ms({...a,colorSchemes:g,defaultColorScheme:l,...typeof o!="boolean"&&o},...r)}const Ws=to(),zs="$$material";function _s(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ls=e=>_s(e)&&e!=="classes",Ns=_a({themeId:zs,defaultTheme:Ws,rootShouldForwardProp:Ls}),Vs=Za;process.env.NODE_ENV!=="production"&&(te.node,te.object.isRequired);function Gs(e){return Qa(e)}function Us(e){return Br("MuiSvgIcon",e)}Fa("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ys=e=>{const{color:r,fontSize:t,classes:o}=e,i={root:["root",r!=="inherit"&&`color${nt(r)}`,`fontSize${nt(t)}`]};return Bi(i,Us,o)},Js=Ns("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color!=="inherit"&&r[`color${nt(t.color)}`],r[`fontSize${nt(t.fontSize)}`]]}})(Vs(({theme:e})=>{var r,t,o,i,s,a,l,d,g,f,x,m,h,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(r=e.transitions)==null?void 0:r.create)==null?void 0:i.call(r,"fill",{duration:(o=(t=(e.vars??e).transitions)==null?void 0:t.duration)==null?void 0:o.shorter}),variants:[{props:u=>!u.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((d=(l=e.typography)==null?void 0:l.pxToRem)==null?void 0:d.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(g=e.typography)==null?void 0:g.pxToRem)==null?void 0:f.call(g,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,u])=>u&&u.main).map(([u])=>{var y,v;return{props:{color:u},style:{color:(v=(y=(e.vars??e).palette)==null?void 0:y[u])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(x=(e.vars??e).palette)==null?void 0:x.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(b=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),_t=Ge.forwardRef(function(r,t){const o=Gs({props:r,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:l="svg",fontSize:d="medium",htmlColor:g,inheritViewBox:f=!1,titleAccess:x,viewBox:m="0 0 24 24",...h}=o,b=Ge.isValidElement(i)&&i.type==="svg",u={...o,color:a,component:l,fontSize:d,instanceFontSize:r.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},y={};f||(y.viewBox=m);const v=Ys(u);return n.jsxs(Js,{as:l,className:On(v.root,s),focusable:"false",color:g,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:t,...y,...h,...b&&i.props,ownerState:u,children:[b?i.props.children:i,x?n.jsx("title",{children:x}):null]})});process.env.NODE_ENV!=="production"&&(_t.propTypes={children:te.node,classes:te.object,className:te.string,color:te.oneOfType([te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),te.string]),component:te.elementType,fontSize:te.oneOfType([te.oneOf(["inherit","large","medium","small"]),te.string]),htmlColor:te.string,inheritViewBox:te.bool,shapeRendering:te.string,sx:te.oneOfType([te.arrayOf(te.oneOfType([te.func,te.object,te.bool])),te.func,te.object]),titleAccess:te.string,viewBox:te.string});_t.muiName="SvgIcon";function kt(e,r){function t(o,i){return n.jsx(_t,{"data-testid":process.env.NODE_ENV!=="production"?`${r}Icon`:void 0,ref:i,...o,children:e})}return process.env.NODE_ENV!=="production"&&(t.displayName=`${r}Icon`),t.muiName=_t.muiName,Ge.memo(Ge.forwardRef(t))}const qs=kt(n.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded"),Ks=kt(n.jsx("path",{d:"M12 5V3.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V7c3.31 0 6 2.69 6 6 0 2.72-1.83 5.02-4.31 5.75-.42.12-.69.52-.69.95 0 .65.62 1.16 1.25.97C17.57 19.7 20 16.64 20 13c0-4.42-3.58-8-8-8m-6 8c0-1.34.44-2.58 1.19-3.59.3-.4.26-.95-.09-1.31-.42-.42-1.14-.38-1.5.1-1 1.34-1.6 3-1.6 4.8 0 3.64 2.43 6.7 5.75 7.67.63.19 1.25-.32 1.25-.97 0-.43-.27-.83-.69-.95C7.83 18.02 6 15.72 6 13"}),"RestartAltRounded"),Xs=kt(n.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkModeOutlined"),Qs=kt(n.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightModeOutlined"),wn=e=>{let r;const t=new Set,o=(g,f)=>{const x=typeof g=="function"?g(r):g;if(!Object.is(x,r)){const m=r;r=f??(typeof x!="object"||x===null)?x:Object.assign({},r,x),t.forEach(h=>h(r,m))}},i=()=>r,l={setState:o,getState:i,getInitialState:()=>d,subscribe:g=>(t.add(g),()=>t.delete(g))},d=r=e(o,i,l);return l},Zs=(e=>e?wn(e):wn),el=e=>e;function tl(e,r=el){const t=_.useSyncExternalStore(e.subscribe,_.useCallback(()=>r(e.getState()),[e,r]),_.useCallback(()=>r(e.getInitialState()),[e,r]));return _.useDebugValue(t),t}const jn=e=>{const r=Zs(e),t=o=>tl(r,o);return Object.assign(t,r),t},ro=(e=>e?jn(e):jn);function rl(e,r){let t;try{t=e()}catch{return}return{getItem:i=>{var s;const a=d=>d===null?null:JSON.parse(d,void 0),l=(s=t.getItem(i))!=null?s:null;return l instanceof Promise?l.then(a):a(l)},setItem:(i,s)=>t.setItem(i,JSON.stringify(s,void 0)),removeItem:i=>t.removeItem(i)}}const Cr=e=>r=>{try{const t=e(r);return t instanceof Promise?t:{then(o){return Cr(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return Cr(o)(t)}}}},nl=(e,r)=>(t,o,i)=>{let s={storage:rl(()=>window.localStorage),partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...r},a=!1,l=0;const d=new Set,g=new Set;let f=s.storage;if(!f)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...y)},o,i);const x=()=>{const y=s.partialize({...o()});return f.setItem(s.name,{state:y,version:s.version})},m=i.setState;i.setState=(y,v)=>(m(y,v),x());const h=e((...y)=>(t(...y),x()),o,i);i.getInitialState=()=>h;let b;const u=()=>{var y,v;if(!f)return;const k=++l;a=!1,d.forEach(S=>{var w;return S((w=o())!=null?w:h)});const R=((v=s.onRehydrateStorage)==null?void 0:v.call(s,(y=o())!=null?y:h))||void 0;return Cr(f.getItem.bind(f))(s.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==s.version){if(s.migrate){const w=s.migrate(S.state,S.version);return w instanceof Promise?w.then(T=>[!0,T]):[!0,w]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var w;if(k!==l)return;const[T,M]=S;if(b=s.merge(M,(w=o())!=null?w:h),t(b,!0),T)return x()}).then(()=>{k===l&&(R==null||R(o(),void 0),b=o(),a=!0,g.forEach(S=>S(b)))}).catch(S=>{k===l&&(R==null||R(void 0,S))})};return i.persist={setOptions:y=>{s={...s,...y},y.storage&&(f=y.storage)},clearStorage:()=>{f==null||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>u(),hasHydrated:()=>a,onHydrate:y=>(d.add(y),()=>{d.delete(y)}),onFinishHydration:y=>(g.add(y),()=>{g.delete(y)})},s.skipHydration||u(),b||h},ol=nl,Ct=[{id:"corporate",name:"Corporate Blue",snap:{primaryHex:"#4F6BFF",secondaryHex:"#22D3EE",iconColor:"#4F6BFF",highlightHex:"#6D86FF",cardStyle:"soft",cardShadowPx:20,h1Size:28,h2Size:25,h3Size:22,h4Size:20,h5Size:17,h6Size:14,baseFontPx:15,videoShadowLight:"0px 4px 66px 0px #0409D8",videoShadowDark:"0px 4px 63.7px 0px #00136f"}},{id:"emerald",name:"Emerald",snap:{primaryHex:"#10B981",secondaryHex:"#F5A524",iconColor:"#10B981",highlightHex:"#2EE6A6",cardStyle:"soft",cardShadowPx:20,videoShadowLight:"0px 4px 66.3px 0px #0C3726",videoShadowDark:"0px 4px 66.3px 14px #0C3726",ccBadge:"#14b8a6",hdBadge:"#f59e0b",h1Size:28}},{id:"indigo",name:"Indigo Violet",snap:{primaryHex:"#A97BFF",secondaryHex:"#FF5FA2",iconColor:"#A97BFF",highlightHex:"#A97BFF",cardStyle:"soft",cardShadowPx:20,videoShadowLight:"0px 4px 66px 0px #F50079",videoShadowDark:"0px 4px 63.7px 0px #9F0087",h1Size:28}},{id:"slate",name:"Graphite",snap:{primaryHex:"#455a64",secondaryHex:"#78909c",iconColor:"#455a64",cardStyle:"floating",cardShadowPx:16}},{id:"teal",name:"Ocean Teal",snap:{primaryHex:"#00838f",secondaryHex:"#0277bd",iconColor:"#00838f",cardStyle:"floating",cardShadowPx:20}},{id:"amber",name:"Amber",snap:{primaryHex:"#e65100",secondaryHex:"#d84315",iconColor:"#e65100",cardStyle:"floating",cardShadowPx:20}}],kn={appName:"Crystal Ball",appTagline:"Run your whole business in one place",logoMode:"icon",logoUrl:"",iconColor:"#4F6BFF",presetId:"emerald",mode:"light",primaryHex:"#4F6BFF",secondaryHex:"#22D3EE",highlightHex:"",videoShadowLight:"",videoShadowDark:"",ccBadge:"",hdBadge:"",errorHex:"#d32f2f",warningHex:"#ed6c02",infoHex:"#0288d1",successHex:"#2e7d32",cardBgHex:"",cardHdrHex:"",pageBgHex:"",notifCardHex:"",textPrimaryHex:"",textSecondaryHex:"",dividerHex:"",btnColorHex:"",btnTextHex:"",h1Color:"",h2Color:"",h3Color:"",h4Color:"",h5Color:"",h6Color:"",fontFamily:"Roboto",headingFont:"Inter",customFonts:[],customHeadFonts:[],textSize:"df",baseFontPx:15,bodyLineHeight:0,bodyWeight:300,letterSpace:0,scaleRatio:"default",scaleRatioCustom:0,h1Size:0,h2Size:0,h3Size:0,h4Size:0,h5Size:0,h6Size:0,h1Weight:0,h2Weight:0,h3Weight:0,h4Weight:0,h5Weight:0,h6Weight:0,headingWeight:300,headingLH:0,radiusPreset:"rounded",radiusVal:9,density:"default",densityScale:0,cardShadowPx:-1,contrast:"medium",contrastMode:"auto",containerPadPx:0,edgePadPx:0,cardGapPx:0,cardStyle:"soft",cardHeader:"plain",surfaceTint:"snow",nestedStyle:"recessed",nestedDepth:-1,headerStrength:-1,tintIntensity:-1,btnCase:"upper",accentGradient:!1,statusBold:!1,mapGlass:"light",chartScheme:"brand",tableDensity:"default",tableColDensity:"default",tableDividers:!1,tableColDividers:!1,tableRowDivW:1,tableColDivW:1,tableStripe:!1,tableHeaderStyle:"tinted",tableCellAlignH:"left",tableCellAlignV:"middle",notifPosition:"bottom-right",notifStyle:"toast",notifAccent:"severity",notifBadge:!0,notifAutoDismiss:!1,autoDismissSec:8,toastW:0,navPattern:"sidebar",sidebarWidth:220,appBarH:0,loginLayout:"split",loginImage:"",loginShowTagline:!0,loginPanelColor:"",loginImgOpacity:0,loginCardW:0};var An;const Ee={...kn,...((An=Ct.find(e=>e.id===kn.presetId))==null?void 0:An.snap)??{}},il=["primaryHex","secondaryHex","highlightHex"],Ae=e=>{const{mode:r,...t}=e;return JSON.stringify(t)};function hr(e){const r={...Ee};if(e&&typeof e=="object")for(const t of Object.keys(Ee)){const o=e[t];o!==void 0&&typeof o==typeof Ee[t]&&(r[t]=o)}return r}function al(e){if(!e||typeof e!="object")return!1;const r=Object.keys(Ee);let t=0;for(const o of r){const i=e[o];i!==void 0&&typeof i==typeof Ee[o]&&t++}return t/r.length>=.5}const V=ro()(ol((e,r)=>({settings:{...Ee},savedThemes:[],baseline:Ae(Ee),editingSavedId:null,lastImportedId:null,set:t=>e(o=>{const i=Object.keys(t).some(s=>il.includes(s));return{settings:{...o.settings,...t,...i?{presetId:"custom"}:{}}}}),applyPreset:(t,o)=>e(i=>{const s={...i.settings,...o,presetId:t};return{settings:s,baseline:Ae(s),editingSavedId:null,lastImportedId:null}}),reset:()=>e(()=>({settings:{...Ee},baseline:Ae(Ee),editingSavedId:null,lastImportedId:null})),captureBaseline:()=>e(t=>({baseline:Ae(t.settings)})),restoreBaseline:()=>e(t=>{try{return{settings:{...JSON.parse(t.baseline),mode:t.settings.mode}}}catch{return{}}}),isDirty:()=>Ae(r().settings)!==r().baseline,saveTheme:t=>e(o=>{const i="cust"+Date.now(),s={...o.settings};return{savedThemes:[...o.savedThemes,{id:i,name:t,snap:s}],settings:{...o.settings,presetId:i},baseline:Ae({...o.settings,presetId:i}),editingSavedId:i,lastImportedId:null}}),updateSaved:(t,o,i)=>e(s=>{const a={...i,presetId:t};return{savedThemes:s.savedThemes.map(l=>l.id===t?{...l,name:o,snap:i}:l),settings:a,baseline:Ae(a),editingSavedId:t,lastImportedId:null}}),applySaved:t=>e(()=>{const o={...hr(t.snap),presetId:t.id};return{settings:o,baseline:Ae(o),editingSavedId:t.id,lastImportedId:null}}),renameSaved:(t,o)=>e(i=>({savedThemes:i.savedThemes.map(s=>s.id===t?{...s,name:o}:s)})),deleteSaved:t=>e(o=>({savedThemes:o.savedThemes.filter(i=>i.id!==t),editingSavedId:o.editingSavedId===t?null:o.editingSavedId,lastImportedId:o.lastImportedId===t?null:o.lastImportedId})),importTheme:(t,o)=>{const i=hr(o),s={id:"imp"+Date.now(),name:t,snap:i};return e(a=>{const l={...i,presetId:s.id};return{savedThemes:[s,...a.savedThemes],settings:l,baseline:Ae(l),editingSavedId:s.id,lastImportedId:s.id}}),s}}),{name:"omnieye-theme-studio",merge:(e,r)=>{const t=e??{};return{...r,...t,settings:hr(t.settings),savedThemes:Array.isArray(t.savedThemes)?t.savedThemes:r.savedThemes}}}));function Pe(e){const r=e==="dark";return{studioBg:r?"#15181d":"#f5f7fa",studioBd:r?"#2a2f38":"#d8dee6",card:r?"#1e222a":"#ffffff",cardBd:r?"#2b313b":"#e6eaf0",inset:r?"#262b34":"#f7f9fb",insetBd:r?"#363d48":"#e9edf2",divider:r?"#262b34":"#f0f3f7",iconTile:r?"#2b313b":"#eef1f6",text:r?"rgba(255,255,255,0.92)":"#1c2127",label:r?"rgba(255,255,255,0.5)":"#9aa4b0",label2:r?"rgba(255,255,255,0.6)":"#7a8593",body:r?"rgba(255,255,255,0.78)":"#5a6573",muted:r?"rgba(255,255,255,0.42)":"#aeb6c0",chevron:r?"rgba(255,255,255,0.42)":"#b3bcc7"}}function wr(e){if(!e||e.length<7)return[210,60,45];const r=parseInt(e.slice(1,3),16)/255,t=parseInt(e.slice(3,5),16)/255,o=parseInt(e.slice(5,7),16)/255,i=Math.max(r,t,o),s=Math.min(r,t,o),a=i-s;let l=0,d=0;const g=(i+s)/2;return a&&(d=a/(1-Math.abs(2*g-1)),i===r?l=(t-o)/a%6:i===t?l=(o-r)/a+2:l=(r-t)/a+4,l=Math.round(l*60),l<0&&(l+=360)),[l,Math.round(d*100),Math.round(g*100)]}function re(e,r,t){r/=100,t/=100;const o=i=>{const s=(i+e/30)%12,a=r*Math.min(t,1-t);return Math.round((t-a*Math.max(-1,Math.min(s-3,Math.min(9-s,1))))*255).toString(16).padStart(2,"0")};return"#"+o(0)+o(8)+o(4)}function Se(e){try{const[r,t]=wr(e),o=Math.max(t,18);return{50:re(r,Math.max(Math.round(o*.3),10),96),100:re(r,Math.max(Math.round(o*.42),12),91),200:re(r,Math.max(Math.round(o*.55),16),82),300:re(r,Math.max(Math.round(o*.7),20),70),400:re(r,o,60),500:e,600:re(r,Math.min(o+4,100),44),700:re(r,Math.min(o+8,100),36),800:re(r,Math.max(Math.round(o*.92),16),26),900:re(r,Math.max(Math.round(o*.8),14),16)}}catch{return{50:"#eef",100:"#dde",200:"#bbd",300:"#99c",400:"#77b",500:e||"#4F6BFF",600:"#1257a8",700:"#0e4488",800:"#0a3266",900:"#062044"}}}function gr(e,r){try{const t=l=>{const d=[1,3,5].map(g=>{const f=parseInt(l.slice(g,g+2),16)/255;return f<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)});return .2126*d[0]+.7152*d[1]+.0722*d[2]},o=t(e),i=t(r),s=Math.max(o,i),a=Math.min(o,i);return(s+.05)/(a+.05)}catch{return 1}}function ce(e,r){if(!e||e[0]!=="#"||e.length<7)return"rgba(20,30,48,"+r+")";const t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16);return"rgba("+t+","+o+","+i+","+r+")"}const sl={corporate:{light:{angle:0,colors:["#141b3c"]},dark:{angle:0,colors:["#141b3c"]}},"corporate-blue":{light:{angle:0,colors:["#141b3c"]},dark:{angle:0,colors:["#141b3c"]}},emerald:{light:{angle:0,colors:["#0d2a20"]},dark:{angle:0,colors:["#041610"]}},indigo:{light:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]},dark:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]}},"indigo-violet":{light:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]},dark:{angle:176.18088833734933,colors:["rgb(51, 34, 88)","rgb(50, 20, 56)"],stops:[16.741,83.447]}}},ll={corporate:{angle:180,colors:["#070A1B","#111734","#090D22"]},"corporate-blue":{angle:180,colors:["#070A1B","#111734","#090D22"]},emerald:{angle:180,colors:["#06140E","#082318","#061910"]},indigo:{angle:180,colors:["#0D0620","#221236","#2E1F4F"]},"indigo-violet":{angle:180,colors:["#0D0620","#221236","#2E1F4F"]}},Tn={corporate:{angle:90,colors:["#000000","#03205F"]},"corporate-blue":{angle:90,colors:["#000000","#03205F"]}},cl={corporate:{angle:90,colors:["#6CA4FF","#C9D8F2"]},"corporate-blue":{angle:90,colors:["#6CA4FF","#C9D8F2"]},emerald:{angle:90,colors:["#97E1B2","#E6E6E6"]},indigo:{angle:90,colors:["#FCB3D8","#E6E6E6"]},"indigo-violet":{angle:90,colors:["#FCB3D8","#E6E6E6"]}},dl={corporate:{angle:90,colors:["#010D27","#03205F"]},"corporate-blue":{angle:90,colors:["#010D27","#03205F"]},emerald:{angle:90,colors:["#001909","#0A4821"]},indigo:{angle:90,colors:["#010D27","#37107A"]},"indigo-violet":{angle:90,colors:["#010D27","#37107A"]}},pl={corporate:{light:{angle:90,colors:["#0029ff","#00144b"]},dark:{angle:90,colors:["#4f6bff","#22d3ee"]}},"corporate-blue":{light:{angle:90,colors:["#0029ff","#00144b"]},dark:{angle:90,colors:["#4f6bff","#22d3ee"]}},emerald:{light:{angle:90,colors:["#01b979","#d88b00"]},dark:{angle:90,colors:["#2ee6a6","#ffc255"]}},indigo:{light:{angle:90,colors:["#4300c1","#ff388c"]},dark:{angle:90,colors:["#4300c1","#ff388c"]}},"indigo-violet":{light:{angle:90,colors:["#4300c1","#ff388c"]},dark:{angle:90,colors:["#4300c1","#ff388c"]}}},ul={corporate:{light:{angle:135,colors:["#00ddff","#0c26b1"]},dark:{angle:162,colors:["#22d3ee","#126673"],stops:[11.886,91.492]}},emerald:{light:{angle:135,colors:["#F5A524","#10B981"]},dark:{angle:180,colors:["#FFC255","#997433"],overlay:"linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%)"}}},fl={corporate:{angle:0,colors:["#4f6bff","#3f5adb","#2e49b7","#1e3892","#0d276e","#07153f"],stops:[0,13.75,27.5,41.25,55,100]},emerald:{angle:0,colors:["#2EE6A6","#21AB7B","#1A8D65","#146F4F","#0D4E37","#072D20"],stops:[0,27.5,41.25,55,77.5,100]},indigo:{angle:0,colors:["#A97BFF","#4E22A0","#16013E"],stops:[0,50,100]}},hl={emerald:{angle:169,colors:["#28C78F","#18855F"]}},gl={corporate:{angle:136.6683374482933,colors:["#3f5bff","#4b48e6","#7c5cf5"],stops:[0,45,100]}},mt="#0f172a";function no(e,r){const t=r??e.map((o,i)=>e.length===1?0:i/(e.length-1)*100);return e.map((o,i)=>`${o} ${t[i]}%`).join(", ")}function Ie(e){if(e.colors.length===1)return e.colors[0];const r=`linear-gradient(${e.angle}deg, ${no(e.colors,e.stops)})`;return e.overlay?`${e.overlay}, ${r}`:r}function Bn(e,r){return`radial-gradient(${r}, ${no(e.colors,e.stops)})`}function Hr(e){const r=Se(e.primaryHex),t=Se(e.secondaryHex),o=e.mode==="dark",i=o?r[300]:e.primaryHex,s=o?t[300]:e.secondaryHex,a={pMain:i,pDark:r[700],pLight:r[300],highlight:e.highlightHex||i,highlightSoft:ce(e.highlightHex||i,o?.22:.14),highlightBd:ce(e.highlightHex||i,o?.45:.32),pContrast:e.contrastMode==="light"?"#ffffff":e.contrastMode==="dark"?"rgba(0,0,0,0.87)":gr(i,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",pContainer:o?ce(e.primaryHex,.26):r[50],onPContainer:o?r[100]:r[800],sMain:s,sContrast:gr(s,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)",bgDefault:o?"#121212":"#f3f5f8",paper:o?"#1e1e1e":"#ffffff",paper2:o?"#262630":"#f6f8fb",frameGutterBg:o?"#0a0a0a":"#e3e7ec",footerBg:o?"#17171c":"#eceef2",textPrimary:o?"rgba(255,255,255,0.92)":"rgba(0,0,0,0.87)",textSecondary:o?"rgba(255,255,255,0.62)":"rgba(0,0,0,0.6)",textDisabled:o?"rgba(255,255,255,0.4)":"rgba(0,0,0,0.38)",divider:o?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.12)",outline:o?"rgba(255,255,255,0.23)":"rgba(0,0,0,0.23)"},l=e.statusBold,d=l?e.errorHex:ce(e.errorHex,o?.22:.13),g=l?e.warningHex:ce(e.warningHex,o?.22:.14),f=l?e.infoHex:ce(e.infoHex,o?.22:.13),x=l?e.successHex:ce(e.successHex,o?.22:.13),m=l?"#ffffff":o?Se(e.errorHex)[300]:e.errorHex,h=l?"#ffffff":o?Se(e.warningHex)[300]:Se(e.warningHex)[700],b=l?"#ffffff":o?Se(e.infoHex)[300]:e.infoHex,u=l?"#ffffff":o?Se(e.successHex)[300]:Se(e.successHex)[700],y=wr(e.primaryHex)[0],v={neutral:[220,6],warm:[32,26],cool:[210,30],brand:[y,42],slate:[214,16],snow:[0,0]},k=v[e.surfaceTint]||v.neutral,R=e.tintIntensity>=0?e.tintIntensity:100,S=[k[0],Math.round(k[1]*R/100)];o?(a.bgDefault=re(S[0],Math.round(S[1]*.7),7),a.paper=re(S[0],Math.round(S[1]*.7),13),a.paper2=re(S[0],Math.round(S[1]*.85),19)):(a.bgDefault="#ffffff",a.paper="#ffffff",a.paper2=re(S[0],Math.round(S[1]*.85),e.surfaceTint==="brand"?95:96.5)),e.pageBgHex&&(a.bgDefault=e.pageBgHex),e.cardBgHex&&(a.paper=e.cardBgHex);const w={soft:0,standard:1,medium:2,high:3},T=w[e.contrast]!==void 0?w[e.contrast]:1,M=o?[["rgba(255,255,255,0.82)","rgba(255,255,255,0.55)","rgba(255,255,255,0.09)","rgba(255,255,255,0.16)"],["rgba(255,255,255,0.92)","rgba(255,255,255,0.62)","rgba(255,255,255,0.12)","rgba(255,255,255,0.23)"],["rgba(255,255,255,0.96)","rgba(255,255,255,0.74)","rgba(255,255,255,0.18)","rgba(255,255,255,0.34)"],["#ffffff","rgba(255,255,255,0.87)","rgba(255,255,255,0.26)","rgba(255,255,255,0.46)"]]:[["rgba(0,0,0,0.72)","rgba(0,0,0,0.5)","rgba(0,0,0,0.08)","rgba(0,0,0,0.16)"],["rgba(0,0,0,0.87)","rgba(0,0,0,0.6)","rgba(0,0,0,0.12)","rgba(0,0,0,0.23)"],["rgba(0,0,0,0.92)","rgba(0,0,0,0.7)","rgba(0,0,0,0.18)","rgba(0,0,0,0.34)"],["#000000","rgba(0,0,0,0.8)","rgba(0,0,0,0.24)","rgba(0,0,0,0.46)"]];a.textPrimary=M[T][0],a.textSecondary=M[T][1],a.divider=M[T][2],a.outline=M[T][3],e.textPrimaryHex&&(a.textPrimary=e.textPrimaryHex),e.textSecondaryHex&&(a.textSecondary=e.textSecondaryHex),e.dividerHex&&(a.divider=e.dividerHex),e.nestedStyle==="lighter"?a.paper2=o?re(S[0],Math.round(S[1]*.9),22):re(S[0],Math.max(Math.round(S[1]*.3),4),100):e.nestedStyle==="bordered"?a.paper2=a.paper:a.paper2=o?re(S[0],Math.round(S[1]*.9),Math.max(3,5)):re(S[0],Math.min(Math.round(S[1]*1.1),60),Math.max(88,94-S[1]*.18));const P=e.btnColorHex||i,X=e.accentGradient?"linear-gradient(135deg,"+P+","+(e.btnColorHex?Se(e.btnColorHex)[700]:r[o?500:700])+")":P,Q=e.btnTextHex||(gr(P,"#ffffff")>=2.9?"#ffffff":"rgba(0,0,0,0.87)"),Y=e.h1Color||null,c=e.h2Color||null,$=e.h3Color||null,H=e.h4Color||null,z=e.h5Color||null,N=e.h6Color||null,J=[{key:"sm",px:13},{key:"df",px:12},{key:"lg",px:18}],L=J.find(ge=>ge.key===e.textSize)||J[1],q=e.baseFontPx>0?e.baseFontPx:L.px,E=e.bodyLineHeight>0?e.bodyLineHeight:1.5,I=e.h1Size>0?e.h1Size:20,K=Math.round(I*1.1),G=I,U=Math.max(Math.round(I*.9),11),D=Math.max(Math.round(I*.8),11),C=Math.max(Math.round(I*.7),10),A=Math.max(Math.round(I*.6),10),F=Math.max(Math.round(I*.5),9),B=q,O=Math.round(q*.92),ee=Math.round(q*.8),W=Math.round(q*.72),fe=e.headingWeight,Me=e.headingLH>0?e.headingLH:1.2,We=e.bodyWeight>0?e.bodyWeight:400,Je=Math.min(900,We+200),qe={compact:.82,default:1,comfortable:1.16},Be=e.densityScale>0?e.densityScale/100:qe[e.density]??1,tr=Math.round(20*Be),ze=Math.round(14*Be),Tt=e.cardGapPx>0?e.cardGapPx:Math.round(16*Be),Ke=Math.round(11*Be*({compact:.66,default:1,comfortable:1.32}[e.tableDensity]??1)),_e=e.containerPadPx>0?e.containerPadPx:Math.round(10*Be),Z=e.radiusVal,ft=Z+"px",ht=Math.max(Math.round(Z*.6),2)+"px",Le=ce(i,o?.22:.14),Ne={0:"none",1:o?`0 2px 8px -1px ${Le}, 0 2px 4px 0 rgba(0,0,0,0.28)`:`0 2px 6px -1px ${Le}, 0 1px 3px 0 rgba(0,0,0,0.08)`,2:o?`0 4px 14px -2px ${Le}, 0 3px 8px 0 rgba(0,0,0,0.32)`:`0 3px 8px -2px ${Le}, 0 2px 6px 0 rgba(0,0,0,0.08)`,4:o?`0 6px 20px -3px ${Le}, 0 4px 12px 0 rgba(0,0,0,0.38)`:`0 4px 12px -2px ${Le}, 0 3px 8px 0 rgba(0,0,0,0.1)`,8:o?`0 8px 32px -4px ${Le}, 0 16px 36px 0 rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08)`:`0 6px 22px -2px ${Le}, 0 8px 24px 0 rgba(0,0,0,0.08)`},$r="1px solid rgba(255,255,255,0.06)";let gt,Xe,Bt;if(e.cardStyle==="outlined"?(gt="none",Xe="1.5px solid "+a.outline,Bt="none"):e.cardStyle==="soft"?(gt=Ne[1],Xe=o?$r:"none",Bt=Ne[1]):(gt=Ne[8],Xe=o?$r:"none",Bt=Ne[4]),e.cardShadowPx>=0){const ge=ce(i,o?Math.min(.38,.12+e.cardShadowPx/80):Math.min(.24,.08+e.cardShadowPx/130));gt=`0 ${Math.round(e.cardShadowPx*.4)}px ${Math.round(e.cardShadowPx*1.3)}px ${ge}, 0 ${Math.round(e.cardShadowPx*.6)}px ${Math.round(e.cardShadowPx*1.8)}px rgba(0,0,0,${o?.52:.08})`}let Rt="transparent",Ar="1px solid "+a.divider,rr="none";e.cardHeader==="plain"?Ar="none":e.cardHeader==="tinted"?Rt=a.pContainer:e.cardHeader==="accent"&&(rr="inset 3px 0 0 "+i),e.headerStrength>=0&&(e.cardHeader==="tinted"?Rt=ce(e.primaryHex,(o?.14:.08)*(e.headerStrength/100)):e.cardHeader==="accent"&&(rr="inset "+Math.round(e.headerStrength*.06)+"px 0 0 "+i)),e.cardHdrHex&&(Rt=e.cardHdrHex);const ao=o?"none":Ne[4],so=o?"1px solid "+a.divider:"none",lo=e.nestedStyle==="bordered"?"1.5px solid "+a.outline:"1px solid "+a.divider,co=e.nestedDepth>0?"inset 3px 0 0 "+ce(e.primaryHex,.55)+", 0 "+Math.round(e.nestedDepth*.4)+"px "+e.nestedDepth+"px rgba(16,24,40,"+(o?.42:.1)+")":"none",po=(e.appName||"").trim().split(/\s+/).slice(0,2).map(ge=>ge[0]||"").join("").toUpperCase()||"AP",uo=!!(e.logoMode==="image"&&e.logoUrl),fo=!!e.loginImage,Ir=ge=>{const be=ge||"Roboto";return be.includes(" ")&&!be.startsWith('"')&&!be.startsWith("'")?`"${be}"`:be},ho=Ir(e.headingFont||e.fontFamily),go=Ir(e.fontFamily),ye=wr(e.primaryHex)[0],me=(ge,be)=>re((ge%360+360)%360,62,o?60:46),Dr={brand:[i,s,me(ye+42),me(ye+205),me(ye+120)],categorical:[me(ye),me(ye+72),me(ye+144),me(ye+216),me(ye+288)],sequential:[re(ye,55,o?40:78),re(ye,60,o?50:64),i,re(ye,70,o?70:38),re(ye,78,o?82:26)],cbsafe:["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9"],warm:[me(8),me(28),me(45),me(350),me(18)],cool:[me(200),me(220),me(255),me(180),me(235)]},xo=Dr[e.chartScheme]||Dr.brand,mo=[r[600],t[600],re((ye+42)%360,55,46),re((ye+205)%360,50,46)],yo={error:{cb:d,cc:m},success:{cb:x,cc:u},info:{cb:f,cc:b},warning:{cb:g,cc:h}},nr=e.mapGlass==="light",bo=nr?"rgba(255,255,255,0.84)":"rgba(15,20,28,0.74)",vo=nr?"#1c2733":"#f3f6fa",So=nr?"rgba(0,0,0,0.12)":"rgba(255,255,255,0.18)",Co="repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 11px, rgba(255,255,255,0) 11px, rgba(255,255,255,0) 22px), radial-gradient(circle at 50% 38%, "+ce(i,.22)+", rgba(0,0,0,0) 60%), "+"#0f141c",wo="linear-gradient(135deg,"+i+","+r[700]+")",jo="linear-gradient(180deg,"+ce(r[900],.12)+","+ce(r[900],.55)+")",ko="linear-gradient(135deg,"+r[700]+","+r[900]+")",To="linear-gradient(135deg,"+ce(r[900],.55)+","+ce(e.primaryHex,.45)+")",Re=e.presetId,Bo=ll[Re]||{angle:180,colors:[re(y,32,5),re(y,32,10),re(y,32,6)]},Fr=Ie(Bo),Or=sl[Re],Ro=Or?Or[o?"dark":"light"]:{angle:0,colors:[re(y,38,6.5)]},Eo=Ie(Ro),Ho=e.pageBgHex||(o?Fr:"#ffffff"),Po=e.pageBgHex||(o?Tn[Re]?Ie(Tn[Re]):Fr:a.bgDefault),$o=o?dl[Re]||{angle:90,colors:[`color-mix(in srgb, ${e.primaryHex} 25%, black)`,`color-mix(in srgb, ${e.secondaryHex} 55%, black)`]}:cl[Re]||{angle:90,colors:[`color-mix(in srgb, ${e.primaryHex} 45%, white)`,`color-mix(in srgb, ${e.secondaryHex} 15%, white)`]},Ao=Ie($o),Mr=pl[Re],Io=Mr?Mr[o?"dark":"light"]:{angle:90,colors:[e.primaryHex,e.secondaryHex]},Do=Ie(Io),Wr=ul[Re],Fo=Wr?Wr[o?"dark":"light"]:o?{angle:162,colors:[e.secondaryHex,`color-mix(in srgb, ${e.secondaryHex} 48%, black)`],stops:[11.886,91.492]}:{angle:135,colors:[e.secondaryHex,e.primaryHex]},Oo=Ie(Fo),Mo=fl[Re]||{colors:[e.primaryHex,`color-mix(in srgb, ${e.primaryHex} 78%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 57%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 36%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 16%, ${mt})`,`color-mix(in srgb, ${e.primaryHex} 20%, ${mt})`],stops:[0,13.75,27.5,41.25,55,100]},Wo=Bn(Mo,"circle at 50% 30%"),zo=hl[Re]||{angle:135,colors:[r[300],r[700]]},_o=Ie(zo),zr=gl[Re]||{angle:136.6683374482933,colors:[e.secondaryHex,e.primaryHex]},Lo=Ie(zr),No=Ie({...zr,angle:165.45289138562782}),Vo="inset 0px 1px 2px 0px rgba(255,255,255,0.3)",Go={colors:[re(y,45,14),re(y,35,9),re(y,10,4)]},Uo=e.loginPanelColor||(o?Bn(Go,"ellipse 70% 65% at 50% 77%"):"#ffffff"),_r={"top-right":{top:"14px",right:"14px"},"top-center":{top:"14px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"14px",right:"14px"},"bottom-left":{bottom:"14px",left:"14px"}},Yo=_r[e.notifPosition]||_r["top-right"],Lr=e.notifAccent==="primary"?{bar:i,icbg:a.pContainer,icc:a.onPContainer,dot:i}:e.notifAccent==="mono"?{bar:a.textSecondary,icbg:a.paper2,icc:a.textPrimary,dot:a.textSecondary}:{bar:e.warningHex,icbg:g,icc:h,dot:e.warningHex};let Et;e.notifStyle==="toast"?Et={boxShadow:Ne[8],border:typeof Xe=="string"&&Xe!=="none"?Xe:"none"}:e.notifStyle==="banner"?Et={boxShadow:Ne[2],borderLeft:"4px solid "+Lr.bar}:Et={boxShadow:"none",border:"1px solid "+a.divider};const Jo=e.notifCardHex||(o?"#1e1e1e":"#ffffff"),qo={compact:"7px",default:"11px",comfortable:"16px"},Ko={compact:"6px",default:"12px",comfortable:"22px"},Xo={top:"flex-start",middle:"center",bottom:"flex-end"},Qo={left:"flex-start",center:"center",right:"flex-end"},Zo={plain:"transparent",tinted:a.paper2,accent:a.highlightSoft},ei={rowPy:qo[e.tableDensity]||"11px",cellPx:Ko[e.tableColDensity]||"12px",rowBorder:e.tableDividers?(e.tableRowDivW||1)+"px solid "+a.divider:"none",colBorder:e.tableColDividers?(e.tableColDivW||1)+"px solid "+a.divider:"none",headBg:Zo[e.tableHeaderStyle]||a.paper2,cellAI:Xo[e.tableCellAlignV]||"center",cellJC:Qo[e.tableCellAlignH]||"flex-start",stripeBg:o?"rgba(255,255,255,0.035)":"rgba(0,0,0,0.028)",statusMap:{Delivered:{sb:x,sc:u},Processing:{sb:a.pContainer,sc:o?a.pLight:a.pDark},Pending:{sb:g,sc:h},Shipped:{sb:f,sc:b}},filters:["All","Delivered","Processing","Pending"].map((ge,be)=>({label:ge,bg:be===0?a.highlightSoft:"transparent",c:be===0?a.textPrimary:a.textSecondary,brd:be===0?a.highlightBd:a.outline}))},ti={sm:"Small",df:"Default",lg:"Large"},ri={compact:"Compact",default:"Default",comfortable:"Comfortable"},ni={outlined:"Outlined",soft:"Soft",floating:"Floating"},oi={sharp:"Sharp",rounded:"Rounded",round:"Round"},ii=[{key:"sidebar",label:"Sidebar",desc:"Full drawer",ic:"▤"},{key:"rail",label:"Rail",desc:"Icons only",ic:"▥"},{key:"topbar",label:"Top Bar",desc:"Horizontal",ic:"▦"}],ai=e.fontFamily+" · "+(ti[e.textSize]||"Default"),si=(oi[e.radiusPreset]||"Custom")+" · "+(ri[e.density]||"Default")+" · "+(ni[e.cardStyle]||"Soft"),li=[{label:"General",ic:"◉"},{label:"Appearance",ic:"◧"},{label:"Modules",ic:"◫"},{label:"Team",ic:"◍"},{label:"Security",ic:"▣"},{label:"Billing",ic:"◳"}].map((ge,be)=>({...ge,on:be===1,bg:be===1?a.highlightSoft:"transparent",c:be===1?a.textPrimary:a.textSecondary,bar:be===1?"3px solid "+a.highlight:"3px solid transparent"})),ci=ii.map(ge=>({...ge,active:e.navPattern===ge.key,brd:e.navPattern===ge.key?i:a.divider,bg:e.navPattern===ge.key?a.pContainer:a.paper,color:e.navPattern===ge.key?a.onPContainer:a.textPrimary})),di=e.sidebarWidth,pi=e.appBarH>0?e.appBarH:56,ui=e.appBarH>0?e.appBarH+"px":"Auto (56px)";return{pal:r,spal:t,isDark:o,pMain:i,sMain:s,t:a,errSoft:d,warnSoft:g,infoSoft:f,sucSoft:x,errTxt:m,warnTxt:h,infoTxt:b,sucTxt:u,sevMap:yo,accentBg:X,btnText:Q,hc1:Y,hc2:c,hc3:$,hc4:H,hc5:z,hc6:N,base:q,bodyLH:E,h1base:I,tDisplay:K,tH1:G,tH2:U,tTitle:D,tH4:C,tH5:A,tH6:F,tBody:B,tBodySm:O,tCaption:ee,tOverline:W,wH1:fe,wH2:fe,wH3:fe,wH4:fe,wH5:fe,wH6:fe,headLH:Me,bodyWeightEff:We,bwEmph:Je,pad:tr,padSm:ze,gap:Tt,rowPy:Ke,screenPad:_e,r:Z,rad:ft,radSm:ht,SH:Ne,cardShadow:gt,cardBorder:Xe,btnShadow:Bt,cardHdrBg:Rt,cardHdrBorder:Ar,cardHdrAccent:rr,appbarShadow:ao,appbarBorder:so,nestBorder:lo,nestShadow:co,iconInitials:po,hasLogo:uo,hasLoginImage:fo,headFam:ho,bodyFam:go,chartHue:ye,chartPalette:xo,avatarColors:mo,overlaySurface:bo,onOverlay:vo,overlayBorder:So,mediaBg:Co,loginBrandGrad:wo,loginScrimGrad:jo,loginCenteredGrad:ko,loginScrimGradC:To,headerBg:Eo,canvasBg:Ho,accountPageBg:Po,accountCardBg:Ao,brandGradient:Do,gsAccentGradient:Oo,gsModalBgDark:Wo,gsArrowGradient:_o,loginPanelGradient:Uo,reportsAccentTileGradient:Lo,reportsAccentCtaGradient:No,reportsModalInnerHighlight:Vo,npos:Yo,nacc:Lr,toastDeco:Et,toastBg:Jo,btnCase:e.btnCase!=="none"?"uppercase":"none",table:ei,typeSummary:ai,shapeSummary:si,settingsCats:li,navSettingsChips:ci,sidebarWidth:di,appBarHEff:pi,appBarHLabel:ui}}function xl({icon:e,title:r,info:t,open:o,dimmed:i,onToggle:s,onPreviewMenu:a,children:l}){const d=V(v=>v.settings),g=d.mode==="dark",f=d.primaryHex||"#4F6BFF",x=Pe(d.mode),m=Se(f),h=Hr(d),b=o?g?ce(f,.22):ce(f,.1):"transparent",u=o?g?m[200]:m[700]:x.text,y=o?f:x.chevron;return n.jsxs(p.Box,{sx:{background:b,opacity:i?.3:1,transform:o?"translateY(-2px)":"none",transition:"opacity .22s ease, transform .22s ease",borderBottom:`1px solid ${x.divider}`,overflow:"hidden"},children:[n.jsxs(p.Box,{component:"button",onClick:s,sx:{width:"100%",display:"flex",alignItems:"center",gap:"9px",p:"7px 11px",background:"transparent",border:"none",textAlign:"left",cursor:"pointer",fontFamily:"inherit"},children:[n.jsx(p.Box,{sx:{width:32,height:32,borderRadius:"10px",background:x.iconTile,color:x.body,display:"grid",placeItems:"center",flexShrink:0,position:"relative"},children:e}),n.jsx(p.Box,{sx:{flex:1,minWidth:0},children:n.jsx(p.Box,{sx:{fontSize:`${h.tH5}px`,fontWeight:h.wH5,fontFamily:`${h.headFam},sans-serif`,lineHeight:1.25,color:u,letterSpacing:"-.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),a&&n.jsx(p.Box,{component:"span",title:"Change preview screen",onClick:v=>{v.stopPropagation(),a()},sx:{width:16,height:16,mr:"6px",flexShrink:0,cursor:"pointer",display:"grid",placeItems:"center",color:x.chevron,transition:"filter .15s ease, transform .1s ease","&:hover":{filter:"brightness(1.15)",transform:"scale(1.12)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),n.jsx("path",{d:"M8 21h8M12 17v4"})]})}),t&&n.jsx(p.Box,{component:"span",title:t,sx:{width:15,height:15,borderRadius:"50%",border:`1.2px solid ${x.chevron}`,color:x.chevron,fontSize:"9px",fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"grid",placeItems:"center",mr:"7px",flexShrink:0,cursor:"help"},children:"i"}),n.jsx(p.Box,{sx:{width:20,height:20,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:"9px",color:y,flexShrink:0,transition:"background .18s, border-color .18s"},children:n.jsx(p.Box,{component:"span",sx:{display:"block",lineHeight:1,transform:o?"rotate(180deg)":"none",transition:"transform .2s"},children:"▼"})})]}),n.jsx(p.Collapse,{in:o,unmountOnExit:!0,timeout:280,children:n.jsx(p.Box,{sx:{p:"2px 13px 12px",borderTop:`1px solid ${x.divider}`},children:l})})]})}function ve(){const e=V(r=>r.settings);return _.useMemo(()=>Hr(e),[e])}function ot({tabs:e,active:r,onChange:t}){const o=V(m=>m.settings.mode),i=V(m=>m.settings.primaryHex)||"#4F6BFF",s=V(m=>m.settings.highlightHex)||"#ffd400",a=V(m=>m.settings.bodyWeight)||400,l=o==="dark",d=Math.min(900,a+200),g=ve(),f=l?"#e6edf3":"#1c2127",x=l?"#cdd4de":"#5a6573";return n.jsx(p.Box,{sx:{display:"flex",gap:"2px",mb:"2px",px:"2px",borderBottom:"1.5px solid rgba(120,130,145,0.5)"},children:e.map(m=>{const h=m.key===r,b=n.jsx(p.Button,{onClick:()=>t(m.key),disableRipple:!0,sx:{flex:1,minWidth:0,px:"2px",pt:"9px",pb:"8px",minHeight:44,borderRadius:"6px 6px 0 0",mb:"-1px",fontSize:`${g.tBodySm}px`,fontFamily:`${g.headFam},sans-serif`,fontWeight:h?d:a,letterSpacing:0,textTransform:"none",whiteSpace:"normal",lineHeight:1.15,textAlign:"center",color:h?f:x,opacity:h?1:.3,bgcolor:h?ce(s,l?.26:.18):"transparent",borderBottom:h?`3px solid ${i}`:"2px solid transparent",transition:"color .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease","&:hover":h?{bgcolor:ce(s,l?.26:.18)}:{opacity:1,bgcolor:"rgba(150,160,175,0.35)",borderRadius:"8px",boxShadow:"0 6px 18px rgba(0,0,0,0.35)",transform:"translateY(-2px)"}},children:m.label},m.key);return m.info?n.jsx(p.Tooltip,{title:m.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:b},m.key):b})})}function ml(){var U,D;const[e,r]=_.useState("presets"),t=V(C=>C.settings),o=t.mode==="dark",i=t.highlightHex||"#ffd400",s=ce(i,o?.3:.18),a=o?"#e6edf3":"#1c2127",l=o?"rgba(255,255,255,0.82)":"#2c333d",d=V(C=>C.savedThemes),g=V(C=>C.applyPreset),f=V(C=>C.applySaved),x=V(C=>C.saveTheme),m=V(C=>C.updateSaved),h=V(C=>C.renameSaved),b=V(C=>C.deleteSaved),u=V(C=>C.importTheme),y=V(C=>C.set),v=V(C=>C.isDirty),k=V(C=>C.editingSavedId),R=V(C=>C.lastImportedId),S=d.find(C=>C.id===k),w=(C,A)=>{const F=new Blob([JSON.stringify({name:C,snap:A},null,2)],{type:"application/json"}),B=URL.createObjectURL(F),O=document.createElement("a");O.href=B,O.download=`${C.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}.theme.json`,O.click(),URL.revokeObjectURL(B)},[T,M]=_.useState("");_.useEffect(()=>{if(!T)return;const C=setTimeout(()=>M(""),5e3);return()=>clearTimeout(C)},[T]);const[P,X]=_.useState(null),Q=C=>{const A=d.map(O=>O.name.toLowerCase());let F=C,B=2;for(;A.includes(F.toLowerCase());)F=`${C} ${B++}`;return F},Y=C=>{var B;const A=(B=C.target.files)==null?void 0:B[0];if(!A)return;const F=new FileReader;F.onload=()=>{try{const O=JSON.parse(F.result),ee=O.snap??O;if(!al(ee)){M("Invalid theme file. The selected file is not a valid Theme Studio export.");return}const W=O.name||"Imported Theme";if(d.some(fe=>fe.name.toLowerCase()===W.toLowerCase())){X({name:W,snap:ee});return}M(""),u(W,ee)}catch{M("Invalid theme file. The selected file is not a valid Theme Studio export.")}},F.readAsText(A),C.target.value=""},[c,$]=_.useState(null),[H,z]=_.useState(!1),[N,J]=_.useState(""),[L,q]=_.useState(null),[E,I]=_.useState(null),K=(S==null?void 0:S.name)||((U=Ct.find(C=>C.id===t.presetId))==null?void 0:U.name)||((D=d.find(C=>C.id===t.presetId))==null?void 0:D.name)||"Custom Theme",G=(C,A)=>{const F=C.trim();return F?d.some(B=>B.name.toLowerCase()===F.toLowerCase()&&B.id!==A)?"Name already exists":"":"Name required"};return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"presets",label:"Presets",info:"Ready-made colour themes."},{key:"saved",label:"My Themes",info:"Your saved custom themes."},{key:"mode",label:"Mode",info:"Light / Dark."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="presets"&&n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:Ct.map(C=>{const A=t.presetId===C.id;return n.jsxs(p.Box,{onClick:()=>g(C.id,C.snap),title:`${C.name} — applies this colour palette`,sx:{display:"flex",alignItems:"center",gap:"9px",p:"9px 10px",borderRadius:"11px",cursor:"pointer",textAlign:"left",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:C.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:C.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{fontSize:"11px",fontWeight:600,color:A?a:l,lineHeight:1.3},children:C.name})]},C.id)})}),e==="saved"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[d.length===0&&n.jsx(p.Typography,{variant:"caption",sx:{color:"text.secondary",py:2,textAlign:"center"},children:"No saved themes yet."}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:.9},children:d.map(C=>{const A=k===C.id;return n.jsxs(p.Box,{onClick:()=>f(C),title:"Apply this saved theme",sx:{display:"flex",flexDirection:"column",gap:.9,p:"9px 10px",borderRadius:"11px",cursor:"pointer",position:"relative",border:`1px solid ${A?i:o?"#363d48":"#e3e8ee"}`,bgcolor:A?s:o?"#262b34":"#ffffff",transition:"all .14s ease"},children:[A&&R===C.id&&n.jsx(p.Tooltip,{title:"recently upload",arrow:!0,children:n.jsx(p.Box,{component:"span",sx:{position:"absolute",top:-2,right:0,width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"2px",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:20,height:11,borderRadius:"3px",bgcolor:C.snap.primaryHex}}),n.jsx(p.Box,{sx:{width:20,height:7,borderRadius:"2px",bgcolor:C.snap.secondaryHex}})]}),n.jsx(p.Box,{component:"span",sx:{flex:1,minWidth:0,fontSize:"11px",fontWeight:600,color:A?a:l,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal"},children:C.name}),n.jsx(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end"},children:n.jsx(p.Box,{component:"span",onClick:F=>{F.stopPropagation(),$({el:F.currentTarget,id:C.id})},sx:{cursor:"pointer",color:"text.muted",px:.5},children:"⋮"})})]})]},C.id)})}),T&&n.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1,bgcolor:"rgba(211,47,47,0.08)",border:"1px solid rgba(211,47,47,0.35)",borderRadius:"10px",px:1.5,py:1.25,color:"#b3261e"},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:15,lineHeight:1.4},children:"!"}),n.jsx(p.Box,{sx:{fontSize:12.5,lineHeight:1.4},children:T})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1,mt:1},children:[n.jsxs(p.Button,{size:"small",variant:"outlined",component:"label",sx:{flex:1,textTransform:"none"},children:["↑ Import",n.jsx("input",{hidden:!0,type:"file",accept:".json,application/json",onChange:Y})]}),n.jsx(p.Button,{size:"small",variant:"outlined",onClick:()=>w(K,t),sx:{flex:1,textTransform:"none"},children:"⤓ Download"}),n.jsx(p.Button,{size:"small",variant:"contained",disabled:!v(),onClick:()=>{J(S?S.name:""),z(!0)},sx:{flex:1,textTransform:"none"},children:"+ Save"})]})]}),e==="mode"&&n.jsx(p.Box,{sx:{display:"flex",gap:1},children:["light","dark"].map(C=>n.jsx(p.Button,{onClick:()=>y({mode:C}),variant:t.mode===C?"contained":"outlined",sx:{flex:1,textTransform:"capitalize"},children:C},C))})]}),n.jsxs(p.Menu,{open:!!c,anchorEl:c==null?void 0:c.el,onClose:()=>$(null),children:[n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);f(C),$(null)},children:"✏️ Edit"}),n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);q({id:C.id,name:C.name}),$(null)},children:"✎ Rename"}),n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);I({id:C.id,name:C.name}),$(null)},children:"🗑 Delete"}),n.jsx(p.MenuItem,{onClick:()=>{const C=d.find(A=>A.id===c.id);w(C.name,C.snap),$(null)},children:"⤓ Download"})]}),n.jsxs(p.Dialog,{open:H,onClose:()=>z(!1),children:[n.jsx(p.DialogTitle,{children:S?`Save changes to “${S.name}”`:"Save theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"Theme name",value:N,onChange:C=>J(C.target.value),error:!!G(N,S==null?void 0:S.id),helperText:G(N,S==null?void 0:S.id),sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>z(!1),children:"Cancel"}),S&&n.jsx(p.Button,{variant:"contained",disabled:!!G(N,S.id),onClick:()=>{m(S.id,N.trim(),t),z(!1)},children:"Update"}),n.jsx(p.Button,{variant:S?"outlined":"contained",disabled:!!G(N),onClick:()=>{x(N.trim()),z(!1)},children:S?"Save as New":"Save"})]})]}),n.jsxs(p.Dialog,{open:!!L,onClose:()=>q(null),children:[n.jsx(p.DialogTitle,{children:"Rename theme"}),n.jsx(p.DialogContent,{children:n.jsx(p.TextField,{autoFocus:!0,fullWidth:!0,size:"small",label:"New name",value:(L==null?void 0:L.name)??"",onChange:C=>q(A=>A&&{...A,name:C.target.value}),error:!!(L&&G(L.name,L.id)),helperText:L?G(L.name,L.id):"",sx:{mt:1}})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>q(null),children:"Cancel"}),n.jsx(p.Button,{variant:"contained",disabled:!!(L&&G(L.name,L.id)),onClick:()=>{h(L.id,L.name.trim()),q(null)},children:"Rename"})]})]}),n.jsxs(p.Dialog,{open:!!P,onClose:()=>X(null),children:[n.jsx(p.DialogTitle,{children:"Theme already exists"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["A theme named “",P==null?void 0:P.name,"” is already in My Themes. Upload it anyway as a copy?"]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>{X(null),M("You’ve selected a duplicate file — it already exists.")},children:"Cancel"}),n.jsx(p.Button,{variant:"contained",onClick:()=>{u(Q(P.name),P.snap),X(null)},children:"Yes, continue"})]})]}),n.jsxs(p.Dialog,{open:!!E,onClose:()=>I(null),children:[n.jsx(p.DialogTitle,{children:"Delete theme"}),n.jsx(p.DialogContent,{children:n.jsxs(p.Typography,{variant:"body2",children:["Delete “",E==null?void 0:E.name,"”? This cannot be undone."]})}),n.jsxs(p.DialogActions,{children:[n.jsx(p.Button,{onClick:()=>I(null),children:"Cancel"}),n.jsx(p.Button,{color:"error",variant:"contained",onClick:()=>{b(E.id),I(null)},children:"Delete"})]})]})]})}function yl({tip:e,sk:r}){return n.jsx(p.Box,{component:"span",title:e,sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${r.chevron}`,color:r.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",flexShrink:0,cursor:"help",verticalAlign:"middle"},children:"i"})}function Ze({children:e,tip:r,sk:t,mt:o}){const i=ve();return n.jsxs(p.Box,{sx:{fontSize:`${i.tCaption}px`,fontWeight:i.bwEmph,fontFamily:`${i.bodyFam},sans-serif`,color:t.label2,textTransform:"uppercase",letterSpacing:".5px",mb:"6px",mt:o?`${o}px`:0,display:"flex",alignItems:"center",gap:"5px"},children:[e,r&&n.jsx(yl,{tip:r,sk:t})]})}function dt({value:e,onChange:r,w:t=30,h:o=24,r:i=7,border:s,sk:a}){return n.jsx(p.Box,{sx:{width:t,height:o,borderRadius:`${i}px`,position:"relative",overflow:"hidden",flexShrink:0,background:e,border:s?`1px solid ${a.insetBd}`:"none"},children:n.jsx(p.Box,{component:"input",type:"color",value:e,onChange:l=>r(l.target.value),sx:{position:"absolute",top:-4,left:-4,width:t+10,height:o+10,opacity:0,cursor:"pointer",border:"none",p:0}})})}const bl=/^#[0-9a-fA-F]{6}$/;function vl({value:e,onCommit:r,onWarnChange:t}){const[o,i]=_.useState(!1),[s,a]=_.useState(e),[l,d]=_.useState(""),g=_.useRef(void 0);_.useEffect(()=>{o||a(e)},[e,o]),_.useEffect(()=>()=>clearTimeout(g.current),[]);const f=m=>{clearTimeout(g.current),d(m),t==null||t(m),m&&(g.current=setTimeout(()=>{d(""),t==null||t("")},3e3))},x=m=>{const h=m.trim();return bl.test(h)?(f(""),r(h),!0):(f("Enter a valid hex colour, e.g. #4F6BFF"),!1)};return o?n.jsx(p.InputBase,{autoFocus:!0,value:s,title:l||void 0,onChange:m=>{a(m.target.value)},onBlur:()=>{x(s)||a(e),i(!1)},onKeyDown:m=>{m.key==="Enter"&&x(s)&&i(!1),m.key==="Escape"&&(a(e),f(""),i(!1))},sx:{color:l?"#ffcdd2":"#fff",fontSize:"12.5px",fontWeight:700,width:100,position:"relative",zIndex:1}}):n.jsxs(p.Box,{component:"span",title:l||void 0,onClick:()=>{a(e),i(!0)},sx:{color:l?"#ffcdd2":"rgba(255,255,255,.85)",fontSize:"12.5px",fontWeight:700,cursor:"text",position:"relative",zIndex:1},children:[e," · tap to change"]})}function Sl(){const[e,r]=_.useState("brand"),[t,o]=_.useState(""),i=V(v=>v.settings),s=V(v=>v.set),a=Pe(i.mode),l=ve(),d={fontSize:"11.5px",color:a.body,fontWeight:600},g={fontSize:`${l.tBodySm}px`,color:a.body,fontWeight:l.bodyWeightEff,fontFamily:`${l.bodyFam},sans-serif`,lineHeight:l.bodyLH},f=i.primaryHex||"#4F6BFF",x=Se(f),m=[50,100,200,300,400,500,600,700,800,900].map(v=>x[v]),h=v=>s({...v,presetId:"custom"}),b=[{key:"h1Color",label:"H1 · Page Title"},{key:"h2Color",label:"H2 · Metric"},{key:"h3Color",label:"H3 · Card Title"},{key:"h4Color",label:"H4 · Section Label"},{key:"h5Color",label:"H5 · Caption"},{key:"h6Color",label:"H6 · Overline"}],u=[{key:"successHex",label:"Success"},{key:"warningHex",label:"Warning"},{key:"infoHex",label:"Info"},{key:"errorHex",label:"Error"}],y=[{key:"cardBgHex",label:"Card background",fb:"#ffffff"},{key:"cardHdrHex",label:"Card header",fb:"#f6f8fb"},{key:"pageBgHex",label:"Page background",fb:"#f4f6f9"},{key:"notifCardHex",label:"Notification background",fb:"#ffffff"}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"brand",label:"Brand",info:"Core brand colours — primary, secondary and the selection highlight colour used across the app."},{key:"text",label:"Text",info:"Heading and body text colours"},{key:"status",label:"Status",info:"Status colours & surface overrides"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px",display:"flex",flexDirection:"column",gap:"11px"},children:[e==="brand"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Primary brand colour — main/filled buttons, active sidebar item, links, focus rings, first chart series, and the login Sign-in button.",children:"Brand Color"}),n.jsxs(p.Box,{sx:{position:"relative",height:46,borderRadius:"11px",background:f,overflow:"hidden",display:"flex",alignItems:"center",px:"14px",boxShadow:`0 3px 10px ${f}44`},children:[n.jsx(vl,{value:f,onCommit:v=>h({primaryHex:v}),onWarnChange:o}),n.jsx(p.Box,{component:"input",type:"color",value:f,onChange:v=>h({primaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})]}),n.jsx(p.Box,{sx:{display:"flex",gap:"2px",borderRadius:"7px",overflow:"hidden",height:14,mt:"7px"},children:m.map((v,k)=>n.jsx(p.Box,{sx:{flex:1,background:v}},k))}),t&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:l.warnSoft,border:`1px solid ${l.warnTxt}`,color:l.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),t]})]}),n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Secondary accent — secondary/outlined buttons, switches & toggles, selected chips, and the second data series in charts.",children:"Secondary / Accent"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"9px",background:i.secondaryHex,overflow:"hidden"},children:n.jsx(p.Box,{component:"input",type:"color",value:i.secondaryHex,onChange:v=>h({secondaryHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]}),n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Accent colour used to draw attention — highlight panels, featured badges, callouts. Defaults to the brand colour.",children:"Highlight Colour"}),n.jsx(p.Box,{sx:{position:"relative",height:34,borderRadius:"8px",background:i.highlightHex||i.primaryHex,overflow:"hidden",border:`1px solid ${a.insetBd}`},children:n.jsx(p.Box,{component:"input",type:"color",value:i.highlightHex||i.primaryHex,onChange:v=>h({highlightHex:v.target.value}),sx:{position:"absolute",inset:0,width:"100%",height:"100%",opacity:0,cursor:"pointer",border:"none",p:0}})})]})]}),e==="text"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"11px"},children:[n.jsx(Ze,{sk:a,children:"Heading Text Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"9px"},children:b.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i[v.key]||"#1c2127",onChange:k=>s({[v.key]:k})}),n.jsx(p.Box,{component:"span",sx:g,children:v.label})]},v.key))}),n.jsx(Ze,{sk:a,children:"Body Text Colors"}),n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i.textPrimaryHex||"#1c2127",onChange:v=>s({textPrimaryHex:v})}),n.jsx(p.Box,{component:"span",sx:d,title:"Main body text colour.",children:"Primary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i.textSecondaryHex||"#5a6573",onChange:v=>s({textSecondaryHex:v})}),n.jsx(p.Box,{component:"span",sx:d,title:"Muted text colour.",children:"Secondary Text"})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"9px"},children:[n.jsx(dt,{sk:a,border:!0,value:i.dividerHex||"#e3e8ee",onChange:v=>s({dividerHex:v})}),n.jsx(p.Box,{component:"span",sx:d,title:"Divider / border colour.",children:"Divider"})]})]})]}),e==="status"&&n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:"7px"},children:[n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Success, warning, error & info colours — used for alerts, status pills, toasts and validation states.",children:"Status Colors"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:u.map(v=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"7px"},children:[n.jsx(dt,{sk:a,w:22,h:22,r:6,value:i[v.key],onChange:k=>s({[v.key]:k})}),n.jsx(p.Box,{component:"span",sx:d,children:v.label})]},v.key))})]}),n.jsxs(p.Box,{children:[n.jsx(Ze,{sk:a,tip:"Override the auto-generated surface colours. Leave on Auto to follow the surface tint & mode.",children:"Surfaces"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"7px"},children:y.map(v=>{const k=!!i[v.key];return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"8px",background:a.card,border:`1px solid ${a.insetBd}`,borderRadius:"9px",px:"9px",py:"5px"},children:[n.jsx(dt,{sk:a,w:22,h:22,r:6,border:!0,value:i[v.key]||v.fb,onChange:R=>s({[v.key]:R})}),n.jsx(p.Box,{component:"span",sx:{...d,flex:1},children:v.label}),k&&n.jsx(p.Box,{component:"button",title:"Reset to Auto",onClick:()=>s({[v.key]:""}),sx:{background:"transparent",border:`1px solid ${a.insetBd}`,borderRadius:"6px",color:a.muted,fontSize:"10px",fontWeight:700,px:"7px",py:"3px",cursor:"pointer"},children:"Auto"})]},v.key)})})]})]})]})]})}function xe(e){const{label:r,info:t,value:o,effective:i,min:s,max:a,step:l=1,unit:d="",autoLabel:g,autoValue:f=0,softMin:x,softMax:m,floorValue:h,floorReset:b,floorMessage:u,extra:y,onChange:v}=e,k=Pe(V(J=>J.settings.mode)),R=ve(),S=`${R.bodyFam},sans-serif`,[w,T]=_.useState(!1),[M,P]=_.useState(String(i)),[X,Q]=_.useState(""),Y=_.useRef(void 0);_.useEffect(()=>{w||P(String(i))},[i,w]),_.useEffect(()=>()=>clearTimeout(Y.current),[]);const c=J=>{clearTimeout(Y.current),Q(J),J&&(Y.current=setTimeout(()=>Q(""),3e3))},$=J=>x!=null&&J<x?`Below ${x}${d} may break the UI`:m!=null&&J>m?`Above ${m}${d} may break the UI`:"",H=()=>{c(u??`Minimum is ${b}${d} — reset`),v(b),P(String(b))},z=J=>{const L=parseFloat(J);if(isNaN(L)){c("Enter a number"),P(String(i));return}if(h!=null&&b!=null&&L<=h){H();return}const q=Math.min(a,Math.max(s,L));c(q!==L?`Must be between ${s}${d} and ${a}${d} — clamped to ${q}${d}`:$(q)),P(String(q)),v(q)},N=o===f&&g?g:`${i}${d}`;return n.jsxs(p.Box,{sx:{mb:1.5},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"8px"},children:[n.jsxs(p.Typography,{sx:{fontSize:`${R.tBodySm}px`,fontWeight:R.bwEmph,fontFamily:S,lineHeight:R.bodyLH,color:k.label2,display:"flex",alignItems:"center",gap:"5px"},children:[r,t&&n.jsx(p.Tooltip,{title:t,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${k.chevron}`,color:k.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:"5px",flexShrink:0},children:[w?n.jsx(p.InputBase,{autoFocus:!0,value:M,onChange:J=>P(J.target.value),onBlur:()=>{z(M),T(!1)},onKeyDown:J=>{J.key==="Enter"&&(z(M),T(!1)),J.key==="Escape"&&T(!1)},sx:{width:56,fontSize:`${R.tBodySm}px`,fontWeight:700,fontFamily:S,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsxs(p.Box,{component:"button",onClick:()=>{P(String(i)),T(!0)},sx:{display:"inline-flex",alignItems:"center",gap:"5px",fontFamily:S,fontSize:`${R.tBodySm}px`,fontWeight:800,color:k.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"7px",py:"2px",cursor:"pointer",lineHeight:1.3,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:[N,n.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block",flexShrink:0},children:[n.jsx("path",{d:"M12 20h9"}),n.jsx("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"})]})]}),y]})]}),n.jsx(p.Box,{component:"input",type:"range",min:s,max:a,step:l,value:i,onChange:J=>{const L=parseFloat(J.target.value);if(h!=null&&b!=null&&L<=h){H();return}c($(L)),v(L)},sx:{WebkitAppearance:"none",appearance:"none",width:"100%",height:"4px",m:0,p:0,display:"block",borderRadius:"2px",outline:"none",cursor:"pointer",background:"#dde3ea",accentColor:"primary.main","&::-webkit-slider-thumb":{WebkitAppearance:"none",width:18,height:18,borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"},"&::-moz-range-thumb":{width:18,height:18,border:"none",borderRadius:"50%",background:"#fff",cursor:"pointer",boxShadow:"0 1px 4px rgba(0,0,0,.25),0 0 0 1px rgba(0,0,0,.05)"}}}),X&&n.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center",gap:"6px",mt:"8px",px:"10px",py:"6px",borderRadius:"8px",bgcolor:R.warnSoft,border:`1px solid ${R.warnTxt}`,color:R.warnTxt,fontSize:12,fontWeight:600},children:[n.jsx(p.Box,{component:"span",sx:{fontSize:13,lineHeight:1},children:"⚠"}),X]})]})}const Rn=new Set;function oo(e,r){if(Rn.has(e))return;Rn.add(e);const t=document.createElement("style");t.textContent=`@font-face{font-family:'${e}';src:url('${r}');font-display:swap;}`,document.head.appendChild(t)}function En(e){e.forEach(r=>oo(r.name,r.dataUrl))}const Cl=[{key:"Roboto",label:"Roboto",sub:"Material"},{key:"Inter",label:"Inter",sub:"Enterprise"},{key:"DM Sans",label:"DM Sans",sub:"Modern"},{key:"Manrope",label:"Manrope",sub:"Geometric"},{key:"Plus Jakarta Sans",label:"Jakarta",sub:"Friendly"},{key:"Nunito Sans",label:"Nunito",sub:"Rounded"}],wl=[{key:"Figtree",label:"Google Sans"},{key:"Roboto",label:"Roboto"},{key:"Inter",label:"Inter"},{key:"Arial",label:"Arial"},{key:"Manrope",label:"Manrope"},{key:"Plus Jakarta Sans",label:"Jakarta"}];function It({label:e,fam:r,active:t,onClick:o}){const i=V(f=>f.settings.mode),s=V(f=>f.settings.primaryHex)||"#4F6BFF",a=V(f=>f.settings.highlightHex)||"#ffd400",l=i==="dark",d=Se(s),g=ce(a,l?.3:.18);return n.jsx(p.Box,{onClick:o,sx:{py:"17px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",border:`1px solid ${t?l?d[400]:s:l?"#363d48":"#e3e8ee"}`,bgcolor:t?g:l?"#262b34":"#ffffff",transition:"all .14s ease","&:hover":t?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:n.jsx(p.Box,{sx:{fontFamily:`${r}, sans-serif`,fontSize:13,fontWeight:700,lineHeight:1,color:t?l?d[200]:d[700]:l?"#aeb6c0":"#5a6573"},children:e})})}const jl=["woff2","woff","ttf","otf"],kl=10*1024*1024,Tl=e=>new Promise((r,t)=>{const o=new FileReader;o.onload=()=>r(o.result),o.onerror=()=>t(o.error),o.readAsDataURL(e)}),Bl=e=>new Promise(r=>{const t=setTimeout(()=>r(!1),5e3),o=new FileReader;o.onload=()=>{var a;clearTimeout(t);const i=new Uint8Array(o.result),s=((a=e.name.split(".").pop())==null?void 0:a.toLowerCase())||"";if(s==="woff2"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===50||s==="woff"&&i[0]===119&&i[1]===79&&i[2]===70&&i[3]===70||s==="otf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79||s==="ttf"&&i[0]===0&&i[1]===1&&i[2]===0&&i[3]===0||s==="ttf"&&i[0]===79&&i[1]===84&&i[2]===84&&i[3]===79)return r(!0);r(!1)},o.onerror=()=>{clearTimeout(t),r(!1)};try{o.readAsArrayBuffer(e.slice(0,4))}catch{clearTimeout(t),r(!1)}});function Hn({label:e,list:r,onAdd:t}){const o=Pe(V(f=>f.settings.mode)),i=ve(),[s,a]=_.useState(""),l=_.useRef(void 0);_.useEffect(()=>()=>clearTimeout(l.current),[]);const d=f=>{clearTimeout(l.current),a(f),f&&(l.current=setTimeout(()=>a(""),3e3))},g=async f=>{var k;const x=Array.from(f.target.files??[]);if(f.target.value="",!x.length)return;const m=[],h=[],b=[],u=[],y=[];for(const R of x){const S=((k=R.name.split(".").pop())==null?void 0:k.toLowerCase())||"";if(!jl.includes(S)){b.push(R.name);continue}if(R.size>kl){u.push(R.name);continue}if(!await Bl(R)){y.push(R.name);continue}const w=R.name.replace(/\.[^.]+$/,""),T=P=>P.toLowerCase()===w.toLowerCase();if(r.some(P=>T(P.name))||m.some(P=>T(P.name))){h.push(w);continue}const M=await Tl(R);oo(w,M),m.push({name:w,dataUrl:M})}m.length&&t(m);const v=[];h.length&&v.push(`Already added: ${h.join(", ")}`),b.length&&v.push(`Unsupported file type: ${b.join(", ")}`),u.length&&v.push(`Too large (max 10MB): ${u.join(", ")}`),y.length&&v.push(`Invalid font file: ${y.join(", ")}`),d(v.join(" · "))};return n.jsxs(p.Box,{sx:{mt:1.5},children:[n.jsxs(p.Box,{component:"label",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.75,bgcolor:o.inset,border:`1.5px dashed ${o.insetBd}`,borderRadius:"9px",p:1.5,cursor:"pointer",color:o.body,fontSize:11.5,fontWeight:600,fontFamily:`${i.bodyFam},sans-serif`,textAlign:"center"},children:["⬆ ",e,n.jsx(p.Box,{component:"span",sx:{color:o.muted},children:".woff2 / .ttf / .otf"}),n.jsx("input",{type:"file",accept:".woff2,.woff,.ttf,.otf",multiple:!0,onChange:g,style:{display:"none"}})]}),s&&n.jsxs(p.Box,{sx:{mt:.9,display:"flex",alignItems:"center",gap:.9,bgcolor:"error.main",borderRadius:2,px:1.4,py:.9,color:"error.contrastText",fontFamily:`${i.bodyFam},sans-serif`},children:[n.jsx(p.Box,{component:"span",sx:{fontWeight:900,fontSize:12},children:"✕"}),n.jsx(p.Box,{component:"span",sx:{fontSize:11.5},children:s})]})]})}const Rl={compact:1.15,default:1.25,airy:1.414};function El(){const e=V(f=>f.settings),r=V(f=>f.set),t=Pe(e.mode),o=ve(),[i,s]=_.useState(!1),a=e.scaleRatioCustom>0?e.scaleRatioCustom:Rl[e.scaleRatio]??1.25,[l,d]=_.useState(a.toFixed(2));_.useEffect(()=>{i||d(a.toFixed(2))},[a,i]);const g=()=>{const f=parseFloat(l);isNaN(f)||r({scaleRatioCustom:f}),s(!1)};return i?n.jsx(p.InputBase,{autoFocus:!0,value:l,onChange:f=>d(f.target.value),onBlur:g,onKeyDown:f=>{f.key==="Enter"&&g(),f.key==="Escape"&&s(!1)},sx:{width:56,fontSize:"11.5px",fontWeight:700,fontFamily:`${o.bodyFam},sans-serif`,border:"1.5px solid",borderColor:"primary.main",borderRadius:"6px",px:"6px",py:"3px","& input":{p:0,textAlign:"center"}}}):n.jsx(p.Box,{component:"button",title:"Configure scale ratio — each heading is the one above ÷ this value",onClick:()=>{d(a.toFixed(2)),s(!0)},sx:{display:"inline-grid",placeItems:"center",color:t.body,bgcolor:"rgba(130,140,155,0.14)",border:"1px solid rgba(130,140,155,0.28)",borderRadius:"6px",px:"6px",py:"3px",cursor:"pointer",fontFamily:`${o.bodyFam},sans-serif`,"&:hover":{bgcolor:"rgba(130,140,155,0.24)"}},children:n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})})}function Hl(){const[e,r]=_.useState("bodyFont"),t=V(i=>i.settings),o=V(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"bodyFont",label:"Body Font",info:"Typeface used for body / paragraph text (headings use the Heading Font)"},{key:"headFont",label:"Heading Font",info:"Choose a separate typeface for headings (or match the body font)"},{key:"headText",label:"Heading Text",info:"Fine-tune size & weight per heading level (H1–H4)"},{key:"bodyText",label:"Body Text",info:"Adjust base font size and line height for body copy"}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="bodyFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[Cl.map(i=>n.jsx(It,{label:i.label,sub:i.sub,fam:i.key,active:t.fontFamily===i.key,onClick:()=>o({fontFamily:i.key})},i.key)),t.customFonts.map(i=>n.jsx(It,{label:i.name,sub:"Custom",fam:i.name,active:t.fontFamily===i.name,onClick:()=>o({fontFamily:i.name})},i.name))]}),n.jsx(Hn,{label:"Upload custom font",list:t.customFonts,onAdd:i=>o({customFonts:[...i,...t.customFonts],fontFamily:i[0].name})})]}),e==="headFont"&&n.jsxs(n.Fragment,{children:[n.jsxs(p.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:"10px"},children:[wl.map(i=>n.jsx(It,{label:i.label,fam:i.key,active:t.headingFont===i.key,onClick:()=>o({headingFont:i.key})},i.key)),t.customHeadFonts.map(i=>n.jsx(It,{label:i.name,sub:"Custom",fam:i.name,active:t.headingFont===i.name,onClick:()=>o({headingFont:i.name})},i.name))]}),n.jsx(Hn,{label:"Upload heading font",list:t.customHeadFonts,onAdd:i=>o({customHeadFonts:[...i,...t.customHeadFonts],headingFont:i[0].name})})]}),e==="headText"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"H1 size",info:"All heading levels scale from H1 by a modular ratio (configurable via the gear icon).",value:t.h1Size,effective:t.h1Size||20,min:18,max:56,unit:"px",extra:n.jsx(El,{}),onChange:i=>o({h1Size:i})}),n.jsx(xe,{label:"Weight (all headings)",value:t.headingWeight,effective:t.headingWeight,min:300,max:900,step:100,onChange:i=>o({headingWeight:i})}),n.jsx(xe,{label:"Line height (all headings)",value:t.headingLH,effective:t.headingLH||1.2,min:.9,max:2,step:.05,autoLabel:"Auto (1.20)",onChange:i=>o({headingLH:i})})]}),e==="bodyText"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"Base font size",info:"Root body text size.",value:t.baseFontPx,effective:t.baseFontPx||12,min:9,max:20,unit:"px",softMin:9,onChange:i=>o({baseFontPx:i})}),n.jsx(xe,{label:"Body weight",value:t.bodyWeight,effective:t.bodyWeight||400,min:300,max:900,step:100,autoLabel:"Auto (400)",onChange:i=>o({bodyWeight:i})}),n.jsx(xe,{label:"Body line height",value:t.bodyLineHeight,effective:t.bodyLineHeight||1.5,min:1.2,max:2,step:.05,autoLabel:"Auto (1.50)",onChange:i=>o({bodyLineHeight:i})})]})]})]})}function we({options:e,value:r,columns:t=3,onChange:o}){const i=V(v=>v.settings.mode),s=V(v=>v.settings.primaryHex)||"#4F6BFF",a=V(v=>v.settings.highlightHex)||"#ffd400",l=i==="dark",d=Se(s),g=ve(),f=`${g.bodyFam},sans-serif`,x=ce(a,l?.3:.18),m=l?d[400]:s,h=l?d[200]:d[700],b=l?"#262b34":"#ffffff",u=l?"#363d48":"#e3e8ee",y=l?"#aeb6c0":"#5a6573";return n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"6px"},children:e.map(v=>{const k=v.key===r,R=n.jsx(p.Box,{onClick:()=>o(v.key),sx:{py:"9px",px:"4px",borderRadius:"10px",textAlign:"center",cursor:"pointer",userSelect:"none",fontSize:`${g.tCaption}px`,fontWeight:k?g.bwEmph:g.bodyWeightEff,fontFamily:f,border:`1px solid ${k?m:u}`,bgcolor:k?x:b,color:k?h:y,transition:"color .14s ease, background .14s ease, border-color .14s ease","&:hover":k?{}:{borderColor:l?"#4a5361":"#c9d0d9"}},children:v.label},v.key);return v.info?n.jsx(p.Tooltip,{title:v.info,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:R},v.key):R})})}const Dt={outlined:0,soft:6,floating:24},Ft={plain:0,tinted:40,accent:60},Pl={bordered:0,recessed:6,lighter:4};function $l(){const[e,r]=_.useState("style"),t=V(d=>d.settings),o=V(d=>d.set),i=t.cardShadowPx>=0?t.cardShadowPx:Dt[t.cardStyle]??24,s=t.headerStrength>=0?t.headerStrength:Ft[t.cardHeader]??45,a=t.nestedDepth>=0?t.nestedDepth:Pl[t.nestedStyle]??6,l=t.tintIntensity>=0?t.tintIntensity:100;return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"style",label:"Style",info:"Card border vs shadow depth."},{key:"header",label:"Header",info:"Card header treatment."},{key:"nested",label:"Nested",info:"How cards-within-cards look."},{key:"tint",label:"Tint",info:"Overall surface tint colour & strength."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="style"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.cardStyle,onChange:d=>{const g=d;o({cardStyle:g,cardShadowPx:Dt[g]})},options:[{key:"outlined",label:"Outlined"},{key:"soft",label:"Soft"},{key:"floating",label:"Floating"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Shadow depth",info:"Card elevation (px).",value:t.cardShadowPx,effective:i,min:0,max:32,unit:"px",autoValue:-1,autoLabel:`Auto (${i}px)`,softMin:t.cardStyle==="outlined"?void 0:1,softMax:32,floorValue:t.cardStyle==="outlined"?void 0:0,floorReset:Dt[t.cardStyle],floorMessage:`${t.cardStyle==="soft"?"Soft":"Floating"} cards need shadow - reset to ${Dt[t.cardStyle]}px`,onChange:d=>o({cardShadowPx:d})})})]}),e==="header"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.cardHeader,onChange:d=>{const g=d;o({cardHeader:g,headerStrength:Ft[g]})},options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Header strength",info:"Header tint / accent intensity.",value:t.headerStrength,effective:s,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${s}%)`,softMin:t.cardHeader==="plain"?void 0:1,floorValue:t.cardHeader==="plain"?void 0:0,floorReset:Ft[t.cardHeader],floorMessage:`${t.cardHeader==="tinted"?"Tinted":"Accent"} headers need strength - reset to ${Ft[t.cardHeader]}%`,onChange:d=>o({headerStrength:d})})})]}),e==="nested"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.nestedStyle,onChange:d=>o({nestedStyle:d}),options:[{key:"recessed",label:"Recessed"},{key:"lighter",label:"Lighter"},{key:"bordered",label:"Bordered"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Nested depth",info:"Inset depth of cards-within-cards.",value:t.nestedDepth,effective:a,min:0,max:24,unit:"px",autoValue:-1,autoLabel:`Auto (${a}px)`,onChange:d=>o({nestedDepth:d})})})]}),e==="tint"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.surfaceTint,onChange:d=>o({surfaceTint:d}),options:[{key:"snow",label:"None"},{key:"neutral",label:"Low"},{key:"brand",label:"High"}]}),n.jsx(p.Box,{sx:{mt:1.5},children:n.jsx(xe,{label:"Tint intensity",info:"Strength of the page surface tint.",value:t.tintIntensity,effective:l,min:0,max:100,unit:"%",autoValue:-1,autoLabel:`Auto (${l}%)`,onChange:d=>o({tintIntensity:d})})})]})]})]})}function Al(){const[e,r]=_.useState("rows"),t=V(i=>i.settings),o=V(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"rows",label:"Rows",info:"Row density & dividers."},{key:"cols",label:"Columns",info:"Column density & dividers."},{key:"cells",label:"Cells",info:"Cell text & vertical alignment."},{key:"styling",label:"Styling",info:"Header background & row striping."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="rows"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableDensity,onChange:i=>o({tableDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableDividers,onChange:i=>o({tableDividers:i.target.checked})}),label:"Row dividers"}),t.tableDividers&&n.jsx(xe,{label:"Divider width",value:t.tableRowDivW,effective:t.tableRowDivW,min:1,max:4,unit:"px",onChange:i=>o({tableRowDivW:i})})]}),e==="cols"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableColDensity,onChange:i=>o({tableColDensity:i}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableColDividers,onChange:i=>o({tableColDividers:i.target.checked})}),label:"Column dividers"}),t.tableColDividers&&n.jsx(xe,{label:"Divider width",value:t.tableColDivW,effective:t.tableColDivW,min:1,max:4,unit:"px",onChange:i=>o({tableColDivW:i})})]}),e==="cells"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableCellAlignH,onChange:i=>o({tableCellAlignH:i}),options:[{key:"left",label:"Left"},{key:"center",label:"Center"},{key:"right",label:"Right"}]}),n.jsx(p.Box,{sx:{mt:1},children:n.jsx(we,{value:t.tableCellAlignV,onChange:i=>o({tableCellAlignV:i}),options:[{key:"top",label:"Top"},{key:"middle",label:"Middle"},{key:"bottom",label:"Bottom"}]})})]}),e==="styling"&&n.jsxs(n.Fragment,{children:[n.jsx(we,{value:t.tableHeaderStyle,onChange:i=>o({tableHeaderStyle:i}),options:[{key:"plain",label:"Plain"},{key:"tinted",label:"Tinted"},{key:"accent",label:"Accent"}]}),n.jsx(p.FormControlLabel,{sx:{mt:1},control:n.jsx(p.Switch,{checked:t.tableStripe,onChange:i=>o({tableStripe:i.target.checked})}),label:"Striped rows"})]})]})]})}const xr={compact:.82,default:1,comfortable:1.16};function Il(){const[e,r]=_.useState("shape"),t=V(d=>d.settings),o=V(d=>d.set),i=Pe(t.mode),s=t.densityScale>0?t.densityScale:Math.round((xr[t.density]??1)*100),a=t.cardGapPx>0?t.cardGapPx:Math.round(16*(xr[t.density]??1)),l=t.containerPadPx>0?t.containerPadPx:Math.round(10*(xr[t.density]??1));return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"shape",label:"Shape",info:"Corner radius & layout density."},{key:"effects",label:"Effects",info:"Spacing, button case & status chips."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="shape"&&n.jsxs(n.Fragment,{children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Corner Radius"}),n.jsx(we,{value:t.radiusPreset,onChange:d=>o({radiusPreset:d,radiusVal:d==="sharp"?0:d==="round"?18:9}),options:[{key:"sharp",label:"Sharp"},{key:"rounded",label:"Rounded"},{key:"round",label:"Round"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(xe,{label:"Exact radius",value:t.radiusVal,effective:t.radiusVal,min:0,max:28,unit:"px",onChange:d=>o({radiusVal:d,radiusPreset:"rounded"})})}),n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75,mt:.5},children:"Density"}),n.jsx(we,{value:t.densityScale>0?"":t.density,onChange:d=>o({density:d,densityScale:0}),options:[{key:"compact",label:"Compact"},{key:"default",label:"Default"},{key:"comfortable",label:"Comfortable"}]}),n.jsx(p.Box,{sx:{mt:1.25},children:n.jsx(xe,{label:"Exact density",info:"Fine-tune spacing scale (%).",value:t.densityScale,effective:s,min:60,max:140,unit:"%",onChange:d=>o({densityScale:d})})})]}),e==="effects"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"Card-to-card gap",value:t.cardGapPx,effective:a,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${a}px)`,onChange:d=>o({cardGapPx:d})}),n.jsx(xe,{label:"Container padding",value:t.containerPadPx,effective:l,min:0,max:40,step:2,unit:"px",autoLabel:`Auto (${l}px)`,onChange:d=>o({containerPadPx:d})}),n.jsx(xe,{label:"Edge gap",info:"Space between the preview frame and the outer app card.",value:t.edgePadPx,effective:t.edgePadPx,min:0,max:40,step:2,unit:"px",autoLabel:"0px (flush)",onChange:d=>o({edgePadPx:d})}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:1},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2},children:"Uppercase button labels"}),n.jsx(p.Switch,{size:"small",checked:t.btnCase==="upper",onChange:d=>o({btnCase:d.target.checked?"upper":"none"})})]}),n.jsxs(p.Box,{sx:{mt:1.25},children:[n.jsx(p.Typography,{variant:"caption",sx:{fontWeight:700,color:i.label2,textTransform:"uppercase",letterSpacing:".6px",display:"block",mb:.75},children:"Status Chips"}),n.jsx(we,{columns:2,value:t.statusBold?"bold":"soft",onChange:d=>o({statusBold:d==="bold"}),options:[{key:"soft",label:"Soft"},{key:"bold",label:"Bold"}]})]})]})]})]})}function Dl(){const[e,r]=_.useState("placement"),t=V(i=>i.settings),o=V(i=>i.set);return n.jsxs(n.Fragment,{children:[n.jsx(ot,{active:e,onChange:r,tabs:[{key:"placement",label:"Placement",info:"Where toasts appear."},{key:"behaviour",label:"Behaviour",info:"Width & auto-dismiss."}]}),n.jsxs(p.Box,{sx:{p:"12px 2px 2px"},children:[e==="placement"&&n.jsx(we,{columns:2,value:t.notifPosition,onChange:i=>o({notifPosition:i}),options:[{key:"top-center",label:"Top Center"},{key:"top-right",label:"Top Right"},{key:"bottom-left",label:"Bottom Left"},{key:"bottom-right",label:"Bottom Right"}]}),e==="behaviour"&&n.jsxs(n.Fragment,{children:[n.jsx(xe,{label:"Toast width",value:t.toastW,effective:t.toastW||252,min:200,max:500,unit:"px",softMax:500,onChange:i=>o({toastW:i})}),n.jsx(p.FormControlLabel,{sx:{mt:.5},control:n.jsx(p.Switch,{checked:t.notifBadge,onChange:i=>o({notifBadge:i.target.checked})}),label:"Show unread badge"}),n.jsx(p.FormControlLabel,{sx:{mt:.5,display:"flex"},control:n.jsx(p.Switch,{checked:t.notifAutoDismiss,onChange:i=>o({notifAutoDismiss:i.target.checked})}),label:"Auto-dismiss toasts"}),t.notifAutoDismiss&&n.jsx(xe,{label:"Dismiss after",value:t.autoDismissSec,effective:t.autoDismissSec||5,min:5,max:30,unit:"s",onChange:i=>o({autoDismissSec:i})})]})]})]})}function Fl({label:e,info:r,value:t,fallback:o,onChange:i,onReset:s}){const a=Pe(V(f=>f.settings.mode)),[l,d]=_.useState(null),g=t||o;return n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[n.jsx(p.Box,{onClick:f=>d(f.currentTarget),sx:{width:22,height:22,borderRadius:1.5,border:`1px solid ${a.insetBd}`,bgcolor:g,cursor:"pointer",flexShrink:0}}),n.jsxs(p.Typography,{variant:"caption",sx:{flex:1,color:a.body,display:"flex",alignItems:"center",gap:.5},children:[e,r&&n.jsx(p.Tooltip,{title:r,arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:13,height:13,borderRadius:"50%",border:`1.1px solid ${a.chevron}`,color:a.chevron,fontSize:8,fontWeight:800,fontStyle:"italic",fontFamily:"Georgia, serif",display:"inline-grid",placeItems:"center",cursor:"help"},children:"i"})})]}),t&&s&&n.jsx(p.Box,{component:"span",onClick:s,title:"Reset to theme default",sx:{fontSize:13,color:a.muted,cursor:"pointer"},children:"↺"}),n.jsx(p.Popover,{open:!!l,anchorEl:l,onClose:()=>d(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:n.jsx(p.Box,{sx:{p:1},children:n.jsx("input",{type:"color",value:g,onChange:f=>i(f.target.value),style:{width:160,height:40,border:"none",background:"none"}})})})]})}function Ol({src:e,aspect:r,onCancel:t,onConfirm:o}){const[i,s]=_.useState(1),[a,l]=_.useState({x:0,y:0}),d=_.useRef(null),g=_.useRef(null),f=_.useRef(null),x=_.useRef(null);_.useEffect(()=>{const b=y=>{x.current&&l({x:x.current.ox+(y.clientX-x.current.sx),y:x.current.oy+(y.clientY-x.current.sy)})},u=()=>{x.current=null};return document.addEventListener("pointermove",b),document.addEventListener("pointerup",u),()=>{document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",u)}},[]);const m=b=>{b.preventDefault(),x.current={sx:b.clientX,sy:b.clientY,ox:a.x,oy:a.y}},h=()=>{const b=d.current,u=g.current,y=f.current;if(!b||!u){o(e);return}const v=(y||b).getBoundingClientRect(),k=1e3,R=Math.round(k*r),S=R/v.width,w=document.createElement("canvas");w.width=R,w.height=k;const T=w.getContext("2d");if(!T){o(e);return}const M=u.getBoundingClientRect(),P=(M.left-v.left)*S,X=(M.top-v.top)*S,Q=M.width*S,Y=M.height*S;try{T.drawImage(u,P,X,Q,Y),o(w.toDataURL("image/png"))}catch{o(e)}};return hi.createPortal(n.jsx(p.Box,{sx:{position:"fixed",inset:0,zIndex:1400,bgcolor:"rgba(15,23,42,.6)",display:"flex",alignItems:"center",justifyContent:"center",p:2.25,overflow:"auto"},children:n.jsxs(p.Box,{sx:{width:"100%",maxWidth:320,bgcolor:"background.paper",border:"1px solid",borderColor:"divider",borderRadius:3,boxShadow:"0 20px 50px rgba(15,23,42,.4)",p:2},children:[n.jsx(p.Typography,{sx:{fontSize:14,fontWeight:800,mb:.5},children:"Adjust brand image"}),n.jsx(p.Typography,{sx:{fontSize:11.5,color:"text.secondary",mb:1.5,lineHeight:1.45},children:"Drag and zoom to fit your image inside the bright frame. Anything in the dimmed area is cropped out."}),n.jsxs(p.Box,{ref:d,onPointerDown:m,sx:{position:"relative",width:"100%",aspectRatio:String(r),borderRadius:2.5,overflow:"hidden",bgcolor:"#e9edf2",cursor:"grab",touchAction:"none",display:"grid",placeItems:"center","&:active":{cursor:"grabbing"}},children:[n.jsx("img",{ref:g,src:e,alt:"",draggable:!1,style:{position:"absolute",left:"50%",top:"50%",transform:`translate(-50%,-50%) translate(${a.x}px,${a.y}px) scale(${i})`,transformOrigin:"center",maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto",userSelect:"none",pointerEvents:"none"}}),n.jsx(p.Box,{ref:f,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"72%",aspectRatio:String(r),maxWidth:"90%",boxShadow:"0 0 0 9999px rgba(10,15,25,.62)",border:"2px solid #fff",borderRadius:"3px",pointerEvents:"none"}})]}),n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,my:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:12,fontWeight:700,color:"text.secondary"},children:"Zoom"}),n.jsx(p.Slider,{size:"small",min:.3,max:4,step:.02,value:i,onChange:(b,u)=>s(u)})]}),n.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:t,sx:{flex:1,p:1.25,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Cancel"}),n.jsx(p.Box,{component:"button",onClick:h,sx:{flex:1,p:1.25,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:12.5,fontWeight:700,cursor:"pointer"},children:"Confirm"})]})]})}),document.body)}function Ml(){const e=V(f=>f.settings),r=V(f=>f.set),t=Pe(e.mode),[o,i]=_.useState(null),s=(f,x)=>{var b;const m=(b=f.target.files)==null?void 0:b[0];if(!m)return;const h=new FileReader;h.onload=()=>i({src:h.result,aspect:x==="logoUrl"?3.5:1.55,target:x}),h.readAsDataURL(m),f.target.value=""},a=f=>{o&&(o.target==="logoUrl"?r({logoUrl:f,logoMode:"image"}):r({loginImage:f}),i(null))},l={fontSize:11,fontWeight:700,textTransform:"uppercase",letterSpacing:".6px"},d={display:"flex",alignItems:"center",justifyContent:"center",gap:1,border:`1.5px dashed ${t.insetBd}`,borderRadius:2.5,p:1.75,cursor:"pointer",color:t.body,fontSize:12.5,fontWeight:600,bgcolor:t.inset},g=(f,x)=>n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:1,p:.9,bgcolor:t.inset,border:`1px solid ${t.insetBd}`,borderRadius:2},children:[n.jsx(p.Typography,{variant:"caption",sx:{flex:1,minWidth:0,color:t.body,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f}),n.jsx(p.Box,{component:"button",onClick:x,title:"Remove",sx:{border:"none",background:"transparent",color:t.muted,cursor:"pointer",fontSize:14},children:"✕"})]});return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1.75},children:[n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Brand Image"}),n.jsxs(p.Box,{component:"label",sx:d,children:["⬆ Choose image",n.jsx("input",{hidden:!0,type:"file",accept:"image/*",onChange:f=>s(f,"loginImage")})]}),e.loginImage&&g("Uploaded image",()=>r({loginImage:""}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:1},children:"Logo"}),n.jsxs(p.Box,{component:"label",sx:d,children:["⬆ Choose logo file",n.jsx("input",{hidden:!0,type:"file",accept:"image/png,image/jpeg,image/svg+xml,image/webp",onChange:f=>s(f,"logoUrl")})]}),e.logoMode==="image"&&e.logoUrl&&g("Uploaded logo",()=>r({logoUrl:"",logoMode:"icon"}))]}),n.jsxs(p.Box,{children:[n.jsx(p.Typography,{variant:"caption",sx:{...l,color:t.label2,display:"block",mb:.5},children:"Panel Colour"}),n.jsx(Fl,{label:"Login panel background",value:e.loginPanelColor,fallback:e.primaryHex,onChange:f=>r({loginPanelColor:f}),onReset:()=>r({loginPanelColor:""})})]}),o&&n.jsx(Ol,{src:o.src,aspect:o.aspect,onCancel:()=>i(null),onConfirm:a})]})}const Wl=[{key:"dashboard",label:"Dashboard"},{key:"orders",label:"Orders"},{key:"reports",label:"Reports"},{key:"cameras",label:"Cameras"},{key:"operations",label:"Operations"},{key:"components",label:"Components"},{key:"login",label:"Login"}],zl=[{key:"dashboard",label:"Dashboard"},{key:"operations",label:"Operations"},{key:"cameras",label:"Cameras"},{key:"reports",label:"Reports"},{key:"orders",label:"Orders"},{key:"components",label:"Components"}],De=ro(e=>({openSection:"",setOpenSection:r=>e({openSection:r}),previewScreen:"dashboard",setPreviewScreen:r=>e({previewScreen:r}),previewMenuOpen:!1,setPreviewMenuOpen:r=>e({previewMenuOpen:r}),studioOpen:!0,setStudioOpen:r=>e({studioOpen:r}),defaultLoginImage:"",setDefaultLoginImage:r=>e({defaultLoginImage:r})}));function _l({onClose:e}){var D,C,A,F;const r=De(B=>B.openSection),t=De(B=>B.setOpenSection),o=De(B=>B.setPreviewScreen),i=De(B=>B.previewScreen),s=De(B=>B.previewMenuOpen),a=De(B=>B.setPreviewMenuOpen),l=V(B=>B.settings),d=V(B=>B.savedThemes),g=V(B=>B.editingSavedId),f=V(B=>B.isDirty),x=V(B=>B.set),m=V(B=>B.reset),h=Pe(l.mode),b=_.useRef("theme"),[u,y]=_.useState(!1),v=(B,O)=>{const ee=r!==B;t(ee?B:""),a(!1),ee&&b.current!==B&&(o(O),b.current=B)},k=((D=d.find(B=>B.id===g))==null?void 0:D.name)||((C=Ct.find(B=>B.id===l.presetId))==null?void 0:C.name)||((A=d.find(B=>B.id===l.presetId))==null?void 0:A.name)||"Custom Theme",R=f(),S=((F=Ct.find(B=>B.id===Ee.presetId))==null?void 0:F.name)??"default",w={fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},T=({children:B})=>n.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",...w,children:B}),M=n.jsxs(T,{children:[n.jsx("circle",{cx:"13.5",cy:"6.5",r:"2.5"}),n.jsx("circle",{cx:"17.5",cy:"10.5",r:"2.5"}),n.jsx("circle",{cx:"8.5",cy:"7.5",r:"2.5"}),n.jsx("circle",{cx:"6.5",cy:"12.5",r:"2.5"}),n.jsx("path",{d:"M12 2a10 10 0 0 0 0 20 3 3 0 0 0 0-6 2 2 0 0 1 0-4 4 4 0 0 0 4-4 6 6 0 0 0-4-6z"})]}),P=n.jsxs(p.Box,{sx:{display:"flex",gap:"2px",width:14,height:14},children:[n.jsx(p.Box,{sx:{flex:1,background:l.secondaryHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.errorHex,borderRadius:"2px"}}),n.jsx(p.Box,{sx:{flex:1,background:l.successHex,borderRadius:"2px"}})]}),X=n.jsxs(T,{children:[n.jsx("path",{d:"M4 20 9 5l5 15M6 14h6"}),n.jsx("path",{d:"M15 20l3-9 3 9M16.2 17h3.6"})]}),Q=n.jsxs(T,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18"})]}),Y=n.jsxs(T,{children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("path",{d:"M3 9h18M3 15h18M9 3v18"})]}),c=n.jsx(T,{children:n.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"4"})}),$=n.jsxs(n.Fragment,{children:[n.jsxs(T,{children:[n.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"}),n.jsx("path",{d:"M10 21a2 2 0 0 0 4 0"})]}),n.jsx(p.Box,{sx:{position:"absolute",top:"6px",right:"6px",width:7,height:7,borderRadius:"50%",background:l.primaryHex,border:`1.5px solid ${h.iconTile}`}})]}),H=n.jsxs(T,{children:[n.jsx("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),n.jsx("path",{d:"M10 17l5-5-5-5"}),n.jsx("path",{d:"M15 12H3"})]}),z=l.mode==="dark",N=B=>B.charAt(0).toUpperCase()+B.slice(1),J={sm:"Small",df:"Default",lg:"Large"},L={sharp:"Sharp",rounded:"Rounded",round:"Round"},q={compact:"Compact",default:"Default",comfortable:"Comfortable"},E={flat:"Flat",outlined:"Outlined",soft:"Soft",raised:"Raised",elevated:"Elevated",floating:"Floating"},I={split:"Split Brand",centered:"Centered Card"},K={"top-center":"Top Center","top-right":"Top Right","bottom-left":"Bottom Left","bottom-right":"Bottom Right"},G={theme:`${k} · ${z?"Dark":"Light"}`,color:"Secondary & status colours",type:`${l.fontFamily} · ${J[l.textSize]??"Default"}`,cards:"Card style, header, nesting & surface tint",tables:"Table row density, dividers, striping & header style — previewed on the Orders screen",shape:`${L[l.radiusPreset]??"Custom"} · ${q[l.density]??"Default"} · ${E[l.cardStyle]??""}`,notif:`${K[l.notifPosition]??""} · ${N(l.notifStyle)}`,login:`${I[l.loginLayout]??""}${l.loginImage?" · image":""}`},U=[{id:"theme",title:"Theme Settings",info:"Presets, saved themes & light/dark mode.",icon:M,screen:"dashboard",body:n.jsx(ml,{})},{id:"color",title:"Colour Settings",info:"Brand, text & status colours.",icon:P,screen:"components",body:n.jsx(Sl,{})},{id:"type",title:"Typography",info:"Fonts, sizes, weight & line-height.",icon:X,screen:"components",body:n.jsx(Hl,{})},{id:"cards",title:"Cards",info:"Card style, header, nesting & tint.",icon:Q,screen:"dashboard",body:n.jsx($l,{})},{id:"tables",title:"Tables",info:"Row/column density, dividers & alignment.",icon:Y,screen:"orders",body:n.jsx(Al,{})},{id:"shape",title:"Surface & Shape",info:"Radius, density, elevation & spacing.",icon:c,screen:"dashboard",body:n.jsx(Il,{})},{id:"notif",title:"Notifications",info:"Toast placement & behaviour.",icon:$,screen:"operations",body:n.jsx(Dl,{})},{id:"login",title:"Login Screen",info:"Brand image, logo & panel colour.",icon:H,screen:"login",body:n.jsx(Ml,{})}];return n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.1,borderBottom:`1px solid ${h.divider}`,bgcolor:h.card},children:[n.jsxs(p.Box,{sx:{display:"flex",gap:.5,flexShrink:0},children:[n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.primaryHex}}),n.jsx(p.Box,{sx:{width:13,height:13,borderRadius:"3px",bgcolor:l.secondaryHex}})]}),n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:"6px"},children:[n.jsx(p.Typography,{variant:"caption",sx:{minWidth:0,fontWeight:800,color:h.text,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k}),R&&n.jsx(p.Tooltip,{title:"Unsaved changes",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"error.main",flexShrink:0}})})]}),n.jsx(p.Tooltip,{title:"Reset to defaults",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>y(!0),sx:{bgcolor:"action.selected"},children:n.jsx(Ks,{sx:{fontSize:16}})})}),n.jsx(p.Tooltip,{title:l.mode==="dark"?"Switch to light":"Switch to dark",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{size:"small",onClick:()=>x({mode:l.mode==="dark"?"light":"dark"}),sx:{bgcolor:"action.selected"},children:l.mode==="dark"?n.jsx(Qs,{sx:{fontSize:16}}):n.jsx(Xs,{sx:{fontSize:16}})})})]}),s&&n.jsxs(p.Box,{sx:{borderBottom:"1px solid",borderColor:"divider",borderLeft:"3px solid #eab308",bgcolor:B=>B.palette.mode==="dark"?"rgba(234,179,8,0.14)":"#fef9c3",px:1.6,py:1.5},children:[n.jsx(p.Typography,{sx:{fontSize:10,fontWeight:800,textTransform:"uppercase",letterSpacing:".6px",color:B=>B.palette.mode==="dark"?"#f2cd5c":"#854d0e",mb:1},children:"Previewing Screen"}),n.jsx(p.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:.75},children:zl.map(B=>{const O=i===B.key;return n.jsx(p.Box,{component:"button",onClick:()=>{i!==B.key&&o(B.key),a(!1)},sx:{px:.75,py:1,borderRadius:2,cursor:"pointer",fontSize:11,fontWeight:O?800:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",border:"1.5px solid",borderColor:O?"#d4a915":"#e6dca8",bgcolor:O?"#fde68a":"background.paper",color:O?"#713f12":"text.secondary"},children:B.label},B.key)})})]}),U.map(B=>n.jsx(xl,{icon:B.icon,title:B.title,info:G[B.id]??B.info,open:r===B.id,dimmed:r!==""&&r!==B.id,onToggle:()=>v(B.id,B.screen),onPreviewMenu:()=>a(!s),children:B.body},B.id)),n.jsxs(p.Dialog,{open:u,onClose:()=>y(!1),PaperProps:{sx:{borderRadius:3,width:320,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Reset everything?"}),n.jsxs(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:["This reverts every change you've made — theme preset, light/dark mode, brand colours, logo, typography, cards, surface & shape, notifications and login screen — back to the default ",S," preset. This can't be undone."]}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{m(),y(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"error.main",color:"error.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Reset to defaults"}),n.jsx(p.Box,{component:"button",onClick:()=>y(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Cancel"})]})]})]})}const Ll=kt(n.jsx("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H3V4h18z"}),"DesktopWindowsOutlined");function Pr(e,r,t){const o=_.useRef(null),[i,s]=_.useState(e);return _.useLayoutEffect(()=>{const a=o.current;if(!a)return;const l=()=>{const x=a.children.length;if(!x)return;const m=parseFloat(getComputedStyle(a).rowGap)||0;let h=0;for(const y of Array.from(a.children))h+=y.offsetHeight;const b=h/x,u=a.clientHeight;u<=0||b<=0||s(Math.max(r,Math.min(t,Math.floor((u+m)/(b+m)))))};l();const d=requestAnimationFrame(l),g=setTimeout(l,300),f=new ResizeObserver(l);return f.observe(a),()=>{cancelAnimationFrame(d),clearTimeout(g),f.disconnect()}},[r,t]),[o,i]}function io(e,r,t){const o=_.useRef(null),i=_.useRef(null),[s,a]=_.useState(e);return _.useLayoutEffect(()=>{const l=i.current;if(!l)return;const d=()=>{var u;const m=Array.from(l.children).filter(y=>getComputedStyle(y).position!=="absolute"),h=m.length?m[0].offsetHeight:((u=o.current)==null?void 0:u.offsetHeight)||36,b=l.clientHeight;b<=0||h<=0||a(Math.max(r,Math.min(t,Math.floor(b/h))))};d();const g=requestAnimationFrame(d),f=setTimeout(d,300),x=new ResizeObserver(d);return x.observe(l),()=>{cancelAnimationFrame(g),clearTimeout(f),x.disconnect()}},[r,t]),[o,i,s]}const Nl=["Jan","Feb","Mar","Apr","May","Jun"],Vl=[44,60,50,74,88,96],Gl=[24,32,30,42,52,60];function Ul(){const e=ve(),r=V(D=>D.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,tH4:m,wH1:h,headFam:b,headLH:u,accentBg:y,btnText:v,tBodySm:k,bwEmph:R,btnCase:S,bodyWeightEff:w,bodyLH:T,tCaption:M,pMain:P,sMain:X}=e,Q=b+",sans-serif",Y=r.fontFamily+",sans-serif",c=e.hc1||t.textPrimary,$=e.hc2||t.textPrimary,H=e.hc3||t.textPrimary,z=[{label:"Revenue",val:"$2.41M",chg:"+12.5%",up:!0},{label:"Open Orders",val:"1,284",chg:"+3.2%",up:!0},{label:"Inventory",val:"8,540",chg:"-1.8%",up:!1},{label:"Active Users",val:"342",chg:"+5",up:!0}].map(D=>({...D,cc:D.up?e.sucTxt:e.errTxt,cb:D.up?e.sucSoft:e.errSoft,arrow:D.up?"▲":"▼"})),N=D=>D==="✓"?{cb:e.sucSoft,cc:e.sucTxt}:D==="!"?{cb:e.warnSoft,cc:e.warnTxt}:D==="+"?{cb:e.infoSoft,cc:e.infoTxt}:{cb:t.pContainer,cc:e.isDark?t.pLight:t.pDark},J=[{title:"Order ORD-1042 delivered to Acme Corp",time:"2m ago",ic:"✓"},{title:"Invoice #4821 paid — $12,400",time:"18m ago",ic:"$"},{title:"Low stock alert: Widget Pro (12 left)",time:"1h ago",ic:"!"},{title:"New customer onboarded: Globex Ltd",time:"3h ago",ic:"+"},{title:'Report "Q2 Summary" exported to PDF',time:"5h ago",ic:"▤"},{title:"Shipment SHP-2093 dispatched — Initech",time:"6h ago",ic:"✓"},{title:"Refund processed — $840 to Umbrella Co",time:"7h ago",ic:"$"},{title:"Payment overdue: Waystar Royco",time:"8h ago",ic:"!"},{title:"New support ticket — Stark Industries",time:"9h ago",ic:"+"},{title:"Backup completed — 12,480 records",time:"11h ago",ic:"✓"},{title:"Purchase order PO-771 approved",time:"13h ago",ic:"$"},{title:"Inventory reconciled — Warehouse 3",time:"15h ago",ic:"▤"},{title:"SLA breach warning — Hooli Inc",time:"17h ago",ic:"!"},{title:"New user invited — M. Fernandez",time:"19h ago",ic:"+"},{title:"Quarterly report scheduled",time:"21h ago",ic:"▤"},{title:"Order ORD-1039 delivered to Oscorp",time:"23h ago",ic:"✓"}].map(D=>({...D,...N(D.ic)})),[L,q]=Pr(5,4,J.length),E=J.slice(0,q),I=e.cardBorder==="none"?"none":e.cardBorder,K={background:t.paper,border:I,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},G={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},U={fontSize:x,lineHeight:u,fontWeight:h,color:H,fontFamily:Q};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:I,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Y,fontWeight:w,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:u,fontWeight:h,color:c,letterSpacing:"-.3px",fontFamily:Q},children:"Dashboard"}),n.jsx("span",{title:"Good morning, Admin · Jun 21, 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:R,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:y,color:v,fontSize:k,fontWeight:R,textTransform:S,letterSpacing:".4px",boxShadow:e.btnShadow,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New"})]}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{...K,marginBottom:l},children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:{...U},children:"Performance Overview"}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary,fontWeight:R},children:"This month"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l},children:z.map(D=>n.jsxs("div",{style:{background:t.paper2,border:e.nestBorder,borderRadius:i,boxShadow:e.nestShadow,padding:a},children:[n.jsx("div",{style:{fontSize:m,color:t.textSecondary,fontWeight:h,fontFamily:Q,textTransform:"uppercase",letterSpacing:".6px",marginBottom:8},children:D.label}),n.jsx("div",{style:{fontSize:f,fontWeight:h,color:$,letterSpacing:"-.8px",lineHeight:1,marginBottom:6},children:D.val}),n.jsxs("span",{style:{fontSize:M,fontWeight:R,color:D.cc,background:D.cb,padding:"3px 9px",borderRadius:999},children:[D.arrow," ",D.chg]})]},D.label))})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...K,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsxs("div",{style:G,children:[n.jsx("span",{style:U,children:"Revenue Trend"}),n.jsx("div",{style:{display:"flex",gap:12},children:[["Revenue",P],["Profit",X]].map(([D,C])=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[n.jsx("div",{style:{width:10,height:10,borderRadius:2,background:C}}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:D})]},D))})]}),n.jsx("div",{style:{padding:`${a}px ${s}px`,display:"flex",alignItems:"flex-end",gap:12,flex:1,minHeight:200},children:Nl.map((D,C)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:Gl[C]+"%",background:X,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:Vl[C]+"%",background:P,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:M,color:t.textSecondary},children:D})]},D))})]}),n.jsxs("div",{style:{...K,display:"flex",flexDirection:"column",minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:U,children:"Recent Activity"})}),n.jsx("div",{ref:L,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:4,flex:1,minHeight:0},children:E.map((D,C)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:8,borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:D.cb,color:D.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:R},children:D.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:k,color:t.textPrimary,fontFamily:Y,fontWeight:w,lineHeight:T,marginBottom:2},children:D.title}),n.jsx("div",{style:{fontSize:M,color:t.textSecondary,fontFamily:Y},children:D.time})]})]},C))})]})]})]})]})}const Yl=[{id:"ORD-1042",cust:"Acme Corporation",status:"Delivered",amt:"$12,400",date:"Jun 18"},{id:"ORD-1041",cust:"Globex Ltd",status:"Processing",amt:"$8,750",date:"Jun 17"},{id:"ORD-1040",cust:"Initech",status:"Pending",amt:"$5,200",date:"Jun 16"},{id:"ORD-1039",cust:"Umbrella Co",status:"Shipped",amt:"$22,100",date:"Jun 15"},{id:"ORD-1038",cust:"Waystar Royco",status:"Delivered",amt:"$9,800",date:"Jun 14"},{id:"ORD-1037",cust:"Stark Industries",status:"Processing",amt:"$31,500",date:"Jun 13"},{id:"ORD-1036",cust:"Wayne Enterprises",status:"Delivered",amt:"$18,240",date:"Jun 12"},{id:"ORD-1035",cust:"Soylent Corp",status:"Pending",amt:"$4,120",date:"Jun 11"},{id:"ORD-1034",cust:"Hooli Inc",status:"Shipped",amt:"$27,900",date:"Jun 10"},{id:"ORD-1033",cust:"Cyberdyne Systems",status:"Delivered",amt:"$14,650",date:"Jun 09"},{id:"ORD-1032",cust:"Massive Dynamic",status:"Processing",amt:"$10,300",date:"Jun 08"},{id:"ORD-1031",cust:"Tyrell Corp",status:"Delivered",amt:"$16,780",date:"Jun 07"},{id:"ORD-1030",cust:"Oscorp",status:"Shipped",amt:"$7,940",date:"Jun 06"},{id:"ORD-1029",cust:"Nakatomi Trading",status:"Pending",amt:"$3,560",date:"Jun 05"},{id:"ORD-1028",cust:"Gekko & Co",status:"Delivered",amt:"$25,300",date:"Jun 04"},{id:"ORD-1027",cust:"Bluth Company",status:"Processing",amt:"$6,410",date:"Jun 03"}],mr="100px 1fr 120px 100px 80px 70px";function Jl(){const e=ve(),r=V(q=>q.settings),{t,rad:o,radSm:i,pad:s,padSm:a,screenPad:l,rowPy:d,tH1:g,wH1:f,headFam:x,headLH:m,accentBg:h,btnText:b,btnShadow:u,tBody:y,tBodySm:v,tCaption:k,tOverline:R,bwEmph:S,btnCase:w,bodyWeightEff:T,pMain:M,table:P}=e,X=x+",sans-serif",Q=r.fontFamily+",sans-serif",Y=e.hc1||t.textPrimary,[c,$,H]=io(12,3,16),z=Yl.slice(0,H).map((q,E)=>({...q,...P.statusMap[q.status]||{sb:t.divider,sc:t.textSecondary},rowBg:r.tableStripe&&E%2===1?P.stripeBg:"transparent"})),N=e.cardBorder==="none"?"none":e.cardBorder,J=q=>({fontSize:R,fontWeight:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px",borderRight:P.colBorder,alignSelf:"stretch",display:"flex",alignItems:P.cellAI,justifyContent:P.cellJC,padding:`${P.rowPy} ${P.cellPx}`}),L={alignSelf:"stretch",display:"flex",alignItems:P.cellAI,justifyContent:P.cellJC,padding:`${P.rowPy} ${P.cellPx}`};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:N,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:Q,fontWeight:T,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:m,fontWeight:f,color:Y,letterSpacing:"-.3px",fontFamily:X},children:"Orders"}),n.jsx("span",{title:"1,284 orders · June 2026",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:S,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:h,color:b,fontSize:v,fontWeight:S,textTransform:w,letterSpacing:".4px",boxShadow:u,whiteSpace:"nowrap",cursor:"pointer"},children:"+ New Order"})]}),n.jsx("div",{style:{padding:l,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:N,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",flex:1,minHeight:0},children:[n.jsxs("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",gap:9,alignItems:"center",flexWrap:"wrap"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:t.paper,border:"1.5px solid "+t.divider,borderRadius:999,padding:"8px 15px",flex:1,minWidth:170},children:[n.jsx("span",{style:{color:t.textSecondary,fontSize:13},children:"⌕"}),n.jsx("span",{style:{fontSize:v,color:t.textSecondary},children:"Search orders…"})]}),P.filters.map(q=>n.jsx("button",{style:{padding:"7px 14px",borderRadius:999,border:"1px solid "+q.brd,background:q.bg,color:q.c,fontSize:k,fontWeight:S,whiteSpace:"nowrap",cursor:"pointer"},children:q.label},q.label))]}),n.jsxs("div",{ref:c,style:{display:"grid",gridTemplateColumns:mr,padding:`0 ${s}px`,borderBottom:P.rowBorder,background:P.headBg},children:[["Order ID","Customer","Status","Amount","Date"].map(q=>n.jsx("div",{style:J(),children:q},q)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${P.rowPy} 0`}})]}),n.jsxs("div",{ref:$,style:{position:"relative",display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsxs("div",{style:{position:"absolute",inset:0,padding:`0 ${s}px`,display:"grid",gridTemplateColumns:mr,pointerEvents:"none",zIndex:2},children:[n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{style:{borderRight:P.colBorder}}),n.jsx("div",{})]}),z.map(q=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:mr,padding:`0 ${s}px`,borderBottom:P.rowBorder,alignItems:"stretch",background:q.rowBg},children:[n.jsx("div",{style:{...L,fontSize:v,fontWeight:S,color:M,fontFamily:Q},children:q.id}),n.jsx("div",{style:{...L,fontSize:y,color:t.textPrimary,fontWeight:S},children:q.cust}),n.jsx("div",{style:L,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:k,fontWeight:S,background:q.sb,color:q.sc,whiteSpace:"nowrap"},children:q.status})}),n.jsx("div",{style:{...L,fontSize:y,color:t.textPrimary,fontWeight:S},children:q.amt}),n.jsx("div",{style:{...L,fontSize:v,color:t.textSecondary},children:q.date}),n.jsx("div",{style:L,children:n.jsx("button",{style:{fontSize:k,color:M,background:t.pContainer,border:"none",fontWeight:S,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"View"})})]},q.id))]}),n.jsxs("div",{style:{padding:`${d}px ${s}px`,display:"flex",alignItems:"center",gap:7,borderTop:"1px solid "+t.divider},children:[n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,flex:1},children:["Showing 1–",z.length," of 1,284"]}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"‹"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"none",background:h,color:b,fontWeight:S,cursor:"pointer"},children:"1"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"2"}),n.jsx("button",{style:{width:32,height:32,borderRadius:i,border:"1px solid "+t.outline,background:"transparent",color:t.textSecondary,cursor:"pointer"},children:"›"})]})]})})]})}function ql(){const e=ve(),r=V(Z=>Z.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,tH4:m,tH5:h,tH6:b,tBody:u,tBodySm:y,tCaption:v,wH1:k,headFam:R,headLH:S,accentBg:w,btnText:T,btnShadow:M,bwEmph:P,btnCase:X,bodyWeightEff:Q,bodyLH:Y,pMain:c,errSoft:$,errTxt:H,warnSoft:z,warnTxt:N,infoSoft:J,infoTxt:L,sucSoft:q,sucTxt:E}=e,I=R+",sans-serif",K=r.fontFamily+",sans-serif",G=e.t.highlight,U=e.t.highlightSoft,D=e.t.highlightBd,C=t.pContainer,A=t.onPContainer,F=t.pContrast,B=e.hc1||t.textPrimary,O=e.hc2||t.textPrimary,ee=e.hc3||t.textPrimary,W=e.hc4||t.textPrimary,fe=e.hc5||t.textPrimary,Me=e.hc6||t.textPrimary,We=e.cardBorder==="none"?"none":e.cardBorder,Je={display:"flex",flexDirection:"column",background:t.paper,border:We,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",height:"100%"},qe={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},Be={fontSize:x,lineHeight:S,fontWeight:k,color:ee,fontFamily:I},tr=[{label:"Dashboard Overview",size:g,w:k,color:B,lh:1.1,ls:"-.5px",name:"H1",border:!0},{label:"Revenue Report",size:f,w:k,color:O,lh:1.1,ls:"-.4px",name:"H2",border:!0},{label:"Performance Overview",size:x,w:k,color:ee,lh:1.15,name:"H3",border:!0},{label:"Active Users",size:m,w:k,color:W,lh:1.2,name:"H4",border:!0},{label:"Last updated 2m ago",size:h,w:k,color:fe,lh:1.25,name:"H5",border:!0},{label:"Status · Live",size:b,w:k,color:Me,lh:1.3,name:"H6",border:!0}],ze=Z=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"11px 12px",borderBottom:"1px solid "+t.divider,background:Z?U:"transparent",boxShadow:Z?"inset 3px 0 0 "+G:"none"},children:[n.jsx("div",{style:{width:16,height:16,borderRadius:"50%",border:"2px solid "+(Z?G:t.outline),display:"grid",placeItems:"center",flexShrink:0},children:Z&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:G}})}),n.jsx("span",{style:{flex:1,fontSize:y,fontFamily:K,fontWeight:Z?P:Q,color:t.textPrimary},children:Z?"Selected item":"Unselected item"}),Z&&n.jsx("span",{style:{fontSize:v,fontFamily:K,fontWeight:P,color:t.textSecondary},children:"Active"})]}),Tt=(Z,ft,ht)=>n.jsxs("div",{style:{position:"relative",border:Z?"2px solid "+c:"1.5px solid "+t.outline,borderRadius:i,padding:"12px 13px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:10,background:t.paper,padding:"0 5px",fontSize:v,color:Z?c:t.textSecondary,fontWeight:Z?P:void 0},children:ft}),n.jsx("span",{style:{fontSize:u,color:Z?t.textPrimary:t.textSecondary},children:ht})]}),Ke=(Z,ft,ht)=>n.jsx("span",{style:{padding:"5px 13px",borderRadius:999,background:Z,color:ft,fontSize:v,fontWeight:P},children:ht}),_e=Z=>({padding:"9px 20px",borderRadius:i,fontSize:y,fontWeight:P,textTransform:X,letterSpacing:".4px",cursor:"pointer",...Z});return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:We,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:K,fontWeight:Q,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:S,fontWeight:k,color:B,letterSpacing:"-.3px",fontFamily:I},children:"Component Library"}),n.jsx("span",{title:"Every Material UI component reflects your live theme",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:P,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Typography Scale"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",justifyContent:"space-between",flex:1,minHeight:0,gap:6},children:[tr.map(Z=>n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,borderBottom:"1px solid "+t.divider,paddingBottom:14},children:[n.jsx("span",{style:{fontSize:Z.size,lineHeight:Z.lh,fontWeight:Z.w,color:Z.color,fontFamily:I,letterSpacing:Z.ls},children:Z.label}),n.jsxs("span",{style:{fontSize:Z.size,color:t.textSecondary,fontWeight:Z.w,whiteSpace:"nowrap",flexShrink:0,fontFamily:I},children:[Z.name," · ",Z.size]})]},Z.name)),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:u,lineHeight:Y,color:t.textPrimary,fontFamily:K,fontWeight:Q},children:"Body text — the quick brown fox jumps over the lazy dog."}),n.jsxs("span",{style:{fontSize:u,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:K},children:["Body · ",u]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[n.jsx("span",{style:{fontSize:v,lineHeight:Y,color:t.textSecondary,fontFamily:K,fontWeight:Q},children:"Caption & helper text style"}),n.jsxs("span",{style:{fontSize:v,color:t.textSecondary,fontWeight:Q,whiteSpace:"nowrap",flexShrink:0,fontFamily:K},children:["Caption · ",v]})]})]})]}),n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Selection States"})}),n.jsxs("div",{style:{padding:s,display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{display:"flex",gap:2,borderBottom:"1.5px solid "+t.divider},children:[n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textPrimary,background:U,borderBottom:"2.5px solid "+c,marginBottom:-1.5,borderRadius:"6px 6px 0 0"},children:"Overview"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textSecondary},children:"Activity"}),n.jsx("div",{style:{flex:1,textAlign:"center",padding:"8px 4px",fontSize:y,fontWeight:P,color:t.textSecondary},children:"Settings"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",border:"1px solid "+t.divider,borderRadius:i,overflow:"hidden"},children:[ze(!0),ze(!1),ze(!1),ze(!1),ze(!0),ze(!1)]}),n.jsx("div",{style:{display:"inline-flex",alignSelf:"flex-start",padding:"6px 12px",borderRadius:i,background:U,border:"1px solid "+D},children:n.jsx("span",{style:{fontSize:v,fontWeight:P,color:G},children:"2 selected items"})})]})]})]}),n.jsxs("div",{style:{...Je,height:"auto"},children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Inputs & Selection"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,marginBottom:l},children:[Tt(!1,"Outlined","Placeholder…"),Tt(!0,"Focused","Active value")]}),n.jsxs("div",{style:{display:"flex",gap:22,alignItems:"center",flexWrap:"wrap",paddingTop:a,borderTop:"1px solid "+t.divider},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:4,background:c,display:"grid",placeItems:"center",color:F,fontSize:11,fontWeight:P},children:"✓"}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Checkbox"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:18,height:18,borderRadius:"50%",border:"2px solid "+c,display:"grid",placeItems:"center"},children:n.jsx("div",{style:{width:9,height:9,borderRadius:"50%",background:c}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Radio"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:38,height:22,borderRadius:999,background:c,position:"relative"},children:n.jsx("div",{style:{position:"absolute",top:3,right:3,width:16,height:16,borderRadius:"50%",background:"#fff"}})}),n.jsx("span",{style:{fontSize:y,color:t.textPrimary},children:"Switch"})]})]})]})]}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:l,alignItems:"stretch"},children:[n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Buttons"})}),n.jsxs("div",{style:{padding:s,display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[n.jsx("button",{style:_e({border:"none",background:w,color:T,boxShadow:M}),children:"Contained"}),n.jsx("button",{style:_e({border:"1.5px solid "+c,background:"transparent",color:c}),children:"Outlined"}),n.jsx("button",{style:_e({border:"none",background:"transparent",color:c}),children:"Text"}),n.jsx("button",{style:_e({border:"none",background:C,color:A}),children:"Tonal"}),n.jsx("button",{style:_e({border:"none",background:w,color:T,boxShadow:M,borderRadius:999}),children:"Rounded"}),n.jsx("button",{style:_e({border:"none",background:$,color:H}),children:"Error"})]})]}),n.jsxs("div",{style:Je,children:[n.jsx("div",{style:qe,children:n.jsx("span",{style:Be,children:"Chips, Alerts & Progress"})}),n.jsxs("div",{style:{padding:s},children:[n.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:l},children:[Ke(C,A,"Primary"),Ke(q,E,"Success"),Ke(z,N,"Warning"),Ke(J,L,"Info"),Ke($,H,"Error")]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:7},children:[n.jsx("span",{style:{fontSize:y,color:t.textPrimary,fontWeight:P},children:"Revenue goal"}),n.jsx("span",{style:{fontSize:y,color:c,fontWeight:P},children:"74%"})]}),n.jsx("div",{style:{height:8,background:t.paper2,border:"1px solid "+t.divider,borderRadius:999,overflow:"hidden"},children:n.jsx("div",{style:{height:"100%",width:"74%",background:c,borderRadius:999}})})]})]})]})]})]})}const Kl=[{label:"Cameras Online",val:"5 / 6"},{label:"Recording",val:"4"},{label:"Motion Alerts",val:"2"},{label:"Storage Used",val:"82%"}],Xl=[{name:"CAM 01",loc:"Main Lobby",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 02",loc:"North Gate",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 03",loc:"Loading Bay",rec:!1,online:!0,time:"14:32:07"},{name:"CAM 04",loc:"Rooftop",rec:!0,online:!0,time:"14:32:08"},{name:"CAM 05",loc:"Parking Deck",rec:!1,online:!1,time:"—"},{name:"CAM 06",loc:"Server Room",rec:!0,online:!0,time:"14:32:08"}],Ql=[{cam:"CAM 04",label:"Motion detected — Rooftop",time:"just now",sev:"error"},{cam:"CAM 02",label:"Person identified — North Gate",time:"6m ago",sev:"info"},{cam:"CAM 01",label:"Loitering cleared — Main Lobby",time:"22m ago",sev:"success"},{cam:"CAM 06",label:"Door forced — Server Room",time:"34m ago",sev:"error"},{cam:"CAM 03",label:"Vehicle detected — Loading Bay",time:"48m ago",sev:"info"},{cam:"CAM 05",label:"Signal restored — Parking Deck",time:"1h ago",sev:"success"},{cam:"CAM 02",label:"Tailgating flagged — North Gate",time:"1h ago",sev:"error"},{cam:"CAM 04",label:"Crowd density normal — Rooftop",time:"2h ago",sev:"success"},{cam:"CAM 01",label:"Object left behind — Main Lobby",time:"2h ago",sev:"info"},{cam:"CAM 03",label:"Motion detected — Loading Bay",time:"3h ago",sev:"error"},{cam:"CAM 06",label:"Access granted — Server Room",time:"3h ago",sev:"success"},{cam:"CAM 05",label:"Camera offline — Parking Deck",time:"4h ago",sev:"error"},{cam:"CAM 02",label:"Face match — North Gate",time:"5h ago",sev:"info"},{cam:"CAM 01",label:"Queue length normal — Main Lobby",time:"6h ago",sev:"success"},{cam:"CAM 04",label:"Perimeter breach — Rooftop",time:"7h ago",sev:"error"},{cam:"CAM 03",label:"Package scanned — Loading Bay",time:"8h ago",sev:"info"}];function Zl(){const e=ve(),r=V(F=>F.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,wH1:m,headFam:h,headLH:b,accentBg:u,btnText:y,btnShadow:v,tBodySm:k,tCaption:R,tOverline:S,bwEmph:w,btnCase:T,bodyWeightEff:M,errSoft:P,errTxt:X,mediaBg:Q,overlaySurface:Y,overlayBorder:c,onOverlay:$,sevMap:H}=e,z=h+",sans-serif",N=r.fontFamily+",sans-serif",J=e.hc1||t.textPrimary,L=e.hc2||t.textPrimary,q=e.hc3||t.textPrimary,E=e.cardBorder==="none"?"none":e.cardBorder,I=Xl.map(F=>({...F,dotC:F.online?r.successHex:t.textDisabled})),[K,G]=Pr(3,3,16),U=Ql.slice(0,G).map(F=>({...F,...H[F.sev]})),D={background:t.paper,border:E,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},C={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},A={fontSize:x,lineHeight:b,fontWeight:m,color:q,fontFamily:z};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:E,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:N,fontWeight:M,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:b,fontWeight:m,color:J,letterSpacing:"-.3px",fontFamily:z},children:"Camera Surveillance"}),n.jsx("span",{title:"6 feeds · live monitoring & recording",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:w,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:R,fontWeight:w,color:X,background:P,padding:"6px 12px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]}),n.jsx("button",{style:{padding:"10px 18px",borderRadius:i,border:"none",background:u,color:y,fontSize:k,fontWeight:w,textTransform:T,letterSpacing:".4px",boxShadow:v,whiteSpace:"nowrap",cursor:"pointer"},children:"+ Add Camera"})]})]}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:Kl.map(F=>n.jsxs("div",{style:D,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:S,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:w},children:F.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:f,fontWeight:m,color:L,letterSpacing:"-.8px",lineHeight:1},children:F.val})})]},F.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:{...D,display:"flex",flexDirection:"column"},children:[n.jsxs("div",{style:C,children:[n.jsx("span",{style:A,children:"Camera Wall"}),n.jsx("span",{style:{fontSize:R,color:t.textSecondary,fontWeight:w},children:"2 × 3 grid"})]}),n.jsx("div",{style:{padding:s,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridAutoRows:"1fr",gap:l},children:I.map(F=>n.jsxs("div",{style:{position:"relative",borderRadius:i,overflow:"hidden",background:Q,minHeight:104,border:"1px solid "+t.divider},children:[n.jsx("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center"},children:n.jsx("span",{style:{fontFamily:"monospace",fontSize:R,color:"rgba(255,255,255,.3)",letterSpacing:1},children:F.loc})}),n.jsxs("div",{style:{position:"absolute",top:7,left:7,display:"flex",alignItems:"center",gap:5,background:Y,border:"1px solid "+c,borderRadius:999,padding:"2px 8px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:F.dotC}}),n.jsx("span",{style:{color:$,fontSize:R,fontWeight:700,letterSpacing:".4px"},children:F.name})]}),F.rec&&n.jsxs("div",{style:{position:"absolute",top:7,right:7,display:"flex",alignItems:"center",gap:4,background:Y,borderRadius:999,padding:"2px 7px"},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:r.errorHex}}),n.jsx("span",{style:{color:$,fontSize:8,fontWeight:800,letterSpacing:".5px"},children:"REC"})]}),F.online&&n.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,padding:"5px 8px",background:"linear-gradient(0deg,rgba(0,0,0,.7),rgba(0,0,0,0))",display:"flex",justifyContent:"space-between",alignItems:"center"},children:n.jsx("span",{style:{color:"#fff",fontSize:R,fontWeight:600,fontFamily:"monospace"},children:F.time})})]},F.name))})]}),n.jsxs("div",{style:{...D,display:"flex",flexDirection:"column"},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:A,children:"Recent Detections"})}),n.jsx("div",{ref:K,style:{padding:a,display:"flex",flexDirection:"column",justifyContent:"space-between",gap:2,flex:1,minHeight:0},children:U.map((F,B)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i},children:[n.jsx("div",{style:{width:28,height:28,borderRadius:i,background:F.cb,color:F.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:11,fontWeight:800,fontFamily:"monospace"},children:"●"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:k,color:t.textPrimary,fontWeight:M,lineHeight:1.35},children:F.label}),n.jsxs("div",{style:{fontSize:R,color:t.textSecondary,marginTop:2},children:[F.cam," · ",F.time]})]})]},B))})]})]})]})]})}const ec=[{ic:"!",label:"Camera 04 motion detected — Loading Bay",time:"just now",sev:"error",unread:!0},{ic:"✓",label:"Stream reconnected — North Gate feed",time:"4m ago",sev:"success",unread:!0},{ic:"i",label:"Access request — J. Okoro (Operator)",time:"22m ago",sev:"info",unread:!1},{ic:"!",label:"Report archive storage 82% full",time:"1h ago",sev:"warning",unread:!1},{ic:"✓",label:"Backup completed — 12,480 clips archived",time:"2h ago",sev:"success",unread:!1},{ic:"i",label:"Firmware update available — 3 devices",time:"3h ago",sev:"info",unread:!1},{ic:"!",label:"Camera 02 lens obstruction detected",time:"5h ago",sev:"error",unread:!1},{ic:"✓",label:"Nightly health check passed — all nodes",time:"6h ago",sev:"success",unread:!1},{ic:"i",label:"New operator invited — M. Fernandez",time:"7h ago",sev:"info",unread:!1},{ic:"!",label:"Bandwidth spike on West Wing uplink",time:"8h ago",sev:"warning",unread:!1},{ic:"✓",label:"Retention policy applied — 30 day window",time:"9h ago",sev:"success",unread:!1},{ic:"i",label:"Scheduled maintenance — Sat 02:00 UTC",time:"11h ago",sev:"info",unread:!1},{ic:"!",label:"Motion zone breach — Perimeter Gate 3",time:"12h ago",sev:"error",unread:!1},{ic:"✓",label:"Clip export finished — Incident #4821",time:"14h ago",sev:"success",unread:!1},{ic:"i",label:"Analytics model updated — v2.4.1",time:"16h ago",sev:"info",unread:!1},{ic:"!",label:"Disk latency elevated — NVR-02",time:"18h ago",sev:"warning",unread:!1}];function tc(){const e=ve(),r=V(A=>A.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tTitle:f,wH1:x,headFam:m,headLH:h,accentBg:b,btnText:u,tBodySm:y,tCaption:v,tOverline:k,bwEmph:R,bodyWeightEff:S,bodyLH:w,errSoft:T,errTxt:M,pMain:P,mediaBg:X,overlaySurface:Q,overlayBorder:Y,onOverlay:c,sevMap:$}=e,H=m+",sans-serif",z=r.fontFamily+",sans-serif",N=e.hc1||t.textPrimary,J=e.hc3||t.textPrimary,L=e.cardBorder==="none"?"none":e.cardBorder,[q,E]=Pr(7,4,16),I=ec.slice(0,E).map(A=>({...A,...$[A.sev],rowBg:A.unread?ce(r.primaryHex,e.isDark?.12:.05):"transparent"})),K=I.filter(A=>A.unread).length,G={display:"flex",flexDirection:"column",minHeight:0,background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},U={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},D={fontSize:f,lineHeight:h,fontWeight:x,color:J,fontFamily:H},C={height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:c,fontSize:v,fontWeight:R,cursor:"pointer",fontFamily:"inherit"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:z,fontWeight:S,color:t.textPrimary},children:[n.jsx("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:h,fontWeight:x,color:N,letterSpacing:"-.3px",fontFamily:H},children:"Operations Center"}),n.jsx("span",{title:"Live map, camera feeds, alerts & access — every module themed end to end",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:R,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]})}),n.jsx("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 320px",gap:l,flex:1,minHeight:0},children:[n.jsxs("div",{style:G,children:[n.jsxs("div",{style:U,children:[n.jsx("span",{style:D,children:"Live Map · Street View"}),n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:v,fontWeight:R,color:M,background:T,padding:"3px 10px",borderRadius:999},children:[n.jsx("span",{style:{width:7,height:7,borderRadius:"50%",background:r.errorHex}}),"LIVE"]})]}),n.jsxs("div",{style:{position:"relative",flex:1,minHeight:320,background:X,display:"flex",alignItems:"center",justifyContent:"center"},children:[n.jsx("span",{style:{fontFamily:"monospace",fontSize:v,color:"rgba(255,255,255,.42)",letterSpacing:1.5},children:"◍ GOOGLE STREET VIEW / EARTH EMBED"}),n.jsx("div",{style:{position:"absolute",top:12,left:12,display:"flex",alignItems:"center",gap:7,background:Q,border:"1px solid "+Y,borderRadius:999,padding:"6px 12px"},children:n.jsx("span",{style:{color:c,fontSize:v,fontWeight:R},children:"◎ 40.7128, -74.0060 · Manhattan"})}),n.jsxs("div",{style:{position:"absolute",bottom:12,left:"50%",transform:"translateX(-50%)",display:"flex",alignItems:"center",gap:4,background:Q,border:"1px solid "+Y,borderRadius:i,padding:5},children:[n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:b,color:u,fontSize:16,fontWeight:R,cursor:"pointer"},children:"+"}),n.jsx("button",{style:{width:30,height:30,borderRadius:i,border:"none",background:"rgba(255,255,255,.14)",color:c,fontSize:16,fontWeight:R,cursor:"pointer"},children:"−"}),n.jsx("div",{style:{width:1,height:18,background:Y,margin:"0 3px"}}),n.jsx("button",{style:{...C,padding:"0 12px"},children:"Layers"}),n.jsx("button",{style:{...C,padding:"0 12px"},children:"◎ Locate"})]})]})]}),n.jsxs("div",{style:G,children:[n.jsxs("div",{style:U,children:[n.jsx("span",{style:D,children:"Notifications"}),n.jsxs("span",{style:{fontSize:k,fontWeight:R,color:t.pContrast,background:P,padding:"2px 9px",borderRadius:999},children:[K," NEW"]})]}),n.jsx("div",{ref:q,style:{padding:a,display:"flex",flexDirection:"column",gap:2,flex:1,minHeight:0},children:I.map((A,F)=>n.jsxs("div",{style:{display:"flex",gap:11,alignItems:"flex-start",padding:"9px 8px",borderRadius:i,background:A.rowBg},children:[n.jsx("div",{style:{width:26,height:26,borderRadius:i,background:A.cb,color:A.cc,display:"grid",placeItems:"center",flexShrink:0,fontSize:13,fontWeight:R},children:A.ic}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:y,color:t.textPrimary,fontWeight:S,lineHeight:w},children:A.label}),n.jsx("div",{style:{fontSize:v,color:t.textSecondary,marginTop:2},children:A.time})]}),A.unread&&n.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:P,flexShrink:0,marginTop:6}})]},F))})]})]})})]})}const rc=[{label:"Reports Generated",val:"248"},{label:"Avg Generation",val:"1.2s"},{label:"Data Points",val:"84.2K"},{label:"Scheduled",val:"12"}],nc=["Jan","Feb","Mar","Apr","May","Jun"],oc=[44,60,50,74,88,96],ic=[24,32,30,42,52,60],ac=[{l:"Reports",h:72},{l:"Cameras",h:92},{l:"Alerts",h:40},{l:"Users",h:58},{l:"Storage",h:80}],sc=[{name:"Q2 Revenue Summary",type:"Financial",date:"Jun 20",status:"Ready"},{name:"Camera Uptime Audit",type:"Operations",date:"Jun 19",status:"Ready"},{name:"User Access Log",type:"Security",date:"Jun 18",status:"Ready"},{name:"Inventory Forecast",type:"Analytics",date:"Jun 17",status:"Processing"},{name:"Monthly KPI Digest",type:"Executive",date:"Jun 15",status:"Ready"},{name:"Incident Response Log",type:"Security",date:"Jun 14",status:"Ready"},{name:"Storage Utilization Report",type:"Operations",date:"Jun 13",status:"Ready"},{name:"Weekly Traffic Analysis",type:"Analytics",date:"Jun 12",status:"Processing"},{name:"Vendor SLA Compliance",type:"Financial",date:"Jun 11",status:"Ready"},{name:"Motion Event Rollup",type:"Operations",date:"Jun 10",status:"Ready"},{name:"Quarterly Audit Trail",type:"Security",date:"Jun 09",status:"Ready"},{name:"Energy Consumption Digest",type:"Analytics",date:"Jun 08",status:"Processing"},{name:"Executive Board Pack",type:"Executive",date:"Jun 07",status:"Ready"},{name:"Device Firmware Ledger",type:"Operations",date:"Jun 06",status:"Ready"},{name:"Access Anomaly Report",type:"Security",date:"Jun 05",status:"Ready"},{name:"Cost Allocation Summary",type:"Financial",date:"Jun 04",status:"Ready"}],Pn="1fr 130px 110px 90px 70px";function lc(){const e=ve(),r=V(O=>O.settings),{t,rad:o,radSm:i,pad:s,padSm:a,gap:l,screenPad:d,tH1:g,tH2:f,tTitle:x,wH1:m,headFam:h,headLH:b,accentBg:u,btnText:y,btnShadow:v,tBody:k,tBodySm:R,tCaption:S,tOverline:w,bwEmph:T,btnCase:M,bodyWeightEff:P,pMain:X,sMain:Q,chartPalette:Y,table:c}=e,$=h+",sans-serif",H=r.fontFamily+",sans-serif",z=e.hc1||t.textPrimary,N=e.hc2||t.textPrimary,J=e.hc3||t.textPrimary,L=e.cardBorder==="none"?"none":e.cardBorder,[q,E,I]=io(5,3,16),K=sc.slice(0,I).map((O,ee)=>({...O,sb:O.status==="Ready"?e.sucSoft:e.warnSoft,sc:O.status==="Ready"?e.sucTxt:e.warnTxt,rowBg:r.tableStripe&&ee%2===1?c.stripeBg:"transparent"})),G=ac.map((O,ee)=>({...O,c:Y[ee%Y.length]})),U={borderRight:c.colBorder,alignSelf:"stretch",display:"flex",alignItems:c.cellAI,justifyContent:c.cellJC,padding:`${c.rowPy} ${c.cellPx}`},D={alignSelf:"stretch",display:"flex",alignItems:c.cellAI,justifyContent:c.cellJC,padding:`${c.rowPy} ${c.cellPx}`},C={background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden"},A={padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"center",justifyContent:"space-between"},F={fontSize:x,lineHeight:b,fontWeight:m,color:J,fontFamily:$},B={fontSize:w,fontWeight:T,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".5px"};return n.jsxs("div",{style:{display:"flex",flexDirection:"column",background:t.paper,border:L,borderRadius:o,boxShadow:e.cardShadow,overflow:"hidden",fontFamily:H,fontWeight:P,color:t.textPrimary},children:[n.jsxs("div",{style:{padding:s,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent,display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:14},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{fontSize:g,lineHeight:b,fontWeight:m,color:z,letterSpacing:"-.3px",fontFamily:$},children:"Reports"}),n.jsx("span",{title:"Generated insights across every module",style:{width:16,height:16,borderRadius:"50%",border:"1.2px solid "+t.textSecondary,color:t.textSecondary,fontSize:9.5,fontWeight:T,fontStyle:"italic",fontFamily:"Georgia,serif",display:"grid",placeItems:"center",flexShrink:0,cursor:"help"},children:"i"})]}),n.jsx("button",{style:{padding:"10px 20px",borderRadius:i,border:"none",background:u,color:y,fontSize:R,fontWeight:T,textTransform:M,letterSpacing:".4px",boxShadow:v,whiteSpace:"nowrap",cursor:"pointer"},children:"↓ Export PDF"})]}),n.jsxs("div",{style:{padding:d,background:t.bgDefault,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:l,marginBottom:l},children:rc.map(O=>n.jsxs("div",{style:C,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:{fontSize:w,color:t.textSecondary,textTransform:"uppercase",letterSpacing:".6px",fontWeight:T},children:O.label})}),n.jsx("div",{style:{padding:`${a}px ${s}px`},children:n.jsx("div",{style:{fontSize:f,fontWeight:m,color:N,letterSpacing:"-.8px",lineHeight:1},children:O.val})})]},O.label))}),n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 300px",gap:l,marginBottom:l},children:[n.jsxs("div",{style:C,children:[n.jsxs("div",{style:A,children:[n.jsx("span",{style:F,children:"Revenue & Profit Trend"}),n.jsx("span",{style:{fontSize:S,color:t.textSecondary,fontWeight:T},children:"6 months"})]}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:12,height:160},children:nc.map((O,ee)=>n.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",gap:6,height:"100%"},children:[n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-end",gap:3,flex:1},children:[n.jsx("div",{style:{width:"100%",height:ic[ee]+"%",background:Q,opacity:.55,borderRadius:`${i} ${i} 0 0`}}),n.jsx("div",{style:{width:"100%",height:oc[ee]+"%",background:X,borderRadius:`${i} ${i} 0 0`}})]}),n.jsx("span",{style:{fontSize:S,color:t.textSecondary},children:O})]},O))})]}),n.jsxs("div",{style:C,children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:F,children:"By Module"})}),n.jsx("div",{style:{padding:s,display:"flex",alignItems:"flex-end",gap:10,height:128},children:G.map(O=>n.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:n.jsx("div",{style:{width:"100%",height:O.h+"%",background:O.c,borderRadius:`${i} ${i} 0 0`}})},O.l))})]})]}),n.jsxs("div",{style:{...C,display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[n.jsx("div",{style:{padding:`${a}px ${s}px`,background:e.cardHdrBg,borderBottom:e.cardHdrBorder,boxShadow:e.cardHdrAccent},children:n.jsx("span",{style:F,children:"Recent Reports"})}),n.jsxs("div",{ref:q,style:{display:"grid",gridTemplateColumns:Pn,padding:`0 ${s}px`,borderBottom:c.rowBorder,background:c.headBg},children:[["Report","Type","Status","Date"].map(O=>n.jsx("div",{style:{...B,...U},children:O},O)),n.jsx("div",{style:{alignSelf:"stretch",padding:`${c.rowPy} 0`}})]}),n.jsx("div",{ref:E,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:K.map(O=>n.jsxs("div",{style:{display:"grid",gridTemplateColumns:Pn,padding:`0 ${s}px`,borderBottom:c.rowBorder,background:O.rowBg},children:[n.jsx("div",{style:{...D,fontSize:k,color:t.textPrimary,fontWeight:T},children:O.name}),n.jsx("div",{style:{...D,fontSize:R,color:t.textSecondary},children:O.type}),n.jsx("div",{style:D,children:n.jsx("span",{style:{padding:"4px 11px",borderRadius:999,fontSize:S,fontWeight:T,background:O.sb,color:O.sc,whiteSpace:"nowrap"},children:O.status})}),n.jsx("div",{style:{...D,fontSize:R,color:t.textSecondary},children:O.date}),n.jsx("div",{style:D,children:n.jsx("button",{style:{fontSize:S,color:X,background:t.pContainer,border:"none",fontWeight:T,padding:"5px 11px",borderRadius:i,cursor:"pointer"},children:"↓ PDF"})})]},O.name))})]})]})]})}const $n=({size:e})=>n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),n.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),n.jsx("path",{d:"m21 15-5-5L5 21"})]});function cc(){const e=ve(),r=V(L=>L.settings),t=De(L=>L.defaultLoginImage),{t:o,rad:i,radSm:s,pad:a,tH1:l,tBody:d,tBodySm:g,tCaption:f,wH1:x,headLH:m,accentBg:h,btnText:b,btnShadow:u,bwEmph:y,pMain:v,iconInitials:k,loginCenteredGrad:R,loginScrimGradC:S}=e,w=r.fontFamily+",sans-serif",T=e.hc1||o.textPrimary,M=o.pContrast,P=e.cardBorder==="none"?"none":e.cardBorder,X=r.logoMode==="image"&&!!r.logoUrl,Q=e.isDark?o.paper2:"#ffffff",Y=r.loginPanelColor||o.bgDefault,c=r.loginImgOpacity>0?r.loginImgOpacity:1,$=r.loginImage||t,H=!!$,z=H?n.jsx("img",{src:$,alt:"",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",zIndex:0,opacity:c}}):null,N={background:o.paper,border:P,borderRadius:i,boxShadow:e.cardShadow,padding:a,display:"flex",flexDirection:"column",gap:20},J=L=>({position:"relative",background:o.paper2,border:"1.5px solid "+(L?v:o.outline),borderRadius:s});return r.loginLayout==="centered"?n.jsxs("div",{style:{minHeight:560,background:R,display:"flex",alignItems:"center",justifyContent:"center",padding:40,position:"relative",overflow:"hidden",fontFamily:w,borderRadius:i},children:[z,H&&n.jsx("div",{style:{position:"absolute",inset:0,background:S,zIndex:0}}),n.jsxs("div",{style:{position:"relative",zIndex:1,width:"100%",maxWidth:380,background:o.paper,border:P,borderRadius:i,boxShadow:"0 24px 60px rgba(0,0,0,.35)",padding:a,display:"flex",flexDirection:"column",gap:20,alignItems:"center"},children:[n.jsx("div",{style:{width:72,height:72,borderRadius:20,background:r.iconColor,display:"grid",placeItems:"center",boxShadow:"0 6px 18px "+r.iconColor+"55"},children:n.jsx("span",{style:{color:"#fff",fontSize:24,fontWeight:y,letterSpacing:"-1px"},children:k})}),n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:14},children:[n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+o.outline,borderRadius:s,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:o.paper,padding:"0 5px",fontSize:11,color:o.textSecondary},children:"Email"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary},children:"admin@company.com"})]}),n.jsxs("div",{style:{position:"relative",border:"1.5px solid "+o.outline,borderRadius:s,padding:"13px 14px"},children:[n.jsx("span",{style:{position:"absolute",top:-8,left:11,background:o.paper,padding:"0 5px",fontSize:11,color:o.textSecondary},children:"Password"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary,letterSpacing:3},children:"••••••••"})]}),n.jsx("button",{style:{padding:13,borderRadius:s,border:"none",background:h,color:b,fontSize:d,fontWeight:y,textTransform:"uppercase",letterSpacing:".5px",boxShadow:u,cursor:"pointer"},children:"Sign in"})]})]})]}):n.jsxs("div",{style:{display:"grid",gridTemplateColumns:"3fr 1fr",minHeight:560,fontFamily:w,borderRadius:i,overflow:"hidden"},children:[n.jsxs("div",{style:{background:Q,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px 40px",gap:22,position:"relative",overflow:"hidden"},children:[z,!H&&n.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,color:o.textSecondary,border:"1.5px dashed "+o.outline,padding:24,boxSizing:"border-box"},children:[n.jsx($n,{size:46}),n.jsx("div",{style:{fontSize:14,fontWeight:y,color:o.textPrimary},children:"No brand image"}),n.jsx("div",{style:{fontSize:12,color:o.textSecondary,textAlign:"center",maxWidth:220},children:"Upload an image in the Login Screen settings to fill this panel."})]})]}),n.jsxs("div",{style:{background:Y,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:22,padding:"48px 40px"},children:[X?n.jsx("img",{src:r.logoUrl,alt:r.appName,style:{maxHeight:64,maxWidth:200,objectFit:"contain"}}):n.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6,maxWidth:200,maxHeight:64,border:"1.5px dashed "+o.outline,borderRadius:s,boxSizing:"border-box",color:o.textSecondary,padding:"8px 16px"},children:[n.jsx($n,{size:20}),n.jsx("span",{style:{fontSize:f,fontWeight:y,color:o.textSecondary,whiteSpace:"nowrap"},children:"No logo uploaded"})]}),n.jsxs("div",{style:{width:"100%",maxWidth:340,...N},children:[n.jsxs("div",{style:{textAlign:"center"},children:[n.jsx("div",{style:{fontSize:l,lineHeight:m,fontWeight:x,color:T,letterSpacing:"-.4px",marginBottom:5},children:"Welcome back"}),n.jsx("div",{style:{fontSize:g,color:o.textSecondary},children:"Sign in to continue"})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:f,fontWeight:y,color:o.textPrimary,marginBottom:7},children:"Email Address"}),n.jsxs("div",{style:{...J(!1),padding:"12px 14px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:o.textSecondary,fontSize:14},children:"✉"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary},children:"admin@company.com"})]})]}),n.jsxs("div",{children:[n.jsx("div",{style:{fontSize:f,fontWeight:y,color:o.textPrimary,marginBottom:7},children:"Password"}),n.jsxs("div",{style:{...J(!0),padding:"12px 40px 12px 40px"},children:[n.jsx("span",{style:{position:"absolute",left:13,top:"50%",transform:"translateY(-50%)",color:o.textSecondary,fontSize:14},children:"🔒"}),n.jsx("span",{style:{fontSize:d,color:o.textPrimary,letterSpacing:3},children:"••••••••"}),n.jsx("span",{style:{position:"absolute",right:13,top:"50%",transform:"translateY(-50%)",color:o.textSecondary,fontSize:14},children:"👁"})]})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[n.jsx("div",{style:{width:17,height:17,borderRadius:4,background:v,display:"grid",placeItems:"center",color:M,fontSize:11,fontWeight:y},children:"✓"}),n.jsx("span",{style:{fontSize:g,color:o.textPrimary},children:"Remember me"})]}),n.jsx("span",{style:{fontSize:g,color:v,fontWeight:y},children:"Forgot password?"})]}),n.jsxs("button",{style:{padding:13,borderRadius:s,border:"none",background:h,color:b,fontSize:d,fontWeight:y,letterSpacing:".3px",boxShadow:u,marginTop:2,display:"flex",alignItems:"center",justifyContent:"center",gap:8,cursor:"pointer"},children:["Login ",n.jsx("span",{style:{fontSize:15},children:"→"})]})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:f,color:o.textSecondary},children:["Powered by ",n.jsx("span",{style:{color:v,fontWeight:y},children:r.appName})," © 2026"]})]})]})]})}function dc(){const e=ve(),r=V(b=>b.settings),[t,o]=_.useState(!1);if(t)return null;const{t:i,npos:s,nacc:a,toastDeco:l,toastBg:d,rad:g,radSm:f,tBodySm:x,tCaption:m}=e,h=(r.toastW>0?r.toastW:252)+"px";return n.jsxs("div",{style:{position:"absolute",zIndex:40,width:h,maxWidth:"70%",boxSizing:"border-box",background:d,borderRadius:g,display:"flex",gap:"10px",alignItems:"flex-start",padding:"12px 13px",fontFamily:r.fontFamily+",sans-serif",...s,...l},children:[n.jsx("div",{style:{width:"30px",height:"30px",borderRadius:f,background:a.icbg,color:a.icc,display:"grid",placeItems:"center",flexShrink:0,fontSize:"15px",fontWeight:800},children:"!"}),n.jsxs("div",{style:{flex:1,minWidth:0},children:[n.jsx("div",{style:{fontSize:x+"px",fontWeight:700,color:i.textPrimary,marginBottom:"2px"},children:"Low stock alert"}),n.jsx("div",{style:{fontSize:m+"px",color:i.textSecondary,lineHeight:1.4},children:"Widget Pro is down to 12 units left."})]}),r.notifAutoDismiss&&n.jsx("div",{title:"Auto-dismiss countdown",style:{flexShrink:0,marginTop:"1px",minWidth:"26px",height:"20px",padding:"0 7px",borderRadius:"999px",background:ce(a.dot,.14),color:a.dot,fontSize:m-.5+"px",fontWeight:800,display:"grid",placeItems:"center",fontVariantNumeric:"tabular-nums"},children:(r.autoDismissSec>0?r.autoDismissSec:8)+"s"}),n.jsx("button",{title:"Dismiss notification",onClick:()=>o(!0),style:{flexShrink:0,width:"20px",height:"20px",marginTop:"1px",border:"none",background:"transparent",color:i.textSecondary,cursor:"pointer",borderRadius:"6px",display:"grid",placeItems:"center",padding:0,lineHeight:1},children:n.jsx("svg",{width:13,height:13,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.4,strokeLinecap:"round",children:n.jsx("path",{d:"M18 6 6 18M6 6l12 12"})})})]})}const pc=[75,90,100,125];function uc(){var f;const e=De(x=>x.previewScreen),r=V(x=>x.settings.edgePadPx)||0,t=e==="operations"?0:r,[o,i]=_.useState("fit"),s=_.useRef(null),a=_.useRef(null),[l,d]=_.useState(100);_.useLayoutEffect(()=>{const x=s.current,m=a.current;if(!x||!m)return;const h=()=>{const k=getComputedStyle(x),R=(parseFloat(k.paddingTop)||0)+(parseFloat(k.paddingBottom)||0);if(o!=="fit"){const c=o/100;m.style.zoom=String(c);const $=x.clientHeight-R;m.style.minHeight=($>0?Math.floor($/c):0)+"px",d(o);return}m.style.zoom="1",m.style.minHeight="0px",m.offsetHeight;const S=(parseFloat(k.paddingLeft)||0)+(parseFloat(k.paddingRight)||0),w=x.clientWidth-S,T=x.clientHeight-R,M=m.scrollWidth,P=m.scrollHeight;if(M<=0||P<=0||w<=0||T<=0)return;const X=Math.min(w/M,T/P,1),Q=X<.985?Math.max(.36,X):1;m.style.zoom=String(Q);const Y=Math.min(w/M,1);m.style.minHeight=Math.floor(T/Math.max(Y,.36))+"px",d(Math.round(Q*100))};let b=0,u=0;const y=()=>{h(),++u<36&&(b=requestAnimationFrame(y))};y();const v=new ResizeObserver(h);return v.observe(x),v.observe(m),()=>{cancelAnimationFrame(b),v.disconnect()}},[o,t,e]);const g=((f=Wl.find(x=>x.key===e))==null?void 0:f.label)??"";return n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",bgcolor:"background.default"},children:[n.jsxs(p.Box,{sx:{px:2.5,py:1.25,borderBottom:"1px solid",borderColor:"divider",display:"flex",alignItems:"center",gap:1.5,bgcolor:"background.paper"},children:[n.jsx(Ll,{sx:{fontSize:22,color:"text.secondary"}}),n.jsxs(p.Typography,{variant:"h5",sx:{flex:1,fontSize:18,fontWeight:700,letterSpacing:"-.2px"},children:["Previewing ",g]}),n.jsxs(p.Select,{size:"small",value:o,onChange:x=>i(x.target.value==="fit"?"fit":Number(x.target.value)),sx:{minWidth:128,fontSize:13,fontWeight:600,"& .MuiSelect-select":{py:.75}},children:[n.jsxs(p.MenuItem,{value:"fit",children:["Fit (",l,"%)"]}),pc.map(x=>n.jsxs(p.MenuItem,{value:x,children:[x,"%"]},x))]})]}),n.jsxs(p.Box,{ref:s,sx:{flex:1,overflow:"auto",p:`${t}px`,position:"relative",bgcolor:"background.default"},children:[n.jsxs(p.Box,{ref:a,sx:{width:"100%",display:"flex",flexDirection:"column","& > *":{flex:"1 1 0%",minHeight:0}},children:[e==="dashboard"&&n.jsx(Ul,{}),e==="orders"&&n.jsx(Jl,{}),e==="reports"&&n.jsx(lc,{}),e==="cameras"&&n.jsx(Zl,{}),e==="operations"&&n.jsx(tc,{}),e==="components"&&n.jsx(ql,{}),e==="login"&&n.jsx(cc,{})]}),e!=="login"&&n.jsx(dc,{})]})]})}const fc=300,hc=520;function gc({defaultLoginImage:e}={}){const[r,t]=_.useState(!0),o=De(k=>k.setDefaultLoginImage);_.useEffect(()=>{o(e||"")},[e,o]);const[i,s]=_.useState(300),[a,l]=_.useState(!1),d=V(k=>k.isDirty),g=V(k=>k.captureBaseline),f=V(k=>k.restoreBaseline),x=Pe(V(k=>k.settings.mode)),m=V(k=>k.settings.customFonts),h=V(k=>k.settings.customHeadFonts),b=_.useRef(null);_.useEffect(()=>{En(m),En(h)},[m,h]);const u=k=>{k.preventDefault(),b.current={x:k.clientX,w:i};const R=w=>{if(!b.current)return;const T=Math.max(fc,Math.min(hc,b.current.w+(w.clientX-b.current.x)));s(T)},S=()=>{b.current=null,window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",S)};window.addEventListener("mousemove",R),window.addEventListener("mouseup",S)},y=()=>{d()?l(!0):t(!1)},v=()=>{t(!0),g()};return n.jsxs(p.Box,{sx:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",bgcolor:"background.paper"},children:[n.jsx(p.Box,{sx:{flex:1,minHeight:0,display:"flex"},children:n.jsxs(p.Box,{sx:{flex:1,minWidth:0,display:"flex",bgcolor:"background.default",borderTop:"1px solid",borderColor:"divider"},children:[r?n.jsxs(p.Box,{sx:{display:"flex",flexShrink:0},children:[n.jsx(p.Box,{sx:{width:i,flexShrink:0,borderRight:`1px solid ${x.studioBd}`,display:"flex",flexDirection:"column",bgcolor:x.card,overflow:"auto",scrollbarWidth:"none",msOverflowStyle:"none","&::-webkit-scrollbar":{display:"none"}},children:n.jsx(_l,{onClose:y})}),n.jsx(p.Box,{onMouseDown:u,sx:{width:5,cursor:"col-resize",flexShrink:0,bgcolor:"divider",opacity:.4,"&:hover":{opacity:1,bgcolor:"primary.main"}}})]}):n.jsx(p.Tooltip,{title:"Open Theme Studio",placement:"right",arrow:!0,slotProps:{popper:{style:{pointerEvents:"none"}}},children:n.jsx(p.IconButton,{onClick:v,sx:{position:"absolute",left:68,bottom:56,zIndex:10,bgcolor:"primary.main",color:"primary.contrastText",boxShadow:4,"&:hover":{bgcolor:"primary.dark"}},children:n.jsx(qs,{})})}),n.jsx(uc,{})]})}),n.jsxs(p.Dialog,{open:a,onClose:()=>l(!1),PaperProps:{sx:{borderRadius:3,width:300,p:2.5}},children:[n.jsx(p.Typography,{sx:{fontSize:15,fontWeight:800,mb:.75},children:"Save changes?"}),n.jsx(p.Typography,{sx:{fontSize:12.5,color:"text.secondary",lineHeight:1.5,mb:2.25},children:"You've made changes to the theme. Do you want to save them before leaving?"}),n.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n.jsx(p.Box,{component:"button",onClick:()=>{g(),l(!1),t(!1)},sx:{p:1.4,borderRadius:2.5,border:"none",bgcolor:"primary.main",color:"primary.contrastText",fontSize:13,fontWeight:700,cursor:"pointer"},children:"Save & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>{f(),l(!1),t(!1)},sx:{p:1.4,borderRadius:2.5,border:"1px solid",borderColor:"divider",bgcolor:"action.hover",color:"text.secondary",fontSize:13,fontWeight:600,cursor:"pointer"},children:"Discard & exit"}),n.jsx(p.Box,{component:"button",onClick:()=>l(!1),sx:{p:1.1,borderRadius:2.5,border:"none",bgcolor:"transparent",color:"text.secondary",fontSize:12.5,fontWeight:600,cursor:"pointer"},children:"Keep editing"})]})]})]})}function xc(e){var a,l;const r=Hr(e),t=r.t,o=`${r.headFam},sans-serif`,i=`${r.bodyFam},sans-serif`,s=(d,g)=>({fontFamily:o,fontSize:d,fontWeight:r.wH1,lineHeight:r.headLH,color:g||t.textPrimary});if(typeof window<"u"&&typeof document<"u"){const d=["Roboto","Inter","DM Sans","Manrope","Plus Jakarta Sans","Nunito Sans","Figtree"],f=[e.fontFamily,e.headingFont].filter(Boolean).map(m=>m.replace(/"/g,"").replace(/'/g,"")),x=Array.from(new Set(f)).filter(m=>d.includes(m));if(x.length>0){const m="dynamic-google-fonts";let h=document.getElementById(m);const u=`https://fonts.googleapis.com/css2?${x.map(y=>`family=${y.replace(/ /g,"+")}:wght@300;400;500;600;700;800;900`).join("&")}&display=swap`;h||(h=document.createElement("link"),h.id=m,h.rel="stylesheet",document.head.appendChild(h)),h.href!==u&&(h.href=u,(l=(a=document.fonts)==null?void 0:a.ready)==null||l.then(()=>window.dispatchEvent(new Event("resize"))))}}return to({palette:{mode:e.mode,primary:{main:r.pMain,dark:r.pal[700],light:r.pal[300],contrastText:t.pContrast},secondary:{main:r.sMain,dark:r.spal[700],light:r.spal[300],contrastText:t.sContrast},success:{main:e.successHex},warning:{main:e.warningHex},info:{main:e.infoHex},error:{main:e.errorHex},background:{default:t.bgDefault,paper:t.paper},text:{primary:t.textPrimary,secondary:t.textSecondary,disabled:t.textDisabled},divider:t.divider},shape:{borderRadius:r.r},typography:{fontFamily:i,fontSize:r.base,h1:s(r.tH1,r.hc1),h2:s(r.tH2,r.hc2),h3:s(r.tTitle,r.hc3),h4:s(r.tH4,r.hc4),h5:s(r.tH5,r.hc5),h6:s(r.tH6,r.hc6),body1:{fontFamily:i,fontSize:r.tBody,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},body2:{fontFamily:i,fontSize:r.tBodySm,lineHeight:r.bodyLH,fontWeight:r.bodyWeightEff},caption:{fontFamily:i,fontSize:r.tCaption,lineHeight:r.bodyLH},button:{textTransform:r.btnCase,fontWeight:r.bwEmph}},components:{MuiCssBaseline:{styleOverrides:{"button, input, textarea, select":{fontFamily:"inherit"}}},MuiCard:{styleOverrides:{root:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiCardHeader:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiDialog:{styleOverrides:{paper:{borderRadius:r.r,border:r.cardBorder==="none"?"none":r.cardBorder,boxShadow:r.cardShadow,backgroundImage:"none"}}},MuiDialogTitle:{styleOverrides:{root:{backgroundColor:r.cardHdrBg,borderBottom:r.cardHdrBorder,boxShadow:r.cardHdrAccent}}},MuiButton:{styleOverrides:{root:{borderRadius:r.r,boxShadow:"none"}},defaultProps:{disableElevation:!0},variants:e.accentGradient?[{props:{variant:"contained"},style:{backgroundImage:r.accentBg}}]:[]},MuiChip:{styleOverrides:{root:{borderRadius:999,fontWeight:e.statusBold?700:500}}}},urmTable:{rowPaddingY:r.table.rowPy,cellPaddingX:r.table.cellPx,headerBg:r.table.headBg,rowDivider:r.table.rowBorder,colDivider:r.table.colBorder,cellAlignH:e.tableCellAlignH,cellAlignV:e.tableCellAlignV,striped:e.tableStripe,stripeBg:r.table.stripeBg},tokens:{toastW:e.toastW>0?e.toastW:void 0,cardBorder:r.toastDeco.border,cardShadow:r.toastDeco.boxShadow,cardBodyBorder:r.cardBorder==="none"?"none":r.cardBorder,cardBodyShadow:r.cardShadow,cardHdrBg:r.cardHdrBg,cardHdrBorder:r.cardHdrBorder,cardHdrAccent:r.cardHdrAccent,cardHeader:e.cardHeader,status:{errSoft:r.errSoft,warnSoft:r.warnSoft,infoSoft:r.infoSoft,sucSoft:r.sucSoft,errTxt:r.errTxt,warnTxt:r.warnTxt,infoTxt:r.infoTxt,sucTxt:r.sucTxt},notifPosition:e.notifPosition,notifStyle:e.notifStyle,notifAccent:e.notifAccent,notifAutoDismiss:e.notifAutoDismiss,toastBg:r.toastBg,autoDismissSec:e.autoDismissSec>0?e.autoDismissSec:void 0,statusBold:e.statusBold,cardHdrHex:e.cardHdrHex||void 0,containerPad:r.screenPad,cardGap:r.gap,edgePad:e.edgePadPx,highlight:t.highlight,highlightSoft:t.highlightSoft,highlightBd:t.highlightBd,headerBg:r.headerBg,canvasBg:r.canvasBg,accountPageBg:r.accountPageBg,accountCardBg:r.accountCardBg,brandGradient:r.brandGradient,gsAccentGradient:r.gsAccentGradient,gsModalBgDark:r.gsModalBgDark,gsArrowGradient:r.gsArrowGradient,loginPanelGradient:r.loginPanelGradient,reportsAccentTileGradient:r.reportsAccentTileGradient,reportsAccentCtaGradient:r.reportsAccentCtaGradient,reportsModalInnerHighlight:r.reportsModalInnerHighlight}})}exports.DEFAULT_SETTINGS=Ee;exports.ThemeStudio=gc;exports.buildMuiTheme=xc;exports.useThemeStore=V;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnieye-theme-studio",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",