UNPKG

antd-tag-input

Version:

```js import TagInput from 'antd-tag-input'; import 'antd-tag-input/dist/style.css'; ```

68 lines (60 loc) 229 kB
var g1=Object.defineProperty,y1=Object.defineProperties;var b1=Object.getOwnPropertyDescriptors;var ln=Object.getOwnPropertySymbols;var Kl=Object.prototype.hasOwnProperty,Yl=Object.prototype.propertyIsEnumerable;var Gl=(I,ce,me)=>ce in I?g1(I,ce,{enumerable:!0,configurable:!0,writable:!0,value:me}):I[ce]=me,Xl=(I,ce)=>{for(var me in ce||(ce={}))Kl.call(ce,me)&&Gl(I,me,ce[me]);if(ln)for(var me of ln(ce))Yl.call(ce,me)&&Gl(I,me,ce[me]);return I},Jl=(I,ce)=>y1(I,b1(ce));var Ql=(I,ce)=>{var me={};for(var Le in I)Kl.call(I,Le)&&ce.indexOf(Le)<0&&(me[Le]=I[Le]);if(I!=null&&ln)for(var Le of ln(I))ce.indexOf(Le)<0&&Yl.call(I,Le)&&(me[Le]=I[Le]);return me};(function(I,ce){typeof exports=="object"&&typeof module!="undefined"?module.exports=ce(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],ce):(I=typeof globalThis!="undefined"?globalThis:I||self,I.TagInput=ce(I.React,I.ReactDOM))})(this,function(I,ce){"use strict";function me(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function Le(e){if(e&&e.__esModule)return e;var t={__proto__:null,[Symbol.toStringTag]:"Module"};return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var f=Le(I),ne=me(I),Je=me(ce),C1="",w1="",x1="",E1="",S1="",P1="";function k(){return k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},k.apply(this,arguments)}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ka={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a<arguments.length;a++){var o=arguments[a];if(!!o){var i=typeof o;if(i==="string"||i==="number")n.push(o);else if(Array.isArray(o)){if(o.length){var s=r.apply(null,o);s&&n.push(s)}}else if(i==="object")if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&n.push(l);else n.push(o.toString())}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Ka);var X=Ka.exports;function Zl(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function ze(e,t){if(e==null)return{};var r=Zl(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Ya(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ya(Object(r),!0).forEach(function(n){A(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ya(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xa(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ye(e,t,r){return t&&Xa(e.prototype,t),r&&Xa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function un(e,t){return un=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},un(e,t)}function Se(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&un(e,t)}function ar(e){return ar=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ar(e)}function eu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function de(e){return de=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(e)}function ir(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tu(e,t){if(t&&(de(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ir(e)}function Pe(e){var t=eu();return function(){var n=ar(e),a;if(t){var o=ar(this).constructor;a=Reflect.construct(n,arguments,o)}else a=n.apply(this,arguments);return tu(this,a)}}function Ja(e){if(Array.isArray(e))return e}function ru(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,o=!1,i,s;try{for(r=r.call(e);!(a=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));a=!0);}catch(l){o=!0,s=l}finally{try{!a&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function cn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fn(e,t){if(!!e){if(typeof e=="string")return cn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cn(e,t)}}function Qa(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(e,t){return Ja(e)||ru(e,t)||fn(e,t)||Qa()}function or(e){return e instanceof HTMLElement?e:Je.default.findDOMNode(e)}var dn={exports:{}},ee={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var he=typeof Symbol=="function"&&Symbol.for,vn=he?Symbol.for("react.element"):60103,pn=he?Symbol.for("react.portal"):60106,sr=he?Symbol.for("react.fragment"):60107,lr=he?Symbol.for("react.strict_mode"):60108,ur=he?Symbol.for("react.profiler"):60114,cr=he?Symbol.for("react.provider"):60109,fr=he?Symbol.for("react.context"):60110,hn=he?Symbol.for("react.async_mode"):60111,dr=he?Symbol.for("react.concurrent_mode"):60111,vr=he?Symbol.for("react.forward_ref"):60112,pr=he?Symbol.for("react.suspense"):60113,nu=he?Symbol.for("react.suspense_list"):60120,hr=he?Symbol.for("react.memo"):60115,mr=he?Symbol.for("react.lazy"):60116,au=he?Symbol.for("react.block"):60121,iu=he?Symbol.for("react.fundamental"):60117,ou=he?Symbol.for("react.responder"):60118,su=he?Symbol.for("react.scope"):60119;function Te(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case vn:switch(e=e.type,e){case hn:case dr:case sr:case ur:case lr:case pr:return e;default:switch(e=e&&e.$$typeof,e){case fr:case vr:case mr:case hr:case cr:return e;default:return t}}case pn:return t}}}function Za(e){return Te(e)===dr}ee.AsyncMode=hn,ee.ConcurrentMode=dr,ee.ContextConsumer=fr,ee.ContextProvider=cr,ee.Element=vn,ee.ForwardRef=vr,ee.Fragment=sr,ee.Lazy=mr,ee.Memo=hr,ee.Portal=pn,ee.Profiler=ur,ee.StrictMode=lr,ee.Suspense=pr,ee.isAsyncMode=function(e){return Za(e)||Te(e)===hn},ee.isConcurrentMode=Za,ee.isContextConsumer=function(e){return Te(e)===fr},ee.isContextProvider=function(e){return Te(e)===cr},ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vn},ee.isForwardRef=function(e){return Te(e)===vr},ee.isFragment=function(e){return Te(e)===sr},ee.isLazy=function(e){return Te(e)===mr},ee.isMemo=function(e){return Te(e)===hr},ee.isPortal=function(e){return Te(e)===pn},ee.isProfiler=function(e){return Te(e)===ur},ee.isStrictMode=function(e){return Te(e)===lr},ee.isSuspense=function(e){return Te(e)===pr},ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===sr||e===dr||e===ur||e===lr||e===pr||e===nu||typeof e=="object"&&e!==null&&(e.$$typeof===mr||e.$$typeof===hr||e.$$typeof===cr||e.$$typeof===fr||e.$$typeof===vr||e.$$typeof===iu||e.$$typeof===ou||e.$$typeof===su||e.$$typeof===au)},ee.typeOf=Te,dn.exports=ee;function lu(e,t,r){var n=f.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}function ei(e,t){typeof e=="function"?e(t):de(e)==="object"&&e&&"current"in e&&(e.current=t)}function At(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(function(a){return a});return n.length<=1?n[0]:function(a){t.forEach(function(o){ei(o,a)})}}function mn(e){var t,r,n=dn.exports.isMemo(e)?e.type.type:e.type;return!(typeof n=="function"&&!((t=n.prototype)===null||t===void 0?void 0:t.render)||typeof e=="function"&&!((r=e.prototype)===null||r===void 0?void 0:r.render))}function ct(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function ti(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function uu(e,t){var r={animationend:ti("Animation","AnimationEnd"),transitionend:ti("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var cu=uu(ct(),typeof window!="undefined"?window:{}),ri={};if(ct()){var fu=document.createElement("div");ri=fu.style}var gr={};function ni(e){if(gr[e])return gr[e];var t=cu[e];if(t)for(var r=Object.keys(t),n=r.length,a=0;a<n;a+=1){var o=r[a];if(Object.prototype.hasOwnProperty.call(t,o)&&o in ri)return gr[e]=t[o],gr[e]}return""}var ai=ni("animationend"),ii=ni("transitionend"),oi=!!(ai&&ii),si=ai||"animationend",li=ii||"transitionend";function ui(e,t){if(!e)return null;if(de(e)==="object"){var r=t.replace(/-\w/g,function(n){return n[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}var $t="none",yr="appear",br="enter",Cr="leave",ci="none",qe="prepare",ft="start",dt="active",gn="end";function wr(e){var t=I.useRef(!1),r=I.useState(e),n=J(r,2),a=n[0],o=n[1];function i(s){t.current||o(s)}return I.useEffect(function(){return function(){t.current=!0}},[]),[a,i]}var fi=ct()?I.useLayoutEffect:I.useEffect,di=function(t){return+setTimeout(t,16)},vi=function(t){return clearTimeout(t)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(di=function(t){return window.requestAnimationFrame(t)},vi=function(t){return window.cancelAnimationFrame(t)});var pi=0,yn=new Map;function hi(e){yn.delete(e)}function Me(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pi+=1;var r=pi;function n(a){if(a===0)hi(r),e();else{var o=di(function(){n(a-1)});yn.set(r,o)}}return n(t),r}Me.cancel=function(e){var t=yn.get(e);return hi(t),vi(t)};var du=function(){var e=f.useRef(null);function t(){Me.cancel(e.current)}function r(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Me(function(){a<=1?n({isCanceled:function(){return o!==e.current}}):r(n,a-1)});e.current=o}return f.useEffect(function(){return function(){t()}},[]),[r,t]},mi=[qe,ft,dt,gn],gi=!1,vu=!0;function yi(e){return e===dt||e===gn}var pu=function(e,t){var r=wr(ci),n=J(r,2),a=n[0],o=n[1],i=du(),s=J(i,2),l=s[0],u=s[1];function c(){o(qe)}return fi(function(){if(a!==ci&&a!==gn){var d=mi.indexOf(a),v=mi[d+1],h=t(a);h===gi?o(v):l(function(m){function p(){m.isCanceled()||o(v)}h===!0?p():Promise.resolve(h).then(p)})}},[e,a]),f.useEffect(function(){return function(){u()}},[]),[c,a]},hu=function(e){var t=I.useRef(),r=I.useRef(e);r.current=e;var n=f.useCallback(function(i){r.current(i)},[]);function a(i){i&&(i.removeEventListener(li,n),i.removeEventListener(si,n))}function o(i){t.current&&t.current!==i&&a(t.current),i&&i!==t.current&&(i.addEventListener(li,n),i.addEventListener(si,n),t.current=i)}return f.useEffect(function(){return function(){a(t.current)}},[]),[o,a]};function mu(e,t,r,n){var a=n.motionEnter,o=a===void 0?!0:a,i=n.motionAppear,s=i===void 0?!0:i,l=n.motionLeave,u=l===void 0?!0:l,c=n.motionDeadline,d=n.motionLeaveImmediately,v=n.onAppearPrepare,h=n.onEnterPrepare,m=n.onLeavePrepare,p=n.onAppearStart,y=n.onEnterStart,g=n.onLeaveStart,b=n.onAppearActive,w=n.onEnterActive,T=n.onLeaveActive,E=n.onAppearEnd,P=n.onEnterEnd,$=n.onLeaveEnd,_=n.onVisibleChanged,N=wr(),F=J(N,2),L=F[0],V=F[1],D=wr($t),j=J(D,2),z=j[0],Z=j[1],Q=wr(null),x=J(Q,2),C=x[0],O=x[1],R=I.useRef(!1),M=I.useRef(null),H=I.useRef(!1),Y=I.useRef(null);function U(){var le=r();return le||Y.current}var ae=I.useRef(!1);function se(le){var fe=U();if(!(le&&!le.deadline&&le.target!==fe)){var we;z===yr&&ae.current?we=E==null?void 0:E(fe,le):z===br&&ae.current?we=P==null?void 0:P(fe,le):z===Cr&&ae.current&&(we=$==null?void 0:$(fe,le)),we!==!1&&!H.current&&(Z($t),O(null))}}var re=hu(se),te=J(re,1),q=te[0],G=f.useMemo(function(){var le,fe,we;switch(z){case yr:return le={},A(le,qe,v),A(le,ft,p),A(le,dt,b),le;case br:return fe={},A(fe,qe,h),A(fe,ft,y),A(fe,dt,w),fe;case Cr:return we={},A(we,qe,m),A(we,ft,g),A(we,dt,T),we;default:return{}}},[z]),ue=pu(z,function(le){if(le===qe){var fe=G[qe];return fe?fe(U()):gi}if(Xe in G){var we;O(((we=G[Xe])===null||we===void 0?void 0:we.call(G,U(),null))||null)}return Xe===dt&&(q(U()),c>0&&(clearTimeout(M.current),M.current=setTimeout(function(){se({deadline:!0})},c))),vu}),Ee=J(ue,2),sn=Ee[0],Xe=Ee[1],Ue=yi(Xe);ae.current=Ue,fi(function(){V(t);var le=R.current;if(R.current=!0,!!e){var fe;!le&&t&&s&&(fe=yr),le&&t&&o&&(fe=br),(le&&!t&&u||!le&&d&&!t&&u)&&(fe=Cr),fe&&(Z(fe),sn())}},[t]),I.useEffect(function(){(z===yr&&!s||z===br&&!o||z===Cr&&!u)&&Z($t)},[s,o,u]),I.useEffect(function(){return function(){clearTimeout(M.current),H.current=!0}},[]),I.useEffect(function(){L!==void 0&&z===$t&&(_==null||_(L))},[L,z]);var rt=C;return G[qe]&&Xe===ft&&(rt=S({transition:"none"},rt)),[z,Xe,rt,L!=null?L:t]}var gu=function(e){Se(r,e);var t=Pe(r);function r(){return ge(this,r),t.apply(this,arguments)}return ye(r,[{key:"render",value:function(){return this.props.children}}]),r}(f.Component);function yu(e){var t=e;de(e)==="object"&&(t=e.transitionSupport);function r(a){return!!(a.motionName&&t)}var n=f.forwardRef(function(a,o){var i=a.visible,s=i===void 0?!0:i,l=a.removeOnLeave,u=l===void 0?!0:l,c=a.forceRender,d=a.children,v=a.motionName,h=a.leavedClassName,m=a.eventProps,p=r(a),y=I.useRef(),g=I.useRef();function b(){try{return y.current instanceof HTMLElement?y.current:or(g.current)}catch{return null}}var w=mu(p,s,b,a),T=J(w,4),E=T[0],P=T[1],$=T[2],_=T[3],N=f.useRef(_);_&&(N.current=!0);var F=f.useCallback(function(z){y.current=z,ei(o,z)},[]),L,V=S(S({},m),{},{visible:s});if(!d)L=null;else if(E===$t||!r(a))_?L=d(S({},V),F):!u&&N.current?L=d(S(S({},V),{},{className:h}),F):c?L=d(S(S({},V),{},{style:{display:"none"}}),F):L=null;else{var D,j;P===qe?j="prepare":yi(P)?j="active":P===ft&&(j="start"),L=d(S(S({},V),{},{className:X(ui(v,E),(D={},A(D,ui(v,"".concat(E,"-").concat(j)),j),A(D,v,typeof v=="string"),D)),style:$}),F)}return f.createElement(gu,{ref:g},L)});return n.displayName="CSSMotion",n}var kt=yu(oi),bn="add",Cn="keep",wn="remove",bi="removed";function bu(e){var t;return e&&de(e)==="object"&&"key"in e?t=e:t={key:e},S(S({},t),{},{key:String(t.key)})}function xn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(bu)}function Cu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,a=t.length,o=xn(e),i=xn(t);o.forEach(function(u){for(var c=!1,d=n;d<a;d+=1){var v=i[d];if(v.key===u.key){n<d&&(r=r.concat(i.slice(n,d).map(function(h){return S(S({},h),{},{status:bn})})),n=d),r.push(S(S({},v),{},{status:Cn})),n+=1,c=!0;break}}c||r.push(S(S({},u),{},{status:wn}))}),n<a&&(r=r.concat(i.slice(n).map(function(u){return S(S({},u),{},{status:bn})})));var s={};r.forEach(function(u){var c=u.key;s[c]=(s[c]||0)+1});var l=Object.keys(s).filter(function(u){return s[u]>1});return l.forEach(function(u){r=r.filter(function(c){var d=c.key,v=c.status;return d!==u||v!==wn}),r.forEach(function(c){c.key===u&&(c.status=Cn)})}),r}var wu=["component","children","onVisibleChanged"],xu=["status"],Eu=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Su(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kt,r=function(n){Se(o,n);var a=Pe(o);function o(){var i;ge(this,o);for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return i=a.call.apply(a,[this].concat(l)),i.state={keyEntities:[]},i.removeKey=function(c){i.setState(function(d){var v=d.keyEntities;return{keyEntities:v.map(function(h){return h.key!==c?h:S(S({},h),{},{status:bi})})}})},i}return ye(o,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,u=this.props,c=u.component,d=u.children,v=u.onVisibleChanged,h=ze(u,wu),m=c||f.Fragment,p={};return Eu.forEach(function(y){p[y]=h[y],delete h[y]}),delete h.keys,f.createElement(m,h,l.map(function(y){var g=y.status,b=ze(y,xu),w=g===bn||g===Cn;return f.createElement(t,k({},p,{key:b.key,visible:w,eventProps:b,onVisibleChanged:function(E){v==null||v(E,{key:b.key}),E||s.removeKey(b.key)}}),d)}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var u=s.keys,c=l.keyEntities,d=xn(u),v=Cu(c,d);return{keyEntities:v.filter(function(h){var m=c.find(function(p){var y=p.key;return h.key===y});return!(m&&m.status===bi&&h.status===wn)})}}}]),o}(f.Component);return r.defaultProps={component:"div"},r}var Pu=Su(oi),En=function(e){Se(r,e);var t=Pe(r);function r(){var n;ge(this,r);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=t.call.apply(t,[this].concat(o)),n.closeTimer=null,n.close=function(s){s&&s.stopPropagation(),n.clearCloseTimer();var l=n.props,u=l.onClose,c=l.noticeKey;u&&u(c)},n.startCloseTimer=function(){n.props.duration&&(n.closeTimer=window.setTimeout(function(){n.close()},n.props.duration*1e3))},n.clearCloseTimer=function(){n.closeTimer&&(clearTimeout(n.closeTimer),n.closeTimer=null)},n}return ye(r,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(a){(this.props.duration!==a.duration||this.props.updateMark!==a.updateMark||this.props.visible!==a.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var a=this,o=this.props,i=o.prefixCls,s=o.className,l=o.closable,u=o.closeIcon,c=o.style,d=o.onClick,v=o.children,h=o.holder,m="".concat(i,"-notice"),p=Object.keys(this.props).reduce(function(g,b){return(b.substr(0,5)==="data-"||b.substr(0,5)==="aria-"||b==="role")&&(g[b]=a.props[b]),g},{}),y=f.createElement("div",k({className:X(m,s,A({},"".concat(m,"-closable"),l)),style:c,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:d},p),f.createElement("div",{className:"".concat(m,"-content")},v),l?f.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(m,"-close")},u||f.createElement("span",{className:"".concat(m,"-close-x")})):null);return h?Je.default.createPortal(y,h):y}}]),r}(I.Component);En.defaultProps={onClose:function(){},duration:1.5};function Tu(e){if(Array.isArray(e))return cn(e)}function Ci(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ou(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W(e){return Tu(e)||Ci(e)||fn(e)||Ou()}function Sn(e){var t=f.useRef({}),r=f.useState([]),n=J(r,2),a=n[0],o=n[1];function i(s){var l=!0;e.add(s,function(u,c){var d=c.key;if(u&&(!t.current[d]||l)){var v=f.createElement(En,k({},c,{holder:u}));t.current[d]=v,o(function(h){var m=h.findIndex(function(y){return y.key===c.key});if(m===-1)return[].concat(W(h),[v]);var p=W(h);return p[m]=v,p})}l=!1})}return[i,f.createElement(f.Fragment,null,a)]}var wi=0,_u=Date.now();function xi(){var e=wi;return wi+=1,"rcNotification_".concat(_u,"_").concat(e)}var vt=function(e){Se(r,e);var t=Pe(r);function r(){var n;ge(this,r);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return n=t.call.apply(t,[this].concat(o)),n.state={notices:[]},n.hookRefs=new Map,n.add=function(s,l){var u=s.key||xi(),c=S(S({},s),{},{key:u}),d=n.props.maxCount;n.setState(function(v){var h=v.notices,m=h.map(function(y){return y.notice.key}).indexOf(u),p=h.concat();return m!==-1?p.splice(m,1,{notice:c,holderCallback:l}):(d&&h.length>=d&&(c.key=p[0].notice.key,c.updateMark=xi(),c.userPassKey=u,p.shift()),p.push({notice:c,holderCallback:l})),{notices:p}})},n.remove=function(s){n.setState(function(l){var u=l.notices;return{notices:u.filter(function(c){var d=c.notice,v=d.key,h=d.userPassKey,m=h||v;return m!==s})}})},n.noticePropsMap={},n}return ye(r,[{key:"getTransitionName",value:function(){var a=this.props,o=a.prefixCls,i=a.animation,s=this.props.transitionName;return!s&&i&&(s="".concat(o,"-").concat(i)),s}},{key:"render",value:function(){var a=this,o=this.state.notices,i=this.props,s=i.prefixCls,l=i.className,u=i.closeIcon,c=i.style,d=[];return o.forEach(function(v,h){var m=v.notice,p=v.holderCallback,y=h===o.length-1?m.updateMark:void 0,g=m.key,b=m.userPassKey,w=S(S(S({prefixCls:s,closeIcon:u},m),m.props),{},{key:g,noticeKey:b||g,updateMark:y,onClose:function(E){var P;a.remove(E),(P=m.onClose)===null||P===void 0||P.call(m)},onClick:m.onClick,children:m.content});d.push(g),a.noticePropsMap[g]={props:w,holderCallback:p}}),f.createElement("div",{className:X(s,l),style:c},f.createElement(Pu,{keys:d,motionName:this.getTransitionName(),onVisibleChanged:function(h,m){var p=m.key;h||delete a.noticePropsMap[p]}},function(v){var h=v.key,m=v.className,p=v.style,y=v.visible,g=a.noticePropsMap[h],b=g.props,w=g.holderCallback;return w?f.createElement("div",{key:h,className:X(m,"".concat(s,"-hook-holder")),style:S({},p),ref:function(E){typeof h!="undefined"&&(E?(a.hookRefs.set(h,E),w(E,b)):a.hookRefs.delete(h))}}):f.createElement(En,k({},b,{className:X(m,b==null?void 0:b.className),style:S(S({},p),b==null?void 0:b.style),visible:y}))}))}}]),r}(I.Component);vt.newInstance=void 0,vt.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},vt.newInstance=function(t,r){var n=t||{},a=n.getContainer,o=ze(n,["getContainer"]),i=document.createElement("div");if(a){var s=a();s.appendChild(i)}else document.body.appendChild(i);var l=!1;function u(c){l||(l=!0,r({notice:function(v){c.add(v)},removeNotice:function(v){c.remove(v)},component:c,destroy:function(){Je.default.unmountComponentAtNode(i),i.parentNode&&i.parentNode.removeChild(i)},useNotification:function(){return Sn(c)}}))}Je.default.render(f.createElement(vt,k({},o,{ref:u})),i)};var Nu={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},Au=Nu,$u=I.createContext({}),Pn=$u;function be(e,t){ku(e)&&(e="100%");var r=Mu(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function xr(e){return Math.min(1,Math.max(0,e))}function ku(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Mu(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Ei(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Er(e){return e<=1?Number(e)*100+"%":e}function nt(e){return e.length===1?"0"+e:String(e)}function Fu(e,t,r){return{r:be(e,255)*255,g:be(t,255)*255,b:be(r,255)*255}}function Si(e,t,r){e=be(e,255),t=be(t,255),r=be(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o=0,i=0,s=(n+a)/2;if(n===a)i=0,o=0;else{var l=n-a;switch(i=s>.5?l/(2-n-a):l/(n+a),n){case e:o=(t-r)/l+(t<r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4;break}o/=6}return{h:o,s:i,l:s}}function Tn(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Ru(e,t,r){var n,a,o;if(e=be(e,360),t=be(t,100),r=be(r,100),t===0)a=r,o=r,n=r;else{var i=r<.5?r*(1+t):r+t-r*t,s=2*r-i;n=Tn(s,i,e+1/3),a=Tn(s,i,e),o=Tn(s,i,e-1/3)}return{r:n*255,g:a*255,b:o*255}}function On(e,t,r){e=be(e,255),t=be(t,255),r=be(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o=0,i=n,s=n-a,l=n===0?0:s/n;if(n===a)o=0;else{switch(n){case e:o=(t-r)/s+(t<r?6:0);break;case t:o=(r-e)/s+2;break;case r:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:i}}function Iu(e,t,r){e=be(e,360)*6,t=be(t,100),r=be(r,100);var n=Math.floor(e),a=e-n,o=r*(1-t),i=r*(1-a*t),s=r*(1-(1-a)*t),l=n%6,u=[r,i,o,o,s,r][l],c=[s,r,r,i,o,o][l],d=[o,o,s,r,r,i][l];return{r:u*255,g:c*255,b:d*255}}function _n(e,t,r,n){var a=[nt(Math.round(e).toString(16)),nt(Math.round(t).toString(16)),nt(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Vu(e,t,r,n,a){var o=[nt(Math.round(e).toString(16)),nt(Math.round(t).toString(16)),nt(Math.round(r).toString(16)),nt(Lu(n))];return a&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Lu(e){return Math.round(parseFloat(e)*255).toString(16)}function Pi(e){return Oe(e)/255}function Oe(e){return parseInt(e,16)}function Du(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Nn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function pt(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,o=null,i=!1,s=!1;return typeof e=="string"&&(e=Hu(e)),typeof e=="object"&&(Ge(e.r)&&Ge(e.g)&&Ge(e.b)?(t=Fu(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ge(e.h)&&Ge(e.s)&&Ge(e.v)?(n=Er(e.s),a=Er(e.v),t=Iu(e.h,n,a),i=!0,s="hsv"):Ge(e.h)&&Ge(e.s)&&Ge(e.l)&&(n=Er(e.s),o=Er(e.l),t=Ru(e.h,n,o),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=Ei(r),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var ju="[-\\+]?\\d+%?",zu="[-\\+]?\\d*\\.\\d+%?",Qe="(?:"+zu+")|(?:"+ju+")",An="[\\s|\\(]+("+Qe+")[,|\\s]+("+Qe+")[,|\\s]+("+Qe+")\\s*\\)?",$n="[\\s|\\(]+("+Qe+")[,|\\s]+("+Qe+")[,|\\s]+("+Qe+")[,|\\s]+("+Qe+")\\s*\\)?",De={CSS_UNIT:new RegExp(Qe),rgb:new RegExp("rgb"+An),rgba:new RegExp("rgba"+$n),hsl:new RegExp("hsl"+An),hsla:new RegExp("hsla"+$n),hsv:new RegExp("hsv"+An),hsva:new RegExp("hsva"+$n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Hu(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Nn[e])e=Nn[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=De.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=De.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=De.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=De.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=De.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=De.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=De.hex8.exec(e),r?{r:Oe(r[1]),g:Oe(r[2]),b:Oe(r[3]),a:Pi(r[4]),format:t?"name":"hex8"}:(r=De.hex6.exec(e),r?{r:Oe(r[1]),g:Oe(r[2]),b:Oe(r[3]),format:t?"name":"hex"}:(r=De.hex4.exec(e),r?{r:Oe(r[1]+r[1]),g:Oe(r[2]+r[2]),b:Oe(r[3]+r[3]),a:Pi(r[4]+r[4]),format:t?"name":"hex8"}:(r=De.hex3.exec(e),r?{r:Oe(r[1]+r[1]),g:Oe(r[2]+r[2]),b:Oe(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function Ge(e){return Boolean(De.CSS_UNIT.exec(String(e)))}var kn=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=Du(t)),this.originalInput=t;var a=pt(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,a,o=t.r/255,i=t.g/255,s=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Ei(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=On(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=On(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv("+r+", "+n+"%, "+a+"%)":"hsva("+r+", "+n+"%, "+a+"%, "+this.roundA+")"},e.prototype.toHsl=function(){var t=Si(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Si(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl("+r+", "+n+"%, "+a+"%)":"hsla("+r+", "+n+"%, "+a+"%, "+this.roundA+")"},e.prototype.toHex=function(t){return t===void 0&&(t=!1),_n(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Vu(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb("+t+", "+r+", "+n+")":"rgba("+t+", "+r+", "+n+", "+this.roundA+")"},e.prototype.toPercentageRgb=function(){var t=function(r){return Math.round(be(r,255)*100)+"%"};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(be(r,255)*100)};return this.a===1?"rgb("+t(this.r)+"%, "+t(this.g)+"%, "+t(this.b)+"%)":"rgba("+t(this.r)+"%, "+t(this.g)+"%, "+t(this.b)+"%, "+this.roundA+")"},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+_n(this.r,this.g,this.b,!1),r=0,n=Object.entries(Nn);r<n.length;r++){var a=n[r],o=a[0],i=a[1];if(t===i)return o}return!1},e.prototype.toString=function(t){var r=Boolean(t);t=t!=null?t:this.format;var n=!1,a=this.a<1&&this.a>=0,o=!r&&a&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=xr(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=xr(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=xr(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=xr(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),a=new e(t).toRgb(),o=r/100,i={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return new e(i)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,o=[this];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,a=r.s,o=r.v,i=[],s=1/t;t--;)i.push(new e({h:n,s:a,v:o})),o=(o+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb();return new e({r:n.r+(r.r-n.r)*r.a,g:n.g+(r.g-n.g)*r.a,b:n.b+(r.b-n.b)*r.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,a=[this],o=360/t,i=1;i<t;i++)a.push(new e({h:(n+i*o)%360,s:r.s,l:r.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Sr=2,Ti=.16,Bu=.05,Wu=.05,Uu=.15,Oi=5,_i=4,qu=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Ni(e){var t=e.r,r=e.g,n=e.b,a=On(t,r,n);return{h:a.h*360,s:a.s,v:a.v}}function Pr(e){var t=e.r,r=e.g,n=e.b;return"#".concat(_n(t,r,n,!1))}function Gu(e,t,r){var n=r/100,a={r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b};return a}function Ai(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Sr*t:Math.round(e.h)+Sr*t:n=r?Math.round(e.h)+Sr*t:Math.round(e.h)-Sr*t,n<0?n+=360:n>=360&&(n-=360),n}function $i(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-Ti*t:t===_i?n=e.s+Ti:n=e.s+Bu*t,n>1&&(n=1),r&&t===Oi&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function ki(e,t,r){var n;return r?n=e.v+Wu*t:n=e.v-Uu*t,n>1&&(n=1),Number(n.toFixed(2))}function Mt(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=pt(e),a=Oi;a>0;a-=1){var o=Ni(n),i=Pr(pt({h:Ai(o,a,!0),s:$i(o,a,!0),v:ki(o,a,!0)}));r.push(i)}r.push(Pr(n));for(var s=1;s<=_i;s+=1){var l=Ni(n),u=Pr(pt({h:Ai(l,s),s:$i(l,s),v:ki(l,s)}));r.push(u)}return t.theme==="dark"?qu.map(function(c){var d=c.index,v=c.opacity,h=Pr(Gu(pt(t.backgroundColor||"#141414"),pt(r[d]),v*100));return h}):r}var Mn={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Ce={},Fn={};Object.keys(Mn).forEach(function(e){Ce[e]=Mt(Mn[e]),Ce[e].primary=Ce[e][5],Fn[e]=Mt(Mn[e],{theme:"dark",backgroundColor:"#141414"}),Fn[e].primary=Fn[e][5]}),Ce.red,Ce.volcano,Ce.gold,Ce.orange,Ce.yellow,Ce.lime,Ce.green,Ce.cyan,Ce.blue,Ce.geekblue,Ce.purple,Ce.magenta,Ce.grey;var Mi={};function Ku(e,t){}function Yu(e,t,r){!t&&!Mi[r]&&(e(!1,r),Mi[r]=!0)}function He(e,t){Yu(Ku,e,t)}var Xu="rc-util-key";function Fi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Xu}function Rn(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Ri(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ct())return null;var n=document.createElement("style");if((t=r.csp)===null||t===void 0?void 0:t.nonce){var a;n.nonce=(a=r.csp)===null||a===void 0?void 0:a.nonce}n.innerHTML=e;var o=Rn(r),i=o.firstChild;return r.prepend&&o.prepend?o.prepend(n):r.prepend&&i?o.insertBefore(n,i):o.appendChild(n),n}var In=new Map;function Ju(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Rn(t);return Array.from(In.get(r).children).find(function(n){return n.tagName==="STYLE"&&n.getAttribute(Fi(t))===e})}function Vn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Rn(r);if(!In.has(n)){var a=Ri("",r),o=a.parentNode;In.set(n,o),o.removeChild(a)}var i=Ju(t,r);if(i){var s,l;if(((s=r.csp)===null||s===void 0?void 0:s.nonce)&&i.nonce!==((l=r.csp)===null||l===void 0?void 0:l.nonce)){var u;i.nonce=(u=r.csp)===null||u===void 0?void 0:u.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var c=Ri(e,r);return c.setAttribute(Fi(r),t),c}function Qu(e,t){He(e,"[@ant-design/icons] ".concat(t))}function Ii(e){return de(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(de(e.icon)==="object"||typeof e.icon=="function")}function Vi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:t[r]=n}return t},{})}function Ln(e,t,r){return r?ne.default.createElement(e.tag,S(S({key:t},Vi(e.attrs)),r),(e.children||[]).map(function(n,a){return Ln(n,"".concat(t,"-").concat(e.tag,"-").concat(a))})):ne.default.createElement(e.tag,S({key:t},Vi(e.attrs)),(e.children||[]).map(function(n,a){return Ln(n,"".concat(t,"-").concat(e.tag,"-").concat(a))}))}function Li(e){return Mt(e)[0]}function Di(e){return e?Array.isArray(e)?e:[e]:[]}var Zu=` .anticon { display: inline-block; 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); } } `,ec=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zu,r=I.useContext(Pn),n=r.csp;I.useEffect(function(){Vn(t,"@ant-design-icons",{prepend:!0,csp:n})},[])},tc=["icon","className","onClick","style","primaryColor","secondaryColor"],Ft={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function rc(e){var t=e.primaryColor,r=e.secondaryColor;Ft.primaryColor=t,Ft.secondaryColor=r||Li(t),Ft.calculated=!!r}function nc(){return S({},Ft)}var Tr=function(t){var r=t.icon,n=t.className,a=t.onClick,o=t.style,i=t.primaryColor,s=t.secondaryColor,l=ze(t,tc),u=Ft;if(i&&(u={primaryColor:i,secondaryColor:s||Li(i)}),ec(),Qu(Ii(r),"icon should be icon definiton, but got ".concat(r)),!Ii(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=S(S({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),Ln(c.icon,"svg-".concat(c.name),S({className:n,onClick:a,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};Tr.displayName="IconReact",Tr.getTwoToneColors=nc,Tr.setTwoToneColors=rc;var Dn=Tr;function ji(e){var t=Di(e),r=J(t,2),n=r[0],a=r[1];return Dn.setTwoToneColors({primaryColor:n,secondaryColor:a})}function ac(){var e=Dn.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var ic=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];ji("#1890ff");var Or=f.forwardRef(function(e,t){var r,n=e.className,a=e.icon,o=e.spin,i=e.rotate,s=e.tabIndex,l=e.onClick,u=e.twoToneColor,c=ze(e,ic),d=f.useContext(Pn),v=d.prefixCls,h=v===void 0?"anticon":v,m=X(h,(r={},A(r,"".concat(h,"-").concat(a.name),!!a.name),A(r,"".concat(h,"-spin"),!!o||a.name==="loading"),r),n),p=s;p===void 0&&l&&(p=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,g=Di(u),b=J(g,2),w=b[0],T=b[1];return f.createElement("span",S(S({role:"img","aria-label":a.name},c),{},{ref:t,tabIndex:p,onClick:l,className:m}),f.createElement(Dn,{icon:a,primaryColor:w,secondaryColor:T,style:y}))});Or.displayName="AntdIcon",Or.getTwoToneColor=ac,Or.setTwoToneColor=ji;var _e=Or,zi=function(t,r){return f.createElement(_e,S(S({},t),{},{ref:r,icon:Au}))};zi.displayName="LoadingOutlined";var jn=f.forwardRef(zi),oc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},sc=oc,Hi=function(t,r){return f.createElement(_e,S(S({},t),{},{ref:r,icon:sc}))};Hi.displayName="ExclamationCircleFilled";var lc=f.forwardRef(Hi),uc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"},cc=uc,Bi=function(t,r){return f.createElement(_e,S(S({},t),{},{ref:r,icon:cc}))};Bi.displayName="CloseCircleFilled";var Wi=f.forwardRef(Bi),fc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},dc=fc,Ui=function(t,r){return f.createElement(_e,S(S({},t),{},{ref:r,icon:dc}))};Ui.displayName="CheckCircleFilled";var vc=f.forwardRef(Ui),pc={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},hc=pc,qi=function(t,r){return f.createElement(_e,S(S({},t),{},{ref:r,icon:hc}))};qi.displayName="InfoCircleFilled";var mc=f.forwardRef(qi);function _r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return ne.default.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(_r(n)):dn.exports.isFragment(n)&&n.props?r=r.concat(_r(n.props.children,t)):r.push(n))}),r}var ht="RC_FORM_INTERNAL_HOOKS",ie=function(){He(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Rt=f.createContext({getFieldValue:ie,getFieldsValue:ie,getFieldError:ie,getFieldWarning:ie,getFieldsError:ie,isFieldsTouched:ie,isFieldTouched:ie,isFieldValidating:ie,isFieldsValidating:ie,resetFields:ie,setFields:ie,setFieldsValue:ie,validateFields:ie,submit:ie,getInternalHooks:function(){return ie(),{dispatch:ie,initEntityValue:ie,registerField:ie,useSubscribe:ie,setInitialValues:ie,setCallbacks:ie,getFields:ie,setValidateMessages:ie,setPreserve:ie,getInitialValue:ie}}});function zn(e){return e==null?[]:Array.isArray(e)?e:[e]}var Gi={exports:{}};(function(e){var t=function(r){var n=Object.prototype,a=n.hasOwnProperty,o,i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(x,C,O){return Object.defineProperty(x,C,{value:O,enumerable:!0,configurable:!0,writable:!0}),x[C]}try{c({},"")}catch{c=function(C,O,R){return C[O]=R}}function d(x,C,O,R){var M=C&&C.prototype instanceof b?C:b,H=Object.create(M.prototype),Y=new z(R||[]);return H._invoke=L(x,O,Y),H}r.wrap=d;function v(x,C,O){try{return{type:"normal",arg:x.call(C,O)}}catch(R){return{type:"throw",arg:R}}}var h="suspendedStart",m="suspendedYield",p="executing",y="completed",g={};function b(){}function w(){}function T(){}var E={};c(E,s,function(){return this});var P=Object.getPrototypeOf,$=P&&P(P(Z([])));$&&$!==n&&a.call($,s)&&(E=$);var _=T.prototype=b.prototype=Object.create(E);w.prototype=T,c(_,"constructor",T),c(T,"constructor",w),w.displayName=c(T,u,"GeneratorFunction");function N(x){["next","throw","return"].forEach(function(C){c(x,C,function(O){return this._invoke(C,O)})})}r.isGeneratorFunction=function(x){var C=typeof x=="function"&&x.constructor;return C?C===w||(C.displayName||C.name)==="GeneratorFunction":!1},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,T):(x.__proto__=T,c(x,u,"GeneratorFunction")),x.pro