import{r as m,bf as A,b7 as J}from"./index-60a3c753.js";import{c as f,_ as E,a as z,d as j,b as S}from"./objectSpread2-85813881.js";import{g as V,c as X,b as Z}from"./presets-06d13753.js";var nn=m.createContext({});const B=nn;function en(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function rn(n,e){if(!n)return!1;if(n.contains)return n.contains(e);for(var r=e;r;){if(r===n)return!0;r=r.parentNode}return!1}var _="data-rc-order",P="data-rc-priority",tn="rc-util-key",T=new Map;function D(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=n.mark;return e?e.startsWith("data-")?e:"data-".concat(e):tn}function N(n){if(n.attachTo)return n.attachTo;var e=document.querySelector("head");return e||document.body}function on(n){return n==="queue"?"prependQueue":n?"prepend":"append"}function R(n){return Array.from((T.get(n)||n).children).filter(function(e){return e.tagName==="STYLE"})}function L(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!en())return null;var r=e.csp,t=e.prepend,i=e.priority,o=i===void 0?0:i,a=on(t),u=a==="prependQueue",c=document.createElement("style");c.setAttribute(_,a),u&&o&&c.setAttribute(P,"".concat(o)),r!=null&&r.nonce&&(c.nonce=r==null?void 0:r.nonce),c.innerHTML=n;var s=N(e),d=s.firstChild;if(t){if(u){var l=(e.styles||R(s)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(_)))return!1;var h=Number(g.getAttribute(P)||0);return o>=h});if(l.length)return s.insertBefore(c,l[l.length-1].nextSibling),c}s.insertBefore(c,d)}else s.appendChild(c);return c}function an(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=N(e);return(e.styles||R(r)).find(function(t){return t.getAttribute(D(e))===n})}function cn(n,e){var r=T.get(n);if(!r||!rn(document,r)){var t=L("",e),i=t.parentNode;T.set(n,i),n.removeChild(t)}}function ln(n,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},t=N(r),i=R(t),o=f(f({},r),{},{styles:i});cn(t,o);var a=an(e,o);if(a){var u,c;if((u=o.csp)!==null&&u!==void 0&&u.nonce&&a.nonce!==((c=o.csp)===null||c===void 0?void 0:c.nonce)){var s;a.nonce=(s=o.csp)===null||s===void 0?void 0:s.nonce}return a.innerHTML!==n&&(a.innerHTML=n),a}var d=L(n,o);return d.setAttribute(D(o),e),d}function Q(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}function sn(n){return Q(n)instanceof ShadowRoot}function un(n){return sn(n)?Q(n):null}var b={},dn=function(e){};function fn(n,e){}function mn(n,e){}function gn(){b={}}function W(n,e,r){!e&&!b[r]&&(n(!1,r),b[r]=!0)}function v(n,e){W(fn,n,e)}function Cn(n,e){W(mn,n,e)}v.preMessage=dn;v.resetWarned=gn;v.noteOnce=Cn;function vn(n){return n.replace(/-(.)/g,function(e,r){return r.toUpperCase()})}function yn(n,e){v(n,"[@ant-design/icons] ".concat(e))}function M(n){return E(n)==="object"&&typeof n.name=="string"&&typeof n.theme=="string"&&(E(n.icon)==="object"||typeof n.icon=="function")}function O(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(n).reduce(function(e,r){var t=n[r];switch(r){case"class":e.className=t,delete e.class;break;default:delete e[r],e[vn(r)]=t}return e},{})}function x(n,e,r){return r?A.createElement(n.tag,f(f({key:e},O(n.attrs)),r),(n.children||[]).map(function(t,i){return x(t,"".concat(e,"-").concat(n.tag,"-").concat(i))})):A.createElement(n.tag,f({key:e},O(n.attrs)),(n.children||[]).map(function(t,i){return x(t,"".concat(e,"-").concat(n.tag,"-").concat(i))}))}function H(n){return V(n)[0]}function Y(n){return n?Array.isArray(n)?n:[n]:[]}var An={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},pn=`
.anticon {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`,hn=function(e){var r=m.useContext(B),t=r.csp,i=r.prefixCls,o=r.layer,a=pn;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` {
`).concat(a,`
}`)),m.useEffect(function(){var u=e.current,c=un(u);ln(a,"@ant-design-icons",{prepend:!o,csp:t,attachTo:c})},[])},wn=["icon","className","onClick","style","primaryColor","secondaryColor"],C={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Tn(n){var e=n.primaryColor,r=n.secondaryColor;C.primaryColor=e,C.secondaryColor=r||H(e),C.calculated=!!r}function bn(){return f({},C)}var y=function(e){var r=e.icon,t=e.className,i=e.onClick,o=e.style,a=e.primaryColor,u=e.secondaryColor,c=z(e,wn),s=m.useRef(),d=C;if(a&&(d={primaryColor:a,secondaryColor:u||H(a)}),hn(s),yn(M(r),"icon should be icon definiton, but got ".concat(r)),!M(r))return null;var l=r;return l&&typeof l.icon=="function"&&(l=f(f({},l),{},{icon:l.icon(d.primaryColor,d.secondaryColor)})),x(l.icon,"svg-".concat(l.name),f(f({className:t,onClick:i,style:o,"data-icon":l.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c),{},{ref:s}))};y.displayName="IconReact";y.getTwoToneColors=bn;y.setTwoToneColors=Tn;const k=y;function q(n){var e=Y(n),r=j(e,2),t=r[0],i=r[1];return k.setTwoToneColors({primaryColor:t,secondaryColor:i})}function xn(){var n=k.getTwoToneColors();return n.calculated?[n.primaryColor,n.secondaryColor]:n.primaryColor}var Nn=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];q(Z.primary);var p=m.forwardRef(function(n,e){var r=n.className,t=n.icon,i=n.spin,o=n.rotate,a=n.tabIndex,u=n.onClick,c=n.twoToneColor,s=z(n,Nn),d=m.useContext(B),l=d.prefixCls,g=l===void 0?"anticon":l,h=d.rootClassName,K=X(h,g,S(S({},"".concat(g,"-").concat(t.name),!!t.name),"".concat(g,"-spin"),!!i||t.name==="loading"),r),w=a;w===void 0&&u&&(w=-1);var U=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,$=Y(c),I=j($,2),F=I[0],G=I[1];return m.createElement("span",J({role:"img","aria-label":t.name},s,{ref:e,tabIndex:w,onClick:u,className:K}),m.createElement(k,{icon:t,primaryColor:F,secondaryColor:G,style:U}))});p.displayName="AntdIcon";p.getTwoToneColor=xn;p.setTwoToneColor=q;const En=p;export{En as A,B as C,q as a,xn as g,An as s,hn as u,yn as w};
