"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("../node_modules/polished/dist/polished.esm.js"),u=require("styled-components");const g=e=>e.substring(4,e.length-1),d=e=>e.startsWith("var("),a=e=>{if(d(e)){const t=g(e);return String(s.cssVar(t,"#000000"))}return e},h=(e,t)=>r=>{try{const n=a(String(r.theme.mode==="dark"?r.theme.alias.dark[e]:r.theme.alias.light[e])),o=i(t,r.theme);if(typeof o!="string")throw new Error("Invalid alias");const l=a(o);return s.darken(n,l)}catch(n){return console.warn(n),i(t,r.theme)}},f=(e,t)=>r=>{try{const n=a(String(r.theme.mode==="dark"?r.theme.alias.dark[e]:r.theme.alias.light[e])),o=i(t,r.theme);if(typeof o!="string")throw new Error("Invalid alias");const l=a(o);return s.lighten(n,l)}catch(n){return console.warn(n),i(t,r.theme)}},C=(e,t)=>r=>{try{const n=typeof e=="number"?e:a(String(r.theme.mode==="dark"?r.theme.alias.dark[e]:r.theme.alias.light[e])),o=i(t,r.theme);if(typeof o!="string")throw new Error("Invalid alias");const l=a(o);return s.rgba(l,Number(n))}catch(n){return console.warn(n),i(t,r.theme)}},S=e=>u.css`
    ${t=>{const r=t.theme.font[e];return`
        font-size: ${r.fontSize};
        line-height: ${r.lineHeight};
      `}}
  `,i=(e,t)=>t?t.mode==="dark"?t.alias.dark[e]:t.alias.light[e]:r=>r.theme.mode==="dark"?r.theme.alias.dark[e]:r.theme.alias.light[e],y=()=>{},k=e=>e.toLowerCase().replace(/[^a-z0-9]/g,"-"),w=null,b=(e="all")=>u.css`
    transition: ${({theme:t})=>`${e} ${t.motion.speed.defaultS} ${t.motion.easing.easeDefault}`};
  `,v=(...e)=>t=>{e.length>4&&console.warn("You added to many values");const r=t.theme.spacing;return e.reduce((n,o)=>`${n} ${r[o]}`,"")},V=e=>t=>e&&t?`${e}-${t}`:e||void 0;function A(e){return e!=null}const E=e=>{let t;return e?t=typeof e=="string"?document.getElementById(e):e:t=document.getElementById("main")||document.getElementById("react-root")||document.getElementById("root"),t!==null?t:document.body},$=e=>[...e?e.querySelectorAll('a, button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])'):[]].filter(t=>!t.hasAttribute("disabled")),m=e=>e==="dark",I=e=>e==="light",M=(e,t)=>r=>{const n=m(r.theme.mode);try{const o=a(String(n?r.theme.alias.dark[e]:r.theme.alias.light[e])),l=i(t,r.theme);if(typeof l!="string")throw new Error("Invalid alias");const c=a(l);return n?s.lighten(o,c):s.darken(o,c)}catch(o){return console.warn(o),i(t,r.theme)}},D=e=>t=>!e.includes(t);exports.convertToTransientProps=D;exports.extractCSSVarName=g;exports.getColorAlias=i;exports.getColorAliasValue=a;exports.getComponentRoot=E;exports.getDarkenColor=h;exports.getDefaultTransition=b;exports.getFocusableElements=$;exports.getFontSize=S;exports.getId=V;exports.getLightenColor=f;exports.getModifiedColorByThemeMode=M;exports.getSpacing=v;exports.isDarkMode=m;exports.isDifferentFromUndefinedOrNull=A;exports.isLightMode=I;exports.isUsingCssVar=d;exports.noop=y;exports.slugify=k;exports.transparentizeAliasColor=C;exports.unitJSX=w;
