"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../node_modules/.pnpm/@ant-design_colors@7.2.1/node_modules/@ant-design/colors/es/generate.js");require("../node_modules/.pnpm/@ant-design_colors@7.2.1/node_modules/@ant-design/colors/es/presets.js");const C=require("../_util/canUseDom.js"),y=require("../vc-util/Dom/dynamicCSS.js"),s=require("../node_modules/.pnpm/@ctrl_tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.js"),f=`-ant-${Date.now()}-${Math.random()}`;function p(a,e){const o={},c=(t,i)=>{let l=t.clone();return l=i?.(l)||l,l.toRgbString()},n=(t,i)=>{const l=new s.TinyColor(t),r=d.default(l.toRgbString());o[`${i}-color`]=c(l),o[`${i}-color-disabled`]=r[1],o[`${i}-color-hover`]=r[4],o[`${i}-color-active`]=r[6],o[`${i}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),o[`${i}-color-deprecated-bg`]=r[0],o[`${i}-color-deprecated-border`]=r[2]};if(e.primaryColor){n(e.primaryColor,"primary");const t=new s.TinyColor(e.primaryColor),i=d.default(t.toRgbString());i.forEach((r,g)=>{o[`primary-${g+1}`]=r}),o["primary-color-deprecated-l-35"]=c(t,r=>r.lighten(35)),o["primary-color-deprecated-l-20"]=c(t,r=>r.lighten(20)),o["primary-color-deprecated-t-20"]=c(t,r=>r.tint(20)),o["primary-color-deprecated-t-50"]=c(t,r=>r.tint(50)),o["primary-color-deprecated-f-12"]=c(t,r=>r.setAlpha(r.getAlpha()*.12));const l=new s.TinyColor(i[0]);o["primary-color-active-deprecated-f-30"]=c(l,r=>r.setAlpha(r.getAlpha()*.3)),o["primary-color-active-deprecated-d-02"]=c(l,r=>r.darken(2))}return e.successColor&&n(e.successColor,"success"),e.warningColor&&n(e.warningColor,"warning"),e.errorColor&&n(e.errorColor,"error"),e.infoColor&&n(e.infoColor,"info"),`
  :root {
    ${Object.keys(o).map(t=>`--${a}-${t}: ${o[t]};`).join(`
`)}
  }
  `.trim()}function u(a,e){const o=p(a,e);C.default()&&y.updateCSS(o,`${f}-dynamic-theme`)}exports.getStyle=p;exports.registerTheme=u;
