-1&&e%1==0&&e\n"},l.blockquote_close=function(e,t){return""+c(e,t)},l.code=function(e,t){return e[t].block?""+i(e[t].content)+"
"+c(e,t):""+i(e[t].content)+"
"},l.fence=function(e,t,n,l,u){var s,f,d=e[t],p="",h=n.langPrefix;if(d.params){if(f=(s=d.params.split(/\s+/g)).join(" "),r(u.rules.fence_custom,s[0]))return u.rules.fence_custom[s[0]](e,t,n,l,u);p=' class="'+h+i(a(o(f)))+'"'}return""+(n.highlight&&n.highlight.apply(n.highlight,[d.content].concat(s))||i(d.content))+"
"+c(e,t)},l.fence_custom={},l.heading_open=function(e,t){return""},l.heading_close=function(e,t){return"\n"},l.hr=function(e,t,n){return(n.xhtmlOut?"
":"
")+c(e,t)},l.bullet_list_open=function(){return"\n"},l.bullet_list_close=function(e,t){return"
"+c(e,t)},l.list_item_open=function(){return""},l.list_item_close=function(){return"\n"},l.ordered_list_open=function(e,t){var n=e[t];return"1?' start="'+n.order+'"':"")+">\n"},l.ordered_list_close=function(e,t){return"
"+c(e,t)},l.paragraph_open=function(e,t){return e[t].tight?"":""},l.paragraph_close=function(e,t){var n=!(e[t].tight&&t&&"inline"===e[t-1].type&&!e[t-1].content);return(e[t].tight?"":"
")+(n?c(e,t):"")},l.link_open=function(e,t,n){var r=e[t].title?' title="'+i(a(e[t].title))+'"':"",o=n.linkTarget?' target="'+n.linkTarget+'"':"";return'"},l.link_close=function(){return""},l.image=function(e,t,n){var r=' src="'+i(e[t].src)+'"',l=e[t].title?' title="'+i(a(e[t].title))+'"':"";return""},l.table_open=function(){return"\n"},l.table_close=function(){return"
\n"},l.thead_open=function(){return"\n"},l.thead_close=function(){return"\n"},l.tbody_open=function(){return"\n"},l.tbody_close=function(){return"\n"},l.tr_open=function(){return""},l.tr_close=function(){return"
\n"},l.th_open=function(e,t){var n=e[t];return""},l.th_close=function(){return" | "},l.td_open=function(e,t){var n=e[t];return""},l.td_close=function(){return" | "},l.strong_open=function(){return""},l.strong_close=function(){return""},l.em_open=function(){return""},l.em_close=function(){return""},l.del_open=function(){return""},l.del_close=function(){return""},l.ins_open=function(){return""},l.ins_close=function(){return""},l.mark_open=function(){return""},l.mark_close=function(){return""},l.sub=function(e,t){return""+i(e[t].content)+""},l.sup=function(e,t){return""+i(e[t].content)+""},l.hardbreak=function(e,t,n){return n.xhtmlOut?"
\n":"
\n"},l.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},l.text=function(e,t){return i(e[t].content)},l.htmlblock=function(e,t){return e[t].content},l.htmltag=function(e,t){return e[t].content},l.abbr_open=function(e,t){return''},l.abbr_close=function(){return""},l.footnote_ref=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),'"},l.footnote_block_open=function(e,t,n){return(n.xhtmlOut?'\n':'\n')+'\n"},l.footnote_open=function(e,t){return'\n"},l.footnote_anchor=function(e,t){var n="fnref"+Number(e[t].id+1).toString();return e[t].subId>0&&(n+=":"+e[t].subId),' '},l.dl_open=function(){return"\n"},l.dt_open=function(){return"- "},l.dd_open=function(){return"
- "},l.dl_close=function(){return"
\n"},l.dt_close=function(){return"\n"},l.dd_close=function(){return"\n"};var c=l.getBreak=function(e,t){return(t=function e(t,n){return++n>=t.length-2?n:"paragraph_open"===t[n].type&&t[n].tight&&"inline"===t[n+1].type&&0===t[n+1].content.length&&"paragraph_close"===t[n+2].type&&t[n+2].tight?e(t,n+2):n}(e,t))0?i[t].count:1,r=0;r=0;t--)if("text"===(i=a[t]).type){for(u=0,l=i.content,f.lastIndex=0,s=i.level,c=[];d=f.exec(l);)f.lastIndex>u&&c.push({type:"text",content:l.slice(u,d.index+d[1].length),level:s}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+d[2]],level:s++}),c.push({type:"text",content:d[2],level:s}),c.push({type:"abbr_close",level:--s}),u=f.lastIndex-d[3].length;c.length&&(u=0;c--)if("inline"===e.tokens[c].type)for(t=(l=e.tokens[c].children).length-1;t>=0;t--)"text"===(n=l[t]).type&&(i=n.content,i=(u=i).indexOf("(")<0?u:u.replace(o,(function(e,t){return a[t.toLowerCase()]})),r.test(i)&&(i=i.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1\u2014$2").replace(/(^|\s)--(\s|$)/gm,"$1\u2013$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1\u2013$2")),n.content=i)}},function(e,t,n){"use strict";var r=/['"]/,o=/['"]/g,a=/[-\s()\[\]]/;function i(e,t){return!(t<0||t>=e.length)&&!a.test(e[t])}function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}e.exports=function(e){var t,n,a,c,u,s,f,d,p,h,m,v,b,g,y,O,w;if(e.options.typographer)for(w=[],y=e.tokens.length-1;y>=0;y--)if("inline"===e.tokens[y].type)for(O=e.tokens[y].children,w.length=0,t=0;t=0&&!(w[b].level<=f);b--);w.length=b+1,u=0,s=(a=n.content).length;e:for(;u=0&&(h=w[b],!(w[b].level/i.test(e)}function i(){var e=[],t=new r({stripPrefix:!1,url:!0,email:!0,twitter:!1,replaceFn:function(t,n){switch(n.getType()){case"url":e.push({text:n.matchedText,url:n.getUrl()});break;case"email":e.push({text:n.matchedText,url:"mailto:"+n.getEmail().replace(/^mailto:/i,"")})}return!1}});return{links:e,autolinker:t}}e.exports=function(e){var t,n,r,l,c,u,s,f,d,p,h,m,v,b,g=e.tokens,y=null;if(e.options.linkify)for(n=0,r=g.length;n=0;t--)if("link_close"!==(c=l[t]).type){if("htmltag"===c.type&&(b=c.content,/^\s]/i.test(b)&&h>0&&h--,a(c.content)&&h++),!(h>0)&&"text"===c.type&&o.test(c.content)){if(y||(m=(y=i()).links,v=y.autolinker),u=c.content,m.length=0,v.link(u),!m.length)continue;for(s=[],p=c.level,f=0;ft&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n=0;n--)!0===t(e[n])&&e.splice(n,1)},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r},trim:function(e){return e.replace(this.trimRegex,"")}},e.HtmlTag=e.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(t){e.Util.assign(this,t),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(t){var n=this.getAttrs();return e.Util.assign(n,t),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(t){for(var n,r=this.getClass(),o=this.whitespaceRegex,a=e.Util.indexOf,i=r?r.split(o):[],l=t.split(o);n=l.shift();)-1===a(i,n)&&i.push(n);return this.getAttrs().class=i.join(" "),this},removeClass:function(t){for(var n,r=this.getClass(),o=this.whitespaceRegex,a=e.Util.indexOf,i=r?r.split(o):[],l=t.split(o);i.length&&(n=l.shift());){var c=a(i,n);-1!==c&&i.splice(c,1)}return this.getAttrs().class=i.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toAnchorString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),e.RegexLib=function(){var e="A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16f1-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2183\u2184\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u3006\u3031-\u3035\u303b\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6e5\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ad\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0de6-\u0def\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\ua9f0-\ua9f9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19";return{alphaNumericCharsStr:e,domainNameRegex:new RegExp("["+e+".\\-]*["+e+"\\-]"),tldRegex:/(?:travelersinsurance|sandvikcoromant|kerryproperties|cancerresearch|weatherchannel|kerrylogistics|spreadbetting|international|wolterskluwer|lifeinsurance|construction|pamperedchef|scholarships|versicherung|bridgestone|creditunion|kerryhotels|investments|productions|blackfriday|enterprises|lamborghini|photography|motorcycles|williamhill|playstation|contractors|barclaycard|accountants|redumbrella|engineering|management|telefonica|protection|consulting|tatamotors|creditcard|vlaanderen|schaeffler|associates|properties|foundation|republican|bnpparibas|boehringer|eurovision|extraspace|industries|immobilien|university|technology|volkswagen|healthcare|restaurant|cuisinella|vistaprint|apartments|accountant|travelers|homedepot|institute|vacations|furniture|fresenius|insurance|christmas|bloomberg|solutions|barcelona|firestone|financial|kuokgroup|fairwinds|community|passagens|goldpoint|equipment|lifestyle|yodobashi|aquarelle|marketing|analytics|education|amsterdam|statefarm|melbourne|allfinanz|directory|microsoft|stockholm|montblanc|accenture|lancaster|landrover|everbank|istanbul|graphics|grainger|ipiranga|softbank|attorney|pharmacy|saarland|catering|airforce|yokohama|mortgage|frontier|mutuelle|stcgroup|memorial|pictures|football|symantec|cipriani|ventures|telecity|cityeats|verisign|flsmidth|boutique|cleaning|firmdale|clinique|clothing|redstone|infiniti|deloitte|feedback|services|broadway|plumbing|commbank|training|barclays|exchange|computer|brussels|software|delivery|barefoot|builders|business|bargains|engineer|holdings|download|security|helsinki|lighting|movistar|discount|hdfcbank|supplies|marriott|property|diamonds|capetown|partners|democrat|jpmorgan|bradesco|budapest|rexroth|zuerich|shriram|academy|science|support|youtube|singles|surgery|alibaba|statoil|dentist|schwarz|android|cruises|cricket|digital|markets|starhub|systems|courses|coupons|netbank|country|domains|corsica|network|neustar|realtor|lincoln|limited|schmidt|yamaxun|cooking|contact|auction|spiegel|liaison|leclerc|latrobe|lasalle|abogado|compare|lanxess|exposed|express|company|cologne|college|avianca|lacaixa|fashion|recipes|ferrero|komatsu|storage|wanggou|clubmed|sandvik|fishing|fitness|bauhaus|kitchen|flights|florist|flowers|watches|weather|temasek|samsung|bentley|forsale|channel|theater|frogans|theatre|okinawa|website|tickets|jewelry|gallery|tiffany|iselect|shiksha|brother|organic|wedding|genting|toshiba|origins|philips|hyundai|hotmail|hoteles|hosting|rentals|windows|cartier|bugatti|holiday|careers|whoswho|hitachi|panerai|caravan|reviews|guitars|capital|trading|hamburg|hangout|finance|stream|family|abbott|health|review|travel|report|hermes|hiphop|gratis|career|toyota|hockey|dating|repair|google|social|soccer|reisen|global|otsuka|giving|unicom|casino|photos|center|broker|rocher|orange|bostik|garden|insure|ryukyu|bharti|safety|physio|sakura|oracle|online|jaguar|gallup|piaget|tienda|futbol|pictet|joburg|webcam|berlin|office|juegos|kaufen|chanel|chrome|xihuan|church|tennis|circle|kinder|flickr|bayern|claims|clinic|viajes|nowruz|xperia|norton|yachts|studio|coffee|camera|sanofi|nissan|author|expert|events|comsec|lawyer|tattoo|viking|estate|villas|condos|realty|yandex|energy|emerck|virgin|vision|durban|living|school|coupon|london|taobao|natura|taipei|nagoya|luxury|walter|aramco|sydney|madrid|credit|maison|makeup|schule|market|anquan|direct|design|swatch|suzuki|alsace|vuelos|dental|alipay|voyage|shouji|voting|airtel|mutual|degree|supply|agency|museum|mobily|dealer|monash|select|mormon|active|moscow|racing|datsun|quebec|nissay|rodeo|email|gifts|works|photo|chloe|edeka|cheap|earth|vista|tushu|koeln|glass|shoes|globo|tunes|gmail|nokia|space|kyoto|black|ricoh|seven|lamer|sener|epson|cisco|praxi|trust|citic|crown|shell|lease|green|legal|lexus|ninja|tatar|gripe|nikon|group|video|wales|autos|gucci|party|nexus|guide|linde|adult|parts|amica|lixil|boats|azure|loans|locus|cymru|lotte|lotto|stada|click|poker|quest|dabur|lupin|nadex|paris|faith|dance|canon|place|gives|trade|skype|rocks|mango|cloud|boots|smile|final|swiss|homes|honda|media|horse|cards|deals|watch|bosch|house|pizza|miami|osaka|tours|total|xerox|coach|sucks|style|delta|toray|iinet|tools|money|codes|beats|tokyo|salon|archi|movie|baidu|study|actor|yahoo|store|apple|world|forex|today|bible|tmall|tirol|irish|tires|forum|reise|vegas|vodka|sharp|omega|weber|jetzt|audio|promo|build|bingo|chase|gallo|drive|dubai|rehab|press|solar|sale|beer|bbva|bank|band|auto|sapo|sarl|saxo|audi|asia|arte|arpa|army|yoga|ally|zara|scor|scot|sexy|seat|zero|seek|aero|adac|zone|aarp|maif|meet|meme|menu|surf|mini|mobi|mtpc|porn|desi|star|ltda|name|talk|navy|love|loan|live|link|news|limo|like|spot|life|nico|lidl|lgbt|land|taxi|team|tech|kred|kpmg|sony|song|kiwi|kddi|jprs|jobs|sohu|java|itau|tips|info|immo|icbc|hsbc|town|host|page|toys|here|help|pars|haus|guru|guge|tube|goog|golf|gold|sncf|gmbh|gift|ggee|gent|gbiz|game|vana|pics|fund|ford|ping|pink|fish|film|fast|farm|play|fans|fail|plus|skin|pohl|fage|moda|post|erni|dvag|prod|doha|prof|docs|viva|diet|luxe|site|dell|sina|dclk|show|qpon|date|vote|cyou|voto|read|coop|cool|wang|club|city|chat|cern|cash|reit|rent|casa|cars|care|camp|rest|call|cafe|weir|wien|rich|wiki|buzz|wine|book|bond|room|work|rsvp|shia|ruhr|blue|bing|shaw|bike|safe|xbox|best|pwc|mtn|lds|aig|boo|fyi|nra|nrw|ntt|car|gal|obi|zip|aeg|vin|how|one|ong|onl|dad|ooo|bet|esq|org|htc|bar|uol|ibm|ovh|gdn|ice|icu|uno|gea|ifm|bot|top|wtf|lol|day|pet|eus|wtc|ubs|tvs|aco|ing|ltd|ink|tab|abb|afl|cat|int|pid|pin|bid|cba|gle|com|cbn|ads|man|wed|ceb|gmo|sky|ist|gmx|tui|mba|fan|ski|iwc|app|pro|med|ceo|jcb|jcp|goo|dev|men|aaa|meo|pub|jlc|bom|jll|gop|jmp|mil|got|gov|win|jot|mma|joy|trv|red|cfa|cfd|bio|moe|moi|mom|ren|biz|aws|xin|bbc|dnp|buy|kfh|mov|thd|xyz|fit|kia|rio|rip|kim|dog|vet|nyc|bcg|mtr|bcn|bms|bmw|run|bzh|rwe|tel|stc|axa|kpn|fly|krd|cab|bnl|foo|crs|eat|tci|sap|srl|nec|sas|net|cal|sbs|sfr|sca|scb|csc|edu|new|xxx|hiv|fox|wme|ngo|nhk|vip|sex|frl|lat|yun|law|you|tax|soy|sew|om|ac|hu|se|sc|sg|sh|sb|sa|rw|ru|rs|ro|re|qa|py|si|pw|pt|ps|sj|sk|pr|pn|pm|pl|sl|sm|pk|sn|ph|so|pg|pf|pe|pa|zw|nz|nu|nr|np|no|nl|ni|ng|nf|sr|ne|st|nc|na|mz|my|mx|mw|mv|mu|mt|ms|mr|mq|mp|mo|su|mn|mm|ml|mk|mh|mg|me|sv|md|mc|sx|sy|ma|ly|lv|sz|lu|lt|ls|lr|lk|li|lc|lb|la|tc|kz|td|ky|kw|kr|kp|kn|km|ki|kh|tf|tg|th|kg|ke|jp|jo|jm|je|it|is|ir|tj|tk|tl|tm|iq|tn|to|io|in|im|il|ie|ad|sd|ht|hr|hn|hm|tr|hk|gy|gw|gu|gt|gs|gr|gq|tt|gp|gn|gm|gl|tv|gi|tw|tz|ua|gh|ug|uk|gg|gf|ge|gd|us|uy|uz|va|gb|ga|vc|ve|fr|fo|fm|fk|fj|vg|vi|fi|eu|et|es|er|eg|ee|ec|dz|do|dm|dk|vn|dj|de|cz|cy|cx|cw|vu|cv|cu|cr|co|cn|cm|cl|ck|ci|ch|cg|cf|cd|cc|ca|wf|bz|by|bw|bv|bt|bs|br|bo|bn|bm|bj|bi|ws|bh|bg|bf|be|bd|bb|ba|az|ax|aw|au|at|as|ye|ar|aq|ao|am|al|yt|ai|za|ag|af|ae|zm|id)\b/}}(),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},build:function(t){return new e.HtmlTag({tagName:"a",attrs:this.createAttrs(t.getType(),t.getAnchorHref()),innerHtml:this.processAnchorText(t.getAnchorText())})},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(t){var n=this.truncate;if(!n||!n.length)return t;var r=n.length,o=n.location;return"smart"===o?e.truncate.TruncateSmart(t,r,".."):"middle"===o?e.truncate.TruncateMiddle(t,r,".."):e.truncate.TruncateEnd(t,r,"..")}}),e.htmlParser.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,t=/[^\s"'>\/=\x00-\x1F\x7F]+/.source+"(?:\\s*=\\s*"+e.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",t,"|",e.source+")",")*",">",")","|","(?:","<(/)?","(?:",/!--([\s\S]+?)--/.source,"|","(?:","("+/[0-9a-zA-Z][0-9a-zA-Z:]*/.source+")","(?:","(?:\\s+|\\b)",t,")*","\\s*/?",")",")",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,o=0,a=[];null!==(t=r.exec(e));){var i=t[0],l=t[3],c=t[1]||t[4],u=!!t[2],s=t.index,f=e.substring(o,s);f&&(n=this.parseTextAndEntityNodes(o,f),a.push.apply(a,n)),l?a.push(this.createCommentNode(s,i,l)):a.push(this.createElementNode(s,i,c,u)),o=s+i.length}if(o0&&"@"===h)&&!(d>0&&p&&this.wordCharRegExp.test(h))){if(this.matchHasUnbalancedClosingParen(l))l=l.substr(0,l.length-1);else{var m=this.matchHasInvalidCharAfterTld(l,c);m>-1&&(l=l.substr(0,m))}var v=c?"scheme":u?"www":"tld",b=!!c;i.push(new e.match.Url({tagBuilder:a,matchedText:l,offset:d,urlMatchType:v,url:l,protocolUrlMatch:b,protocolRelativeMatch:!!p,stripPrefix:o}))}}return i},matchHasUnbalancedClosingParen:function(e){if(")"===e.charAt(e.length-1)){var t=e.match(this.openParensRe),n=e.match(this.closeParensRe);if((t&&t.length||0)<(n&&n.length||0))return!0}return!1},matchHasInvalidCharAfterTld:function(e,t){if(!e)return-1;var n=0;t&&(n=e.indexOf(":"),e=e.slice(n));var r=/^((.?\/\/)?[A-Za-z0-9\u00C0-\u017F\.\-]*[A-Za-z0-9\u00C0-\u017F\-]\.[A-Za-z]+)/.exec(e);return null===r?-1:(n+=r[1].length,e=e.slice(r[1].length),/^[^.A-Za-z:\/?#]/.test(e)?n:-1)}}),e.matcher.UrlMatchValidator={hasFullProtocolRegex:/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,uriSchemeRegex:/^[A-Za-z][-.+A-Za-z0-9]*:/,hasWordCharAfterProtocolRegex:/:[^\s]*?[A-Za-z\u00C0-\u017F]/,ipRegex:/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,isValid:function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e))},isValidIpAddress:function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==e.match(t)},isValidUriScheme:function(e){var t=e.match(this.uriSchemeRegex)[0].toLowerCase();return"javascript:"!==t&&"vbscript:"!==t},urlMatchDoesNotHaveProtocolOrDot:function(e,t){return!!e&&(!t||!this.hasFullProtocolRegex.test(t))&&-1===e.indexOf(".")},urlMatchDoesNotHaveAtLeastOneWordChar:function(e,t){return!(!e||!t)&&!this.hasWordCharAfterProtocolRegex.test(e)}},e.truncate.TruncateEnd=function(t,n,r){return e.Util.ellipsis(t,n,r)},e.truncate.TruncateMiddle=function(e,t,n){if(e.length<=t)return e;var r=t-n.length,o="";return r>0&&(o=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+n+o).substr(0,t)},e.truncate.TruncateSmart=function(e,t,n){var r=function(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t},o=function(e,t){var r=t/2,o=Math.ceil(r),a=-1*Math.floor(r),i="";return a<0&&(i=e.substr(a)),e.substr(0,o)+n+i};if(e.length<=t)return e;var a=t-n.length,i=function(e){var t={},n=e,r=n.match(/^([a-z]+):\/\//i);return r&&(t.scheme=r[1],n=n.substr(r[0].length)),(r=n.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(t.host=r[1],n=n.substr(r[0].length)),(r=n.match(/^\/(.*?)(?=(\?|#|$))/i))&&(t.path=r[1],n=n.substr(r[0].length)),(r=n.match(/^\?(.*?)(?=(#|$))/i))&&(t.query=r[1],n=n.substr(r[0].length)),(r=n.match(/^#(.*?)$/i))&&(t.fragment=r[1]),t}(e);if(i.query){var l=i.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);l&&(i.query=i.query.substr(0,l[1].length),e=r(i))}if(e.length<=t)return e;if(i.host&&(i.host=i.host.replace(/^www\./,""),e=r(i)),e.length<=t)return e;var c="";if(i.host&&(c+=i.host),c.length>=a)return i.host.length==t?(i.host.substr(0,t-n.length)+n).substr(0,t):o(c,a).substr(0,t);var u="";if(i.path&&(u+="/"+i.path),i.query&&(u+="?"+i.query),u){if((c+u).length>=a)return(c+u).length==t?(c+u).substr(0,t):(c+o(u,a-c.length)).substr(0,t);c+=u}if(i.fragment){var s="#"+i.fragment;if((c+s).length>=a)return(c+s).length==t?(c+s).substr(0,t):(c+o(s,a-c.length)).substr(0,t);c+=s}if(i.scheme&&i.host){var f=i.scheme+"://";if((c+f).length0&&(d=c.substr(-1*Math.floor(a/2))),(c.substr(0,Math.ceil(a/2))+n+d).substr(0,t)},e})?r.apply(t,o):r)||(e.exports=a)},function(e,t,n){"use strict";var r=n(96),o=n(296),a=[["code",n(297)],["fences",n(298),["paragraph","blockquote","list"]],["blockquote",n(299),["paragraph","blockquote","list"]],["hr",n(300),["paragraph","blockquote","list"]],["list",n(301),["paragraph","blockquote"]],["footnote",n(302),["paragraph"]],["heading",n(303),["paragraph","blockquote"]],["lheading",n(304)],["htmlblock",n(305),["paragraph","blockquote"]],["table",n(307),["paragraph"]],["deflist",n(308),["paragraph"]],["paragraph",n(309)]];function i(){this.ruler=new r;for(var e=0;e=n))&&!(e.tShift[i]=0&&(e=e.replace(l,(function(t,n){var r;return 10===e.charCodeAt(n)?(i=n+1,s=0,t):(r=" ".slice((n-i-s)%4),s=n-i+1,r)}))),a=new o(e,this,t,n,r),this.tokenize(a,a.line,a.lineMax)},e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r,o){var a,i,l,c,u,s,f;for(this.src=e,this.parser=t,this.options=n,this.env=r,this.tokens=o,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",s=0,f=!1,l=c=s=0,u=(i=this.src).length;c=this.eMarks[e]},r.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},r.prototype.getLines=function(e,t,n,r){var o,a,i,l,c,u=e;if(e>=t)return"";if(u+1===t)return a=this.bMarks[u]+Math.min(this.tShift[u],n),i=r?this.eMarks[u]+1:this.eMarks[u],this.src.slice(a,i);for(l=new Array(t-e),o=0;un&&(c=n),c<0&&(c=0),a=this.bMarks[u]+c,i=u+1=4))break;o=++r}return e.line=r,e.tokens.push({type:"code",content:e.getLines(t,o,4+e.blkIndent,!0),block:!0,lines:[t,e.line],level:e.level}),!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,a,i,l,c,u=!1,s=e.bMarks[t]+e.tShift[t],f=e.eMarks[t];if(s+3>f)return!1;if(126!==(o=e.src.charCodeAt(s))&&96!==o)return!1;if(c=s,(a=(s=e.skipChars(s,o))-c)<3)return!1;if((i=e.src.slice(s,f).trim()).indexOf("`")>=0)return!1;if(r)return!0;for(l=t;!(++l>=n)&&!((s=c=e.bMarks[l]+e.tShift[l])<(f=e.eMarks[l])&&e.tShift[l]=4)&&!((s=e.skipChars(s,o))-cv)return!1;if(62!==e.src.charCodeAt(m++))return!1;if(e.level>=e.options.maxNesting)return!1;if(r)return!0;for(32===e.src.charCodeAt(m)&&m++,c=e.blkIndent,e.blkIndent=0,l=[e.bMarks[t]],e.bMarks[t]=m,a=(m=m=v,i=[e.tShift[t]],e.tShift[t]=m-e.bMarks[t],f=e.parser.ruler.getRules("blockquote"),o=t+1;o=(v=e.eMarks[o]));o++)if(62!==e.src.charCodeAt(m++)){if(a)break;for(h=!1,d=0,p=f.length;d=v,i.push(e.tShift[o]),e.tShift[o]=m-e.bMarks[o];for(u=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:s=[t,0],level:e.level++}),e.parser.tokenize(e,t,o),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=u,s[1]=e.line,d=0;dc)return!1;if(42!==(o=e.src.charCodeAt(l++))&&45!==o&&95!==o)return!1;for(a=1;l=(o=e.eMarks[t])||42!==(n=e.src.charCodeAt(r++))&&45!==n&&43!==n||r=o)return-1;if((n=e.src.charCodeAt(r++))<48||n>57)return-1;for(;;){if(r>=o)return-1;if(!((n=e.src.charCodeAt(r++))>=48&&n<=57)){if(41===n||46===n)break;return-1}}return r=0)b=!0;else{if(!((p=r(e,t))>=0))return!1;b=!1}if(e.level>=e.options.maxNesting)return!1;if(v=e.src.charCodeAt(p-1),a)return!0;for(y=e.tokens.length,b?(d=e.bMarks[t]+e.tShift[t],m=Number(e.src.substr(d,p-d-1)),e.tokens.push({type:"ordered_list_open",order:m,lines:w=[t,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:w=[t,0],level:e.level++}),i=t,O=!1,j=e.parser.ruler.getRules("list");i=e.eMarks[i]?1:g-p)>4&&(h=1),h<1&&(h=1),l=p-e.bMarks[i]+h,e.tokens.push({type:"list_item_open",lines:x=[t,0],level:e.level++}),u=e.blkIndent,s=e.tight,c=e.tShift[t],f=e.parentType,e.tShift[t]=g-e.bMarks[t],e.blkIndent=l,e.tight=!0,e.parentType="list",e.parser.tokenize(e,t,n,!0),e.tight&&!O||(S=!1),O=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=u,e.tShift[t]=c,e.tight=s,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),i=t=e.line,x[1]=i,g=e.bMarks[t],!(i>=n))&&!e.isEmpty(i)&&!(e.tShift[i]s)return!1;if(91!==e.src.charCodeAt(u))return!1;if(94!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(l=u+2;l=s||58!==e.src.charCodeAt(++l))&&(r||(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),c=e.src.slice(u+2,l-2),e.env.footnotes.refs[":"+c]=-1,e.tokens.push({type:"footnote_reference_open",label:c,level:e.level++}),o=e.bMarks[t],a=e.tShift[t],i=e.parentType,e.tShift[t]=e.skipSpaces(l)-l,e.bMarks[t]=l,e.blkIndent+=4,e.parentType="footnote",e.tShift[t]=c)return!1;if(35!==(o=e.src.charCodeAt(l))||l>=c)return!1;for(a=1,o=e.src.charCodeAt(++l);35===o&&l6||ll&&32===e.src.charCodeAt(i-1)&&(c=i),e.line=t+1,e.tokens.push({type:"heading_open",hLevel:a,lines:[t,e.line],level:e.level}),l=n)&&(!(e.tShift[i]3)&&(!((o=e.bMarks[i]+e.tShift[i])>=(a=e.eMarks[i]))&&((45===(r=e.src.charCodeAt(o))||61===r)&&(o=e.skipChars(o,r),!((o=e.skipSpaces(o))]/,a=/^<\/([a-zA-Z]{1,15})[\s>]/;e.exports=function(e,t,n,i){var l,c,u,s=e.bMarks[t],f=e.eMarks[t],d=e.tShift[t];if(s+=d,!e.options.html)return!1;if(d>3||s+2>=f)return!1;if(60!==e.src.charCodeAt(s))return!1;if(33===(l=e.src.charCodeAt(s+1))||63===l){if(i)return!0}else{if(47!==l&&!function(e){var t=32|e;return t>=97&&t<=122}(l))return!1;if(47===l){if(!(c=e.src.slice(s,f).match(a)))return!1}else if(!(c=e.src.slice(s,f).match(o)))return!1;if(!0!==r[c[1].toLowerCase()])return!1;if(i)return!0}for(u=t+1;un)return!1;if(u=t+1,e.tShift[u]=e.eMarks[u])return!1;if(124!==(a=e.src.charCodeAt(l))&&45!==a&&58!==a)return!1;if(i=r(e,t+1),!/^[-:| ]+$/.test(i))return!1;if((s=i.split("|"))<=2)return!1;for(d=[],c=0;c=a||126!==(r=e.src.charCodeAt(o++))&&58!==r||o===(n=e.skipSpaces(o))||n>=a?-1:n}e.exports=function(e,t,n,o){var a,i,l,c,u,s,f,d,p,h,m,v,b,g;if(o)return!(e.ddIndent<0)&&r(e,t)>=0;if(f=t+1,e.isEmpty(f)&&++f>n)return!1;if(e.tShift[f]=e.options.maxNesting)return!1;s=e.tokens.length,e.tokens.push({type:"dl_open",lines:u=[t,0],level:e.level++}),l=t,i=f;e:for(;;){for(g=!0,b=!1,e.tokens.push({type:"dt_open",lines:[l,l],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(l,l+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[l,l],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[f,0],level:e.level++}),v=e.tight,p=e.ddIndent,d=e.blkIndent,m=e.tShift[i],h=e.parentType,e.blkIndent=e.ddIndent=e.tShift[i]+2,e.tShift[i]=a-e.bMarks[i],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,i,n,!0),e.tight&&!b||(g=!1),b=e.line-i>1&&e.isEmpty(e.line-1),e.tShift[i]=m,e.tight=v,e.parentType=h,e.blkIndent=d,e.ddIndent=p,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=f=e.line,f>=n)break e;if(e.tShift[f]=n)break;if(l=f,e.isEmpty(l))break;if(e.tShift[l]=n)break;if(e.isEmpty(i)&&i++,i>=n)break;if(e.tShift[i]3)){for(o=!1,a=0,i=l.length;a0)e.pos=n;else{for(t=0;t=a)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},l.prototype.parse=function(e,t,n,r){var a=new o(e,this,t,n,r);this.tokenize(a)},e.exports=l},function(e,t,n){"use strict";function r(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}e.exports=function(e,t){for(var n=e.pos;n=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(var a=n-2;a>=0;a--)if(32!==e.pending.charCodeAt(a)){e.pending=e.pending.substring(0,a+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(o++;o?@[]^_`{|}~-".split("").forEach((function(e){r[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o=l)return!1;if(126!==e.src.charCodeAt(c+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(a=c>0?e.src.charCodeAt(c-1):-1,i=e.src.charCodeAt(c+2),126===a)return!1;if(126===i)return!1;if(32===i||10===i)return!1;for(r=c+2;rc+3)return e.pos+=r-c,t||(e.pending+=e.src.slice(c,r)),!0;for(e.pos=c+2,o=1;e.pos+1=l)return!1;if(43!==e.src.charCodeAt(c+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(a=c>0?e.src.charCodeAt(c-1):-1,i=e.src.charCodeAt(c+2),43===a)return!1;if(43===i)return!1;if(32===i||10===i)return!1;for(r=c+2;r=l)return!1;if(61!==e.src.charCodeAt(c+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(a=c>0?e.src.charCodeAt(c-1):-1,i=e.src.charCodeAt(c+2),61===a)return!1;if(61===i)return!1;if(32===i||10===i)return!1;for(r=c+2;r=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function o(e,t){var n,o,a,i=t,l=!0,c=!0,u=e.posMax,s=e.src.charCodeAt(t);for(n=t>0?e.src.charCodeAt(t-1):-1;i=u&&(l=!1),(a=i-t)>=4?l=c=!1:(32!==(o=i=e.options.maxNesting)return!1;for(e.pos=f+n,c=[n];e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var n,o,a=e.posMax,i=e.pos;if(126!==e.src.charCodeAt(i))return!1;if(t)return!1;if(i+2>=a)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=i+1;e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var n,o,a=e.posMax,i=e.pos;if(94!==e.src.charCodeAt(i))return!1;if(t)return!1;if(i+2>=a)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=i+1;e.pos=e.options.maxNesting)return!1;if(n=b+1,(l=r(e,b))<0)return!1;if((f=l+1)=v)return!1;for(b=f,o(e,f)?(u=e.linkContent,f=e.pos):u="",b=f;f=v||41!==e.src.charCodeAt(f))return e.pos=m,!1;f++}else{if(e.linkLevel>0)return!1;for(;f=0?c=e.src.slice(b,f++):f=b-1),c||("undefined"===typeof c&&(f=l+1),c=e.src.slice(n,l)),!(d=e.env.references[i(c)]))return e.pos=m,!1;u=d.href,s=d.title}return t||(e.pos=n,e.posMax=l,h?e.push({type:"image",src:u,title:s,alt:e.src.substr(n,l-n),level:e.level}):(e.push({type:"link_open",href:u,title:s,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=f,e.posMax=v,!0}},function(e,t,n){"use strict";var r=n(97);e.exports=function(e,t){var n,o,a,i,l=e.posMax,c=e.pos;return!(c+2>=l)&&(94===e.src.charCodeAt(c)&&(91===e.src.charCodeAt(c+1)&&(!(e.level>=e.options.maxNesting)&&(n=c+2,!((o=r(e,c+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),a=e.env.footnotes.list.length,e.pos=n,e.posMax=o,e.push({type:"footnote_ref",id:a,level:e.level}),e.linkLevel++,i=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[a]={tokens:e.tokens.splice(i)},e.linkLevel--),e.pos=o+1,e.posMax=l,!0)))))}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,a,i=e.posMax,l=e.pos;if(l+3>i)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(l))return!1;if(94!==e.src.charCodeAt(l+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(r=l+2;r=i)&&(r++,n=e.src.slice(l+2,r-1),"undefined"!==typeof e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(o=e.env.footnotes.list.length,e.env.footnotes.list[o]={label:n,count:0},e.env.footnotes.refs[":"+n]=o):o=e.env.footnotes.refs[":"+n],a=e.env.footnotes.list[o].count,e.env.footnotes.list[o].count++,e.push({type:"footnote_ref",id:o,subId:a,level:e.level})),e.pos=r,e.posMax=i,!0)))}},function(e,t,n){"use strict";var r=n(325),o=n(145),a=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,i=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,l,c,u,s,f=e.pos;return 60===e.src.charCodeAt(f)&&(!((n=e.src.slice(f)).indexOf(">")<0)&&((l=n.match(i))?!(r.indexOf(l[1].toLowerCase())<0)&&(u=l[0].slice(1,-1),s=o(u),!!e.parser.validateLink(u)&&(t||(e.push({type:"link_open",href:s,level:e.level}),e.push({type:"text",content:u,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=l[0].length,!0)):!!(c=n.match(a))&&(u=c[0].slice(1,-1),s=o("mailto:"+u),!!e.parser.validateLink(s)&&(t||(e.push({type:"link_open",href:s,level:e.level}),e.push({type:"text",content:u,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=c[0].length,!0))))}},function(e,t,n){"use strict";e.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},function(e,t,n){"use strict";var r=n(327).HTML_TAG_RE;e.exports=function(e,t){var n,o,a,i=e.pos;return!!e.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=a)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(o=e.src.slice(i).match(r))&&(t||e.push({type:"htmltag",content:e.src.slice(i,i+o[0].length),level:e.level}),e.pos+=o[0].length,!0))))}},function(e,t,n){"use strict";function r(e,t){return e=e.source,t=t||"",function n(r,o){return r?(o=o.source||o,e=e.replace(r,o),n):new RegExp(e,t)}}var o=r(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",/[^"'=<>`\x00-\x20]+/)("single_quoted",/'[^']*'/)("double_quoted",/"[^"]*"/)(),a=r(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)("attr_value",o)(),i=r(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",a)(),l=r(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",i)("close_tag",/<\/[A-Za-z][A-Za-z0-9]*\s*>/)("comment",/|/)("processing",/<[?].*?[?]>/)("declaration",/]*>/)("cdata",//)();e.exports.HTML_TAG_RE=l},function(e,t,n){"use strict";var r=n(143),o=n(45).has,a=n(45).isValidEntityCode,i=n(45).fromCodePoint,l=/^((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,c=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,u,s=e.pos,f=e.posMax;if(38!==e.src.charCodeAt(s))return!1;if(s+1u)return 1;if(u>c)return-1}var s=a[a.length-1],f=i[i.length-1];if(s&&f){var d=s.split(".").map(n),p=f.split(".").map(n);for(l=0;lp[l])return 1;if(p[l]>d[l])return-1}}else if(s||f)return s?-1:1;return 0}var a=[">",">=","=","<","<="],i={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};return o.validate=function(t){return"string"===typeof t&&e.test(t)},o.compare=function(e,t,n){!function(e){if("string"!==typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===a.indexOf(e))throw new TypeError("Invalid operator, expected one of "+a.join("|"))}(n);var r=o(e,t);return i[n].indexOf(r)>-1},o})?r.apply(t,o):r)||(e.exports=a)},,,function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(8),i=n(4),l=n(5),c=n.n(l),u=n(0),s=n(50),f=n(105),d=["xxl","xl","lg","md","sm","xs"],p={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},h=new Map,m=-1,v={},b={matchHandlers:{},dispatch:function(e){return v=e,h.forEach((function(e){return e(v)})),h.size>=1},subscribe:function(e){return h.size||this.register(),m+=1,h.set(m,e),e(v),m},unsubscribe:function(e){h.delete(e),h.size||this.unregister()},unregister:function(){var e=this;Object.keys(p).forEach((function(t){var n=p[t],r=e.matchHandlers[n];null===r||void 0===r||r.mql.removeListener(null===r||void 0===r?void 0:r.listener)})),h.clear()},register:function(){var e=this;Object.keys(p).forEach((function(t){var n=p[t],a=function(n){var a=n.matches;e.dispatch(Object(r.a)(Object(r.a)({},v),Object(o.a)({},t,a)))},i=window.matchMedia(n);i.addListener(a),e.matchHandlers[n]={mql:i,listener:a},a(i)}))}},g=n(34),y=n(109),O=n(108),w=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0?$[0]/-2:void 0,Q=null!=$[1]&&$[1]>0?$[1]/-2:void 0;if(Y&&(K.marginLeft=Y,K.marginRight=Y),H){var Z=Object(i.a)($,2);K.rowGap=Z[1]}else Q&&(K.marginTop=Q,K.marginBottom=Q);var J=Object(i.a)($,2),ee=J[0],te=J[1],ne=u.useMemo((function(){return{gutter:[ee,te],wrap:E,supportFlexGap:H}}),[ee,te,E,H]);return U(u.createElement(y.a.Provider,{value:ne},u.createElement("div",Object(r.a)({},C,{className:G,style:Object(r.a)(Object(r.a)({},K),v),ref:t}),g)))}));t.a=j},,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(26),o=n(86),a=n(72),i=n(14),l=function(){function e(t,n){var o;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=Object(r.d)(t)),this.originalInput=t;var i=Object(a.a)(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(o=n.format)&&void 0!==o?o:i.format,this.gradientType=n.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=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=Object(i.b)(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=Object(r.h)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=Object(r.h)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),o=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(o,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=Object(r.g)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=Object(r.g)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),o=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(o,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),Object(r.f)(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),Object(r.j)(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},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 e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*Object(i.a)(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*Object(i.a)(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+Object(r.f)(this.r,this.g,this.b,!1),t=0,n=Object.entries(o.a);t=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},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){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Object(i.c)(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Object(i.c)(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Object(i.c)(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Object(i.c)(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100;return new e({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],l=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+l)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i3&&void 0!==arguments[3]?arguments[3]:0;return{key:"string"===typeof e?e:n+"-"+r,error:e,errorStatus:t}}function b(e){var t=e.help,n=e.helpStatus,l=e.errors,p=void 0===l?m:l,b=e.warnings,g=void 0===b?m:b,y=e.className,O=e.fieldId,w=e.onVisibleChanged,x=s.useContext(r.c).prefixCls,j=s.useContext(f.b).getPrefixCls,k=x+"-item-explain",E=j(),C=Object(s.useMemo)((function(){return Object(d.a)(E)}),[E]),S=h(p),T=h(g),_=s.useMemo((function(){return void 0!==t&&null!==t?[v(t,n,"help")]:[].concat(Object(i.a)(S.map((function(e,t){return v(e,"error","error",t)}))),Object(i.a)(T.map((function(e,t){return v(e,"warning","warning",t)}))))}),[t,n,S,T]),M={};return O&&(M.id=O+"_help"),s.createElement(u.b,Object(a.a)({},C,{motionDeadline:C.motionDeadline,motionName:E+"-show-help",visible:!!_.length,onVisibleChanged:w}),(function(e){var t=e.className,n=e.style;return s.createElement("div",Object(a.a)({},M,{className:c()(k,t,y),style:n,role:"alert"}),s.createElement(u.a,Object(a.a)({keys:_},Object(d.a)(E),{motionName:E+"-show-help-item",component:!1}),(function(e){var t=e.key,n=e.error,r=e.errorStatus,a=e.className,i=e.style;return s.createElement("div",{key:t,className:c()(a,Object(o.a)({},k+"-"+r,r)),style:i},n)})))}))}var g=n(8),y=n(37),O=n(41),w=n(33);function x(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function j(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function k(e,t){if(e.clientHeightt||a>e&&i=t&&l>=n?a-e-r:i>t&&ln?i-t+o:0}var C=function(e,t){var n=window,r=t.scrollMode,o=t.block,a=t.inline,i=t.boundary,l=t.skipOverflowHiddenElements,c="function"==typeof i?i:function(e){return e!==i};if(!x(e))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,s=[],f=e;x(f)&&c(f);){if((f=f.parentElement)===u){s.push(f);break}null!=f&&f===document.body&&k(f)&&!k(document.documentElement)||null!=f&&k(f,l)&&s.push(f)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),b=v.height,g=v.width,y=v.top,O=v.right,w=v.bottom,j=v.left,C="start"===o||"nearest"===o?y:"end"===o?w:y+b/2,S="center"===a?j+g/2:"end"===a?O:j,T=[],_=0;_=0&&j>=0&&w<=p&&O<=d&&y>=R&&w<=D&&j>=F&&O<=I)return T;var L=getComputedStyle(M),z=parseInt(L.borderLeftWidth,10),H=parseInt(L.borderTopWidth,10),B=parseInt(L.borderRightWidth,10),q=parseInt(L.borderBottomWidth,10),V=0,W=0,U="offsetWidth"in M?M.offsetWidth-M.clientWidth-z-B:0,X="offsetHeight"in M?M.offsetHeight-M.clientHeight-H-q:0;if(u===M)V="start"===o?C:"end"===o?C-p:"nearest"===o?E(m,m+p,p,H,q,m+C,m+C+b,b):C-p/2,W="start"===a?S:"center"===a?S-d/2:"end"===a?S-d:E(h,h+d,d,z,B,h+S,h+S+g,g),V=Math.max(0,V+m),W=Math.max(0,W+h);else{V="start"===o?C-R-H:"end"===o?C-D+q+X:"nearest"===o?E(R,D,N,H,q+X,C,C+b,b):C-(R+N/2)+X/2,W="start"===a?S-F-z:"center"===a?S-(F+A/2)+U/2:"end"===a?S-I+B+U:E(F,I,A,z,B+U,S,S+g,g);var $=M.scrollLeft,G=M.scrollTop;C+=G-(V=Math.max(0,Math.min(G+V,M.scrollHeight-N+X))),S+=$-(W=Math.max(0,Math.min($+W,M.scrollWidth-A+U)))}T.push({el:M,top:V,left:W})}return T};function S(e){return e===Object(e)&&0!==Object.keys(e).length}var T=function(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(S(t)&&"function"===typeof t.behavior)return t.behavior(n?C(e,t):[]);if(n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:S(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,o=e.top,a=e.left;r.scroll&&n?r.scroll({top:o,left:a,behavior:t}):(r.scrollTop=o,r.scrollLeft=a)}))}(C(e,r),r.behavior)}},_=["parentNode"];function M(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function P(e,t){if(e.length){var n=e.join("_");return t?t+"_"+n:_.includes(n)?"form_item_"+n:n}}function N(e){return M(e).join("_")}function A(e){var t=Object(y.g)(),n=Object(p.a)(t,1)[0],r=s.useRef({}),o=s.useMemo((function(){return null!==e&&void 0!==e?e:Object(a.a)(Object(a.a)({},n),{__INTERNAL__:{itemRef:function(e){return function(t){var n=N(e);t?r.current[n]=t:delete r.current[n]}}},scrollToField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=M(e),r=P(n,o.__INTERNAL__.name),i=r?document.getElementById(r):null;i&&T(i,Object(a.a)({scrollMode:"if-needed",block:"nearest"},t))},getFieldInstance:function(e){var t=N(e);return r.current[t]}})}),[e,n]);return[o]}var R=n(338),I=function(e){var t;return Object(o.a)({},e.componentCls,(t={},Object(o.a)(t,e.antCls+"-motion-collapse-legacy",{overflow:"hidden","&-active":{transition:"height "+e.motionDurationMid+" "+e.motionEaseInOut+",\n opacity "+e.motionDurationMid+" "+e.motionEaseInOut+" !important"}}),Object(o.a)(t,e.antCls+"-motion-collapse",{overflow:"hidden",transition:"height "+e.motionDurationMid+" "+e.motionEaseInOut+",\n opacity "+e.motionDurationMid+" "+e.motionEaseInOut+" !important"}),t))},D=n(104),F=n(67),L=n(16),z=function(e,t){var n,r=e.formItemCls;return Object(o.a)({},r,(n={},Object(o.a)(n,r+"-label > label",{height:t}),Object(o.a)(n,r+"-control-input",{minHeight:t}),n))},H=function(e){var t,n=e.componentCls;return Object(o.a)({},e.componentCls,Object(a.a)(Object(a.a)(Object(a.a)({},Object(L.f)(e)),function(e){var t;return t={legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:e.lineWidth+"px "+e.lineType+" "+e.colorBorder},label:{fontSize:e.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"}},Object(o.a)(t,"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus",{outline:0,boxShadow:"0 0 0 "+e.controlOutlineWidth+"px "+e.controlOutline}),Object(o.a)(t,"output",{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}),t}(e)),(t={},Object(o.a)(t,n+"-text",{display:"inline-block",paddingInlineEnd:e.paddingSM}),Object(o.a)(t,"&-small",Object(a.a)({},z(e,e.controlHeightSM))),Object(o.a)(t,"&-large",Object(a.a)({},z(e,e.controlHeightLG))),t)))},B=function(e){var t,n,r,i=e.formItemCls,l=e.iconCls,c=e.componentCls,u=e.rootPrefixCls;return Object(o.a)({},i,Object(a.a)(Object(a.a)({},Object(L.f)(e)),(r={marginBottom:e.marginLG,verticalAlign:"top","&-with-help":{transition:"none"}},Object(o.a)(r,"&-hidden,\n &-hidden."+u+"-row",{display:"none"}),Object(o.a)(r,"&-has-warning",Object(o.a)({},i+"-split",{color:e.colorError})),Object(o.a)(r,"&-has-error",Object(o.a)({},i+"-split",{color:e.colorWarning})),Object(o.a)(r,i+"-label",{display:"inline-block",flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight+" - 0.25em",whiteSpace:"unset"},"> label":(t={position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:e.controlHeight,color:e.colorTextHeading,fontSize:e.fontSize},Object(o.a)(t,"> "+l,{fontSize:e.fontSize,verticalAlign:"top"}),Object(o.a)(t,"&"+i+"-required:not("+i+"-required-mark-optional)::before",Object(o.a)({display:"inline-block",marginInlineEnd:e.marginXXS,color:e.colorError,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},c+"-hide-required-mark &",{display:"none"})),Object(o.a)(t,i+"-optional",Object(o.a)({display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription},c+"-hide-required-mark &",{display:"none"})),Object(o.a)(t,i+"-tooltip",{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS}),Object(o.a)(t,"&::after",{content:'":"',position:"relative",marginBlock:0,marginInlineStart:e.marginXXS/2,marginInlineEnd:e.marginXS}),Object(o.a)(t,"&"+i+"-no-colon::after",{content:'" "'}),t)}),Object(o.a)(r,i+"-control",(n={display:"flex",flexDirection:"column",flexGrow:1},Object(o.a)(n,"&:first-child:not([class^=~\"'"+u+"-col-'\"]):not([class*=~\"' "+u+"-col-'\"])",{width:"100%"}),Object(o.a)(n,"&-input",{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}),n)),Object(o.a)(r,i,{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight,transition:"color "+e.motionDurationMid+" "+e.motionEaseOut},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}}),Object(o.a)(r,"&-with-help "+i+"-explain",{height:"auto",opacity:1}),Object(o.a)(r,i+"-feedback-icon",{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:R.b,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}),r)))},q=function(e){var t,n,r=e.componentCls,a=e.rootPrefixCls;return Object(o.a)({},r,(n={},Object(o.a)(n,"."+a+"-show-help",{transition:"opacity "+e.motionDurationSlow+" "+e.motionEaseInOut,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}}),Object(o.a)(n,"."+a+"-show-help-item",(t={overflow:"hidden",transition:"height "+e.motionDurationSlow+" "+e.motionEaseInOut+",\n opacity "+e.motionDurationSlow+" "+e.motionEaseInOut+",\n transform "+e.motionDurationSlow+" "+e.motionEaseInOut+" !important"},Object(o.a)(t,"&-appear,\n &-enter",{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}}),Object(o.a)(t,"&-leave-active",{transform:"translateY(-5px)"}),t)),n))},V=function(e){var t,n=e.componentCls,r=e.formItemCls,a=e.rootPrefixCls;return Object(o.a)({},n+"-horizontal",(t={},Object(o.a)(t,r+"-label",{flexGrow:0}),Object(o.a)(t,r+"-control",{flex:"1 1 0",minWidth:0}),Object(o.a)(t,r+"-label."+a+"-col-24 + "+r+"-control",{minWidth:"unset"}),t))},W=function(e){var t,n=e.componentCls,r=e.formItemCls;return Object(o.a)({},n+"-inline",Object(o.a)({display:"flex",flexWrap:"wrap"},r,(t={flex:"none",flexWrap:"nowrap",marginInlineEnd:e.margin,marginBottom:0,"&-with-help":{marginBottom:e.marginLG}},Object(o.a)(t,"> "+r+"-label,\n > "+r+"-control",{display:"inline-block",verticalAlign:"top"}),Object(o.a)(t,"> "+r+"-label",{flex:"none"}),Object(o.a)(t,n+"-text",{display:"inline-block"}),Object(o.a)(t,r+"-has-feedback",{display:"inline-block"}),t)))},U=function(e){return{margin:0,padding:"0 0 "+e.paddingXS+"px",whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{display:"none"}}}},X=function(e){var t,n=e.componentCls,r=e.formItemCls,i=e.rootPrefixCls;return t={},Object(o.a)(t,n+"-vertical",Object(o.a)({},r,Object(o.a)({"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"}},n+"-item-control",{width:"100%"}))),Object(o.a)(t,n+"-vertical "+r+"-label,\n ."+i+"-col-24"+r+"-label,\n ."+i+"-col-xl-24"+r+"-label",Object(a.a)({},U(e))),Object(o.a)(t,"@media (max-width: "+e.screenSMMax+"px)",Object(a.a)(Object(a.a)({},function(e){var t,n=e.componentCls,r=e.formItemCls;return t={},Object(o.a)(t,r+" "+r+"-label",Object(a.a)({},U(e))),Object(o.a)(t,n,Object(o.a)({},r,Object(o.a)({flexWrap:"wrap"},r+"-label,\n "+r+"-control",{flex:"0 0 100%",maxWidth:"100%"}))),t}(e)),Object(o.a)({},n,Object(o.a)({},"."+i+"-col-xs-24"+r+"-label",Object(a.a)({},U(e)))))),Object(o.a)(t,"@media (max-width: "+e.screenSMMax+"px)",Object(o.a)({},n,Object(o.a)({},"."+i+"-col-sm-24"+r+"-label",Object(a.a)({},U(e))))),Object(o.a)(t,"@media (max-width: "+e.screenMDMax+"px)",Object(o.a)({},n,Object(o.a)({},"."+i+"-col-md-24"+r+"-label",Object(a.a)({},U(e))))),Object(o.a)(t,"@media (max-width: "+e.screenLGMax+"px)",Object(o.a)({},n,Object(o.a)({},"."+i+"-col-lg-24"+r+"-label",Object(a.a)({},U(e))))),t},$=Object(D.a)("Form",(function(e,t){var n=t.rootPrefixCls,r=Object(F.b)(e,{formItemCls:e.componentCls+"-item",rootPrefixCls:n});return[H(r),B(r),q(r),V(r),W(r),X(r),I(r),R.b]})),G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o1&&void 0!==arguments[1]?arguments[1]:"";return e.map((function(e){return""+t+e})).join(",")}function Re(e,t){var n,r=e.componentCls,i=e.sizePopupArrow,l=e.marginXXS,c=e.borderRadiusXS,u=e.borderRadiusOuter,s=e.boxShadowPopoverArrow,f=t.colorBg,d=t.showArrowCls,p=t.contentRadius,h=function(e){var t=e.sizePopupArrow,n=e.contentRadius,r=e.borderRadiusOuter,o=e.limitVerticalRadius,a=t/2-Math.ceil(r*(Math.sqrt(2)-1)),i=(n>12?n+2:12)-a;return{dropdownArrowOffset:i,dropdownArrowOffsetVertical:o?8-a:i}}({sizePopupArrow:i,contentRadius:void 0===p?e.borderRadiusLG:p,borderRadiusOuter:u,limitVerticalRadius:t.limitVerticalRadius}),m=h.dropdownArrowOffsetVertical,v=h.dropdownArrowOffset,b=i/2+l;return Object(o.a)({},r,(n={},Object(o.a)(n,r+"-arrow",[Object(a.a)(Object(a.a)({position:"absolute",zIndex:1,display:"block"},Object(Ne.a)(i,c,u,f,s)),{"&:before":{background:f}})]),Object(o.a)(n,["&-placement-top "+r+"-arrow","&-placement-topLeft "+r+"-arrow","&-placement-topRight "+r+"-arrow"].join(","),{bottom:0,transform:"translateY(100%) rotate(180deg)"}),Object(o.a)(n,"&-placement-top "+r+"-arrow",{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"}),Object(o.a)(n,"&-placement-topLeft "+r+"-arrow",{left:{_skip_check_:!0,value:v}}),Object(o.a)(n,"&-placement-topRight "+r+"-arrow",{right:{_skip_check_:!0,value:v}}),Object(o.a)(n,["&-placement-bottom "+r+"-arrow","&-placement-bottomLeft "+r+"-arrow","&-placement-bottomRight "+r+"-arrow"].join(","),{top:0,transform:"translateY(-100%)"}),Object(o.a)(n,"&-placement-bottom "+r+"-arrow",{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"}),Object(o.a)(n,"&-placement-bottomLeft "+r+"-arrow",{left:{_skip_check_:!0,value:v}}),Object(o.a)(n,"&-placement-bottomRight "+r+"-arrow",{right:{_skip_check_:!0,value:v}}),Object(o.a)(n,["&-placement-left "+r+"-arrow","&-placement-leftTop "+r+"-arrow","&-placement-leftBottom "+r+"-arrow"].join(","),{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"}),Object(o.a)(n,"&-placement-left "+r+"-arrow",{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"}),Object(o.a)(n,"&-placement-leftTop "+r+"-arrow",{top:m}),Object(o.a)(n,"&-placement-leftBottom "+r+"-arrow",{bottom:m}),Object(o.a)(n,["&-placement-right "+r+"-arrow","&-placement-rightTop "+r+"-arrow","&-placement-rightBottom "+r+"-arrow"].join(","),{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"}),Object(o.a)(n,"&-placement-right "+r+"-arrow",{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"}),Object(o.a)(n,"&-placement-rightTop "+r+"-arrow",{top:m}),Object(o.a)(n,"&-placement-rightBottom "+r+"-arrow",{bottom:m}),Object(o.a)(n,Ae(["&-placement-topLeft","&-placement-top","&-placement-topRight"],d),{paddingBottom:b}),Object(o.a)(n,Ae(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"],d),{paddingTop:b}),Object(o.a)(n,Ae(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"],d),{paddingRight:{_skip_check_:!0,value:b}}),Object(o.a)(n,Ae(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"],d),{paddingLeft:{_skip_check_:!0,value:b}}),n))}var Ie=function(e){var t=e.componentCls;return Pe.a.reduce((function(n,r){var a,i=e[r+"-6"];return n["&"+t+"-"+r]=(a={},Object(o.a)(a,t+"-inner",{backgroundColor:i}),Object(o.a)(a,t+"-arrow",{"--antd-arrow-background-color":i}),a),n}),{})},De=function(e){var t,n=e.componentCls,r=e.tooltipMaxWidth,i=e.tooltipColor,l=e.tooltipBg,c=e.tooltipBorderRadius,u=e.zIndexPopup,s=e.controlHeight,f=e.boxShadowSecondary,d=e.paddingSM,p=e.paddingXS,h=e.tooltipRadiusOuter;return[Object(o.a)({},n,Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},Object(L.f)(e)),(t={position:"absolute",zIndex:u,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:r,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":l},Object(o.a)(t,n+"-inner",{minWidth:s,minHeight:s,padding:d/2+"px "+p+"px",color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:l,borderRadius:c,boxShadow:f}),Object(o.a)(t,["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(","),Object(o.a)({},n+"-inner",{borderRadius:c>8?8:c})),Object(o.a)(t,n+"-content",{position:"relative"}),t)),Ie(e)),{"&-rtl":{direction:"rtl"}})),Re(Object(F.b)(e,{borderRadiusOuter:h}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:c,limitVerticalRadius:!0}),Object(o.a)({},n+"-pure",{position:"relative",maxWidth:"none"})]},Fe=function(e,t){return Object(D.a)("Tooltip",(function(e){if(!1===t)return[];var n=e.borderRadius,r=e.colorTextLightSolid,o=e.colorBgDefault,a=e.borderRadiusOuter,i=Object(F.b)(e,{tooltipMaxWidth:250,tooltipColor:r,tooltipBorderRadius:n,tooltipBg:o,tooltipRadiusOuter:a>4?4:a});return[De(i),Object(R.a)(e,"zoom-big-fast")]}),(function(e){return{zIndexPopup:e.zIndexPopupBase+70,colorBgDefault:e.colorBgSpotlight}}))(e)},Le=(Object(te.a)("success","processing","error","default","warning"),Object(te.a)("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime")),ze=new RegExp("^("+Le.join("|")+")(-inverse)?$");function He(e,t){var n,r,a=c()(Object(o.a)({},e+"-"+t,t&&ze.test(t)));return t&&!ze.test(t)&&(n={background:t},r={"--antd-arrow-background-color":t}),{className:a,overlayStyle:n,arrowStyle:r}}var Be=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0||oe.length>0||e.extra){var O=[];(e.help||re.length>0)&&O.push(u+"_help"),e.extra&&O.push(u+"_extra"),y["aria-describedby"]=O.join(" ")}re.length>0&&(y["aria-invalid"]="true"),f&&(y["aria-required"]="true"),Object(Z.c)(m)&&(y.ref=ae(c,m)),new Set([].concat(Object(i.a)(M(x)),Object(i.a)(M(N)))).forEach((function(e){y[e]=function(){for(var t,n,r,o,a,i=arguments.length,l=new Array(i),c=0;c "+f,{verticalAlign:"-0.2em"}),Object(r.a)(i,"&:hover",{color:e.colorIconHover}),i))),l)),Object(r.a)(u,d+"-item + "+d+"-item",Object(r.a)({},s+"-selection-search",{marginInlineStart:0})),Object(r.a)(u,s+"-selection-search",(c={display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.inputPaddingHorizontalBase-m},Object(r.a)(c,"\n &-input,\n &-mirror\n ",{height:p,fontFamily:e.fontFamily,lineHeight:p+"px",transition:"all "+e.motionDurationSlow}),Object(r.a)(c,"&-input",{width:"100%",minWidth:4.1}),Object(r.a)(c,"&-mirror",{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}),c)),Object(r.a)(u,s+"-selection-placeholder ",{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:"all "+e.motionDurationSlow}),u))}function pe(e){var t,n=e.componentCls,o=Object(v.b)(e,{controlHeight:e.controlHeightSM,controlHeightSM:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),i=fe(e),l=Object(a.a)(i,2)[1];return[de(e),de(o,"sm"),Object(r.a)({},n+"-multiple"+n+"-sm",(t={},Object(r.a)(t,n+"-selection-placeholder",{insetInlineStart:e.controlPaddingHorizontalSM-e.lineWidth,insetInlineEnd:"auto"}),Object(r.a)(t,n+"-selection-search",{marginInlineStart:l}),t)),de(Object(v.b)(e,{fontSize:e.fontSizeLG,controlHeight:e.controlHeightLG,controlHeightSM:e.controlHeight,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius}),"lg")]}function he(e,t){var n,a,i,l,c=e.componentCls,u=e.inputPaddingHorizontalBase,s=e.borderRadius,f=e.controlHeight-2*e.lineWidth,d=Math.ceil(1.25*e.fontSize),p=t?c+"-"+t:"";return Object(r.a)({},c+"-single"+p,(l={fontSize:e.fontSize},Object(r.a)(l,c+"-selector",Object(o.a)(Object(o.a)({},Object(ce.f)(e)),(n={display:"flex",borderRadius:s},Object(r.a)(n,c+"-selection-search",{position:"absolute",top:0,insetInlineStart:u,insetInlineEnd:u,bottom:0,"&-input":{width:"100%"}}),Object(r.a)(n,"\n "+c+"-selection-item,\n "+c+"-selection-placeholder\n ",{padding:0,lineHeight:f+"px",transition:"all "+e.motionDurationSlow,"@supports (-moz-appearance: meterbar) &":{lineHeight:f+"px"}}),Object(r.a)(n,c+"-selection-item",{position:"relative",userSelect:"none"}),Object(r.a)(n,c+"-selection-placeholder",{transition:"none",pointerEvents:"none"}),Object(r.a)(n,["&:after",c+"-selection-item:after",c+"-selection-placeholder:after"].join(","),{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}),n))),Object(r.a)(l,"\n &"+c+"-show-arrow "+c+"-selection-item,\n &"+c+"-show-arrow "+c+"-selection-placeholder\n ",{paddingInlineEnd:d}),Object(r.a)(l,"&"+c+"-open "+c+"-selection-item",{color:e.colorTextPlaceholder}),Object(r.a)(l,"&:not("+c+"-customize-input)",Object(r.a)({},c+"-selector",(a={width:"100%",height:e.controlHeight,padding:"0 "+u+"px"},Object(r.a)(a,c+"-selection-search-input",{height:f}),Object(r.a)(a,"&:after",{lineHeight:f+"px"}),a))),Object(r.a)(l,"&"+c+"-customize-input",Object(r.a)({},c+"-selector",(i={"&:after":{display:"none"}},Object(r.a)(i,c+"-selection-search",{position:"static",width:"100%"}),Object(r.a)(i,c+"-selection-placeholder",{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:"0 "+u+"px","&:after":{display:"none"}}),i))),l))}function me(e){var t,n=e.componentCls,o=e.controlPaddingHorizontalSM-e.lineWidth;return[he(e),he(Object(v.b)(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),Object(r.a)({},n+"-single"+n+"-sm",Object(r.a)({},"&:not("+n+"-customize-input)",(t={},Object(r.a)(t,n+"-selection-search",{insetInlineStart:o,insetInlineEnd:o}),Object(r.a)(t,n+"-selector",{padding:"0 "+o+"px"}),Object(r.a)(t,"&"+n+"-show-arrow "+n+"-selection-search",{insetInlineStart:"auto",insetInlineEnd:o+1.5*e.fontSize}),Object(r.a)(t,"\n &"+n+"-show-arrow "+n+"-selection-item,\n &"+n+"-show-arrow "+n+"-selection-placeholder\n ",{paddingInlineEnd:1.5*e.fontSize}),t))),he(Object(v.b)(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}var ve=n(79),be=function(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.componentCls,l=t.borderHoverColor,c=t.outlineColor,u=t.antCls,s=a?Object(r.a)({},i+"-selector",{borderColor:l}):{};return Object(r.a)({},e,Object(r.a)({},"&:not("+i+"-disabled):not("+i+"-customize-input):not("+u+"-pagination-size-changer)",Object(o.a)(Object(o.a)({},s),(n={},Object(r.a)(n,i+"-focused& "+i+"-selector",{borderColor:l,boxShadow:"0 0 0 "+t.controlOutlineWidth+"px "+c,borderInlineEndWidth:t.controlLineWidth+"px !important",outline:0}),Object(r.a)(n,"&:hover "+i+"-selector",{borderColor:l,borderInlineEndWidth:t.controlLineWidth+"px !important"}),n))))},ge=function(e){var t,n,a,i=e.componentCls,l=e.inputPaddingHorizontalBase,c=e.iconCls;return a={},Object(r.a)(a,i,Object(o.a)(Object(o.a)({},Object(ce.f)(e)),(n={position:"relative",display:"inline-block",cursor:"pointer"},Object(r.a)(n,"&:not(&-customize-input) "+i+"-selector",Object(o.a)(Object(o.a)({},function(e){var t,n,o=e.componentCls;return n={position:"relative",backgroundColor:e.colorBgContainer,border:e.lineWidth+"px "+e.lineType+" "+e.colorBorder,transition:"all "+e.motionDurationMid+" "+e.motionEaseInOut,input:{cursor:"pointer"}},Object(r.a)(n,o+"-show-search&",{cursor:"text",input:{cursor:"auto"}}),Object(r.a)(n,o+"-disabled&",(t={color:e.colorTextDisabled,background:e.colorBgContainerDisabled,cursor:"not-allowed"},Object(r.a)(t,o+"-multiple&",{background:e.colorBgContainerDisabled}),Object(r.a)(t,"input",{cursor:"not-allowed"}),t)),n}(e)),function(e){var t=e.componentCls;return Object(r.a)({},t+"-selection-search-input",{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}})}(e))),Object(r.a)(n,i+"-selection-item",Object(o.a)({flex:1,fontWeight:"normal"},ce.h)),Object(r.a)(n,i+"-selection-placeholder",Object(o.a)(Object(o.a)({},ce.h),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"})),Object(r.a)(n,i+"-arrow",Object(o.a)(Object(o.a)({},Object(ce.g)()),(t={position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:l,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextDisabled,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center"},Object(r.a)(t,c,Object(r.a)({verticalAlign:"top",transition:"transform "+e.motionDurationSlow,"> svg":{verticalAlign:"top"}},"&:not("+i+"-suffix)",{pointerEvents:"auto"})),Object(r.a)(t,i+"-disabled &",{cursor:"not-allowed"}),Object(r.a)(t,"> *:not(:last-child)",{marginInlineEnd:8}),t))),Object(r.a)(n,i+"-clear",{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:l,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:-e.fontSizeIcon/2,color:e.colorTextDisabled,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:e.colorBgContainer,cursor:"pointer",opacity:0,transition:"color "+e.motionDurationMid+" ease, opacity "+e.motionDurationSlow+" ease",textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextDescription}}),Object(r.a)(n,"&:hover",Object(r.a)({},i+"-clear",{opacity:1})),n))),Object(r.a)(a,i+"-has-feedback",Object(r.a)({},i+"-clear",{insetInlineEnd:l+e.fontSize+e.paddingXXS})),a},ye=function(e){var t,n=e.componentCls;return[Object(r.a)({},n,Object(o.a)((t={},Object(r.a)(t,"&-borderless "+n+"-selector",{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"}),Object(r.a)(t,"&&-in-form-item",{width:"100%"}),t),Object(ve.a)(e,n,n+"-selector",n+"-focused"))),ge(e),me(e),pe(e),se(e),Object(r.a)({},n+"-rtl",{direction:"rtl"}),be(n,Object(v.b)(e,{borderHoverColor:e.colorPrimaryHover,outlineColor:e.controlOutline})),be(n+"-status-error",Object(v.b)(e,{borderHoverColor:e.colorErrorHover,outlineColor:e.colorErrorOutline}),!0),be(n+"-status-warning",Object(v.b)(e,{borderHoverColor:e.colorWarningHover,outlineColor:e.colorWarningOutline}),!0)]},Oe=Object(m.a)("Select",(function(e,t){var n=t.rootPrefixCls,r=Object(v.b)(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.controlPaddingHorizontal-1});return[ye(r)]}),(function(e){return{zIndexPopup:e.zIndexPopupBase+50}})),we=n(35),xe=n(19);var je,ke,Ee,Ce=n(56),Se=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o input"+n,{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&:focus":{boxShadow:"none !important"}}),Object(o.a)(t,"&::before",{width:0,visibility:"hidden",content:'"\\a0"'}),Object(o.a)(t,""+n,{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:i},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:a},"&-suffix":{marginInlineStart:a}}),t)),function(e){var t,n=e.componentCls;return t={},Object(o.a)(t,n+"-clear-icon",{margin:0,color:e.colorIcon,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:"color "+e.motionDurationSlow,"&:hover":{color:e.colorTextDescription},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:"0 "+e.inputAffixPadding+"px"}}),Object(o.a)(t,"&-textarea-with-clear-btn",Object(o.a)({padding:"0 !important",border:"0 !important"},n+"-clear-icon",{position:"absolute",insetBlockStart:e.paddingXS,insetInlineEnd:e.paddingXS,zIndex:1})),t}(e)),Object(o.a)({},""+s+n+"-password-icon",{color:c,cursor:"pointer",transition:"all "+l,"&:hover":{color:u}})),w(e)))},E=function(e){var t=e.componentCls,n=e.colorError,a=e.colorSuccess,i=e.borderRadiusLG,l=e.borderRadiusSM;return Object(o.a)({},t+"-group",Object(r.a)(Object(r.a)(Object(r.a)({},Object(h.f)(e)),function(e){var t,n,a,i,l,c,u,s=e.componentCls,f=e.antCls;return u={position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0},Object(o.a)(u,"&[class*='col-']",{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}}),Object(o.a)(u,"&-lg "+s+", &-lg > "+s+"-group-addon",Object(r.a)({},y(e))),Object(o.a)(u,"&-sm "+s+", &-sm > "+s+"-group-addon",Object(r.a)({},O(e))),Object(o.a)(u,"&-lg "+f+"-select-single "+f+"-select-selector",{height:e.controlHeightLG}),Object(o.a)(u,"&-sm "+f+"-select-single "+f+"-select-selector",{height:e.controlHeightSM}),Object(o.a)(u,"> "+s,{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}}),Object(o.a)(u,s+"-group",(a={},Object(o.a)(a,"&-addon, &-wrap",{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}}),Object(o.a)(a,"&-wrap > *",{display:"block !important"}),Object(o.a)(a,"&-addon",(n={position:"relative",padding:"0 "+e.inputPaddingHorizontal+"px",color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.colorFillAlter,border:e.lineWidth+"px "+e.lineType+" "+e.colorBorder,borderRadius:e.borderRadius,transition:"all "+e.motionDurationSlow},Object(o.a)(n,f+"-select",(t={margin:"-"+(e.inputPaddingVertical+1)+"px -"+e.inputPaddingHorizontal+"px"},Object(o.a)(t,"&"+f+"-select-single:not("+f+"-select-customize-input)",Object(o.a)({},f+"-select-selector",{backgroundColor:"inherit",border:e.lineWidth+"px "+e.lineType+" transparent",boxShadow:"none"})),Object(o.a)(t,"&-open, &-focused",Object(o.a)({},f+"-select-selector",{color:e.colorPrimary})),t)),Object(o.a)(n,f+"-cascader-picker",Object(o.a)({margin:"-9px -"+e.inputPaddingHorizontal+"px",backgroundColor:"transparent"},f+"-cascader-input",{textAlign:"start",border:0,boxShadow:"none"})),n)),Object(o.a)(a,"&-addon:first-child",{borderInlineEnd:0}),Object(o.a)(a,"&-addon:last-child",{borderInlineStart:0}),a)),Object(o.a)(u,""+s,{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":Object(o.a)({zIndex:1,borderInlineEndWidth:1},s+"-search-with-button &",{zIndex:0})}),Object(o.a)(u,"> "+s+":first-child, "+s+"-group-addon:first-child",Object(o.a)({borderStartEndRadius:0,borderEndEndRadius:0},f+"-select "+f+"-select-selector",{borderStartEndRadius:0,borderEndEndRadius:0})),Object(o.a)(u,"> "+s+"-affix-wrapper",(i={},Object(o.a)(i,"&:not(:first-child) "+s,{borderStartStartRadius:0,borderEndStartRadius:0}),Object(o.a)(i,"&:not(:last-child) "+s,{borderStartEndRadius:0,borderEndEndRadius:0}),i)),Object(o.a)(u,"> "+s+":last-child, "+s+"-group-addon:last-child",Object(o.a)({borderStartStartRadius:0,borderEndStartRadius:0},f+"-select "+f+"-select-selector",{borderStartStartRadius:0,borderEndStartRadius:0})),Object(o.a)(u,s+"-affix-wrapper",Object(o.a)({"&:not(:last-child)":Object(o.a)({borderStartEndRadius:0,borderEndEndRadius:0},s+"-search &",{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius})},"&:not(:first-child), "+s+"-search &:not(:first-child)",{borderStartStartRadius:0,borderEndStartRadius:0})),Object(o.a)(u,"&&-compact",Object(r.a)(Object(r.a)({display:"block"},Object(h.a)()),(c={},Object(o.a)(c,s+"-group-addon, "+s+"-group-wrap, > "+s,{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}}),Object(o.a)(c,"& > *",{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0}),Object(o.a)(c,"& > "+s+"-affix-wrapper",{display:"inline-flex"}),Object(o.a)(c,"& > "+f+"-picker-range",{display:"inline-flex"}),Object(o.a)(c,"& > *:not(:last-child)",{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth}),Object(o.a)(c,""+s,{float:"none"}),Object(o.a)(c,"& > "+f+"-select > "+f+"-select-selector,\n & > "+f+"-select-auto-complete "+s+",\n & > "+f+"-cascader-picker "+s+",\n & > "+s+"-group-wrapper "+s,{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}),Object(o.a)(c,"& > "+f+"-select-focused",{zIndex:1}),Object(o.a)(c,"& > "+f+"-select > "+f+"-select-arrow",{zIndex:1}),Object(o.a)(c,"& > *:first-child,\n & > "+f+"-select:first-child > "+f+"-select-selector,\n & > "+f+"-select-auto-complete:first-child "+s+",\n & > "+f+"-cascader-picker:first-child "+s,{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}),Object(o.a)(c,"& > *:last-child,\n & > "+f+"-select:last-child > "+f+"-select-selector,\n & > "+f+"-cascader-picker:last-child "+s+",\n & > "+f+"-cascader-picker-focused:last-child "+s,{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius}),Object(o.a)(c,"& > "+f+"-select-auto-complete "+s,{verticalAlign:"top"}),Object(o.a)(c,s+"-group-wrapper + "+s+"-group-wrapper",Object(o.a)({marginInlineStart:-e.lineWidth},s+"-affix-wrapper",{borderRadius:0})),Object(o.a)(c,s+"-group-wrapper:not(:last-child)",Object(o.a)({},"&"+s+"-search > "+s+"-group",(l={},Object(o.a)(l,"& > "+s+"-group-addon > "+s+"-search-button",{borderRadius:0}),Object(o.a)(l,"& > "+s,{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}),l))),c))),u}(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":Object(o.a)({},t+"-group-addon",{borderRadius:i}),"&-sm":Object(o.a)({},t+"-group-addon",{borderRadius:l}),"&-status-error":Object(o.a)({},t+"-group-addon",{color:n,borderColor:n}),"&-status-warning":Object(o.a)({},t+"-group-addon:last-child",{color:a,borderColor:a})}}))},C=function(e){var t,n,r,a=e.componentCls,i=e.antCls,l=a+"-search";return Object(o.a)({},l,(r={},Object(o.a)(r,""+a,{"&:hover, &:focus":Object(o.a)({borderColor:e.colorPrimaryHover},"+ "+a+"-group-addon "+l+"-button:not(.@{ant-prefix}-btn-primary)",{borderInlineStartColor:e.colorPrimaryHover})}),Object(o.a)(r,a+"-affix-wrapper",{borderRadius:0}),Object(o.a)(r,a+"-lg",{lineHeight:e.lineHeightLG-2e-4}),Object(o.a)(r,"> "+a+"-group",Object(o.a)({},"> "+a+"-group-addon:last-child",(t={insetInlineStart:-1,padding:0,border:0},Object(o.a)(t,l+"-button",{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius,borderEndStartRadius:0}),Object(o.a)(t,l+"-button:not("+i+"-btn-primary)",Object(o.a)({color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive}},"&"+i+"-btn-loading::before",{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0})),t))),Object(o.a)(r,l+"-button",{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}}),Object(o.a)(r,"&-large "+l+"-button",{height:e.controlHeightLG}),Object(o.a)(r,"&-small "+l+"-button",{height:e.controlHeightSM}),Object(o.a)(r,"&-rtl",{direction:"rtl"}),Object(o.a)(r,"&"+a+"-compact-item",(n={},Object(o.a)(n,"&:not("+a+"-compact-last-item)",Object(o.a)({},a+"-group-addon",Object(o.a)({},a+"-search-button",{marginInlineEnd:-e.lineWidth,borderRadius:0}))),Object(o.a)(n,"&:not("+a+"-compact-first-item)",Object(o.a)({},a+","+a+"-affix-wrapper",{borderRadius:0})),Object(o.a)(n,"> "+a+"-group-addon "+a+"-search-button,\n > "+a+",\n "+a+"-affix-wrapper",{"&:hover,&:focus,&:active":{zIndex:2}}),Object(o.a)(n,"> "+a+"-affix-wrapper-focused",{zIndex:2}),n)),r))};var S=function(e){var t,n,r=e.componentCls,a=e.inputPaddingHorizontal,i=e.paddingLG,l=r+"-textarea";return Object(o.a)({},l,(n={position:"relative"},Object(o.a)(n,l+"-suffix",{position:"absolute",top:0,insetInlineEnd:a,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"}),Object(o.a)(n,"&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating",Object(o.a)({},"&"+l+"-has-feedback",Object(o.a)({},""+r,{paddingInlineEnd:i}))),Object(o.a)(n,"&-show-count",(t={},Object(o.a)(t,"> "+r,{height:"100%"}),Object(o.a)(t,"&::after",{position:"absolute",bottom:0,insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",content:"attr(data-count)",pointerEvents:"none",display:"block",transform:"translateY(100%)"}),t)),n))},T=Object(p.a)("Input",(function(e){var t=function(e){return Object(d.b)(e,{inputAffixPadding:e.paddingXXS,inputPaddingVertical:Math.max(Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,3),inputPaddingVerticalLG:Math.ceil((e.controlHeightLG-e.fontSizeLG*e.lineHeightLG)/2*10)/10-e.lineWidth,inputPaddingVerticalSM:Math.max(Math.round((e.controlHeightSM-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,0),inputPaddingHorizontal:e.controlPaddingHorizontal-e.lineWidth,inputPaddingHorizontalSM:e.controlPaddingHorizontalSM-e.lineWidth,inputBorderHoverColor:e.colorPrimaryHover,inputBorderActiveColor:e.colorPrimaryHover})}(e);return[j(t),S(t),k(t),E(t),C(t)]})),_=function(e){var t,n=Object(c.useContext)(s.b),i=n.getPrefixCls,u=n.direction,d=e.prefixCls,p=e.className,h=void 0===p?"":p,m=i("input-group",d),v=i("input"),b=T(v),g=Object(a.a)(b,2),y=g[0],O=g[1],w=l()(m,(t={},Object(o.a)(t,m+"-lg","large"===e.size),Object(o.a)(t,m+"-sm","small"===e.size),Object(o.a)(t,m+"-compact",e.compact),Object(o.a)(t,m+"-rtl","rtl"===u),t),O,h),x=Object(c.useContext)(f.b),j=Object(c.useMemo)((function(){return Object(r.a)(Object(r.a)({},x),{isFormItemInput:!1})}),[x]);return y(c.createElement("span",{className:w,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},c.createElement(f.b.Provider,{value:j},e.children)))},M=n(8),P=n(55);function N(e){return!(!e.addonBefore&&!e.addonAfter)}function A(e){return!!(e.prefix||e.suffix||e.allowClear)}function R(e,t,n,r){if(n){var o=t;if("click"===t.type){var a=e.cloneNode(!0);return o=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",void n(o)}if(void 0!==r)return o=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,void n(o);n(o)}}function I(e){return"undefined"===typeof e||null===e?"":String(e)}var D=function(e){var t=e.inputElement,n=e.prefixCls,r=e.prefix,a=e.suffix,i=e.addonBefore,s=e.addonAfter,f=e.className,d=e.style,p=e.affixWrapperClassName,h=e.groupClassName,m=e.wrapperClassName,v=e.disabled,b=e.readOnly,g=e.focused,y=e.triggerFocus,O=e.allowClear,w=e.value,x=e.handleReset,j=e.hidden,k=Object(c.useRef)(null),E=Object(c.cloneElement)(t,{value:w,hidden:j});if(A(e)){var C,S="".concat(n,"-affix-wrapper"),T=l()(S,(C={},Object(o.a)(C,"".concat(S,"-disabled"),v),Object(o.a)(C,"".concat(S,"-focused"),g),Object(o.a)(C,"".concat(S,"-readonly"),b),Object(o.a)(C,"".concat(S,"-input-with-clear-btn"),a&&O&&w),C),!N(e)&&f,p),_=(a||O)&&u.a.createElement("span",{className:"".concat(n,"-suffix")},function(){var e;if(!O)return null;var t=!v&&!b&&w,r="".concat(n,"-clear-icon"),i="object"===Object(M.a)(O)&&null!==O&&void 0!==O&&O.clearIcon?O.clearIcon:"\u2716";return u.a.createElement("span",{onClick:x,onMouseDown:function(e){return e.preventDefault()},className:l()(r,(e={},Object(o.a)(e,"".concat(r,"-hidden"),!t),Object(o.a)(e,"".concat(r,"-has-suffix"),!!a),e)),role:"button",tabIndex:-1},i)}(),a);E=u.a.createElement("span",{className:T,style:d,hidden:!N(e)&&j,onClick:function(e){var t;null!==(t=k.current)&&void 0!==t&&t.contains(e.target)&&(null===y||void 0===y||y())},ref:k},r&&u.a.createElement("span",{className:"".concat(n,"-prefix")},r),Object(c.cloneElement)(t,{style:null,value:w,hidden:null}),_)}if(N(e)){var P="".concat(n,"-group"),R="".concat(P,"-addon"),I=l()("".concat(n,"-wrapper"),P,m),D=l()("".concat(n,"-group-wrapper"),f,h);return u.a.createElement("span",{className:D,style:d,hidden:j},u.a.createElement("span",{className:I},i&&u.a.createElement("span",{className:R},i),Object(c.cloneElement)(E,{style:null,hidden:null}),s&&u.a.createElement("span",{className:R},s)))}return E},F=n(7),L=n(11),z=n(32),H=n(35),B=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],q=Object(c.forwardRef)((function(e,t){var n=e.autoComplete,i=e.onChange,s=e.onFocus,f=e.onBlur,d=e.onPressEnter,p=e.onKeyDown,h=e.prefixCls,m=void 0===h?"rc-input":h,v=e.disabled,b=e.htmlSize,g=e.className,y=e.maxLength,O=e.suffix,w=e.showCount,x=e.type,j=void 0===x?"text":x,k=e.inputClassName,E=Object(L.a)(e,B),C=Object(H.a)(e.defaultValue,{value:e.value}),S=Object(a.a)(C,2),T=S[0],_=S[1],P=Object(c.useState)(!1),q=Object(a.a)(P,2),V=q[0],W=q[1],U=Object(c.useRef)(null),X=function(e){U.current&&function(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}(U.current,e)};Object(c.useImperativeHandle)(t,(function(){return{focus:X,blur:function(){var e;null===(e=U.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var r;null===(r=U.current)||void 0===r||r.setSelectionRange(e,t,n)},select:function(){var e;null===(e=U.current)||void 0===e||e.select()},input:U.current}})),Object(c.useEffect)((function(){W((function(e){return(!e||!v)&&e}))}),[v]);var $=function(t){void 0===e.value&&_(t.target.value),U.current&&R(U.current,t,i)},G=function(e){d&&"Enter"===e.key&&d(e),null===p||void 0===p||p(e)},K=function(e){W(!0),null===s||void 0===s||s(e)},Y=function(e){W(!1),null===f||void 0===f||f(e)};return u.a.createElement(D,Object(r.a)({},E,{prefixCls:m,className:g,inputElement:function(){var t=Object(z.a)(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return u.a.createElement("input",Object(r.a)({autoComplete:n},t,{onChange:$,onFocus:K,onBlur:Y,onKeyDown:G,className:l()(m,Object(o.a)({},"".concat(m,"-disabled"),v),k,!N(e)&&!A(e)&&g),ref:U,size:b,type:j}))}(),handleReset:function(e){_(""),X(),U.current&&R(U.current,e,i)},value:I(T),focused:V,triggerFocus:X,suffix:function(){var e=Number(y)>0;if(O||w){var t=I(T),n=Object(F.a)(t).length,r="object"===Object(M.a)(w)?w.formatter({value:t,count:n,maxLength:y}):"".concat(n).concat(e?" / ".concat(y):"");return u.a.createElement(u.a.Fragment,null,!!w&&u.a.createElement("span",{className:l()("".concat(m,"-show-count-suffix"),Object(o.a)({},"".concat(m,"-show-count-has-suffix"),!!O))},r),O)}return null}(),disabled:v}))})),V=n(22),W=n(41),U=n(33),X=n(56),$=n(43);function G(e,t){var n=Object(c.useRef)([]),r=function(){n.current.push(setTimeout((function(){var t,n,r,o;(null===(t=e.current)||void 0===t?void 0:t.input)&&"password"===(null===(n=e.current)||void 0===n?void 0:n.input.getAttribute("type"))&&(null===(r=e.current)||void 0===r?void 0:r.input.hasAttribute("value"))&&(null===(o=e.current)||void 0===o||o.input.removeAttribute("value"))})))};return Object(c.useEffect)((function(){return t&&r(),function(){return n.current.forEach((function(e){e&&clearTimeout(e)}))}}),[]),r}var K=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);or&&(o=t),o}var Ce=c.forwardRef((function(e,t){var n,i=e.prefixCls,u=e.bordered,d=void 0===u||u,p=e.showCount,h=void 0!==p&&p,m=e.maxLength,v=e.className,b=e.style,g=e.size,y=e.disabled,O=e.onCompositionStart,w=e.onCompositionEnd,x=e.onChange,j=e.status,k=je(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),E=c.useContext(s.b),C=E.getPrefixCls,S=E.direction,_=c.useContext(U.b),P=c.useContext(W.b),N=null!==y&&void 0!==y?y:P,A=c.useContext(f.b),R=A.status,I=A.hasFeedback,D=A.feedbackIcon,L=Object($.a)(R,j),B=c.useRef(null),q=c.useRef(null),V=c.useState(!1),X=Object(a.a)(V,2),G=X[0],K=X[1],Q=c.useRef(),Z=c.useRef(0),J=Object(H.a)(k.defaultValue,{value:k.value}),ee=Object(a.a)(J,2),te=ee[0],ne=ee[1],re=k.hidden,oe=function(e,t){void 0===k.value&&(ne(e),null===t||void 0===t||t())},ae=Number(m)>0,ie=C("input",i),le=T(ie),ce=Object(a.a)(le,2),ue=ce[0],se=ce[1];c.useImperativeHandle(t,(function(){var e;return{resizableTextArea:null===(e=B.current)||void 0===e?void 0:e.resizableTextArea,focus:function(e){var t,n;!function(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}(null===(n=null===(t=B.current)||void 0===t?void 0:t.resizableTextArea)||void 0===n?void 0:n.textArea,e)},blur:function(){var e;return null===(e=B.current)||void 0===e?void 0:e.blur()}}}));var fe=c.createElement(me.a,Object(r.a)({},Object(z.a)(k,["allowClear"]),{disabled:N,className:l()((n={},Object(o.a)(n,ie+"-borderless",!d),Object(o.a)(n,v,v&&!h),Object(o.a)(n,ie+"-sm","small"===_||"small"===g),Object(o.a)(n,ie+"-lg","large"===_||"large"===g),n),Object($.b)(ie,L),se),style:h?{resize:null===b||void 0===b?void 0:b.resize}:b,prefixCls:ie,onCompositionStart:function(e){K(!0),Q.current=te,Z.current=e.currentTarget.selectionStart,null===O||void 0===O||O(e)},onChange:function(e){var t=e.target.value;!G&&ae&&(t=Ee(e.target.selectionStart>=m+1||e.target.selectionStart===t.length||!e.target.selectionStart,te,t,m));oe(t),Y(e.currentTarget,e,x,t)},onCompositionEnd:function(e){var t;K(!1);var n=e.currentTarget.value;ae&&(n=Ee(Z.current>=m+1||Z.current===(null===(t=Q.current)||void 0===t?void 0:t.length),Q.current,n,m));n!==te&&(oe(n),Y(e.currentTarget,e,x,n)),null===w||void 0===w||w(e)},ref:B})),de=function(e){return"undefined"===typeof e||null===e?"":String(e)}(te);G||!ae||null!==k.value&&void 0!==k.value||(de=ke(de,m));var pe=c.createElement(xe,Object(r.a)({disabled:N},k,{prefixCls:ie,direction:S,inputType:"text",value:de,element:fe,handleReset:function(e){var t,n,r;oe(""),null===(t=B.current)||void 0===t||t.focus(),Y(null===(r=null===(n=B.current)||void 0===n?void 0:n.resizableTextArea)||void 0===r?void 0:r.textArea,e,x)},ref:q,bordered:d,status:j,style:h?void 0:b,hashId:se}));if(h||I){var he,ve=Object(F.a)(de).length,be="";return be="object"===Object(M.a)(h)?h.formatter({value:de,count:ve,maxLength:m}):ve+(ae?" / "+m:""),c.createElement("div",{hidden:re,className:l()(ie+"-textarea",(he={},Object(o.a)(he,ie+"-textarea-rtl","rtl"===S),Object(o.a)(he,ie+"-textarea-show-count",h),he),Object($.b)(ie+"-textarea",L,I),v,se),style:b,"data-count":be},pe,I&&c.createElement("span",{className:ie+"-textarea-suffix"},D))}return ue(pe)})),Se=Q;Se.Group=_,Se.Search=he,Se.TextArea=Ce,Se.Password=ue;t.a=Se},function(e,t,n){"use strict";var r,o=n(7),a=n(2),i=n(36),l=n(57),c=n(8),u=n(3),s=n(40),f=Object(u.a)({},s),d=f.version,p=f.render,h=f.unmountComponentAtNode;try{Number((d||"").split(".")[0])>=18&&(r=f.createRoot)}catch(Ie){}function m(e){var t=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===Object(c.a)(t)&&(t.usingClientEntryPoint=e)}var v="__rc_react_root__";function b(e,t){r?function(e,t){m(!0);var n=t[v]||r(t);m(!1),n.render(e),t[v]=n}(e,t):function(e,t){p(e,t)}(e,t)}function g(e){return y.apply(this,arguments)}function y(){return(y=Object(l.a)(Object(i.a)().mark((function e(t){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[v])||void 0===e||e.unmount(),delete t[v]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){h(e)}function w(e){return x.apply(this,arguments)}function x(){return(x=Object(l.a)(Object(i.a)().mark((function e(t){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===r){e.next=2;break}return e.abrupt("return",g(t));case 2:O(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var j=n(0),k=n(19),E=n(1),C=n(112),S=n(55),T=n(113),_={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"},M=n(23),P=function(e,t){return j.createElement(M.a,Object(u.a)(Object(u.a)({},e),{},{ref:t,icon:_}))};P.displayName="InfoCircleFilled";var N=j.forwardRef(P),A=n(5),R=n.n(A),I=n(49),D=n(4),F=n(38),L=n(69),z=n(80);function H(e){return!(!e||!e.then)}var B=function(e){var t=j.useRef(!1),n=j.useRef(null),r=Object(F.a)(!1),o=Object(D.a)(r,2),i=o[0],l=o[1],c=e.close,u=function(){null===c||void 0===c||c.apply(void 0,arguments)};j.useEffect((function(){var t=null;return e.autoFocus&&(t=setTimeout((function(){var e;null===(e=n.current)||void 0===e||e.focus()}))),function(){t&&clearTimeout(t)}}),[]);var s=e.type,f=e.children,d=e.prefixCls,p=e.buttonProps;return j.createElement(L.a,Object(a.a)({},Object(z.a)(s),{onClick:function(n){var r=e.actionFn;if(!t.current)if(t.current=!0,r){var o;if(e.emitEvent){if(o=r(n),e.quitOnNullishReturnValue&&!H(o))return t.current=!1,void u(n)}else if(r.length)o=r(c),t.current=!1;else if(!(o=r()))return void u();!function(e){H(e)&&(l(!0),e.then((function(){l(!1,!0),u.apply(void 0,arguments),t.current=!1}),(function(e){console.error(e),l(!1,!0),t.current=!1})))}(o)}else u()},loading:i,prefixCls:d},p,{ref:n}),f)},q=n(46),V=n(111),W=n(50),U=n(12),X=n(105),$=n(114),G=n(68),K=n(9),Y=n(64),Q=new K.a("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Z=new K.a("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),J=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.antCls,o=r+"-fade",a=n?"&":"";return[Object(Y.a)(o,Q,Z,e.motionDurationMid,n),(t={},Object(E.a)(t,"\n "+a+o+"-enter,\n "+a+o+"-appear\n ",{opacity:0,animationTimingFunction:"linear"}),Object(E.a)(t,""+a+o+"-leave",{animationTimingFunction:"linear"}),t)]},ee=n(338),te=n(104),ne=n(67),re=n(16);function oe(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}var ae=function(e){var t,n=e.componentCls;return[Object(E.a)({},n+"-root",(t={},Object(E.a)(t,""+n+e.antCls+"-zoom-enter, "+n+e.antCls+"-zoom-appear",{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"}),Object(E.a)(t,n+"-mask",Object(a.a)(Object(a.a)({},oe("fixed")),Object(E.a)({zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask},n+"-hidden",{display:"none"}))),Object(E.a)(t,n+"-wrap",Object(a.a)(Object(a.a)({},oe("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})),t)),Object(E.a)({},n+"-root",J(e))]},ie=function(e){var t,n,r,o,i=e.componentCls;return[Object(E.a)({},i+"-root",(n={},Object(E.a)(n,i+"-wrap",{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}),Object(E.a)(n,i+"-wrap-rtl",{direction:"rtl"}),Object(E.a)(n,i+"-centered",Object(E.a)({textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'}},i,{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"})),Object(E.a)(n,"@media (max-width: "+e.screenSMMax+")",(t={},Object(E.a)(t,i,{maxWidth:"calc(100vw - 16px)",margin:e.marginXS+" auto"}),Object(E.a)(t,i+"-centered",Object(E.a)({},i,{flex:1})),t)),n)),Object(E.a)({},i,Object(a.a)(Object(a.a)({},Object(re.f)(e)),(r={pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:"calc(100vw - "+2*e.margin+"px)",margin:"0 auto",paddingBottom:e.paddingLG},Object(E.a)(r,i+"-title",{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"}),Object(E.a)(r,i+"-content",{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:e.paddingMD+"px "+e.paddingContentHorizontalLG+"px"}),Object(E.a)(r,i+"-close",Object(a.a)({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:"color "+e.motionDurationMid+", background-color "+e.motionDurationMid,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:e.modalCloseBtnSize+"px",textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},Object(re.d)(e))),Object(E.a)(r,i+"-header",{color:e.colorText,background:e.modalHeaderBg,borderRadius:e.borderRadiusLG+"px "+e.borderRadiusLG+"px 0 0",marginBottom:e.marginXS}),Object(E.a)(r,i+"-body",{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"}),Object(E.a)(r,i+"-footer",Object(E.a)({textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM},e.antCls+"-btn + "+e.antCls+"-btn:not("+e.antCls+"-dropdown-trigger)",{marginBottom:0,marginInlineStart:e.marginXS})),Object(E.a)(r,i+"-open",{overflow:"hidden"}),r))),Object(E.a)({},i+"-pure-panel",(o={top:"auto",padding:0,display:"flex",flexDirection:"column"},Object(E.a)(o,i+"-content,\n "+i+"-body,\n "+i+"-confirm-body-wrapper",{display:"flex",flexDirection:"column",flex:"auto"}),Object(E.a)(o,i+"-confirm-body",{marginBottom:"auto"}),o))]},le=function(e){var t,n,r,o,i=e.componentCls,l=i+"-confirm";return o={},Object(E.a)(o,l,(r={"&-rtl":{direction:"rtl"}},Object(E.a)(r,e.antCls+"-modal-header",{display:"none"}),Object(E.a)(r,l+"-body-wrapper",Object(a.a)({},Object(re.a)())),Object(E.a)(r,l+"-body",(n={display:"flex",flexWrap:"wrap",alignItems:"center"},Object(E.a)(n,l+"-title",Object(E.a)({flex:"0 0 100%",display:"block",overflow:"hidden",color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight},"+ "+l+"-content",{marginBlockStart:e.marginXS})),Object(E.a)(n,l+"-content",{color:e.colorText,fontSize:e.fontSize}),Object(E.a)(n,"> "+e.iconCls,(t={flex:"none",marginInlineEnd:e.marginSM,fontSize:e.modalConfirmIconSize},Object(E.a)(t,"+ "+l+"-title",{flex:1}),Object(E.a)(t,"+ "+l+"-title + "+l+"-content",{marginInlineStart:e.modalConfirmIconSize+e.marginSM,flexBasis:"100%"}),t)),n)),Object(E.a)(r,l+"-btns",Object(E.a)({textAlign:"end",marginTop:e.marginSM},e.antCls+"-btn + "+e.antCls+"-btn",{marginBottom:0,marginInlineStart:e.marginXS})),r)),Object(E.a)(o,l+"-error "+l+"-body > "+e.iconCls,{color:e.colorError}),Object(E.a)(o,l+"-warning "+l+"-body > "+e.iconCls+",\n "+l+"-confirm "+l+"-body > "+e.iconCls,{color:e.colorWarning}),Object(E.a)(o,l+"-info "+l+"-body > "+e.iconCls,{color:e.colorInfo}),Object(E.a)(o,l+"-success "+l+"-body > "+e.iconCls,{color:e.colorSuccess}),Object(E.a)(o,i+"-zoom-leave "+i+"-btns",{pointerEvents:"none"}),o},ce=function(e){var t=e.componentCls;return Object(E.a)({},t+"-root",Object(E.a)({},t+"-wrap-rtl",Object(E.a)({direction:"rtl"},t+"-confirm-body",{direction:"rtl"})))},ue=function(e){var t,n,r,o=e.componentCls,a=e.antCls,i=o+"-confirm";return r={},Object(E.a)(r,o,(t={},Object(E.a)(t,o+"-content",{padding:0}),Object(E.a)(t,o+"-header",{padding:e.modalHeaderPadding,borderBottom:e.modalHeaderBorderWidth+"px "+e.modalHeaderBorderStyle+" "+e.modalHeaderBorderColorSplit,marginBottom:0}),Object(E.a)(t,o+"-body",{padding:e.modalBodyPadding}),Object(E.a)(t,o+"-footer",{padding:e.modalFooterPaddingVertical+"px "+e.modalFooterPaddingHorizontal+"px",borderTop:e.modalFooterBorderWidth+"px "+e.modalFooterBorderStyle+" "+e.modalFooterBorderColorSplit,borderRadius:"0 0 "+e.borderRadiusLG+"px "+e.borderRadiusLG+"px",marginTop:0}),t)),Object(E.a)(r,i,(n={},Object(E.a)(n,a+"-modal-body",{padding:2*e.padding+"px "+2*e.padding+"px "+e.paddingLG+"px"}),Object(E.a)(n,i+"-body",Object(E.a)({},"> "+e.iconCls,Object(E.a)({marginInlineEnd:e.margin},"+ "+i+"-title + "+i+"-content",{marginInlineStart:e.modalConfirmIconSize+e.margin}))),Object(E.a)(n,i+"-btns",{marginTop:e.marginLG}),n)),r},se=Object(te.a)("Modal",(function(e){var t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5,o=Object(ne.b)(e,{modalBodyPadding:e.paddingLG,modalHeaderBg:e.colorBgElevated,modalHeaderPadding:t+"px "+e.paddingLG+"px",modalHeaderBorderWidth:e.lineWidth,modalHeaderBorderStyle:e.lineType,modalHeaderTitleLineHeight:r,modalHeaderTitleFontSize:n,modalHeaderBorderColorSplit:e.colorSplit,modalHeaderCloseSize:r*n+2*t,modalContentBg:e.colorBgElevated,modalHeadingColor:e.colorTextHeading,modalCloseColor:e.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterPaddingVertical:e.paddingXS,modalFooterPaddingHorizontal:e.padding,modalFooterBorderWidth:e.lineWidth,modalConfirmTitleFontSize:e.fontSizeLG,modalIconHoverColor:e.colorIconHover,modalConfirmIconSize:e.fontSize*e.lineHeight,modalCloseBtnSize:.55*e.controlHeightLG});return[ie(o),le(o),ce(o),ae(o),e.wireframe&&ue(o),Object(ee.a)(o,"zoom")]})),fe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o "+r+", > "+r+"-content",{width:0})),Object(o.a)(t,r+"-header, &"+r+"-footer",{flex:"0 0 auto"}),Object(o.a)(t,r+"-header",Object(o.a)({height:f,paddingInline:d,color:h,lineHeight:f+"px",background:c},n+"-menu",{lineHeight:"inherit"})),Object(o.a)(t,r+"-footer",{padding:m,color:a,fontSize:O,background:u}),Object(o.a)(t,r+"-content",{flex:"auto",minHeight:0}),Object(o.a)(t,r+"-sider",{position:"relative",minWidth:0,background:c,transition:"all "+g,"&-children":Object(o.a)({height:"100%",marginTop:-.1,paddingTop:.1},n+"-menu"+n+"menu-inline-collapsed",{width:"auto"}),"&-has-trigger":{paddingBottom:v},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:v,color:l,lineHeight:v+"px",textAlign:"center",background:s,cursor:"pointer",transition:"all "+g},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:f,insetInlineEnd:-b,zIndex:1,width:b,height:b,color:l,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:c,borderStartStartRadius:0,borderStartEndRadius:w,borderEndEndRadius:w,borderEndStartRadius:0,cursor:"pointer",transition:"background "+y+" ease","&::after":{position:"absolute",inset:0,background:"transparent",transition:"all "+y,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-b,borderStartStartRadius:w,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:w}}}}),t),p(e)),{"&-rtl":{direction:"rtl"}}))},m=Object(f.a)("Layout",(function(e){var t=e.colorText,n=e.controlHeightSM,r=e.controlHeight,o=e.controlHeightLG,a=e.marginXXS,i=1.25*o,l=Object(d.b)(e,{layoutHeaderHeight:2*r,layoutHeaderPaddingInline:i,layoutHeaderColor:t,layoutFooterPadding:n+"px "+i+"px",layoutTriggerHeight:o+2*a,layoutZeroTriggerSize:o});return[h(l)]}),(function(e){return{colorBgHeader:"#001529",colorBgBody:e.colorBgLayout,colorBgTrigger:"#002140"}})),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0),Object(o.a)(n,g+"-rtl","rtl"===l),n),y,S),_=u.useMemo((function(){return{siderHook:{addSider:function(e){h((function(t){return[].concat(Object(r.a)(t),[e])}))},removeSider:function(e){h((function(t){return t.filter((function(t){return t!==e}))}))}}}}),[]);return C(u.createElement(b.Provider,{value:_},u.createElement(x,Object(i.a)({ref:t,className:T},j),O)))})),w=g({suffixCls:"layout",tagName:"section",displayName:"Layout"})(O),x=g({suffixCls:"layout-header",tagName:"header",displayName:"Header"})(y),j=g({suffixCls:"layout-footer",tagName:"footer",displayName:"Footer"})(y),k=g({suffixCls:"layout-content",tagName:"main",displayName:"Content"})(y),E=w,C=n(3),S={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},T=n(23),_=function(e,t){return u.createElement(T.a,Object(C.a)(Object(C.a)({},e),{},{ref:t,icon:S}))};_.displayName="BarsOutlined";var M=u.forwardRef(_),P={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},N=function(e,t){return u.createElement(T.a,Object(C.a)(Object(C.a)({},e),{},{ref:t,icon:P}))};N.displayName="LeftOutlined";var A=u.forwardRef(N),R={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},I=function(e,t){return u.createElement(T.a,Object(C.a)(Object(C.a)({},e),{},{ref:t,icon:R}))};I.displayName="RightOutlined";var D=u.forwardRef(I),F=n(32),L=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},z=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0&&void 0!==arguments[0]?arguments[0]:"";return""+t+(e+=1)}}();var V=u.forwardRef((function(e,t){var n=e.prefixCls,r=e.className,l=e.trigger,f=e.children,d=e.defaultCollapsed,p=void 0!==d&&d,h=e.theme,m=void 0===h?"dark":h,v=e.style,g=void 0===v?{}:v,y=e.collapsible,O=void 0!==y&&y,w=e.reverseArrow,x=void 0!==w&&w,j=e.width,k=void 0===j?200:j,E=e.collapsedWidth,C=void 0===E?80:E,S=e.zeroWidthTriggerStyle,T=e.breakpoint,_=e.onCollapse,P=e.onBreakpoint,N=z(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),R=Object(u.useContext)(b).siderHook,I=Object(u.useState)("collapsed"in N?N.collapsed:p),V=Object(a.a)(I,2),W=V[0],U=V[1],X=Object(u.useState)(!1),$=Object(a.a)(X,2),G=$[0],K=$[1];Object(u.useEffect)((function(){"collapsed"in N&&U(N.collapsed)}),[N.collapsed]);var Y=function(e,t){"collapsed"in N||U(e),null===_||void 0===_||_(e,t)},Q=Object(u.useRef)();Q.current=function(e){K(e.matches),null===P||void 0===P||P(e.matches),W!==e.matches&&Y(e.matches,"responsive")},Object(u.useEffect)((function(){function e(e){return Q.current(e)}var t;if("undefined"!==typeof window){var n=window.matchMedia;if(n&&T&&T in H){t=n("(max-width: "+H[T]+")");try{t.addEventListener("change",e)}catch(r){t.addListener(e)}e(t)}}return function(){try{null===t||void 0===t||t.removeEventListener("change",e)}catch(r){null===t||void 0===t||t.removeListener(e)}}}),[T]),Object(u.useEffect)((function(){var e=q("ant-sider-");return R.addSider(e),function(){return R.removeSider(e)}}),[]);var Z=function(){Y(!W,"clickTrigger")},J=Object(u.useContext)(s.b).getPrefixCls,ee=u.useMemo((function(){return{siderCollapsed:W}}),[W]);return u.createElement(B.Provider,{value:ee},function(){var e,a=J("layout-sider",n),s=Object(F.a)(N,["collapsed"]),d=W?C:k,p=L(d)?d+"px":String(d),h=0===parseFloat(String(C||0))?u.createElement("span",{onClick:Z,className:c()(a+"-zero-width-trigger",a+"-zero-width-trigger-"+(x?"right":"left")),style:S},l||u.createElement(M,null)):null,v={expanded:x?u.createElement(D,null):u.createElement(A,null),collapsed:x?u.createElement(A,null):u.createElement(D,null)}[W?"collapsed":"expanded"],b=null!==l?h||u.createElement("div",{className:a+"-trigger",onClick:Z,style:{width:p}},l||v):null,y=Object(i.a)(Object(i.a)({},g),{flex:"0 0 "+p,maxWidth:p,minWidth:p,width:p}),w=c()(a,a+"-"+m,(e={},Object(o.a)(e,a+"-collapsed",!!W),Object(o.a)(e,a+"-has-trigger",O&&null!==l&&!h),Object(o.a)(e,a+"-below",!!G),Object(o.a)(e,a+"-zero-width",0===parseFloat(p)),e),r);return u.createElement("aside",Object(i.a)({className:w},s,{style:y,ref:t}),u.createElement("div",{className:a+"-children"},f),O||G&&h?b:null)}())})),W=E;W.Header=x,W.Footer=j,W.Content=k,W.Sider=V;t.a=W},function(e,t,n){"use strict";var r=n(2),o=n(1),a=n(4),i=n(5),l=n.n(i),c=n(35),u=n(0),s=n.n(u),f=n(50),d=n(33);var p=u.createContext(null),h=p.Provider,m=p,v=u.createContext(null),b=v.Provider,g=n(11),y=n(3),O=n(20),w=n(21),x=n(30),j=n(29),k=function(e){Object(x.a)(n,e);var t=Object(j.a)(n);function n(e){var r;Object(O.a)(this,n),(r=t.call(this,e)).handleChange=function(e){var t=r.props,n=t.disabled,o=t.onChange;n||("checked"in r.props||r.setState({checked:e.target.checked}),o&&o({target:Object(y.a)(Object(y.a)({},r.props),{},{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e.nativeEvent}))},r.saveInput=function(e){r.input=e};var o="checked"in e?e.checked:e.defaultChecked;return r.state={checked:o},r}return Object(w.a)(n,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,a=t.className,i=t.style,c=t.name,u=t.id,f=t.type,d=t.disabled,p=t.readOnly,h=t.tabIndex,m=t.onClick,v=t.onFocus,b=t.onBlur,y=t.onKeyDown,O=t.onKeyPress,w=t.onKeyUp,x=t.autoFocus,j=t.value,k=t.required,E=Object(g.a)(t,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","autoFocus","value","required"]),C=Object.keys(E).reduce((function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=E[t]),e}),{}),S=this.state.checked,T=l()(n,a,(e={},Object(o.a)(e,"".concat(n,"-checked"),S),Object(o.a)(e,"".concat(n,"-disabled"),d),e));return s.a.createElement("span",{className:T,style:i},s.a.createElement("input",Object(r.a)({name:c,id:u,type:f,required:k,readOnly:p,disabled:d,tabIndex:h,className:"".concat(n,"-input"),checked:!!S,onClick:m,onFocus:v,onBlur:b,onKeyUp:w,onKeyDown:y,onKeyPress:O,onChange:this.handleChange,autoFocus:x,ref:this.saveInput,value:j},C)),s.a.createElement("span",{className:"".concat(n,"-inner")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return"checked"in e?Object(y.a)(Object(y.a)({},t),{},{checked:e.checked}):null}}]),n}(u.Component);k.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}};var E=k,C=n(22),S=n(41),T=n(12),_=n(9),M=n(104),P=n(67),N=n(16),A=new _.a("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),R=function(e){var t,n=e.componentCls,a=e.antCls,i=n+"-group";return Object(o.a)({},i,Object(r.a)(Object(r.a)({},Object(N.f)(e)),(t={display:"inline-block",fontSize:0,"&&-rtl":{direction:"rtl"}},Object(o.a)(t,a+"-badge "+a+"-badge-count",{zIndex:1}),Object(o.a)(t,"> "+a+"-badge:not(:first-child) > "+a+"-button-wrapper",{borderInlineStart:"none"}),t)))},I=function(e){var t,n,a=e.componentCls,i=e.radioWrapperMarginRight,l=e.radioCheckedColor,c=e.radioTop,u=e.radioSize,s=e.motionDurationSlow,f=e.motionDurationMid,d=e.motionEaseInOut,p=e.motionEaseInOutCirc,h=e.radioButtonBg,m=e.colorBorder,v=e.lineWidth,b=e.radioDotSize,g=e.colorBgContainerDisabled,y=e.colorTextDisabled,O=e.paddingXS,w=e.radioDotDisabledColor,x=e.lineType,j=e.radioDotDisabledSize,k=e.wireframe,E=e.colorWhite,C=a+"-inner";return Object(o.a)({},a+"-wrapper",Object(r.a)(Object(r.a)({},Object(N.f)(e)),(n={position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:i,cursor:"pointer","&&-rtl":{direction:"rtl"},"&-disabled":{cursor:"not-allowed"},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'}},Object(o.a)(n,a+"-checked::after",{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:v+"px "+x+" "+l,borderRadius:"50%",visibility:"hidden",animationName:A,animationDuration:s,animationTimingFunction:d,animationFillMode:"both",content:'""'}),Object(o.a)(n,a,Object(r.a)(Object(r.a)({},Object(N.f)(e)),{position:"relative",insetBlockStart:c,display:"inline-block",outline:"none",cursor:"pointer"})),Object(o.a)(n,a+"-wrapper:hover &,\n &:hover "+C,{borderColor:l}),Object(o.a)(n,a+"-input:focus-visible + "+C,Object(r.a)({},Object(N.c)(e))),Object(o.a)(n,a+":hover::after, "+a+"-wrapper:hover &::after",{visibility:"visible"}),Object(o.a)(n,a+"-inner",{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:u,height:u,marginBlockStart:u/-2,marginInlineStart:u/-2,backgroundColor:k?l:E,borderBlockStart:0,borderInlineStart:0,borderRadius:u,transform:"scale(0)",opacity:0,transition:"all "+s+" "+p,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:u,height:u,backgroundColor:h,borderColor:m,borderStyle:"solid",borderWidth:v,borderRadius:"50%",transition:"all "+f}),Object(o.a)(n,a+"-input",{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0}),Object(o.a)(n,a+"-checked",Object(o.a)({},C,{borderColor:l,backgroundColor:k?h:l,"&::after":{transform:"scale("+b/u+")",opacity:1,transition:"all "+s+" "+p}})),Object(o.a)(n,a+"-disabled",(t={cursor:"not-allowed"},Object(o.a)(t,C,{backgroundColor:g,borderColor:m,cursor:"not-allowed","&::after":{backgroundColor:w}}),Object(o.a)(t,"&-input",{cursor:"not-allowed"}),Object(o.a)(t,a+"-disabled + span",{color:y,cursor:"not-allowed"}),Object(o.a)(t,"&"+a+"-checked",Object(o.a)({},C,{"&::after":{transform:"scale("+j/u+")"}})),t)),Object(o.a)(n,"span"+a+" + *",{paddingInlineStart:O,paddingInlineEnd:O}),n)))},D=function(e){var t,n=e.radioButtonColor,a=e.controlHeight,i=e.componentCls,l=e.lineWidth,c=e.lineType,u=e.colorBorder,s=e.motionDurationSlow,f=e.motionDurationMid,d=e.radioButtonPaddingHorizontal,p=e.fontSize,h=e.radioButtonBg,m=e.fontSizeLG,v=e.controlHeightLG,b=e.controlHeightSM,g=e.paddingXS,y=e.borderRadius,O=e.borderRadiusSM,w=e.borderRadiusLG,x=e.radioCheckedColor,j=e.radioButtonCheckedBg,k=e.radioButtonHoverColor,E=e.radioButtonActiveColor,C=e.radioSolidCheckedColor,S=e.colorTextDisabled,T=e.colorBgContainerDisabled,_=e.radioDisabledButtonCheckedColor,M=e.radioDisabledButtonCheckedBg;return Object(o.a)({},i+"-button-wrapper",(t={position:"relative",display:"inline-block",height:a,margin:0,paddingInline:d,paddingBlock:0,color:n,fontSize:p,lineHeight:a-2*l+"px",background:h,border:l+"px "+c+" "+u,borderBlockStartWidth:l+.02,borderInlineStartWidth:0,borderInlineEndWidth:l,cursor:"pointer",transition:["color "+f,"background "+f,"border-color "+f,"box-shadow "+f].join(","),a:{color:n}},Object(o.a)(t,"> "+i+"-button",{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"}),Object(o.a)(t,"&:not(:first-child)",{"&::before":{position:"absolute",insetBlockStart:-l,insetInlineStart:-l,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:l,paddingInline:0,backgroundColor:u,transition:"background-color "+s,content:'""'}}),Object(o.a)(t,"&:first-child",{borderInlineStart:l+"px "+c+" "+u,borderStartStartRadius:y,borderEndStartRadius:y}),Object(o.a)(t,"&:last-child",{borderStartEndRadius:y,borderEndEndRadius:y}),Object(o.a)(t,"&:first-child:last-child",{borderRadius:y}),Object(o.a)(t,i+"-group-large &",{height:v,fontSize:m,lineHeight:v-2*l+"px","&:first-child":{borderStartStartRadius:w,borderEndStartRadius:w},"&:last-child":{borderStartEndRadius:w,borderEndEndRadius:w}}),Object(o.a)(t,i+"-group-small &",{height:b,paddingInline:g-l,paddingBlock:0,lineHeight:b-2*l+"px","&:first-child":{borderStartStartRadius:O,borderEndStartRadius:O},"&:last-child":{borderStartEndRadius:O,borderEndEndRadius:O}}),Object(o.a)(t,"&:hover",{position:"relative",color:x}),Object(o.a)(t,"&:has(:focus-visible)",Object(r.a)({},Object(N.c)(e))),Object(o.a)(t,i+"-inner, input[type='checkbox'], input[type='radio']",{width:0,height:0,opacity:0,pointerEvents:"none"}),Object(o.a)(t,"&-checked:not(&-disabled)",{zIndex:1,color:x,background:j,borderColor:x,"&::before":{backgroundColor:x},"&:first-child":{borderColor:x},"&:hover":{color:k,borderColor:k,"&::before":{backgroundColor:k}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}}),Object(o.a)(t,i+"-group-solid &-checked:not(&-disabled)",{color:C,background:x,borderColor:x,"&:hover":{color:C,background:k,borderColor:k},"&:active":{color:C,background:E,borderColor:E}}),Object(o.a)(t,"&-disabled",{color:S,backgroundColor:T,borderColor:u,cursor:"not-allowed","&:first-child, &:hover":{color:S,backgroundColor:T,borderColor:u}}),Object(o.a)(t,"&-disabled&-checked",{color:_,backgroundColor:M,borderColor:u,boxShadow:"none"}),t))},F=Object(M.a)("Radio",(function(e){var t=e.padding,n=e.lineWidth,r=e.colorBgContainerDisabled,o=e.colorTextDisabled,a=e.colorBgContainer,i=e.fontSize,l=e.lineHeight,c=e.fontSizeLG,u=e.controlOutline,s=e.colorPrimaryHover,f=e.colorPrimaryActive,d=e.colorText,p=e.colorPrimary,h=e.marginXS,m=e.controlOutlineWidth,v=e.wireframe,b="0 0 0 "+m+"px "+u,g=b,y=c,O=(Math.round(i*l)-y)/2,w=y-8,x=v?w:y-2*(4+n),j=p,k=d,E=s,C=f,S=t-n,T=o,_=h,M=Object(P.b)(e,{radioFocusShadow:b,radioButtonFocusShadow:g,radioSize:y,radioTop:O,radioDotSize:x,radioDotDisabledSize:w,radioCheckedColor:j,radioDotDisabledColor:o,radioSolidCheckedColor:a,radioButtonBg:a,radioButtonCheckedBg:a,radioButtonColor:k,radioButtonHoverColor:E,radioButtonActiveColor:C,radioButtonPaddingHorizontal:S,radioDisabledButtonCheckedBg:r,radioDisabledButtonCheckedColor:T,radioWrapperMarginRight:_});return[R(M),I(M),D(M)]})),L=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0&&(V=j.map((function(e){return"string"===typeof e||"number"===typeof e?u.createElement(H,{key:e.toString(),prefixCls:I,disabled:C,value:e,checked:g===e},e):u.createElement(H,{key:"radio-group-value-options-"+e.value,prefixCls:I,disabled:e.disabled||C,value:e.value,checked:g===e.value,style:e.style},e.label)})));var W=T||m,U=l()(D,D+"-"+E,(n={},Object(o.a)(n,D+"-"+W,W),Object(o.a)(n,D+"-rtl","rtl"===p),n),x,q);return B(u.createElement("div",Object(r.a)({},function(e){return Object.keys(e).reduce((function(t,n){return!n.startsWith("data-")&&!n.startsWith("aria-")&&"role"!==n||n.startsWith("data-__")||(t[n]=e[n]),t}),{})}(e),{className:U,style:_,onMouseEnter:P,onMouseLeave:N,onFocus:A,onBlur:R,id:M,ref:t}),u.createElement(h,{value:{onChange:function(t){var n=g,r=t.target.value;"value"in e||y(r);var o=e.onChange;o&&r!==n&&o(t)},value:g,disabled:e.disabled,name:e.name,optionType:e.optionType}},V)))})),q=u.memo(B),V=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset:\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d m s\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import {IMPORT, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nvar Entity = /*#__PURE__*/function () {\n function Entity() {\n _classCallCheck(this, Entity);\n this.cache = new Map();\n }\n _createClass(Entity, [{\n key: \"get\",\n value: function get(keys) {\n return this.cache.get(keys.join('%')) || null;\n }\n }, {\n key: \"update\",\n value: function update(keys, valueFn) {\n var path = keys.join('%');\n var prevValue = this.cache.get(path);\n var nextValue = valueFn(prevValue);\n if (nextValue === null) {\n this.cache.delete(path);\n } else {\n this.cache.set(path, nextValue);\n }\n }\n }]);\n return Entity;\n}();\nexport default Entity;","import * as React from 'react';\nimport CacheEntity from './Cache';\nexport var ATTR_TOKEN = 'data-token-hash';\nexport var ATTR_MARK = 'data-css-hash';\nexport var ATTR_DEV_CACHE_PATH = 'data-dev-cache-path';\n// Mark css-in-js instance in style element\nexport var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport var CSS_IN_JS_INSTANCE_ID = Math.random().toString(12).slice(2);\nexport function createCache() {\n if (typeof document !== 'undefined') {\n var styles = document.body.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\"));\n var firstChild = document.head.firstChild;\n Array.from(styles).forEach(function (style) {\n style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || CSS_IN_JS_INSTANCE_ID;\n document.head.insertBefore(style, firstChild);\n });\n // Deduplicate of moved styles\n var styleHash = {};\n Array.from(document.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\"))).forEach(function (style) {\n var hash = style.getAttribute(ATTR_MARK);\n if (styleHash[hash]) {\n if (style[CSS_IN_JS_INSTANCE] === CSS_IN_JS_INSTANCE_ID) {\n var _style$parentNode;\n (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 ? void 0 : _style$parentNode.removeChild(style);\n }\n } else {\n styleHash[hash] = true;\n }\n });\n }\n return new CacheEntity();\n}\nvar StyleContext = /*#__PURE__*/React.createContext({\n hashPriority: 'low',\n cache: createCache(),\n defaultCache: true\n});\nexport var StyleProvider = function StyleProvider(props) {\n var autoClear = props.autoClear,\n mock = props.mock,\n cache = props.cache,\n hashPriority = props.hashPriority,\n children = props.children;\n var _React$useContext = React.useContext(StyleContext),\n parentCache = _React$useContext.cache,\n parentAutoClear = _React$useContext.autoClear,\n parentMock = _React$useContext.mock,\n parentDefaultCache = _React$useContext.defaultCache,\n parentHashPriority = _React$useContext.hashPriority;\n var context = React.useMemo(function () {\n return {\n autoClear: autoClear !== null && autoClear !== void 0 ? autoClear : parentAutoClear,\n mock: mock !== null && mock !== void 0 ? mock : parentMock,\n cache: cache || parentCache || createCache(),\n defaultCache: !cache && parentDefaultCache,\n hashPriority: hashPriority !== null && hashPriority !== void 0 ? hashPriority : parentHashPriority\n };\n }, [autoClear, parentAutoClear, parentMock, parentCache, mock, cache, parentDefaultCache, hashPriority, parentHashPriority]);\n return /*#__PURE__*/React.createElement(StyleContext.Provider, {\n value: context\n }, children);\n};\nexport default StyleContext;","function useProdHMR() {\n return false;\n}\nvar webpackHMR = false;\nfunction useDevHMR() {\n return webpackHMR;\n}\nexport default process.env.NODE_ENV === 'production' ? useProdHMR : useDevHMR;\n// Webpack `module.hot.accept` do not support any deps update trigger\n// We have to hack handler to force mark as HRM\nif (process.env.NODE_ENV !== 'production' && typeof module !== 'undefined' && module && module.hot) {\n var win = window;\n if (typeof win.webpackHotUpdate === 'function') {\n var originWebpackHotUpdate = win.webpackHotUpdate;\n win.webpackHotUpdate = function () {\n webpackHMR = true;\n setTimeout(function () {\n webpackHMR = false;\n }, 0);\n return originWebpackHotUpdate.apply(void 0, arguments);\n };\n }\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport StyleContext from '../StyleContext';\nimport useHMR from './useHMR';\nexport default function useClientCache(prefix, keyPath, cacheFn, onCacheRemove) {\n var _React$useContext = React.useContext(StyleContext),\n globalCache = _React$useContext.cache;\n var fullPath = [prefix].concat(_toConsumableArray(keyPath));\n var HMRUpdate = useHMR();\n // Create cache\n React.useMemo(function () {\n globalCache.update(fullPath, function (prevCache) {\n var _ref = prevCache || [],\n _ref2 = _slicedToArray(_ref, 2),\n _ref2$ = _ref2[0],\n times = _ref2$ === void 0 ? 0 : _ref2$,\n cache = _ref2[1];\n // HMR should always ignore cache since developer may change it\n var tmpCache = cache;\n if (process.env.NODE_ENV !== 'production' && cache && HMRUpdate) {\n onCacheRemove === null || onCacheRemove === void 0 ? void 0 : onCacheRemove(tmpCache, HMRUpdate);\n tmpCache = null;\n }\n var mergedCache = tmpCache || cacheFn();\n return [times + 1, mergedCache];\n });\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [fullPath.join('_')]);\n // Remove if no need anymore\n React.useEffect(function () {\n return function () {\n globalCache.update(fullPath, function (prevCache) {\n var _ref3 = prevCache || [],\n _ref4 = _slicedToArray(_ref3, 2),\n _ref4$ = _ref4[0],\n times = _ref4$ === void 0 ? 0 : _ref4$,\n cache = _ref4[1];\n var nextCount = times - 1;\n if (nextCount === 0) {\n onCacheRemove === null || onCacheRemove === void 0 ? void 0 : onCacheRemove(cache, false);\n return null;\n }\n return [times - 1, cache];\n });\n };\n }, fullPath);\n return globalCache.get(fullPath)[1];\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport hash from '@emotion/hash';\nimport devWarning from \"rc-util/es/warning\";\nimport { updateCSS, removeCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nexport function flattenToken(token) {\n var str = '';\n Object.keys(token).forEach(function (key) {\n var value = token[key];\n str += key;\n if (value && _typeof(value) === 'object') {\n str += flattenToken(value);\n } else {\n str += value;\n }\n });\n return str;\n}\n/**\n * Convert derivative token to key string\n */\nexport function token2key(token, slat) {\n return hash(\"\".concat(slat, \"_\").concat(flattenToken(token)));\n}\nexport function warning(message, path) {\n devWarning(false, \"[Ant Design CSS-in-JS] \".concat(path ? \"Error in '\".concat(path, \"': \") : '').concat(message));\n}\nexport var styleValidate = function styleValidate(key, value) {\n var info = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var path = info.path,\n hashId = info.hashId;\n switch (key) {\n case 'content':\n // From emotion: https://github.com/emotion-js/emotion/blob/main/packages/serialize/src/index.js#L63\n var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n warning(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\".concat(value, \"\\\"'`\"), path);\n }\n return;\n case 'marginLeft':\n case 'marginRight':\n case 'paddingLeft':\n case 'paddingRight':\n case 'left':\n case 'right':\n case 'borderLeft':\n case 'borderLeftWidth':\n case 'borderLeftStyle':\n case 'borderLeftColor':\n case 'borderRight':\n case 'borderRightWidth':\n case 'borderRightStyle':\n case 'borderRightColor':\n case 'borderTopLeftRadius':\n case 'borderTopRightRadius':\n case 'borderBottomLeftRadius':\n case 'borderBottomRightRadius':\n warning(\"You seem to be using non-logical property '\".concat(key, \"' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.\"), path);\n return;\n case 'margin':\n case 'padding':\n case 'borderWidth':\n case 'borderStyle':\n // case 'borderColor':\n if (typeof value === 'string') {\n var valueArr = value.split(' ').map(function (item) {\n return item.trim();\n });\n if (valueArr.length === 4 && valueArr[1] !== valueArr[3]) {\n warning(\"You seem to be using '\".concat(key, \"' property with different left \").concat(key, \" and right \").concat(key, \", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.\"), path);\n }\n }\n return;\n case 'clear':\n case 'textAlign':\n if (value === 'left' || value === 'right') {\n warning(\"You seem to be using non-logical value '\".concat(value, \"' of \").concat(key, \", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.\"), path);\n }\n return;\n case 'borderRadius':\n if (typeof value === 'string') {\n var radiusGroups = value.split('/').map(function (item) {\n return item.trim();\n });\n var invalid = radiusGroups.reduce(function (result, group) {\n if (result) {\n return result;\n }\n var radiusArr = group.split(' ').map(function (item) {\n return item.trim();\n });\n // borderRadius: '2px 4px'\n if (radiusArr.length >= 2 && radiusArr[0] !== radiusArr[1]) {\n return true;\n }\n // borderRadius: '4px 4px 2px'\n if (radiusArr.length === 3 && radiusArr[1] !== radiusArr[2]) {\n return true;\n }\n // borderRadius: '4px 4px 2px 4px'\n if (radiusArr.length === 4 && radiusArr[2] !== radiusArr[3]) {\n return true;\n }\n return result;\n }, false);\n if (invalid) {\n warning(\"You seem to be using non-logical value '\".concat(value, \"' of \").concat(key, \", which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.\"), path);\n }\n }\n return;\n case 'animation':\n if (hashId && value !== 'none') {\n warning(\"You seem to be using hashed animation '\".concat(value, \"', in which case 'animationName' with Keyframe as value is recommended.\"), path);\n }\n default:\n return;\n }\n};\nvar layerKey = \"layer-\".concat(Date.now(), \"-\").concat(Math.random()).replace(/\\./g, '');\nvar layerWidth = '903px';\nfunction supportSelector(styleStr, handleElement) {\n if (canUseDom()) {\n var _ele$parentNode;\n updateCSS(styleStr, layerKey);\n var ele = document.createElement('div');\n ele.style.position = 'fixed';\n ele.style.left = '0';\n ele.style.top = '0';\n handleElement === null || handleElement === void 0 ? void 0 : handleElement(ele);\n document.body.appendChild(ele);\n if (process.env.NODE_ENV !== 'production') {\n ele.innerHTML = 'Test';\n ele.style.zIndex = '9999999';\n }\n var support = getComputedStyle(ele).width === layerWidth;\n (_ele$parentNode = ele.parentNode) === null || _ele$parentNode === void 0 ? void 0 : _ele$parentNode.removeChild(ele);\n removeCSS(layerKey);\n return support;\n }\n return false;\n}\nvar canLayer = undefined;\nexport function supportLayer() {\n if (canLayer === undefined) {\n canLayer = supportSelector(\"@layer \".concat(layerKey, \" { .\").concat(layerKey, \" { width: \").concat(layerWidth, \"!important; } }\"), function (ele) {\n ele.className = layerKey;\n });\n }\n return canLayer;\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport * as React from 'react';\nimport { updateCSS, removeCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport hash from '@emotion/hash';\n// @ts-ignore\nimport unitless from '@emotion/unitless';\nimport { compile, serialize, stringify } from 'stylis';\nimport useGlobalCache from './useGlobalCache';\nimport StyleContext, { ATTR_MARK, ATTR_TOKEN, ATTR_DEV_CACHE_PATH, CSS_IN_JS_INSTANCE, CSS_IN_JS_INSTANCE_ID } from '../StyleContext';\nimport { styleValidate, supportLayer } from '../util';\nvar isClientSide = canUseDom();\nvar SKIP_CHECK = '_skip_check_';\n// ============================================================================\n// == Parser ==\n// ============================================================================\n// Preprocessor style content to browser support one\nexport function normalizeStyle(styleStr) {\n var serialized = serialize(compile(styleStr), stringify);\n return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}\nfunction isCompoundCSSProperty(value) {\n return _typeof(value) === 'object' && value && SKIP_CHECK in value;\n}\nexport var animationStatistics = {};\n// 注入 hash 值\nfunction injectSelectorHash(key, hashId, hashPriority) {\n if (!hashId) {\n return key;\n }\n var hashClassName = \".\".concat(hashId);\n var hashSelector = hashPriority === 'low' ? \":where(\".concat(hashClassName, \")\") : hashClassName;\n // 注入 hashId\n var keys = key.split(',').map(function (k) {\n var _firstPath$match;\n var fullPath = k.trim().split(/\\s+/);\n // 如果 Selector 第一个是 HTML Element,那我们就插到它的后面。反之,就插到最前面。\n var firstPath = fullPath[0] || '';\n var htmlElement = ((_firstPath$match = firstPath.match(/^\\w+/)) === null || _firstPath$match === void 0 ? void 0 : _firstPath$match[0]) || '';\n firstPath = \"\".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length));\n return [firstPath].concat(_toConsumableArray(fullPath.slice(1))).join(' ');\n });\n return keys.join(',');\n}\n// Parse CSSObject to style content\nexport var parseStyle = function parseStyle(interpolation) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n root: true\n },\n root = _ref.root,\n injectHash = _ref.injectHash;\n var hashId = config.hashId,\n layer = config.layer,\n path = config.path,\n hashPriority = config.hashPriority;\n var styleStr = '';\n function parseKeyframes(keyframes) {\n if (animationStatistics[keyframes.getName(hashId)]) {\n return '';\n }\n animationStatistics[keyframes.getName(hashId)] = true;\n return \"@keyframes \".concat(keyframes.getName(hashId)).concat(parseStyle(keyframes.style, config, {\n root: false\n }));\n }\n function flattenList(list) {\n var fullList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n list.forEach(function (item) {\n if (Array.isArray(item)) {\n flattenList(item, fullList);\n } else if (item) {\n fullList.push(item);\n }\n });\n return fullList;\n }\n var flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);\n flattenStyleList.forEach(function (originStyle) {\n // Only root level can use raw string\n var style = typeof originStyle === 'string' && !root ? {} : originStyle;\n if (typeof style === 'string') {\n styleStr += \"\".concat(style, \"\\n\");\n } else if (style._keyframe) {\n // Keyframe\n styleStr += parseKeyframes(style);\n } else {\n // Normal CSSObject\n Object.keys(style).forEach(function (key) {\n var value = style[key];\n if (_typeof(value) === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {\n var subInjectHash = false;\n // 当成嵌套对象来处理\n var mergedKey = key.trim();\n // Whether treat child as root. In most case it is false.\n var nextRoot = false;\n // 拆分多个选择器\n if ((root || injectHash) && hashId) {\n if (mergedKey.startsWith('@')) {\n // 略过媒体查询,交给子节点继续插入 hashId\n subInjectHash = true;\n } else {\n // 注入 hashId\n mergedKey = injectSelectorHash(key, hashId, hashPriority);\n }\n } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {\n // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,\n // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.\n // But it does not conform to stylis syntax,\n // and finally we will get `{color:red;}` as css, which is wrong.\n // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.\n mergedKey = '';\n nextRoot = true;\n }\n styleStr += \"\".concat(mergedKey).concat(parseStyle(value, _objectSpread(_objectSpread({}, config), {}, {\n path: \"\".concat(path, \" -> \").concat(mergedKey)\n }), {\n root: nextRoot,\n injectHash: subInjectHash\n }));\n } else {\n var _value$value;\n var actualValue = (_value$value = value === null || value === void 0 ? void 0 : value.value) !== null && _value$value !== void 0 ? _value$value : value;\n if (process.env.NODE_ENV !== 'production' && (_typeof(value) !== 'object' || !(value === null || value === void 0 ? void 0 : value[SKIP_CHECK]))) {\n styleValidate(key, actualValue, {\n path: path,\n hashId: hashId\n });\n }\n // 如果是样式则直接插入\n var styleName = key.replace(/[A-Z]/g, function (match) {\n return \"-\".concat(match.toLowerCase());\n });\n // Auto suffix with px\n var formatValue = actualValue;\n if (!unitless[key] && typeof formatValue === 'number' && formatValue !== 0) {\n formatValue = \"\".concat(formatValue, \"px\");\n }\n // handle animationName & Keyframe value\n if (key === 'animationName' && (value === null || value === void 0 ? void 0 : value._keyframe)) {\n styleStr += parseKeyframes(value);\n formatValue = value.getName(hashId);\n }\n styleStr += \"\".concat(styleName, \":\").concat(formatValue, \";\");\n }\n });\n }\n });\n if (!root) {\n styleStr = \"{\".concat(styleStr, \"}\");\n } else if (layer && supportLayer()) {\n var layerCells = layer.split(',');\n var layerName = layerCells[layerCells.length - 1].trim();\n styleStr = \"@layer \".concat(layerName, \" {\").concat(styleStr, \"}\");\n // Order of layer if needed\n if (layerCells.length > 1) {\n // zombieJ: stylis do not support layer order, so we need to handle it manually.\n styleStr = \"@layer \".concat(layer, \"{%%%:%}\").concat(styleStr);\n }\n }\n return styleStr;\n};\n// ============================================================================\n// == Register ==\n// ============================================================================\nfunction uniqueHash(path, styleStr) {\n return hash(\"\".concat(path.join('%')).concat(styleStr));\n}\nfunction Empty() {\n return null;\n}\n/**\n * Register a style to the global style sheet.\n */\nexport default function useStyleRegister(info, styleFn) {\n var token = info.token,\n path = info.path,\n hashId = info.hashId,\n layer = info.layer;\n var _React$useContext = React.useContext(StyleContext),\n autoClear = _React$useContext.autoClear,\n mock = _React$useContext.mock,\n defaultCache = _React$useContext.defaultCache,\n hashPriority = _React$useContext.hashPriority;\n var tokenKey = token._tokenKey;\n var fullPath = [tokenKey].concat(_toConsumableArray(path));\n // Check if need insert style\n var isMergedClientSide = isClientSide;\n if (process.env.NODE_ENV !== 'production' && mock !== undefined) {\n isMergedClientSide = mock === 'client';\n }\n var _useGlobalCache = useGlobalCache('style', fullPath,\n // Create cache if needed\n function () {\n var styleObj = styleFn();\n var styleStr = normalizeStyle(parseStyle(styleObj, {\n hashId: hashId,\n hashPriority: hashPriority,\n layer: layer,\n path: path.join('-')\n }));\n var styleId = uniqueHash(fullPath, styleStr);\n // Clear animation statistics\n animationStatistics = {};\n if (isMergedClientSide) {\n var style = updateCSS(styleStr, styleId, {\n mark: ATTR_MARK,\n prepend: 'queue'\n });\n style[CSS_IN_JS_INSTANCE] = CSS_IN_JS_INSTANCE_ID;\n // Used for `useCacheToken` to remove on batch when token removed\n style.setAttribute(ATTR_TOKEN, tokenKey);\n // Dev usage to find which cache path made this easily\n if (process.env.NODE_ENV !== 'production') {\n style.setAttribute(ATTR_DEV_CACHE_PATH, fullPath.join('|'));\n }\n }\n return [styleStr, tokenKey, styleId];\n },\n // Remove cache if no need\n function (_ref2, fromHMR) {\n var _ref3 = _slicedToArray(_ref2, 3),\n styleId = _ref3[2];\n if ((fromHMR || autoClear) && isClientSide) {\n removeCSS(styleId, {\n mark: ATTR_MARK\n });\n }\n }),\n _useGlobalCache2 = _slicedToArray(_useGlobalCache, 3),\n cachedStyleStr = _useGlobalCache2[0],\n cachedTokenKey = _useGlobalCache2[1],\n cachedStyleId = _useGlobalCache2[2];\n return function (node) {\n var styleNode;\n if (isMergedClientSide || !defaultCache) {\n styleNode = /*#__PURE__*/React.createElement(Empty, null);\n } else {\n var _objectSpread2;\n styleNode = /*#__PURE__*/React.createElement(\"style\", _objectSpread(_objectSpread({}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, ATTR_TOKEN, cachedTokenKey), _defineProperty(_objectSpread2, ATTR_MARK, cachedStyleId), _objectSpread2)), {}, {\n dangerouslySetInnerHTML: {\n __html: cachedStyleStr\n }\n }));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, styleNode, node);\n };\n}\n// ============================================================================\n// == SSR ==\n// ============================================================================\nexport function extractStyle(cache) {\n // prefix with `style` is used for `useStyleRegister` to cache style context\n var styleKeys = Array.from(cache.cache.keys()).filter(function (key) {\n return key.startsWith('style%');\n });\n // const tokenStyles: Record = {};\n var styleText = '';\n styleKeys.forEach(function (key) {\n var _cache$cache$get$ = _slicedToArray(cache.cache.get(key)[1], 3),\n styleStr = _cache$cache$get$[0],\n tokenKey = _cache$cache$get$[1],\n styleId = _cache$cache$get$[2];\n styleText += \"\");\n });\n return styleText;\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport hash from '@emotion/hash';\nimport { ATTR_TOKEN, CSS_IN_JS_INSTANCE, CSS_IN_JS_INSTANCE_ID } from '../StyleContext';\nimport useGlobalCache from './useGlobalCache';\nimport { flattenToken, token2key } from '../util';\nvar EMPTY_OVERRIDE = {};\n// Generate different prefix to make user selector break in production env.\n// This helps developer not to do style override directly on the hash id.\nvar hashPrefix = process.env.NODE_ENV !== 'production' ? 'css-dev-only-do-not-override' : 'css';\nvar tokenKeys = new Map();\nfunction recordCleanToken(tokenKey) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);\n}\nfunction removeStyleTags(key) {\n if (typeof document !== 'undefined') {\n var styles = document.querySelectorAll(\"style[\".concat(ATTR_TOKEN, \"=\\\"\").concat(key, \"\\\"]\"));\n styles.forEach(function (style) {\n if (style[CSS_IN_JS_INSTANCE] === CSS_IN_JS_INSTANCE_ID) {\n var _style$parentNode;\n (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 ? void 0 : _style$parentNode.removeChild(style);\n }\n });\n }\n}\n// Remove will check current keys first\nfunction cleanTokenStyle(tokenKey) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);\n var tokenKeyList = Array.from(tokenKeys.keys());\n var cleanableKeyList = tokenKeyList.filter(function (key) {\n var count = tokenKeys.get(key) || 0;\n return count <= 0;\n });\n if (cleanableKeyList.length < tokenKeyList.length) {\n cleanableKeyList.forEach(function (key) {\n removeStyleTags(key);\n tokenKeys.delete(key);\n });\n }\n}\n/**\n * Cache theme derivative token as global shared one\n * @param theme Theme entity\n * @param tokens List of tokens, used for cache. Please do not dynamic generate object directly\n * @param option Additional config\n * @returns Call Theme.getDerivativeToken(tokenObject) to get token\n */\nexport default function useCacheToken(theme, tokens) {\n var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _option$salt = option.salt,\n salt = _option$salt === void 0 ? '' : _option$salt,\n _option$override = option.override,\n override = _option$override === void 0 ? EMPTY_OVERRIDE : _option$override,\n formatToken = option.formatToken;\n // Basic - We do basic cache here\n var mergedToken = React.useMemo(function () {\n return Object.assign.apply(Object, [{}].concat(_toConsumableArray(tokens)));\n }, [tokens]);\n var tokenStr = React.useMemo(function () {\n return flattenToken(mergedToken);\n }, [mergedToken]);\n var overrideTokenStr = React.useMemo(function () {\n return flattenToken(override);\n }, [override]);\n var cachedToken = useGlobalCache('token', [salt, theme.id, tokenStr, overrideTokenStr], function () {\n var derivativeToken = theme.getDerivativeToken(mergedToken);\n // Merge with override\n var mergedDerivativeToken = _objectSpread(_objectSpread({}, derivativeToken), override);\n // Format if needed\n if (formatToken) {\n mergedDerivativeToken = formatToken(mergedDerivativeToken);\n }\n // Optimize for `useStyleRegister` performance\n var tokenKey = token2key(mergedDerivativeToken, salt);\n mergedDerivativeToken._tokenKey = tokenKey;\n recordCleanToken(tokenKey);\n var hashId = \"\".concat(hashPrefix, \"-\").concat(hash(tokenKey));\n mergedDerivativeToken._hashId = hashId; // Not used\n return [mergedDerivativeToken, hashId];\n }, function (cache) {\n // Remove token will remove all related style\n cleanTokenStyle(cache[0]._tokenKey);\n });\n return cachedToken;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nvar Keyframe = /*#__PURE__*/function () {\n function Keyframe(name, style) {\n _classCallCheck(this, Keyframe);\n this.name = void 0;\n this.style = void 0;\n this._keyframe = true;\n this.name = name;\n this.style = style;\n }\n _createClass(Keyframe, [{\n key: \"getName\",\n value: function getName() {\n var hashId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return hashId ? \"\".concat(hashId, \"-\").concat(this.name) : this.name;\n }\n }]);\n return Keyframe;\n}();\nexport default Keyframe;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nexport function sameDerivativeOption(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n for (var i = 0; i < left.length; i++) {\n if (left[i] !== right[i]) {\n return false;\n }\n }\n return true;\n}\nvar ThemeCache = /*#__PURE__*/function () {\n function ThemeCache() {\n _classCallCheck(this, ThemeCache);\n this.cache = void 0;\n this.keys = void 0;\n this.cacheCallTimes = void 0;\n this.cache = new Map();\n this.keys = [];\n this.cacheCallTimes = 0;\n }\n _createClass(ThemeCache, [{\n key: \"size\",\n value: function size() {\n return this.keys.length;\n }\n }, {\n key: \"internalGet\",\n value: function internalGet(derivativeOption) {\n var _cache2, _cache3;\n var updateCallTimes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var cache = {\n map: this.cache\n };\n derivativeOption.forEach(function (derivative) {\n if (!cache) {\n cache = undefined;\n } else {\n var _cache, _cache$map;\n cache = (_cache = cache) === null || _cache === void 0 ? void 0 : (_cache$map = _cache.map) === null || _cache$map === void 0 ? void 0 : _cache$map.get(derivative);\n }\n });\n if (((_cache2 = cache) === null || _cache2 === void 0 ? void 0 : _cache2.value) && updateCallTimes) {\n cache.value[1] = this.cacheCallTimes++;\n }\n return (_cache3 = cache) === null || _cache3 === void 0 ? void 0 : _cache3.value;\n }\n }, {\n key: \"get\",\n value: function get(derivativeOption) {\n var _this$internalGet;\n return (_this$internalGet = this.internalGet(derivativeOption, true)) === null || _this$internalGet === void 0 ? void 0 : _this$internalGet[0];\n }\n }, {\n key: \"has\",\n value: function has(derivativeOption) {\n return !!this.internalGet(derivativeOption);\n }\n }, {\n key: \"set\",\n value: function set(derivativeOption, value) {\n var _this = this;\n // New cache\n if (!this.has(derivativeOption)) {\n if (this.size() + 1 > ThemeCache.MAX_CACHE_SIZE + ThemeCache.MAX_CACHE_OFFSET) {\n var _this$keys$reduce = this.keys.reduce(function (result, key) {\n var _result = _slicedToArray(result, 2),\n callTimes = _result[1];\n if (_this.internalGet(key)[1] < callTimes) {\n return [key, _this.internalGet(key)[1]];\n }\n return result;\n }, [this.keys[0], this.cacheCallTimes]),\n _this$keys$reduce2 = _slicedToArray(_this$keys$reduce, 1),\n targetKey = _this$keys$reduce2[0];\n this.delete(targetKey);\n }\n this.keys.push(derivativeOption);\n }\n var cache = this.cache;\n derivativeOption.forEach(function (derivative, index) {\n if (index === derivativeOption.length - 1) {\n cache.set(derivative, {\n value: [value, _this.cacheCallTimes++]\n });\n } else {\n var cacheValue = cache.get(derivative);\n if (!cacheValue) {\n cache.set(derivative, {\n map: new Map()\n });\n } else if (!cacheValue.map) {\n cacheValue.map = new Map();\n }\n cache = cache.get(derivative).map;\n }\n });\n }\n }, {\n key: \"deleteByPath\",\n value: function deleteByPath(currentCache, derivatives) {\n var cache = currentCache.get(derivatives[0]);\n if (derivatives.length === 1) {\n var _cache$value;\n if (!cache.map) {\n currentCache.delete(derivatives[0]);\n } else {\n currentCache.set(derivatives[0], {\n map: cache.map\n });\n }\n return (_cache$value = cache.value) === null || _cache$value === void 0 ? void 0 : _cache$value[0];\n }\n var result = this.deleteByPath(cache.map, derivatives.slice(1));\n if ((!cache.map || cache.map.size === 0) && !cache.value) {\n currentCache.delete(derivatives[0]);\n }\n return result;\n }\n }, {\n key: \"delete\",\n value: function _delete(derivativeOption) {\n // If cache exists\n if (this.has(derivativeOption)) {\n this.keys = this.keys.filter(function (item) {\n return !sameDerivativeOption(item, derivativeOption);\n });\n return this.deleteByPath(this.cache, derivativeOption);\n }\n return undefined;\n }\n }]);\n return ThemeCache;\n}();\nThemeCache.MAX_CACHE_SIZE = 20;\nThemeCache.MAX_CACHE_OFFSET = 5;\nexport { ThemeCache as default };","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport { warning } from \"rc-util/es/warning\";\nvar uuid = 0;\n/**\n * Theme with algorithms to derive tokens from design tokens.\n * Use `createTheme` first which will help to manage the theme instance cache.\n */\nvar Theme = /*#__PURE__*/function () {\n function Theme(derivatives) {\n _classCallCheck(this, Theme);\n this.derivatives = void 0;\n this.id = void 0;\n this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];\n this.id = uuid;\n if (derivatives.length === 0) {\n warning(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');\n }\n uuid += 1;\n }\n _createClass(Theme, [{\n key: \"getDerivativeToken\",\n value: function getDerivativeToken(token) {\n return this.derivatives.reduce(function (result, derivative) {\n return derivative(token, result);\n }, undefined);\n }\n }]);\n return Theme;\n}();\nexport { Theme as default };","import ThemeCache from './ThemeCache';\nimport Theme from './Theme';\nvar cacheThemes = new ThemeCache();\n/**\n * Same as new Theme, but will always return same one if `derivative` not changed.\n */\nexport default function createTheme(derivatives) {\n var derivativeArr = Array.isArray(derivatives) ? derivatives : [derivatives];\n // Create new theme if not exist\n if (!cacheThemes.has(derivativeArr)) {\n cacheThemes.set(derivativeArr, new Theme(derivativeArr));\n }\n // Get theme from cache and return\n return cacheThemes.get(derivativeArr);\n}","/**\n * @ignore\n * some key-codes definition and utils from closure-library\n * @author yiminghe@gmail.com\n */\nvar KeyCode = {\n /**\n * MAC_ENTER\n */\n MAC_ENTER: 3,\n /**\n * BACKSPACE\n */\n BACKSPACE: 8,\n /**\n * TAB\n */\n TAB: 9,\n /**\n * NUMLOCK on FF/Safari Mac\n */\n NUM_CENTER: 12,\n /**\n * ENTER\n */\n ENTER: 13,\n /**\n * SHIFT\n */\n SHIFT: 16,\n /**\n * CTRL\n */\n CTRL: 17,\n /**\n * ALT\n */\n ALT: 18,\n /**\n * PAUSE\n */\n PAUSE: 19,\n /**\n * CAPS_LOCK\n */\n CAPS_LOCK: 20,\n /**\n * ESC\n */\n ESC: 27,\n /**\n * SPACE\n */\n SPACE: 32,\n /**\n * PAGE_UP\n */\n PAGE_UP: 33,\n /**\n * PAGE_DOWN\n */\n PAGE_DOWN: 34,\n /**\n * END\n */\n END: 35,\n /**\n * HOME\n */\n HOME: 36,\n /**\n * LEFT\n */\n LEFT: 37,\n /**\n * UP\n */\n UP: 38,\n /**\n * RIGHT\n */\n RIGHT: 39,\n /**\n * DOWN\n */\n DOWN: 40,\n /**\n * PRINT_SCREEN\n */\n PRINT_SCREEN: 44,\n /**\n * INSERT\n */\n INSERT: 45,\n /**\n * DELETE\n */\n DELETE: 46,\n /**\n * ZERO\n */\n ZERO: 48,\n /**\n * ONE\n */\n ONE: 49,\n /**\n * TWO\n */\n TWO: 50,\n /**\n * THREE\n */\n THREE: 51,\n /**\n * FOUR\n */\n FOUR: 52,\n /**\n * FIVE\n */\n FIVE: 53,\n /**\n * SIX\n */\n SIX: 54,\n /**\n * SEVEN\n */\n SEVEN: 55,\n /**\n * EIGHT\n */\n EIGHT: 56,\n /**\n * NINE\n */\n NINE: 57,\n /**\n * QUESTION_MARK\n */\n QUESTION_MARK: 63,\n /**\n * A\n */\n A: 65,\n /**\n * B\n */\n B: 66,\n /**\n * C\n */\n C: 67,\n /**\n * D\n */\n D: 68,\n /**\n * E\n */\n E: 69,\n /**\n * F\n */\n F: 70,\n /**\n * G\n */\n G: 71,\n /**\n * H\n */\n H: 72,\n /**\n * I\n */\n I: 73,\n /**\n * J\n */\n J: 74,\n /**\n * K\n */\n K: 75,\n /**\n * L\n */\n L: 76,\n /**\n * M\n */\n M: 77,\n /**\n * N\n */\n N: 78,\n /**\n * O\n */\n O: 79,\n /**\n * P\n */\n P: 80,\n /**\n * Q\n */\n Q: 81,\n /**\n * R\n */\n R: 82,\n /**\n * S\n */\n S: 83,\n /**\n * T\n */\n T: 84,\n /**\n * U\n */\n U: 85,\n /**\n * V\n */\n V: 86,\n /**\n * W\n */\n W: 87,\n /**\n * X\n */\n X: 88,\n /**\n * Y\n */\n Y: 89,\n /**\n * Z\n */\n Z: 90,\n /**\n * META\n */\n META: 91,\n /**\n * WIN_KEY_RIGHT\n */\n WIN_KEY_RIGHT: 92,\n /**\n * CONTEXT_MENU\n */\n CONTEXT_MENU: 93,\n /**\n * NUM_ZERO\n */\n NUM_ZERO: 96,\n /**\n * NUM_ONE\n */\n NUM_ONE: 97,\n /**\n * NUM_TWO\n */\n NUM_TWO: 98,\n /**\n * NUM_THREE\n */\n NUM_THREE: 99,\n /**\n * NUM_FOUR\n */\n NUM_FOUR: 100,\n /**\n * NUM_FIVE\n */\n NUM_FIVE: 101,\n /**\n * NUM_SIX\n */\n NUM_SIX: 102,\n /**\n * NUM_SEVEN\n */\n NUM_SEVEN: 103,\n /**\n * NUM_EIGHT\n */\n NUM_EIGHT: 104,\n /**\n * NUM_NINE\n */\n NUM_NINE: 105,\n /**\n * NUM_MULTIPLY\n */\n NUM_MULTIPLY: 106,\n /**\n * NUM_PLUS\n */\n NUM_PLUS: 107,\n /**\n * NUM_MINUS\n */\n NUM_MINUS: 109,\n /**\n * NUM_PERIOD\n */\n NUM_PERIOD: 110,\n /**\n * NUM_DIVISION\n */\n NUM_DIVISION: 111,\n /**\n * F1\n */\n F1: 112,\n /**\n * F2\n */\n F2: 113,\n /**\n * F3\n */\n F3: 114,\n /**\n * F4\n */\n F4: 115,\n /**\n * F5\n */\n F5: 116,\n /**\n * F6\n */\n F6: 117,\n /**\n * F7\n */\n F7: 118,\n /**\n * F8\n */\n F8: 119,\n /**\n * F9\n */\n F9: 120,\n /**\n * F10\n */\n F10: 121,\n /**\n * F11\n */\n F11: 122,\n /**\n * F12\n */\n F12: 123,\n /**\n * NUMLOCK\n */\n NUMLOCK: 144,\n /**\n * SEMICOLON\n */\n SEMICOLON: 186,\n /**\n * DASH\n */\n DASH: 189,\n /**\n * EQUALS\n */\n EQUALS: 187,\n /**\n * COMMA\n */\n COMMA: 188,\n /**\n * PERIOD\n */\n PERIOD: 190,\n /**\n * SLASH\n */\n SLASH: 191,\n /**\n * APOSTROPHE\n */\n APOSTROPHE: 192,\n /**\n * SINGLE_QUOTE\n */\n SINGLE_QUOTE: 222,\n /**\n * OPEN_SQUARE_BRACKET\n */\n OPEN_SQUARE_BRACKET: 219,\n /**\n * BACKSLASH\n */\n BACKSLASH: 220,\n /**\n * CLOSE_SQUARE_BRACKET\n */\n CLOSE_SQUARE_BRACKET: 221,\n /**\n * WIN_KEY\n */\n WIN_KEY: 224,\n /**\n * MAC_FF_META\n */\n MAC_FF_META: 224,\n /**\n * WIN_IME\n */\n WIN_IME: 229,\n // ======================== Function ========================\n /**\n * whether text and modified key is entered at the same time.\n */\n isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {\n var keyCode = e.keyCode;\n if (e.altKey && !e.ctrlKey || e.metaKey ||\n // Function keys don't generate text\n keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {\n return false;\n }\n // The following keys are quite harmless, even in combination with\n // CTRL, ALT or SHIFT.\n switch (keyCode) {\n case KeyCode.ALT:\n case KeyCode.CAPS_LOCK:\n case KeyCode.CONTEXT_MENU:\n case KeyCode.CTRL:\n case KeyCode.DOWN:\n case KeyCode.END:\n case KeyCode.ESC:\n case KeyCode.HOME:\n case KeyCode.INSERT:\n case KeyCode.LEFT:\n case KeyCode.MAC_FF_META:\n case KeyCode.META:\n case KeyCode.NUMLOCK:\n case KeyCode.NUM_CENTER:\n case KeyCode.PAGE_DOWN:\n case KeyCode.PAGE_UP:\n case KeyCode.PAUSE:\n case KeyCode.PRINT_SCREEN:\n case KeyCode.RIGHT:\n case KeyCode.SHIFT:\n case KeyCode.UP:\n case KeyCode.WIN_KEY:\n case KeyCode.WIN_KEY_RIGHT:\n return false;\n default:\n return true;\n }\n },\n /**\n * whether character is entered.\n */\n isCharacterKey: function isCharacterKey(keyCode) {\n if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {\n return true;\n }\n if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {\n return true;\n }\n if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {\n return true;\n }\n // Safari sends zero key code for non-latin characters.\n if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {\n return true;\n }\n switch (keyCode) {\n case KeyCode.SPACE:\n case KeyCode.QUESTION_MARK:\n case KeyCode.NUM_PLUS:\n case KeyCode.NUM_MINUS:\n case KeyCode.NUM_PERIOD:\n case KeyCode.NUM_DIVISION:\n case KeyCode.SEMICOLON:\n case KeyCode.DASH:\n case KeyCode.EQUALS:\n case KeyCode.COMMA:\n case KeyCode.PERIOD:\n case KeyCode.SLASH:\n case KeyCode.APOSTROPHE:\n case KeyCode.SINGLE_QUOTE:\n case KeyCode.OPEN_SQUARE_BRACKET:\n case KeyCode.BACKSLASH:\n case KeyCode.CLOSE_SQUARE_BRACKET:\n return true;\n default:\n return false;\n }\n }\n};\nexport default KeyCode;","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { FormProvider as RcFormProvider } from 'rc-field-form';\nimport omit from \"rc-util/es/omit\";\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nexport var FormContext = /*#__PURE__*/React.createContext({\n labelAlign: 'right',\n vertical: false,\n itemRef: function itemRef() {}\n});\nexport var NoStyleItemContext = /*#__PURE__*/React.createContext(null);\nexport var FormProvider = function FormProvider(props) {\n var providerProps = omit(props, ['prefixCls']);\n return /*#__PURE__*/React.createElement(RcFormProvider, _extends({}, providerProps));\n};\nexport var FormItemPrefixContext = /*#__PURE__*/React.createContext({\n prefixCls: ''\n});\nexport var FormItemInputContext = /*#__PURE__*/React.createContext({});\nexport var NoFormStyle = function NoFormStyle(_ref) {\n var children = _ref.children,\n status = _ref.status,\n override = _ref.override;\n var formItemInputContext = useContext(FormItemInputContext);\n var newFormItemInputContext = useMemo(function () {\n var newContext = _extends({}, formItemInputContext);\n if (override) {\n delete newContext.isFormItemInput;\n }\n if (status) {\n delete newContext.status;\n delete newContext.hasFeedback;\n delete newContext.feedbackIcon;\n }\n return newContext;\n }, [status, override, formItemInputContext]);\n return /*#__PURE__*/React.createElement(FormItemInputContext.Provider, {\n value: newFormItemInputContext\n }, children);\n};","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * \n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n","/* eslint-disable no-console */\nvar warned = {};\nexport function warning(valid, message) {\n // Support uglify\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n console.error(\"Warning: \".concat(message));\n }\n}\nexport function note(valid, message) {\n // Support uglify\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n console.warn(\"Note: \".concat(message));\n }\n}\nexport function resetWarned() {\n warned = {};\n}\nexport function call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\nexport function warningOnce(valid, message) {\n call(warning, valid, message);\n}\nexport function noteOnce(valid, message) {\n call(note, valid, message);\n}\nexport default warningOnce;\n/* eslint-enable */","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport { operationUnit } from './operationUnit';\nexport { roundedArrow } from './roundedArrow';\nexport var textEllipsis = {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n};\nexport var resetComponent = function resetComponent(token) {\n return {\n boxSizing: 'border-box',\n margin: 0,\n padding: 0,\n color: token.colorText,\n fontSize: token.fontSize,\n // font-variant: @font-variant-base;\n lineHeight: token.lineHeight,\n listStyle: 'none',\n // font-feature-settings: @font-feature-settings-base;\n fontFamily: token.fontFamily\n };\n};\nexport var resetIcon = function resetIcon() {\n return {\n display: 'inline-flex',\n alignItems: 'center',\n color: 'inherit',\n fontStyle: 'normal',\n lineHeight: 0,\n textAlign: 'center',\n textTransform: 'none',\n // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4\n verticalAlign: '-0.125em',\n textRendering: 'optimizeLegibility',\n '-webkit-font-smoothing': 'antialiased',\n '-moz-osx-font-smoothing': 'grayscale',\n '> *': {\n lineHeight: 1\n },\n svg: {\n display: 'inline-block'\n },\n '& &-icon': {\n display: 'block'\n }\n };\n};\nexport var clearFix = function clearFix() {\n return {\n // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229\n '&::before': {\n display: 'table',\n content: '\"\"'\n },\n '&::after': {\n // https://github.com/ant-design/ant-design/issues/21864\n display: 'table',\n clear: 'both',\n content: '\"\"'\n }\n };\n};\nexport var genLinkStyle = function genLinkStyle(token) {\n var _a;\n return {\n a: (_a = {\n color: token.colorLink,\n textDecoration: token.linkDecoration,\n backgroundColor: 'transparent',\n outline: 'none',\n cursor: 'pointer',\n transition: \"color \" + token.motionDurationSlow,\n '-webkit-text-decoration-skip': 'objects',\n '&:hover': {\n color: token.colorLinkHover\n },\n '&:active': {\n color: token.colorLinkActive\n }\n }, _defineProperty(_a, \"&:active,\\n &:hover\", {\n textDecoration: token.linkHoverDecoration,\n outline: 0\n }), _defineProperty(_a, '&:focus', {\n textDecoration: token.linkFocusDecoration,\n outline: 0\n }), _defineProperty(_a, '&[disabled]', {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n }), _a)\n };\n};\nexport var genCommonStyle = function genCommonStyle(token, componentPrefixCls) {\n var fontFamily = token.fontFamily,\n fontSize = token.fontSize;\n var rootPrefixSelector = \"[class^=\\\"\" + componentPrefixCls + \"\\\"], [class*=\\\" \" + componentPrefixCls + \"\\\"]\";\n return _defineProperty({}, rootPrefixSelector, _defineProperty({\n fontFamily: fontFamily,\n fontSize: fontSize,\n boxSizing: 'border-box',\n '&::before, &::after': {\n boxSizing: 'border-box'\n }\n }, rootPrefixSelector, {\n boxSizing: 'border-box',\n '&::before, &::after': {\n boxSizing: 'border-box'\n }\n }));\n};\nexport var genFocusOutline = function genFocusOutline(token) {\n return {\n outline: token.lineWidth * 4 + \"px solid \" + token.colorPrimaryBorder,\n outlineOffset: 1,\n transition: 'outline-offset 0s, outline 0s'\n };\n};\nexport var genFocusStyle = function genFocusStyle(token) {\n return {\n '&:focus-visible': _extends({}, genFocusOutline(token))\n };\n};","var raf = function raf(callback) {\n return +setTimeout(callback, 16);\n};\nvar caf = function caf(num) {\n return clearTimeout(num);\n};\nif (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {\n raf = function raf(callback) {\n return window.requestAnimationFrame(callback);\n };\n caf = function caf(handle) {\n return window.cancelAnimationFrame(handle);\n };\n}\nvar rafUUID = 0;\nvar rafIds = new Map();\nfunction cleanup(id) {\n rafIds.delete(id);\n}\nvar wrapperRaf = function wrapperRaf(callback) {\n var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n rafUUID += 1;\n var id = rafUUID;\n function callRef(leftTimes) {\n if (leftTimes === 0) {\n // Clean up\n cleanup(id);\n // Trigger\n callback();\n } else {\n // Next raf\n var realId = raf(function () {\n callRef(leftTimes - 1);\n });\n // Bind real raf id\n rafIds.set(id, realId);\n }\n }\n callRef(times);\n return id;\n};\nwrapperRaf.cancel = function (id) {\n var realId = rafIds.get(id);\n cleanup(realId);\n return caf(realId);\n};\nexport default wrapperRaf;","// Compute what scrolling needs to be done on required scrolling boxes for target to be in view\n\n// The type names here are named after the spec to make it easier to find more information around what they mean:\n// To reduce churn and reduce things that need be maintained things from the official TS DOM library is used here\n// https://drafts.csswg.org/cssom-view/\n\n// For a definition on what is \"block flow direction\" exactly, check this: https://drafts.csswg.org/css-writing-modes-4/#block-flow-direction\n\n// add support for visualViewport object currently implemented in chrome\ninterface visualViewport {\n height: number\n width: number\n}\n\ntype ScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest'\n// This new option is tracked in this PR, which is the most likely candidate at the time: https://github.com/w3c/csswg-drafts/pull/1805\ntype ScrollMode = 'always' | 'if-needed'\n// New option that skips auto-scrolling all nodes with overflow: hidden set\n// See FF implementation: https://hg.mozilla.org/integration/fx-team/rev/c48c3ec05012#l7.18\ntype SkipOverflowHiddenElements = boolean\n\ninterface Options {\n block?: ScrollLogicalPosition\n inline?: ScrollLogicalPosition\n scrollMode?: ScrollMode\n boundary?: CustomScrollBoundary\n skipOverflowHiddenElements?: SkipOverflowHiddenElements\n}\n\n// Custom behavior, not in any spec\ntype CustomScrollBoundaryCallback = (parent: Element) => boolean\ntype CustomScrollBoundary = Element | CustomScrollBoundaryCallback | null\ninterface CustomScrollAction {\n el: Element\n top: number\n left: number\n}\n\n// @TODO better shadowdom test, 11 = document fragment\nfunction isElement(el: any): el is Element {\n return typeof el === 'object' && el != null && el.nodeType === 1\n}\n\nfunction canOverflow(\n overflow: string | null,\n skipOverflowHiddenElements?: boolean\n) {\n if (skipOverflowHiddenElements && overflow === 'hidden') {\n return false\n }\n\n return overflow !== 'visible' && overflow !== 'clip'\n}\n\nfunction getFrameElement(el: Element) {\n if (!el.ownerDocument || !el.ownerDocument.defaultView) {\n return null\n }\n\n try {\n return el.ownerDocument.defaultView.frameElement\n } catch (e) {\n return null\n }\n}\n\nfunction isHiddenByFrame(el: Element): boolean {\n const frame = getFrameElement(el)\n if (!frame) {\n return false\n }\n\n return (\n frame.clientHeight < el.scrollHeight || frame.clientWidth < el.scrollWidth\n )\n}\n\nfunction isScrollable(el: Element, skipOverflowHiddenElements?: boolean) {\n if (el.clientHeight < el.scrollHeight || el.clientWidth < el.scrollWidth) {\n const style = getComputedStyle(el, null)\n return (\n canOverflow(style.overflowY, skipOverflowHiddenElements) ||\n canOverflow(style.overflowX, skipOverflowHiddenElements) ||\n isHiddenByFrame(el)\n )\n }\n\n return false\n}\n/**\n * Find out which edge to align against when logical scroll position is \"nearest\"\n * Interesting fact: \"nearest\" works similarily to \"if-needed\", if the element is fully visible it will not scroll it\n *\n * Legends:\n * ┌────────┐ ┏ ━ ━ ━ ┓\n * │ target │ frame\n * └────────┘ ┗ ━ ━ ━ ┛\n */\nfunction alignNearest(\n scrollingEdgeStart: number,\n scrollingEdgeEnd: number,\n scrollingSize: number,\n scrollingBorderStart: number,\n scrollingBorderEnd: number,\n elementEdgeStart: number,\n elementEdgeEnd: number,\n elementSize: number\n) {\n /**\n * If element edge A and element edge B are both outside scrolling box edge A and scrolling box edge B\n *\n * ┌──┐\n * ┏━│━━│━┓\n * │ │\n * ┃ │ │ ┃ do nothing\n * │ │\n * ┗━│━━│━┛\n * └──┘\n *\n * If element edge C and element edge D are both outside scrolling box edge C and scrolling box edge D\n *\n * ┏ ━ ━ ━ ━ ┓\n * ┌───────────┐\n * │┃ ┃│ do nothing\n * └───────────┘\n * ┗ ━ ━ ━ ━ ┛\n */\n if (\n (elementEdgeStart < scrollingEdgeStart &&\n elementEdgeEnd > scrollingEdgeEnd) ||\n (elementEdgeStart > scrollingEdgeStart && elementEdgeEnd < scrollingEdgeEnd)\n ) {\n return 0\n }\n\n /**\n * If element edge A is outside scrolling box edge A and element height is less than scrolling box height\n *\n * ┌──┐\n * ┏━│━━│━┓ ┏━┌━━┐━┓\n * └──┘ │ │\n * from ┃ ┃ to ┃ └──┘ ┃\n *\n * ┗━ ━━ ━┛ ┗━ ━━ ━┛\n *\n * If element edge B is outside scrolling box edge B and element height is greater than scrolling box height\n *\n * ┏━ ━━ ━┓ ┏━┌━━┐━┓\n * │ │\n * from ┃ ┌──┐ ┃ to ┃ │ │ ┃\n * │ │ │ │\n * ┗━│━━│━┛ ┗━│━━│━┛\n * │ │ └──┘\n * │ │\n * └──┘\n *\n * If element edge C is outside scrolling box edge C and element width is less than scrolling box width\n *\n * from to\n * ┏ ━ ━ ━ ━ ┓ ┏ ━ ━ ━ ━ ┓\n * ┌───┐ ┌───┐\n * │ ┃ │ ┃ ┃ │ ┃\n * └───┘ └───┘\n * ┗ ━ ━ ━ ━ ┛ ┗ ━ ━ ━ ━ ┛\n *\n * If element edge D is outside scrolling box edge D and element width is greater than scrolling box width\n *\n * from to\n * ┏ ━ ━ ━ ━ ┓ ┏ ━ ━ ━ ━ ┓\n * ┌───────────┐ ┌───────────┐\n * ┃ │ ┃ │ ┃ ┃ │\n * └───────────┘ └───────────┘\n * ┗ ━ ━ ━ ━ ┛ ┗ ━ ━ ━ ━ ┛\n */\n if (\n (elementEdgeStart <= scrollingEdgeStart && elementSize <= scrollingSize) ||\n (elementEdgeEnd >= scrollingEdgeEnd && elementSize >= scrollingSize)\n ) {\n return elementEdgeStart - scrollingEdgeStart - scrollingBorderStart\n }\n\n /**\n * If element edge B is outside scrolling box edge B and element height is less than scrolling box height\n *\n * ┏━ ━━ ━┓ ┏━ ━━ ━┓\n *\n * from ┃ ┃ to ┃ ┌──┐ ┃\n * ┌──┐ │ │\n * ┗━│━━│━┛ ┗━└━━┘━┛\n * └──┘\n *\n * If element edge A is outside scrolling box edge A and element height is greater than scrolling box height\n *\n * ┌──┐\n * │ │\n * │ │ ┌──┐\n * ┏━│━━│━┓ ┏━│━━│━┓\n * │ │ │ │\n * from ┃ └──┘ ┃ to ┃ │ │ ┃\n * │ │\n * ┗━ ━━ ━┛ ┗━└━━┘━┛\n *\n * If element edge C is outside scrolling box edge C and element width is greater than scrolling box width\n *\n * from to\n * ┏ ━ ━ ━ ━ ┓ ┏ ━ ━ ━ ━ ┓\n * ┌───────────┐ ┌───────────┐\n * │ ┃ │ ┃ │ ┃ ┃\n * └───────────┘ └───────────┘\n * ┗ ━ ━ ━ ━ ┛ ┗ ━ ━ ━ ━ ┛\n *\n * If element edge D is outside scrolling box edge D and element width is less than scrolling box width\n *\n * from to\n * ┏ ━ ━ ━ ━ ┓ ┏ ━ ━ ━ ━ ┓\n * ┌───┐ ┌───┐\n * ┃ │ ┃ │ ┃ │ ┃\n * └───┘ └───┘\n * ┗ ━ ━ ━ ━ ┛ ┗ ━ ━ ━ ━ ┛\n *\n */\n if (\n (elementEdgeEnd > scrollingEdgeEnd && elementSize < scrollingSize) ||\n (elementEdgeStart < scrollingEdgeStart && elementSize > scrollingSize)\n ) {\n return elementEdgeEnd - scrollingEdgeEnd + scrollingBorderEnd\n }\n\n return 0\n}\n\nexport default (target: Element, options: Options): CustomScrollAction[] => {\n //TODO: remove this hack when microbundle will support typescript >= 4.0\n const windowWithViewport = (window as unknown) as Window & {\n visualViewport: visualViewport\n }\n\n const {\n scrollMode,\n block,\n inline,\n boundary,\n skipOverflowHiddenElements,\n } = options\n // Allow using a callback to check the boundary\n // The default behavior is to check if the current target matches the boundary element or not\n // If undefined it'll check that target is never undefined (can happen as we recurse up the tree)\n const checkBoundary =\n typeof boundary === 'function' ? boundary : (node: any) => node !== boundary\n\n if (!isElement(target)) {\n throw new TypeError('Invalid target')\n }\n\n // Used to handle the top most element that can be scrolled\n const scrollingElement = document.scrollingElement || document.documentElement\n\n // Collect all the scrolling boxes, as defined in the spec: https://drafts.csswg.org/cssom-view/#scrolling-box\n const frames: Element[] = []\n let cursor: Element | null = target\n while (isElement(cursor) && checkBoundary(cursor)) {\n // Move cursor to parent\n cursor = cursor.parentElement\n\n // Stop when we reach the viewport\n if (cursor === scrollingElement) {\n frames.push(cursor)\n break\n }\n\n // Skip document.body if it's not the scrollingElement and documentElement isn't independently scrollable\n if (\n cursor != null &&\n cursor === document.body &&\n isScrollable(cursor) &&\n !isScrollable(document.documentElement)\n ) {\n continue\n }\n\n // Now we check if the element is scrollable, this code only runs if the loop haven't already hit the viewport or a custom boundary\n if (cursor != null && isScrollable(cursor, skipOverflowHiddenElements)) {\n frames.push(cursor)\n }\n }\n\n // Support pinch-zooming properly, making sure elements scroll into the visual viewport\n // Browsers that don't support visualViewport will report the layout viewport dimensions on document.documentElement.clientWidth/Height\n // and viewport dimensions on window.innerWidth/Height\n // https://www.quirksmode.org/mobile/viewports2.html\n // https://bokand.github.io/viewport/index.html\n const viewportWidth = windowWithViewport.visualViewport\n ? windowWithViewport.visualViewport.width\n : innerWidth\n const viewportHeight = windowWithViewport.visualViewport\n ? windowWithViewport.visualViewport.height\n : innerHeight\n\n // Newer browsers supports scroll[X|Y], page[X|Y]Offset is\n const viewportX = window.scrollX || pageXOffset\n const viewportY = window.scrollY || pageYOffset\n\n const {\n height: targetHeight,\n width: targetWidth,\n top: targetTop,\n right: targetRight,\n bottom: targetBottom,\n left: targetLeft,\n } = target.getBoundingClientRect()\n\n // These values mutate as we loop through and generate scroll coordinates\n let targetBlock: number =\n block === 'start' || block === 'nearest'\n ? targetTop\n : block === 'end'\n ? targetBottom\n : targetTop + targetHeight / 2 // block === 'center\n let targetInline: number =\n inline === 'center'\n ? targetLeft + targetWidth / 2\n : inline === 'end'\n ? targetRight\n : targetLeft // inline === 'start || inline === 'nearest\n\n // Collect new scroll positions\n const computations: CustomScrollAction[] = []\n // In chrome there's no longer a difference between caching the `frames.length` to a var or not, so we don't in this case (size > speed anyways)\n for (let index = 0; index < frames.length; index++) {\n const frame = frames[index]\n\n // @TODO add a shouldScroll hook here that allows userland code to take control\n\n const {\n height,\n width,\n top,\n right,\n bottom,\n left,\n } = frame.getBoundingClientRect()\n\n // If the element is already visible we can end it here\n // @TODO targetBlock and targetInline should be taken into account to be compliant with https://github.com/w3c/csswg-drafts/pull/1805/files#diff-3c17f0e43c20f8ecf89419d49e7ef5e0R1333\n if (\n scrollMode === 'if-needed' &&\n targetTop >= 0 &&\n targetLeft >= 0 &&\n targetBottom <= viewportHeight &&\n targetRight <= viewportWidth &&\n targetTop >= top &&\n targetBottom <= bottom &&\n targetLeft >= left &&\n targetRight <= right\n ) {\n // Break the loop and return the computations for things that are not fully visible\n return computations\n }\n\n const frameStyle = getComputedStyle(frame)\n const borderLeft = parseInt(frameStyle.borderLeftWidth as string, 10)\n const borderTop = parseInt(frameStyle.borderTopWidth as string, 10)\n const borderRight = parseInt(frameStyle.borderRightWidth as string, 10)\n const borderBottom = parseInt(frameStyle.borderBottomWidth as string, 10)\n\n let blockScroll: number = 0\n let inlineScroll: number = 0\n\n // The property existance checks for offfset[Width|Height] is because only HTMLElement objects have them, but any Element might pass by here\n // @TODO find out if the \"as HTMLElement\" overrides can be dropped\n const scrollbarWidth =\n 'offsetWidth' in frame\n ? (frame as HTMLElement).offsetWidth -\n (frame as HTMLElement).clientWidth -\n borderLeft -\n borderRight\n : 0\n const scrollbarHeight =\n 'offsetHeight' in frame\n ? (frame as HTMLElement).offsetHeight -\n (frame as HTMLElement).clientHeight -\n borderTop -\n borderBottom\n : 0\n\n if (scrollingElement === frame) {\n // Handle viewport logic (document.documentElement or document.body)\n\n if (block === 'start') {\n blockScroll = targetBlock\n } else if (block === 'end') {\n blockScroll = targetBlock - viewportHeight\n } else if (block === 'nearest') {\n blockScroll = alignNearest(\n viewportY,\n viewportY + viewportHeight,\n viewportHeight,\n borderTop,\n borderBottom,\n viewportY + targetBlock,\n viewportY + targetBlock + targetHeight,\n targetHeight\n )\n } else {\n // block === 'center' is the default\n blockScroll = targetBlock - viewportHeight / 2\n }\n\n if (inline === 'start') {\n inlineScroll = targetInline\n } else if (inline === 'center') {\n inlineScroll = targetInline - viewportWidth / 2\n } else if (inline === 'end') {\n inlineScroll = targetInline - viewportWidth\n } else {\n // inline === 'nearest' is the default\n inlineScroll = alignNearest(\n viewportX,\n viewportX + viewportWidth,\n viewportWidth,\n borderLeft,\n borderRight,\n viewportX + targetInline,\n viewportX + targetInline + targetWidth,\n targetWidth\n )\n }\n\n // Apply scroll position offsets and ensure they are within bounds\n // @TODO add more test cases to cover this 100%\n blockScroll = Math.max(0, blockScroll + viewportY)\n inlineScroll = Math.max(0, inlineScroll + viewportX)\n } else {\n // Handle each scrolling frame that might exist between the target and the viewport\n\n if (block === 'start') {\n blockScroll = targetBlock - top - borderTop\n } else if (block === 'end') {\n blockScroll = targetBlock - bottom + borderBottom + scrollbarHeight\n } else if (block === 'nearest') {\n blockScroll = alignNearest(\n top,\n bottom,\n height,\n borderTop,\n borderBottom + scrollbarHeight,\n targetBlock,\n targetBlock + targetHeight,\n targetHeight\n )\n } else {\n // block === 'center' is the default\n blockScroll = targetBlock - (top + height / 2) + scrollbarHeight / 2\n }\n\n if (inline === 'start') {\n inlineScroll = targetInline - left - borderLeft\n } else if (inline === 'center') {\n inlineScroll = targetInline - (left + width / 2) + scrollbarWidth / 2\n } else if (inline === 'end') {\n inlineScroll = targetInline - right + borderRight + scrollbarWidth\n } else {\n // inline === 'nearest' is the default\n inlineScroll = alignNearest(\n left,\n right,\n width,\n borderLeft,\n borderRight + scrollbarWidth,\n targetInline,\n targetInline + targetWidth,\n targetWidth\n )\n }\n\n const { scrollLeft, scrollTop } = frame\n // Ensure scroll coordinates are not out of bounds while applying scroll offsets\n blockScroll = Math.max(\n 0,\n Math.min(\n scrollTop + blockScroll,\n frame.scrollHeight - height + scrollbarHeight\n )\n )\n inlineScroll = Math.max(\n 0,\n Math.min(\n scrollLeft + inlineScroll,\n frame.scrollWidth - width + scrollbarWidth\n )\n )\n\n // Cache the offset so that parent frames can scroll this into view correctly\n targetBlock += scrollTop - blockScroll\n targetInline += scrollLeft - inlineScroll\n }\n\n computations.push({ el: frame, top: blockScroll, left: inlineScroll })\n }\n\n return computations\n}\n","/*\n * Copyright 2019, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nimport allLocaleData from '../locale-data/index.js';\nimport IntlMessageFormat from 'intl-messageformat';\nimport IntlRelativeFormat from 'intl-relativeformat';\nimport PropTypes from 'prop-types';\nimport React, { Children, Component, createElement, isValidElement } from 'react';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport invariant from 'invariant';\nimport memoizeIntlConstructor from 'intl-format-cache';\n\n// GENERATED FILE\nvar defaultLocaleData = { \"locale\": \"en\", \"pluralRuleFunction\": function pluralRuleFunction(n, ord) {\n var s = String(n).split(\".\"),\n v0 = !s[1],\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);if (ord) return n10 == 1 && n100 != 11 ? \"one\" : n10 == 2 && n100 != 12 ? \"two\" : n10 == 3 && n100 != 13 ? \"few\" : \"other\";return n == 1 && v0 ? \"one\" : \"other\";\n }, \"fields\": { \"year\": { \"displayName\": \"year\", \"relative\": { \"0\": \"this year\", \"1\": \"next year\", \"-1\": \"last year\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} year\", \"other\": \"in {0} years\" }, \"past\": { \"one\": \"{0} year ago\", \"other\": \"{0} years ago\" } } }, \"year-short\": { \"displayName\": \"yr.\", \"relative\": { \"0\": \"this yr.\", \"1\": \"next yr.\", \"-1\": \"last yr.\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} yr.\", \"other\": \"in {0} yr.\" }, \"past\": { \"one\": \"{0} yr. ago\", \"other\": \"{0} yr. ago\" } } }, \"month\": { \"displayName\": \"month\", \"relative\": { \"0\": \"this month\", \"1\": \"next month\", \"-1\": \"last month\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} month\", \"other\": \"in {0} months\" }, \"past\": { \"one\": \"{0} month ago\", \"other\": \"{0} months ago\" } } }, \"month-short\": { \"displayName\": \"mo.\", \"relative\": { \"0\": \"this mo.\", \"1\": \"next mo.\", \"-1\": \"last mo.\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} mo.\", \"other\": \"in {0} mo.\" }, \"past\": { \"one\": \"{0} mo. ago\", \"other\": \"{0} mo. ago\" } } }, \"day\": { \"displayName\": \"day\", \"relative\": { \"0\": \"today\", \"1\": \"tomorrow\", \"-1\": \"yesterday\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} day\", \"other\": \"in {0} days\" }, \"past\": { \"one\": \"{0} day ago\", \"other\": \"{0} days ago\" } } }, \"day-short\": { \"displayName\": \"day\", \"relative\": { \"0\": \"today\", \"1\": \"tomorrow\", \"-1\": \"yesterday\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} day\", \"other\": \"in {0} days\" }, \"past\": { \"one\": \"{0} day ago\", \"other\": \"{0} days ago\" } } }, \"hour\": { \"displayName\": \"hour\", \"relative\": { \"0\": \"this hour\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} hour\", \"other\": \"in {0} hours\" }, \"past\": { \"one\": \"{0} hour ago\", \"other\": \"{0} hours ago\" } } }, \"hour-short\": { \"displayName\": \"hr.\", \"relative\": { \"0\": \"this hour\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} hr.\", \"other\": \"in {0} hr.\" }, \"past\": { \"one\": \"{0} hr. ago\", \"other\": \"{0} hr. ago\" } } }, \"minute\": { \"displayName\": \"minute\", \"relative\": { \"0\": \"this minute\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} minute\", \"other\": \"in {0} minutes\" }, \"past\": { \"one\": \"{0} minute ago\", \"other\": \"{0} minutes ago\" } } }, \"minute-short\": { \"displayName\": \"min.\", \"relative\": { \"0\": \"this minute\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} min.\", \"other\": \"in {0} min.\" }, \"past\": { \"one\": \"{0} min. ago\", \"other\": \"{0} min. ago\" } } }, \"second\": { \"displayName\": \"second\", \"relative\": { \"0\": \"now\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} second\", \"other\": \"in {0} seconds\" }, \"past\": { \"one\": \"{0} second ago\", \"other\": \"{0} seconds ago\" } } }, \"second-short\": { \"displayName\": \"sec.\", \"relative\": { \"0\": \"now\" }, \"relativeTime\": { \"future\": { \"one\": \"in {0} sec.\", \"other\": \"in {0} sec.\" }, \"past\": { \"one\": \"{0} sec. ago\", \"other\": \"{0} sec. ago\" } } } } };\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nfunction addLocaleData() {\n var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var locales = Array.isArray(data) ? data : [data];\n\n locales.forEach(function (localeData) {\n if (localeData && localeData.locale) {\n IntlMessageFormat.__addLocaleData(localeData);\n IntlRelativeFormat.__addLocaleData(localeData);\n }\n });\n}\n\nfunction hasLocaleData(locale) {\n var localeParts = (locale || '').split('-');\n\n while (localeParts.length > 0) {\n if (hasIMFAndIRFLocaleData(localeParts.join('-'))) {\n return true;\n }\n\n localeParts.pop();\n }\n\n return false;\n}\n\nfunction hasIMFAndIRFLocaleData(locale) {\n var normalizedLocale = locale && locale.toLowerCase();\n\n return !!(IntlMessageFormat.__localeData__[normalizedLocale] && IntlRelativeFormat.__localeData__[normalizedLocale]);\n}\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\n\n\n\n\nvar asyncGenerator = function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg);\n var value = result.value;\n\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(function (arg) {\n resume(\"next\", arg);\n }, function (arg) {\n resume(\"throw\", arg);\n });\n } else {\n settle(result.done ? \"return\" : \"normal\", result.value);\n }\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({\n value: value,\n done: true\n });\n break;\n\n case \"throw\":\n front.reject(value);\n break;\n\n default:\n front.resolve({\n value: value,\n done: false\n });\n break;\n }\n\n front = front.next;\n\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () {\n return this;\n };\n }\n\n AsyncGenerator.prototype.next = function (arg) {\n return this._invoke(\"next\", arg);\n };\n\n AsyncGenerator.prototype.throw = function (arg) {\n return this._invoke(\"throw\", arg);\n };\n\n AsyncGenerator.prototype.return = function (arg) {\n return this._invoke(\"return\", arg);\n };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n}();\n\n\n\n\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\nvar objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar bool = PropTypes.bool;\nvar number = PropTypes.number;\nvar string = PropTypes.string;\nvar func = PropTypes.func;\nvar object = PropTypes.object;\nvar oneOf = PropTypes.oneOf;\nvar shape = PropTypes.shape;\nvar any = PropTypes.any;\nvar oneOfType = PropTypes.oneOfType;\n\nvar localeMatcher = oneOf(['best fit', 'lookup']);\nvar narrowShortLong = oneOf(['narrow', 'short', 'long']);\nvar numeric2digit = oneOf(['numeric', '2-digit']);\nvar funcReq = func.isRequired;\n\nvar intlConfigPropTypes = {\n locale: string,\n timeZone: string,\n formats: object,\n messages: object,\n textComponent: any,\n\n defaultLocale: string,\n defaultFormats: object,\n\n onError: func\n};\n\nvar intlFormatPropTypes = {\n formatDate: funcReq,\n formatTime: funcReq,\n formatRelative: funcReq,\n formatNumber: funcReq,\n formatPlural: funcReq,\n formatMessage: funcReq,\n formatHTMLMessage: funcReq\n};\n\nvar intlShape = shape(_extends({}, intlConfigPropTypes, intlFormatPropTypes, {\n formatters: object,\n now: funcReq\n}));\n\nvar messageDescriptorPropTypes = {\n id: string.isRequired,\n description: oneOfType([string, object]),\n defaultMessage: string\n};\n\nvar dateTimeFormatPropTypes = {\n localeMatcher: localeMatcher,\n formatMatcher: oneOf(['basic', 'best fit']),\n\n timeZone: string,\n hour12: bool,\n\n weekday: narrowShortLong,\n era: narrowShortLong,\n year: numeric2digit,\n month: oneOf(['numeric', '2-digit', 'narrow', 'short', 'long']),\n day: numeric2digit,\n hour: numeric2digit,\n minute: numeric2digit,\n second: numeric2digit,\n timeZoneName: oneOf(['short', 'long'])\n};\n\nvar numberFormatPropTypes = {\n localeMatcher: localeMatcher,\n\n style: oneOf(['decimal', 'currency', 'percent']),\n currency: string,\n currencyDisplay: oneOf(['symbol', 'code', 'name']),\n useGrouping: bool,\n\n minimumIntegerDigits: number,\n minimumFractionDigits: number,\n maximumFractionDigits: number,\n minimumSignificantDigits: number,\n maximumSignificantDigits: number\n};\n\nvar relativeFormatPropTypes = {\n style: oneOf(['best fit', 'numeric']),\n units: oneOf(['second', 'minute', 'hour', 'day', 'month', 'year', 'second-short', 'minute-short', 'hour-short', 'day-short', 'month-short', 'year-short'])\n};\n\nvar pluralFormatPropTypes = {\n style: oneOf(['cardinal', 'ordinal'])\n};\n\n/*\nHTML escaping and shallow-equals implementations are the same as React's\n(on purpose.) Therefore, it has the following Copyright and Licensing:\n\nCopyright 2013-2014, Facebook, Inc.\nAll rights reserved.\n\nThis source code is licensed under the BSD-style license found in the LICENSE\nfile in the root directory of React's source tree.\n*/\n\nvar intlConfigPropNames = Object.keys(intlConfigPropTypes);\n\nvar ESCAPED_CHARS = {\n '&': '&',\n '>': '>',\n '<': '<',\n '\"': '"',\n \"'\": '''\n};\n\nvar UNSAFE_CHARS_REGEX = /[&><\"']/g;\n\nfunction escape(str) {\n return ('' + str).replace(UNSAFE_CHARS_REGEX, function (match) {\n return ESCAPED_CHARS[match];\n });\n}\n\nfunction filterProps(props, whitelist) {\n var defaults$$1 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n return whitelist.reduce(function (filtered, name) {\n if (props.hasOwnProperty(name)) {\n filtered[name] = props[name];\n } else if (defaults$$1.hasOwnProperty(name)) {\n filtered[name] = defaults$$1[name];\n }\n\n return filtered;\n }, {});\n}\n\nfunction invariantIntlContext() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n intl = _ref.intl;\n\n invariant(intl, '[React Intl] Could not find required `intl` object. ' + ' needs to exist in the component ancestry.');\n}\n\nfunction shallowEquals(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n if ((typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || objA === null || (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);\n for (var i = 0; i < keysA.length; i++) {\n if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction shouldIntlComponentUpdate(_ref2, nextProps, nextState) {\n var props = _ref2.props,\n state = _ref2.state,\n _ref2$context = _ref2.context,\n context = _ref2$context === undefined ? {} : _ref2$context;\n var nextContext = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var _context$intl = context.intl,\n intl = _context$intl === undefined ? {} : _context$intl;\n var _nextContext$intl = nextContext.intl,\n nextIntl = _nextContext$intl === undefined ? {} : _nextContext$intl;\n\n\n return !shallowEquals(nextProps, props) || !shallowEquals(nextState, state) || !(nextIntl === intl || shallowEquals(filterProps(nextIntl, intlConfigPropNames), filterProps(intl, intlConfigPropNames)));\n}\n\nfunction createError(message, exception) {\n var eMsg = exception ? '\\n' + exception : '';\n return '[React Intl] ' + message + eMsg;\n}\n\nfunction defaultErrorHandler(error) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(error);\n }\n}\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\n// Inspired by react-redux's `connect()` HOC factory function implementation:\n// https://github.com/rackt/react-redux\n\nfunction getDisplayName(Component$$1) {\n return Component$$1.displayName || Component$$1.name || 'Component';\n}\n\nfunction injectIntl(WrappedComponent) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$intlPropName = options.intlPropName,\n intlPropName = _options$intlPropName === undefined ? 'intl' : _options$intlPropName,\n _options$withRef = options.withRef,\n withRef = _options$withRef === undefined ? false : _options$withRef;\n\n var InjectIntl = function (_Component) {\n inherits(InjectIntl, _Component);\n\n function InjectIntl(props, context) {\n classCallCheck(this, InjectIntl);\n\n var _this = possibleConstructorReturn(this, (InjectIntl.__proto__ || Object.getPrototypeOf(InjectIntl)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(InjectIntl, [{\n key: 'getWrappedInstance',\n value: function getWrappedInstance() {\n invariant(withRef, '[React Intl] To access the wrapped instance, ' + 'the `{withRef: true}` option must be set when calling: ' + '`injectIntl()`');\n\n return this._wrappedInstance;\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n return React.createElement(WrappedComponent, _extends({}, this.props, defineProperty({}, intlPropName, this.context.intl), {\n ref: withRef ? /* istanbul ignore next */function (ref) {\n return _this2._wrappedInstance = ref;\n } : null\n }));\n }\n }]);\n return InjectIntl;\n }(Component);\n\n InjectIntl.displayName = 'InjectIntl(' + getDisplayName(WrappedComponent) + ')';\n InjectIntl.contextTypes = {\n intl: intlShape\n };\n InjectIntl.WrappedComponent = WrappedComponent;\n\n\n return hoistNonReactStatics(InjectIntl, WrappedComponent);\n}\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nfunction defineMessages(messageDescriptors) {\n // This simply returns what's passed-in because it's meant to be a hook for\n // babel-plugin-react-intl.\n return messageDescriptors;\n}\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\n// This is a \"hack\" until a proper `intl-pluralformat` package is created.\n\nfunction resolveLocale(locales) {\n // IntlMessageFormat#_resolveLocale() does not depend on `this`.\n return IntlMessageFormat.prototype._resolveLocale(locales);\n}\n\nfunction findPluralFunction(locale) {\n // IntlMessageFormat#_findPluralFunction() does not depend on `this`.\n return IntlMessageFormat.prototype._findPluralRuleFunction(locale);\n}\n\nvar IntlPluralFormat = function IntlPluralFormat(locales) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, IntlPluralFormat);\n\n var useOrdinal = options.style === 'ordinal';\n var pluralFn = findPluralFunction(resolveLocale(locales));\n\n this.format = function (value) {\n return pluralFn(value, useOrdinal);\n };\n};\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar DATE_TIME_FORMAT_OPTIONS = Object.keys(dateTimeFormatPropTypes);\nvar NUMBER_FORMAT_OPTIONS = Object.keys(numberFormatPropTypes);\nvar RELATIVE_FORMAT_OPTIONS = Object.keys(relativeFormatPropTypes);\nvar PLURAL_FORMAT_OPTIONS = Object.keys(pluralFormatPropTypes);\n\nvar RELATIVE_FORMAT_THRESHOLDS = {\n second: 60, // seconds to minute\n minute: 60, // minutes to hour\n hour: 24, // hours to day\n day: 30, // days to month\n month: 12 };\n\nfunction updateRelativeFormatThresholds(newThresholds) {\n var thresholds = IntlRelativeFormat.thresholds;\n thresholds.second = newThresholds.second;\n thresholds.minute = newThresholds.minute;\n thresholds.hour = newThresholds.hour;\n thresholds.day = newThresholds.day;\n thresholds.month = newThresholds.month;\n thresholds['second-short'] = newThresholds['second-short'];\n thresholds['minute-short'] = newThresholds['minute-short'];\n thresholds['hour-short'] = newThresholds['hour-short'];\n thresholds['day-short'] = newThresholds['day-short'];\n thresholds['month-short'] = newThresholds['month-short'];\n}\n\nfunction getNamedFormat(formats, type, name, onError) {\n var format = formats && formats[type] && formats[type][name];\n if (format) {\n return format;\n }\n\n onError(createError('No ' + type + ' format named: ' + name));\n}\n\nfunction formatDate(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats,\n timeZone = config.timeZone;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var date = new Date(value);\n var defaults$$1 = _extends({}, timeZone && { timeZone: timeZone }, format && getNamedFormat(formats, 'date', format, onError));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults$$1);\n\n try {\n return state.getDateTimeFormat(locale, filteredOptions).format(date);\n } catch (e) {\n onError(createError('Error formatting date.', e));\n }\n\n return String(date);\n}\n\nfunction formatTime(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats,\n timeZone = config.timeZone;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var date = new Date(value);\n var defaults$$1 = _extends({}, timeZone && { timeZone: timeZone }, format && getNamedFormat(formats, 'time', format, onError));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults$$1);\n\n if (!filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second) {\n // Add default formatting options if hour, minute, or second isn't defined.\n filteredOptions = _extends({}, filteredOptions, { hour: 'numeric', minute: 'numeric' });\n }\n\n try {\n return state.getDateTimeFormat(locale, filteredOptions).format(date);\n } catch (e) {\n onError(createError('Error formatting time.', e));\n }\n\n return String(date);\n}\n\nfunction formatRelative(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var date = new Date(value);\n var now = new Date(options.now);\n var defaults$$1 = format && getNamedFormat(formats, 'relative', format, onError);\n var filteredOptions = filterProps(options, RELATIVE_FORMAT_OPTIONS, defaults$$1);\n\n // Capture the current threshold values, then temporarily override them with\n // specific values just for this render.\n var oldThresholds = _extends({}, IntlRelativeFormat.thresholds);\n updateRelativeFormatThresholds(RELATIVE_FORMAT_THRESHOLDS);\n\n try {\n return state.getRelativeFormat(locale, filteredOptions).format(date, {\n now: isFinite(now) ? now : state.now()\n });\n } catch (e) {\n onError(createError('Error formatting relative time.', e));\n } finally {\n updateRelativeFormatThresholds(oldThresholds);\n }\n\n return String(date);\n}\n\nfunction formatNumber(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats;\n var format = options.format;\n\n\n var onError = config.onError || defaultErrorHandler;\n var defaults$$1 = format && getNamedFormat(formats, 'number', format, onError);\n var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults$$1);\n\n try {\n return state.getNumberFormat(locale, filteredOptions).format(value);\n } catch (e) {\n onError(createError('Error formatting number.', e));\n }\n\n return String(value);\n}\n\nfunction formatPlural(config, state, value) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale;\n\n\n var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);\n var onError = config.onError || defaultErrorHandler;\n\n try {\n return state.getPluralFormat(locale, filteredOptions).format(value);\n } catch (e) {\n onError(createError('Error formatting plural.', e));\n }\n\n return 'other';\n}\n\nfunction formatMessage(config, state) {\n var messageDescriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var locale = config.locale,\n formats = config.formats,\n messages = config.messages,\n defaultLocale = config.defaultLocale,\n defaultFormats = config.defaultFormats;\n var id = messageDescriptor.id,\n defaultMessage = messageDescriptor.defaultMessage;\n\n // Produce a better error if the user calls `intl.formatMessage(element)`\n\n if (process.env.NODE_ENV !== 'production') {\n invariant(!isValidElement(config), '[React Intl] Don\\'t pass React elements to ' + 'formatMessage(), pass `.props`.');\n }\n\n // `id` is a required field of a Message Descriptor.\n invariant(id, '[React Intl] An `id` must be provided to format a message.');\n\n var message = messages && messages[id];\n var hasValues = Object.keys(values).length > 0;\n\n // Avoid expensive message formatting for simple messages without values. In\n // development messages will always be formatted in case of missing values.\n if (!hasValues && process.env.NODE_ENV === 'production') {\n return message || defaultMessage || id;\n }\n\n var formattedMessage = void 0;\n var onError = config.onError || defaultErrorHandler;\n\n if (message) {\n try {\n var formatter = state.getMessageFormat(message, locale, formats);\n\n formattedMessage = formatter.format(values);\n } catch (e) {\n onError(createError('Error formatting message: \"' + id + '\" for locale: \"' + locale + '\"' + (defaultMessage ? ', using default message as fallback.' : ''), e));\n }\n } else {\n // This prevents warnings from littering the console in development\n // when no `messages` are passed into the for the\n // default locale, and a default message is in the source.\n if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) {\n onError(createError('Missing message: \"' + id + '\" for locale: \"' + locale + '\"' + (defaultMessage ? ', using default message as fallback.' : '')));\n }\n }\n\n if (!formattedMessage && defaultMessage) {\n try {\n var _formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats);\n\n formattedMessage = _formatter.format(values);\n } catch (e) {\n onError(createError('Error formatting the default message for: \"' + id + '\"', e));\n }\n }\n\n if (!formattedMessage) {\n onError(createError('Cannot format message: \"' + id + '\", ' + ('using message ' + (message || defaultMessage ? 'source' : 'id') + ' as fallback.')));\n }\n\n return formattedMessage || message || defaultMessage || id;\n}\n\nfunction formatHTMLMessage(config, state, messageDescriptor) {\n var rawValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n // Process all the values before they are used when formatting the ICU\n // Message string. Since the formatted message might be injected via\n // `innerHTML`, all String-based values need to be HTML-escaped.\n var escapedValues = Object.keys(rawValues).reduce(function (escaped, name) {\n var value = rawValues[name];\n escaped[name] = typeof value === 'string' ? escape(value) : value;\n return escaped;\n }, {});\n\n return formatMessage(config, state, messageDescriptor, escapedValues);\n}\n\n\n\nvar format = Object.freeze({\n\tformatDate: formatDate,\n\tformatTime: formatTime,\n\tformatRelative: formatRelative,\n\tformatNumber: formatNumber,\n\tformatPlural: formatPlural,\n\tformatMessage: formatMessage,\n\tformatHTMLMessage: formatHTMLMessage\n});\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar intlConfigPropNames$1 = Object.keys(intlConfigPropTypes);\nvar intlFormatPropNames = Object.keys(intlFormatPropTypes);\n\n// These are not a static property on the `IntlProvider` class so the intl\n// config values can be inherited from an ancestor.\nvar defaultProps = {\n formats: {},\n messages: {},\n timeZone: null,\n textComponent: 'span',\n\n defaultLocale: 'en',\n defaultFormats: {},\n\n onError: defaultErrorHandler\n};\n\nvar IntlProvider = function (_Component) {\n inherits(IntlProvider, _Component);\n\n function IntlProvider(props) {\n var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n classCallCheck(this, IntlProvider);\n\n var _this = possibleConstructorReturn(this, (IntlProvider.__proto__ || Object.getPrototypeOf(IntlProvider)).call(this, props, context));\n\n invariant(typeof Intl !== 'undefined', '[React Intl] The `Intl` APIs must be available in the runtime, ' + 'and do not appear to be built-in. An `Intl` polyfill should be loaded.\\n' + 'See: http://formatjs.io/guides/runtime-environments/');\n\n var intlContext = context.intl;\n\n // Used to stabilize time when performing an initial rendering so that\n // all relative times use the same reference \"now\" time.\n\n var initialNow = void 0;\n if (isFinite(props.initialNow)) {\n initialNow = Number(props.initialNow);\n } else {\n // When an `initialNow` isn't provided via `props`, look to see an\n // exists in the ancestry and call its `now()`\n // function to propagate its value for \"now\".\n initialNow = intlContext ? intlContext.now() : Date.now();\n }\n\n // Creating `Intl*` formatters is expensive. If there's a parent\n // ``, then its formatters will be used. Otherwise, this\n // memoize the `Intl*` constructors and cache them for the lifecycle of\n // this IntlProvider instance.\n\n var _ref = intlContext || {},\n _ref$formatters = _ref.formatters,\n formatters = _ref$formatters === undefined ? {\n getDateTimeFormat: memoizeIntlConstructor(Intl.DateTimeFormat),\n getNumberFormat: memoizeIntlConstructor(Intl.NumberFormat),\n getMessageFormat: memoizeIntlConstructor(IntlMessageFormat),\n getRelativeFormat: memoizeIntlConstructor(IntlRelativeFormat),\n getPluralFormat: memoizeIntlConstructor(IntlPluralFormat)\n } : _ref$formatters;\n\n _this.state = _extends({}, formatters, {\n\n // Wrapper to provide stable \"now\" time for initial render.\n now: function now() {\n return _this._didDisplay ? Date.now() : initialNow;\n }\n });\n return _this;\n }\n\n createClass(IntlProvider, [{\n key: 'getConfig',\n value: function getConfig() {\n var intlContext = this.context.intl;\n\n // Build a whitelisted config object from `props`, defaults, and\n // `context.intl`, if an exists in the ancestry.\n\n var config = filterProps(this.props, intlConfigPropNames$1, intlContext);\n\n // Apply default props. This must be applied last after the props have\n // been resolved and inherited from any in the ancestry.\n // This matches how React resolves `defaultProps`.\n for (var propName in defaultProps) {\n if (config[propName] === undefined) {\n config[propName] = defaultProps[propName];\n }\n }\n\n if (!hasLocaleData(config.locale)) {\n var _config = config,\n locale = _config.locale,\n defaultLocale = _config.defaultLocale,\n defaultFormats = _config.defaultFormats,\n onError = _config.onError;\n\n\n onError(createError('Missing locale data for locale: \"' + locale + '\". ' + ('Using default locale: \"' + defaultLocale + '\" as fallback.')));\n\n // Since there's no registered locale data for `locale`, this will\n // fallback to the `defaultLocale` to make sure things can render.\n // The `messages` are overridden to the `defaultProps` empty object\n // to maintain referential equality across re-renders. It's assumed\n // each contains a `defaultMessage` prop.\n config = _extends({}, config, {\n locale: defaultLocale,\n formats: defaultFormats,\n messages: defaultProps.messages\n });\n }\n\n return config;\n }\n }, {\n key: 'getBoundFormatFns',\n value: function getBoundFormatFns(config, state) {\n return intlFormatPropNames.reduce(function (boundFormatFns, name) {\n boundFormatFns[name] = format[name].bind(null, config, state);\n return boundFormatFns;\n }, {});\n }\n }, {\n key: 'getChildContext',\n value: function getChildContext() {\n var config = this.getConfig();\n\n // Bind intl factories and current config to the format functions.\n var boundFormatFns = this.getBoundFormatFns(config, this.state);\n\n var _state = this.state,\n now = _state.now,\n formatters = objectWithoutProperties(_state, ['now']);\n\n\n return {\n intl: _extends({}, config, boundFormatFns, {\n formatters: formatters,\n now: now\n })\n };\n }\n }, {\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this._didDisplay = true;\n }\n }, {\n key: 'render',\n value: function render() {\n return Children.only(this.props.children);\n }\n }]);\n return IntlProvider;\n}(Component);\n\nIntlProvider.displayName = 'IntlProvider';\nIntlProvider.contextTypes = {\n intl: intlShape\n};\nIntlProvider.childContextTypes = {\n intl: intlShape.isRequired\n};\nprocess.env.NODE_ENV !== \"production\" ? IntlProvider.propTypes = _extends({}, intlConfigPropTypes, {\n children: PropTypes.element.isRequired,\n initialNow: PropTypes.any\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedDate = function (_Component) {\n inherits(FormattedDate, _Component);\n\n function FormattedDate(props, context) {\n classCallCheck(this, FormattedDate);\n\n var _this = possibleConstructorReturn(this, (FormattedDate.__proto__ || Object.getPrototypeOf(FormattedDate)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedDate, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatDate = _context$intl.formatDate,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedDate = formatDate(value, this.props);\n\n if (typeof children === 'function') {\n return children(formattedDate);\n }\n\n return React.createElement(\n Text,\n null,\n formattedDate\n );\n }\n }]);\n return FormattedDate;\n}(Component);\n\nFormattedDate.displayName = 'FormattedDate';\nFormattedDate.contextTypes = {\n intl: intlShape\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedDate.propTypes = _extends({}, dateTimeFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedTime = function (_Component) {\n inherits(FormattedTime, _Component);\n\n function FormattedTime(props, context) {\n classCallCheck(this, FormattedTime);\n\n var _this = possibleConstructorReturn(this, (FormattedTime.__proto__ || Object.getPrototypeOf(FormattedTime)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedTime, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatTime = _context$intl.formatTime,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedTime = formatTime(value, this.props);\n\n if (typeof children === 'function') {\n return children(formattedTime);\n }\n\n return React.createElement(\n Text,\n null,\n formattedTime\n );\n }\n }]);\n return FormattedTime;\n}(Component);\n\nFormattedTime.displayName = 'FormattedTime';\nFormattedTime.contextTypes = {\n intl: intlShape\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedTime.propTypes = _extends({}, dateTimeFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar SECOND = 1000;\nvar MINUTE = 1000 * 60;\nvar HOUR = 1000 * 60 * 60;\nvar DAY = 1000 * 60 * 60 * 24;\n\n// The maximum timer delay value is a 32-bit signed integer.\n// See: https://mdn.io/setTimeout\nvar MAX_TIMER_DELAY = 2147483647;\n\nfunction selectUnits(delta) {\n var absDelta = Math.abs(delta);\n\n if (absDelta < MINUTE) {\n return 'second';\n }\n\n if (absDelta < HOUR) {\n return 'minute';\n }\n\n if (absDelta < DAY) {\n return 'hour';\n }\n\n // The maximum scheduled delay will be measured in days since the maximum\n // timer delay is less than the number of milliseconds in 25 days.\n return 'day';\n}\n\nfunction getUnitDelay(units) {\n switch (units) {\n case 'second':\n return SECOND;\n case 'minute':\n return MINUTE;\n case 'hour':\n return HOUR;\n case 'day':\n return DAY;\n default:\n return MAX_TIMER_DELAY;\n }\n}\n\nfunction isSameDate(a, b) {\n if (a === b) {\n return true;\n }\n\n var aTime = new Date(a).getTime();\n var bTime = new Date(b).getTime();\n\n return isFinite(aTime) && isFinite(bTime) && aTime === bTime;\n}\n\nvar FormattedRelative = function (_Component) {\n inherits(FormattedRelative, _Component);\n\n function FormattedRelative(props, context) {\n classCallCheck(this, FormattedRelative);\n\n var _this = possibleConstructorReturn(this, (FormattedRelative.__proto__ || Object.getPrototypeOf(FormattedRelative)).call(this, props, context));\n\n invariantIntlContext(context);\n\n var now = isFinite(props.initialNow) ? Number(props.initialNow) : context.intl.now();\n\n // `now` is stored as state so that `render()` remains a function of\n // props + state, instead of accessing `Date.now()` inside `render()`.\n _this.state = { now: now };\n return _this;\n }\n\n createClass(FormattedRelative, [{\n key: 'scheduleNextUpdate',\n value: function scheduleNextUpdate(props, state) {\n var _this2 = this;\n\n // Cancel and pending update because we're scheduling a new update.\n clearTimeout(this._timer);\n\n var value = props.value,\n units = props.units,\n updateInterval = props.updateInterval;\n\n var time = new Date(value).getTime();\n\n // If the `updateInterval` is falsy, including `0` or we don't have a\n // valid date, then auto updates have been turned off, so we bail and\n // skip scheduling an update.\n if (!updateInterval || !isFinite(time)) {\n return;\n }\n\n var delta = time - state.now;\n var unitDelay = getUnitDelay(units || selectUnits(delta));\n var unitRemainder = Math.abs(delta % unitDelay);\n\n // We want the largest possible timer delay which will still display\n // accurate information while reducing unnecessary re-renders. The delay\n // should be until the next \"interesting\" moment, like a tick from\n // \"1 minute ago\" to \"2 minutes ago\" when the delta is 120,000ms.\n var delay = delta < 0 ? Math.max(updateInterval, unitDelay - unitRemainder) : Math.max(updateInterval, unitRemainder);\n\n this._timer = setTimeout(function () {\n _this2.setState({ now: _this2.context.intl.now() });\n }, delay);\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.scheduleNextUpdate(this.props, this.state);\n }\n }, {\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(_ref) {\n var nextValue = _ref.value;\n\n // When the `props.value` date changes, `state.now` needs to be updated,\n // and the next update can be rescheduled.\n if (!isSameDate(nextValue, this.props.value)) {\n this.setState({ now: this.context.intl.now() });\n }\n }\n }, {\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'componentWillUpdate',\n value: function componentWillUpdate(nextProps, nextState) {\n this.scheduleNextUpdate(nextProps, nextState);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n clearTimeout(this._timer);\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatRelative = _context$intl.formatRelative,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedRelative = formatRelative(value, _extends({}, this.props, this.state));\n\n if (typeof children === 'function') {\n return children(formattedRelative);\n }\n\n return React.createElement(\n Text,\n null,\n formattedRelative\n );\n }\n }]);\n return FormattedRelative;\n}(Component);\n\nFormattedRelative.displayName = 'FormattedRelative';\nFormattedRelative.contextTypes = {\n intl: intlShape\n};\nFormattedRelative.defaultProps = {\n updateInterval: 1000 * 10\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedRelative.propTypes = _extends({}, relativeFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n updateInterval: PropTypes.number,\n initialNow: PropTypes.any,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedNumber = function (_Component) {\n inherits(FormattedNumber, _Component);\n\n function FormattedNumber(props, context) {\n classCallCheck(this, FormattedNumber);\n\n var _this = possibleConstructorReturn(this, (FormattedNumber.__proto__ || Object.getPrototypeOf(FormattedNumber)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedNumber, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatNumber = _context$intl.formatNumber,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n children = _props.children;\n\n\n var formattedNumber = formatNumber(value, this.props);\n\n if (typeof children === 'function') {\n return children(formattedNumber);\n }\n\n return React.createElement(\n Text,\n null,\n formattedNumber\n );\n }\n }]);\n return FormattedNumber;\n}(Component);\n\nFormattedNumber.displayName = 'FormattedNumber';\nFormattedNumber.contextTypes = {\n intl: intlShape\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedNumber.propTypes = _extends({}, numberFormatPropTypes, {\n value: PropTypes.any.isRequired,\n format: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedPlural = function (_Component) {\n inherits(FormattedPlural, _Component);\n\n function FormattedPlural(props, context) {\n classCallCheck(this, FormattedPlural);\n\n var _this = possibleConstructorReturn(this, (FormattedPlural.__proto__ || Object.getPrototypeOf(FormattedPlural)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedPlural, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate() {\n for (var _len = arguments.length, next = Array(_len), _key = 0; _key < _len; _key++) {\n next[_key] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatPlural = _context$intl.formatPlural,\n Text = _context$intl.textComponent;\n var _props = this.props,\n value = _props.value,\n other = _props.other,\n children = _props.children;\n\n\n var pluralCategory = formatPlural(value, this.props);\n var formattedPlural = this.props[pluralCategory] || other;\n\n if (typeof children === 'function') {\n return children(formattedPlural);\n }\n\n return React.createElement(\n Text,\n null,\n formattedPlural\n );\n }\n }]);\n return FormattedPlural;\n}(Component);\n\nFormattedPlural.displayName = 'FormattedPlural';\nFormattedPlural.contextTypes = {\n intl: intlShape\n};\nFormattedPlural.defaultProps = {\n style: 'cardinal'\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedPlural.propTypes = _extends({}, pluralFormatPropTypes, {\n value: PropTypes.any.isRequired,\n\n other: PropTypes.node.isRequired,\n zero: PropTypes.node,\n one: PropTypes.node,\n two: PropTypes.node,\n few: PropTypes.node,\n many: PropTypes.node,\n\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar defaultFormatMessage = function defaultFormatMessage(descriptor, values) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('[React Intl] Could not find required `intl` object. needs to exist in the component ancestry. Using default message as fallback.');\n }\n return formatMessage({}, { getMessageFormat: memoizeIntlConstructor(IntlMessageFormat) }, descriptor, values);\n};\n\nvar FormattedMessage = function (_Component) {\n inherits(FormattedMessage, _Component);\n\n function FormattedMessage(props, context) {\n classCallCheck(this, FormattedMessage);\n\n var _this = possibleConstructorReturn(this, (FormattedMessage.__proto__ || Object.getPrototypeOf(FormattedMessage)).call(this, props, context));\n\n if (!props.defaultMessage) {\n invariantIntlContext(context);\n }\n return _this;\n }\n\n createClass(FormattedMessage, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps) {\n var values = this.props.values;\n var nextValues = nextProps.values;\n\n\n if (!shallowEquals(nextValues, values)) {\n return true;\n }\n\n // Since `values` has already been checked, we know they're not\n // different, so the current `values` are carried over so the shallow\n // equals comparison on the other props isn't affected by the `values`.\n var nextPropsToCheck = _extends({}, nextProps, {\n values: values\n });\n\n for (var _len = arguments.length, next = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n next[_key - 1] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this, nextPropsToCheck].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _ref = this.context.intl || {},\n _ref$formatMessage = _ref.formatMessage,\n formatMessage$$1 = _ref$formatMessage === undefined ? defaultFormatMessage : _ref$formatMessage,\n _ref$textComponent = _ref.textComponent,\n Text = _ref$textComponent === undefined ? 'span' : _ref$textComponent;\n\n var _props = this.props,\n id = _props.id,\n description = _props.description,\n defaultMessage = _props.defaultMessage,\n values = _props.values,\n _props$tagName = _props.tagName,\n Component$$1 = _props$tagName === undefined ? Text : _props$tagName,\n children = _props.children;\n\n\n var tokenDelimiter = void 0;\n var tokenizedValues = void 0;\n var elements = void 0;\n\n var hasValues = values && Object.keys(values).length > 0;\n if (hasValues) {\n // Creates a token with a random UID that should not be guessable or\n // conflict with other parts of the `message` string.\n var uid = Math.floor(Math.random() * 0x10000000000).toString(16);\n\n var generateToken = function () {\n var counter = 0;\n return function () {\n return 'ELEMENT-' + uid + '-' + (counter += 1);\n };\n }();\n\n // Splitting with a delimiter to support IE8. When using a regex\n // with a capture group IE8 does not include the capture group in\n // the resulting array.\n tokenDelimiter = '@__' + uid + '__@';\n tokenizedValues = {};\n elements = {};\n\n // Iterates over the `props` to keep track of any React Element\n // values so they can be represented by the `token` as a placeholder\n // when the `message` is formatted. This allows the formatted\n // message to then be broken-up into parts with references to the\n // React Elements inserted back in.\n Object.keys(values).forEach(function (name) {\n var value = values[name];\n\n if (isValidElement(value)) {\n var token = generateToken();\n tokenizedValues[name] = tokenDelimiter + token + tokenDelimiter;\n elements[token] = value;\n } else {\n tokenizedValues[name] = value;\n }\n });\n }\n\n var descriptor = { id: id, description: description, defaultMessage: defaultMessage };\n var formattedMessage = formatMessage$$1(descriptor, tokenizedValues || values);\n\n var nodes = void 0;\n\n var hasElements = elements && Object.keys(elements).length > 0;\n if (hasElements) {\n // Split the message into parts so the React Element values captured\n // above can be inserted back into the rendered message. This\n // approach allows messages to render with React Elements while\n // keeping React's virtual diffing working properly.\n nodes = formattedMessage.split(tokenDelimiter).filter(function (part) {\n return !!part;\n }).map(function (part) {\n return elements[part] || part;\n });\n } else {\n nodes = [formattedMessage];\n }\n\n if (typeof children === 'function') {\n return children.apply(undefined, toConsumableArray(nodes));\n }\n\n // Needs to use `createElement()` instead of JSX, otherwise React will\n // warn about a missing `key` prop with rich-text message formatting.\n return createElement.apply(undefined, [Component$$1, null].concat(toConsumableArray(nodes)));\n }\n }]);\n return FormattedMessage;\n}(Component);\n\nFormattedMessage.displayName = 'FormattedMessage';\nFormattedMessage.contextTypes = {\n intl: intlShape\n};\nFormattedMessage.defaultProps = {\n values: {}\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedMessage.propTypes = _extends({}, messageDescriptorPropTypes, {\n values: PropTypes.object,\n tagName: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\nvar FormattedHTMLMessage = function (_Component) {\n inherits(FormattedHTMLMessage, _Component);\n\n function FormattedHTMLMessage(props, context) {\n classCallCheck(this, FormattedHTMLMessage);\n\n var _this = possibleConstructorReturn(this, (FormattedHTMLMessage.__proto__ || Object.getPrototypeOf(FormattedHTMLMessage)).call(this, props, context));\n\n invariantIntlContext(context);\n return _this;\n }\n\n createClass(FormattedHTMLMessage, [{\n key: 'shouldComponentUpdate',\n value: function shouldComponentUpdate(nextProps) {\n var values = this.props.values;\n var nextValues = nextProps.values;\n\n\n if (!shallowEquals(nextValues, values)) {\n return true;\n }\n\n // Since `values` has already been checked, we know they're not\n // different, so the current `values` are carried over so the shallow\n // equals comparison on the other props isn't affected by the `values`.\n var nextPropsToCheck = _extends({}, nextProps, {\n values: values\n });\n\n for (var _len = arguments.length, next = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n next[_key - 1] = arguments[_key];\n }\n\n return shouldIntlComponentUpdate.apply(undefined, [this, nextPropsToCheck].concat(next));\n }\n }, {\n key: 'render',\n value: function render() {\n var _context$intl = this.context.intl,\n formatHTMLMessage = _context$intl.formatHTMLMessage,\n Text = _context$intl.textComponent;\n var _props = this.props,\n id = _props.id,\n description = _props.description,\n defaultMessage = _props.defaultMessage,\n rawValues = _props.values,\n _props$tagName = _props.tagName,\n Component$$1 = _props$tagName === undefined ? Text : _props$tagName,\n children = _props.children;\n\n\n var descriptor = { id: id, description: description, defaultMessage: defaultMessage };\n var formattedHTMLMessage = formatHTMLMessage(descriptor, rawValues);\n\n if (typeof children === 'function') {\n return children(formattedHTMLMessage);\n }\n\n // Since the message presumably has HTML in it, we need to set\n // `innerHTML` in order for it to be rendered and not escaped by React.\n // To be safe, all string prop values were escaped when formatting the\n // message. It is assumed that the message is not UGC, and came from the\n // developer making it more like a template.\n //\n // Note: There's a perf impact of using this component since there's no\n // way for React to do its virtual DOM diffing.\n var html = { __html: formattedHTMLMessage };\n return React.createElement(Component$$1, { dangerouslySetInnerHTML: html });\n }\n }]);\n return FormattedHTMLMessage;\n}(Component);\n\nFormattedHTMLMessage.displayName = 'FormattedHTMLMessage';\nFormattedHTMLMessage.contextTypes = {\n intl: intlShape\n};\nFormattedHTMLMessage.defaultProps = {\n values: {}\n};\nprocess.env.NODE_ENV !== \"production\" ? FormattedHTMLMessage.propTypes = _extends({}, messageDescriptorPropTypes, {\n values: PropTypes.object,\n tagName: PropTypes.string,\n children: PropTypes.func\n}) : void 0;\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\naddLocaleData(defaultLocaleData);\n\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\n\naddLocaleData(allLocaleData);\n\nexport { addLocaleData, intlShape, injectIntl, defineMessages, IntlProvider, FormattedDate, FormattedTime, FormattedRelative, FormattedNumber, FormattedPlural, FormattedMessage, FormattedHTMLMessage };\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport warning from '../_util/warning';\nimport { changeConfirmLocale } from '../modal/locale';\nimport LocaleContext from './context';\nexport var ANT_MARK = 'internalMark';\nvar LocaleProvider = function LocaleProvider(props) {\n var _props$locale = props.locale,\n locale = _props$locale === void 0 ? {} : _props$locale,\n children = props.children,\n _ANT_MARK__ = props._ANT_MARK__;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? warning(_ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale') : void 0;\n }\n React.useEffect(function () {\n changeConfirmLocale(locale && locale.Modal);\n return function () {\n changeConfirmLocale();\n };\n }, [locale]);\n var getMemoizedContextValue = React.useMemo(function () {\n return _extends(_extends({}, locale), {\n exist: true\n });\n }, [locale]);\n return /*#__PURE__*/React.createElement(LocaleContext.Provider, {\n value: getMemoizedContextValue\n }, children);\n};\nexport default LocaleProvider;","/* eslint-disable import/prefer-default-export, prefer-destructuring */\nimport { generate } from '@ant-design/colors';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport warning from '../_util/warning';\nvar dynamicStyleMark = \"-ant-\" + Date.now() + \"-\" + Math.random();\nexport function getStyle(globalPrefixCls, theme) {\n var variables = {};\n var formatColor = function formatColor(color, updater) {\n var clone = color.clone();\n clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;\n return clone.toRgbString();\n };\n var fillColor = function fillColor(colorVal, type) {\n var baseColor = new TinyColor(colorVal);\n var colorPalettes = generate(baseColor.toRgbString());\n variables[type + \"-color\"] = formatColor(baseColor);\n variables[type + \"-color-disabled\"] = colorPalettes[1];\n variables[type + \"-color-hover\"] = colorPalettes[4];\n variables[type + \"-color-active\"] = colorPalettes[6];\n variables[type + \"-color-outline\"] = baseColor.clone().setAlpha(0.2).toRgbString();\n variables[type + \"-color-deprecated-bg\"] = colorPalettes[0];\n variables[type + \"-color-deprecated-border\"] = colorPalettes[2];\n };\n // ================ Primary Color ================\n if (theme.primaryColor) {\n fillColor(theme.primaryColor, 'primary');\n var primaryColor = new TinyColor(theme.primaryColor);\n var primaryColors = generate(primaryColor.toRgbString());\n // Legacy - We should use semantic naming standard\n primaryColors.forEach(function (color, index) {\n variables[\"primary-\" + (index + 1)] = color;\n });\n // Deprecated\n variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, function (c) {\n return c.lighten(35);\n });\n variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, function (c) {\n return c.lighten(20);\n });\n variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, function (c) {\n return c.tint(20);\n });\n variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, function (c) {\n return c.tint(50);\n });\n variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, function (c) {\n return c.setAlpha(c.getAlpha() * 0.12);\n });\n var primaryActiveColor = new TinyColor(primaryColors[0]);\n variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, function (c) {\n return c.setAlpha(c.getAlpha() * 0.3);\n });\n variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, function (c) {\n return c.darken(2);\n });\n }\n // ================ Success Color ================\n if (theme.successColor) {\n fillColor(theme.successColor, 'success');\n }\n // ================ Warning Color ================\n if (theme.warningColor) {\n fillColor(theme.warningColor, 'warning');\n }\n // ================= Error Color =================\n if (theme.errorColor) {\n fillColor(theme.errorColor, 'error');\n }\n // ================= Info Color ==================\n if (theme.infoColor) {\n fillColor(theme.infoColor, 'info');\n }\n // Convert to css variables\n var cssList = Object.keys(variables).map(function (key) {\n return \"--\" + globalPrefixCls + \"-\" + key + \": \" + variables[key] + \";\";\n });\n return (\"\\n :root {\\n \" + cssList.join('\\n') + \"\\n }\\n \").trim();\n}\nexport function registerTheme(globalPrefixCls, theme) {\n var style = getStyle(globalPrefixCls, theme);\n if (canUseDom()) {\n updateCSS(style, dynamicStyleMark + \"-dynamic-theme\");\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { createTheme } from '@ant-design/cssinjs';\nimport IconContext from \"@ant-design/icons/es/components/Context\";\nimport { FormProvider as RcFormProvider } from 'rc-field-form';\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport * as React from 'react';\nimport LocaleProvider, { ANT_MARK } from '../locale-provider';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport defaultLocale from '../locale/en_US';\nimport { DesignTokenContext } from '../theme';\nimport defaultSeedToken from '../theme/themes/seed';\nimport { ConfigConsumer, ConfigContext, defaultIconPrefixCls } from './context';\nimport { registerTheme } from './cssVariables';\nimport { DisabledContextProvider } from './DisabledContext';\nimport useTheme from './hooks/useTheme';\nimport SizeContext, { SizeContextProvider } from './SizeContext';\nimport useStyle from './style';\nexport { ConfigContext, ConfigConsumer };\nexport { defaultIconPrefixCls };\nexport var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader'];\n// These props is used by `useContext` directly in sub component\nvar PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'pageHeader', 'input', 'pagination', 'form'];\nexport var defaultPrefixCls = 'ant';\nvar globalPrefixCls;\nvar globalIconPrefixCls;\nfunction getGlobalPrefixCls() {\n return globalPrefixCls || defaultPrefixCls;\n}\nfunction getGlobalIconPrefixCls() {\n return globalIconPrefixCls || defaultIconPrefixCls;\n}\nvar setGlobalConfig = function setGlobalConfig(_ref) {\n var prefixCls = _ref.prefixCls,\n iconPrefixCls = _ref.iconPrefixCls,\n theme = _ref.theme;\n if (prefixCls !== undefined) {\n globalPrefixCls = prefixCls;\n }\n if (iconPrefixCls !== undefined) {\n globalIconPrefixCls = iconPrefixCls;\n }\n if (theme) {\n registerTheme(getGlobalPrefixCls(), theme);\n }\n};\nexport var globalConfig = function globalConfig() {\n return {\n getPrefixCls: function getPrefixCls(suffixCls, customizePrefixCls) {\n if (customizePrefixCls) return customizePrefixCls;\n return suffixCls ? getGlobalPrefixCls() + \"-\" + suffixCls : getGlobalPrefixCls();\n },\n getIconPrefixCls: getGlobalIconPrefixCls,\n getRootPrefixCls: function getRootPrefixCls() {\n // If Global prefixCls provided, use this\n if (globalPrefixCls) {\n return globalPrefixCls;\n }\n // Fallback to default prefixCls\n return getGlobalPrefixCls();\n }\n };\n};\nvar ProviderChildren = function ProviderChildren(props) {\n var _a, _b;\n var children = props.children,\n customCsp = props.csp,\n autoInsertSpaceInButton = props.autoInsertSpaceInButton,\n form = props.form,\n locale = props.locale,\n componentSize = props.componentSize,\n direction = props.direction,\n space = props.space,\n virtual = props.virtual,\n dropdownMatchSelectWidth = props.dropdownMatchSelectWidth,\n legacyLocale = props.legacyLocale,\n parentContext = props.parentContext,\n customIconPrefixCls = props.iconPrefixCls,\n theme = props.theme,\n componentDisabled = props.componentDisabled;\n var getPrefixCls = React.useCallback(function (suffixCls, customizePrefixCls) {\n var prefixCls = props.prefixCls;\n if (customizePrefixCls) return customizePrefixCls;\n var mergedPrefixCls = prefixCls || parentContext.getPrefixCls('');\n return suffixCls ? mergedPrefixCls + \"-\" + suffixCls : mergedPrefixCls;\n }, [parentContext.getPrefixCls, props.prefixCls]);\n var iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || defaultIconPrefixCls;\n var shouldWrapSSR = iconPrefixCls !== parentContext.iconPrefixCls;\n var csp = customCsp || parentContext.csp;\n var wrapSSR = useStyle(iconPrefixCls);\n var mergedTheme = useTheme(theme, parentContext.theme);\n var config = _extends(_extends({}, parentContext), {\n csp: csp,\n autoInsertSpaceInButton: autoInsertSpaceInButton,\n locale: locale || legacyLocale,\n direction: direction,\n space: space,\n virtual: virtual,\n dropdownMatchSelectWidth: dropdownMatchSelectWidth,\n getPrefixCls: getPrefixCls,\n iconPrefixCls: iconPrefixCls,\n theme: mergedTheme\n });\n // Pass the props used by `useContext` directly with child component.\n // These props should merged into `config`.\n PASSED_PROPS.forEach(function (propName) {\n var propValue = props[propName];\n if (propValue) {\n config[propName] = propValue;\n }\n });\n // https://github.com/ant-design/ant-design/issues/27617\n var memoedConfig = useMemo(function () {\n return config;\n }, config, function (prevConfig, currentConfig) {\n var prevKeys = Object.keys(prevConfig);\n var currentKeys = Object.keys(currentConfig);\n return prevKeys.length !== currentKeys.length || prevKeys.some(function (key) {\n return prevConfig[key] !== currentConfig[key];\n });\n });\n var memoIconContextValue = React.useMemo(function () {\n return {\n prefixCls: iconPrefixCls,\n csp: csp\n };\n }, [iconPrefixCls, csp]);\n var childNode = shouldWrapSSR ? wrapSSR(children) : children;\n // Additional Form provider\n var validateMessages = {};\n if (locale) {\n validateMessages = ((_a = locale.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || ((_b = defaultLocale.Form) === null || _b === void 0 ? void 0 : _b.defaultValidateMessages) || {};\n }\n if (form && form.validateMessages) {\n validateMessages = _extends(_extends({}, validateMessages), form.validateMessages);\n }\n if (Object.keys(validateMessages).length > 0) {\n childNode = /*#__PURE__*/React.createElement(RcFormProvider, {\n validateMessages: validateMessages\n }, children);\n }\n if (locale) {\n childNode = /*#__PURE__*/React.createElement(LocaleProvider, {\n locale: locale,\n _ANT_MARK__: ANT_MARK\n }, childNode);\n }\n if (iconPrefixCls || csp) {\n childNode = /*#__PURE__*/React.createElement(IconContext.Provider, {\n value: memoIconContextValue\n }, childNode);\n }\n if (componentSize) {\n childNode = /*#__PURE__*/React.createElement(SizeContextProvider, {\n size: componentSize\n }, childNode);\n }\n // ================================ Dynamic theme ================================\n var memoTheme = React.useMemo(function () {\n var _a = mergedTheme || {},\n algorithm = _a.algorithm,\n token = _a.token,\n rest = __rest(_a, [\"algorithm\", \"token\"]);\n var themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : undefined;\n return _extends(_extends({}, rest), {\n theme: themeObj,\n token: _extends(_extends({}, defaultSeedToken), token)\n });\n }, [mergedTheme]);\n if (theme) {\n childNode = /*#__PURE__*/React.createElement(DesignTokenContext.Provider, {\n value: memoTheme\n }, childNode);\n }\n // =================================== Render ===================================\n if (componentDisabled !== undefined) {\n childNode = /*#__PURE__*/React.createElement(DisabledContextProvider, {\n disabled: componentDisabled\n }, childNode);\n }\n return /*#__PURE__*/React.createElement(ConfigContext.Provider, {\n value: memoedConfig\n }, childNode);\n};\nvar ConfigProvider = function ConfigProvider(props) {\n return /*#__PURE__*/React.createElement(LocaleReceiver, null, function (_, __, legacyLocale) {\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (context) {\n return /*#__PURE__*/React.createElement(ProviderChildren, _extends({\n parentContext: context,\n legacyLocale: legacyLocale\n }, props));\n });\n });\n};\nConfigProvider.ConfigContext = ConfigContext;\nConfigProvider.SizeContext = SizeContext;\nConfigProvider.config = setGlobalConfig;\nexport default ConfigProvider;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useStyleRegister } from '@ant-design/cssinjs';\nimport { resetIcon } from '../../style';\nimport { useToken } from '../../theme';\nvar useStyle = function useStyle(iconPrefixCls) {\n var _useToken = useToken(),\n _useToken2 = _slicedToArray(_useToken, 2),\n theme = _useToken2[0],\n token = _useToken2[1];\n // Generate style for icons\n return useStyleRegister({\n theme: theme,\n token: token,\n hashId: '',\n path: ['ant-design-icons', iconPrefixCls]\n }, function () {\n return [_defineProperty({}, \".\" + iconPrefixCls, resetIcon())];\n });\n};\nexport default useStyle;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport shallowEqual from 'shallowequal';\nimport { defaultConfig } from '../../theme';\nexport default function useTheme(theme, parentTheme) {\n var themeConfig = theme || {};\n var parentThemeConfig = themeConfig.inherit === false || !parentTheme ? defaultConfig : parentTheme;\n var mergedTheme = useMemo(function () {\n if (!theme) {\n return parentTheme;\n }\n // Override\n var mergedComponents = _extends({}, parentThemeConfig.components);\n Object.keys(theme.components || {}).forEach(function (componentName) {\n mergedComponents[componentName] = _extends(_extends({}, mergedComponents[componentName]), theme.components[componentName]);\n });\n // Base token\n return _extends(_extends(_extends({}, parentThemeConfig), themeConfig), {\n token: _extends(_extends({}, parentThemeConfig.token), themeConfig.token),\n components: mergedComponents\n });\n }, [themeConfig, parentThemeConfig], function (prev, next) {\n return prev.some(function (prevTheme, index) {\n var nextTheme = next[index];\n return !shallowEqual(prevTheme, nextTheme);\n });\n });\n return mergedTheme;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { isMemo } from 'react-is';\nimport useMemo from './hooks/useMemo';\nexport function fillRef(ref, node) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (_typeof(ref) === 'object' && ref && 'current' in ref) {\n ref.current = node;\n }\n}\n/**\n * Merge refs into one ref function to support ref passing.\n */\nexport function composeRef() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n var refList = refs.filter(function (ref) {\n return ref;\n });\n if (refList.length <= 1) {\n return refList[0];\n }\n return function (node) {\n refs.forEach(function (ref) {\n fillRef(ref, node);\n });\n };\n}\nexport function useComposeRef() {\n for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n refs[_key2] = arguments[_key2];\n }\n return useMemo(function () {\n return composeRef.apply(void 0, refs);\n }, refs, function (prev, next) {\n return prev.length === next.length && prev.every(function (ref, i) {\n return ref === next[i];\n });\n });\n}\nexport function supportRef(nodeOrComponent) {\n var _type$prototype, _nodeOrComponent$prot;\n var type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n // Function component node\n if (typeof type === 'function' && !((_type$prototype = type.prototype) === null || _type$prototype === void 0 ? void 0 : _type$prototype.render)) {\n return false;\n }\n // Class component\n if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) === null || _nodeOrComponent$prot === void 0 ? void 0 : _nodeOrComponent$prot.render)) {\n return false;\n }\n return true;\n}\n/* eslint-enable */","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { generate as generateColor } from '@ant-design/colors';\nimport React, { useContext, useEffect } from 'react';\nimport warn from \"rc-util/es/warning\";\nimport { updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport IconContext from './components/Context';\nexport function warning(valid, message) {\n warn(valid, \"[@ant-design/icons] \".concat(message));\n}\nexport function isIconDefinition(target) {\n return _typeof(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (_typeof(target.icon) === 'object' || typeof target.icon === 'function');\n}\nexport function normalizeAttrs() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(attrs).reduce(function (acc, key) {\n var val = attrs[key];\n switch (key) {\n case 'class':\n acc.className = val;\n delete acc.class;\n break;\n default:\n acc[key] = val;\n }\n return acc;\n }, {});\n}\nexport function generate(node, key, rootProps) {\n if (!rootProps) {\n return /*#__PURE__*/React.createElement(node.tag, _objectSpread({\n key: key\n }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {\n return generate(child, \"\".concat(key, \"-\").concat(node.tag, \"-\").concat(index));\n }));\n }\n return /*#__PURE__*/React.createElement(node.tag, _objectSpread(_objectSpread({\n key: key\n }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {\n return generate(child, \"\".concat(key, \"-\").concat(node.tag, \"-\").concat(index));\n }));\n}\nexport function getSecondaryColor(primaryColor) {\n // choose the second color\n return generateColor(primaryColor)[0];\n}\nexport function normalizeTwoToneColors(twoToneColor) {\n if (!twoToneColor) {\n return [];\n }\n return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];\n}\n// These props make sure that the SVG behaviours like general text.\n// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4\nexport var svgBaseProps = {\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true',\n focusable: 'false'\n};\nexport var iconStyles = \"\\n.anticon {\\n display: inline-block;\\n color: inherit;\\n font-style: normal;\\n line-height: 0;\\n text-align: center;\\n text-transform: none;\\n vertical-align: -0.125em;\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\n.anticon > * {\\n line-height: 1;\\n}\\n\\n.anticon svg {\\n display: inline-block;\\n}\\n\\n.anticon::before {\\n display: none;\\n}\\n\\n.anticon .anticon-icon {\\n display: block;\\n}\\n\\n.anticon[tabindex] {\\n cursor: pointer;\\n}\\n\\n.anticon-spin::before,\\n.anticon-spin {\\n display: inline-block;\\n -webkit-animation: loadingCircle 1s infinite linear;\\n animation: loadingCircle 1s infinite linear;\\n}\\n\\n@-webkit-keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\";\nexport var useInsertStyles = function useInsertStyles() {\n var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;\n var _useContext = useContext(IconContext),\n csp = _useContext.csp;\n useEffect(function () {\n updateCSS(styleStr, '@ant-design-icons', {\n prepend: true,\n csp: csp\n });\n }, []);\n};","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nvar _excluded = [\"icon\", \"className\", \"onClick\", \"style\", \"primaryColor\", \"secondaryColor\"];\nimport { generate, getSecondaryColor, isIconDefinition, warning, useInsertStyles } from '../utils';\nvar twoToneColorPalette = {\n primaryColor: '#333',\n secondaryColor: '#E6E6E6',\n calculated: false\n};\nfunction setTwoToneColors(_ref) {\n var primaryColor = _ref.primaryColor,\n secondaryColor = _ref.secondaryColor;\n twoToneColorPalette.primaryColor = primaryColor;\n twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);\n twoToneColorPalette.calculated = !!secondaryColor;\n}\nfunction getTwoToneColors() {\n return _objectSpread({}, twoToneColorPalette);\n}\nvar IconBase = function IconBase(props) {\n var icon = props.icon,\n className = props.className,\n onClick = props.onClick,\n style = props.style,\n primaryColor = props.primaryColor,\n secondaryColor = props.secondaryColor,\n restProps = _objectWithoutProperties(props, _excluded);\n var colors = twoToneColorPalette;\n if (primaryColor) {\n colors = {\n primaryColor: primaryColor,\n secondaryColor: secondaryColor || getSecondaryColor(primaryColor)\n };\n }\n useInsertStyles();\n warning(isIconDefinition(icon), \"icon should be icon definiton, but got \".concat(icon));\n if (!isIconDefinition(icon)) {\n return null;\n }\n var target = icon;\n if (target && typeof target.icon === 'function') {\n target = _objectSpread(_objectSpread({}, target), {}, {\n icon: target.icon(colors.primaryColor, colors.secondaryColor)\n });\n }\n return generate(target.icon, \"svg-\".concat(target.name), _objectSpread({\n className: className,\n onClick: onClick,\n style: style,\n 'data-icon': target.name,\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true'\n }, restProps));\n};\nIconBase.displayName = 'IconReact';\nIconBase.getTwoToneColors = getTwoToneColors;\nIconBase.setTwoToneColors = setTwoToneColors;\nexport default IconBase;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport ReactIcon from './IconBase';\nimport { normalizeTwoToneColors } from '../utils';\nexport function setTwoToneColor(twoToneColor) {\n var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),\n _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),\n primaryColor = _normalizeTwoToneColo2[0],\n secondaryColor = _normalizeTwoToneColo2[1];\n return ReactIcon.setTwoToneColors({\n primaryColor: primaryColor,\n secondaryColor: secondaryColor\n });\n}\nexport function getTwoToneColor() {\n var colors = ReactIcon.getTwoToneColors();\n if (!colors.calculated) {\n return colors.primaryColor;\n }\n return [colors.primaryColor, colors.secondaryColor];\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"icon\", \"spin\", \"rotate\", \"tabIndex\", \"onClick\", \"twoToneColor\"];\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport Context from './Context';\nimport ReactIcon from './IconBase';\nimport { getTwoToneColor, setTwoToneColor } from './twoTonePrimaryColor';\nimport { normalizeTwoToneColors } from '../utils';\n// Initial setting\n// should move it to antd main repo?\nsetTwoToneColor('#1890ff');\nvar Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _classNames;\n var className = props.className,\n icon = props.icon,\n spin = props.spin,\n rotate = props.rotate,\n tabIndex = props.tabIndex,\n onClick = props.onClick,\n twoToneColor = props.twoToneColor,\n restProps = _objectWithoutProperties(props, _excluded);\n var _React$useContext = React.useContext(Context),\n _React$useContext$pre = _React$useContext.prefixCls,\n prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,\n rootClassName = _React$useContext.rootClassName;\n var classString = classNames(rootClassName, prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(icon.name), !!icon.name), _defineProperty(_classNames, \"\".concat(prefixCls, \"-spin\"), !!spin || icon.name === 'loading'), _classNames), className);\n var iconTabIndex = tabIndex;\n if (iconTabIndex === undefined && onClick) {\n iconTabIndex = -1;\n }\n var svgStyle = rotate ? {\n msTransform: \"rotate(\".concat(rotate, \"deg)\"),\n transform: \"rotate(\".concat(rotate, \"deg)\")\n } : undefined;\n var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),\n _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),\n primaryColor = _normalizeTwoToneColo2[0],\n secondaryColor = _normalizeTwoToneColo2[1];\n return /*#__PURE__*/React.createElement(\"span\", _objectSpread(_objectSpread({\n role: \"img\",\n \"aria-label\": icon.name\n }, restProps), {}, {\n ref: ref,\n tabIndex: iconTabIndex,\n onClick: onClick,\n className: classString\n }), /*#__PURE__*/React.createElement(ReactIcon, {\n icon: icon,\n primaryColor: primaryColor,\n secondaryColor: secondaryColor,\n style: svgStyle\n }));\n});\nIcon.displayName = 'AntdIcon';\nIcon.getTwoToneColor = getTwoToneColor;\nIcon.setTwoToneColor = setTwoToneColor;\nexport default Icon;","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","export default function canUseDom() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}","import { bound01, pad2 } from './util';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * \n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n","var genControlHeight = function genControlHeight(token) {\n var controlHeight = token.controlHeight;\n return {\n controlHeightSM: controlHeight * 0.75,\n controlHeightXS: controlHeight * 0.5,\n controlHeightLG: controlHeight * 1.25\n };\n};\nexport default genControlHeight;","var genRadius = function genRadius(radiusBase) {\n var radiusLG = radiusBase;\n var radiusSM = radiusBase;\n var radiusXS = radiusBase;\n var radiusOuter = radiusBase;\n // radiusLG\n if (radiusBase < 6 && radiusBase >= 5) {\n radiusLG = radiusBase + 1;\n } else if (radiusBase < 16 && radiusBase >= 6) {\n radiusLG = radiusBase + 2;\n } else if (radiusBase >= 16) {\n radiusLG = 16;\n }\n // radiusSM\n if (radiusBase < 7 && radiusBase >= 5) {\n radiusSM = 4;\n } else if (radiusBase < 8 && radiusBase >= 7) {\n radiusSM = 5;\n } else if (radiusBase < 14 && radiusBase >= 8) {\n radiusSM = 6;\n } else if (radiusBase < 16 && radiusBase >= 14) {\n radiusSM = 7;\n } else if (radiusBase >= 16) {\n radiusSM = 8;\n }\n // radiusXS\n if (radiusBase < 6 && radiusBase >= 2) {\n radiusXS = 1;\n } else if (radiusBase >= 6) {\n radiusXS = 2;\n }\n // radiusOuter\n if (radiusBase > 4 && radiusBase < 8) {\n radiusOuter = 4;\n } else if (radiusBase >= 8) {\n radiusOuter = 6;\n }\n return {\n borderRadius: radiusBase > 16 ? 16 : radiusBase,\n borderRadiusXS: radiusXS,\n borderRadiusSM: radiusSM,\n borderRadiusLG: radiusLG,\n borderRadiusOuter: radiusOuter\n };\n};\nexport default genRadius;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport genFontSizes from './genFontSizes';\nimport genRadius from './genRadius';\nexport default function genCommonMapToken(token) {\n var motionUnit = token.motionUnit,\n motionBase = token.motionBase,\n fontSize = token.fontSize,\n borderRadius = token.borderRadius,\n lineWidth = token.lineWidth;\n var fontSizes = genFontSizes(fontSize);\n return _extends({\n // motion\n motionDurationFast: (motionBase + motionUnit).toFixed(1) + \"s\",\n motionDurationMid: (motionBase + motionUnit * 2).toFixed(1) + \"s\",\n motionDurationSlow: (motionBase + motionUnit * 3).toFixed(1) + \"s\",\n // font\n fontSizes: fontSizes.map(function (fs) {\n return fs.size;\n }),\n lineHeights: fontSizes.map(function (fs) {\n return fs.lineHeight;\n }),\n // line\n lineWidthBold: lineWidth + 1\n }, genRadius(borderRadius));\n}","// https://zhuanlan.zhihu.com/p/32746810\nexport default function getFontSizes(base) {\n var fontSizes = new Array(10).fill(null).map(function (_, index) {\n var i = index - 1;\n var baseSize = base * Math.pow(2.71828, i / 5);\n var intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);\n // Convert to even\n return Math.floor(intSize / 2) * 2;\n });\n fontSizes[1] = base;\n return fontSizes.map(function (size) {\n var height = size + 8;\n return {\n size: size,\n lineHeight: height / size\n };\n });\n}","import { TinyColor } from '@ctrl/tinycolor';\nexport var getAlphaColor = function getAlphaColor(baseColor, alpha) {\n return new TinyColor(baseColor).setAlpha(alpha).toRgbString();\n};\nexport var getSolidColor = function getSolidColor(baseColor, brightness) {\n var instance = new TinyColor(baseColor);\n return instance.darken(brightness).toHexString();\n};","import { generate } from '@ant-design/colors';\nimport { getAlphaColor, getSolidColor } from './colorAlgorithm';\nexport var generateColorPalettes = function generateColorPalettes(baseColor) {\n var colors = generate(baseColor);\n return {\n 1: colors[0],\n 2: colors[1],\n 3: colors[2],\n 4: colors[3],\n 5: colors[4],\n 6: colors[5],\n 7: colors[6],\n 8: colors[4],\n 9: colors[5],\n 10: colors[6]\n // 8: colors[7],\n // 9: colors[8],\n // 10: colors[9],\n };\n};\n\nexport var generateNeutralColorPalettes = function generateNeutralColorPalettes(bgBaseColor, textBaseColor) {\n var colorBgBase = bgBaseColor || '#fff';\n var colorTextBase = textBaseColor || '#000';\n return {\n colorBgBase: colorBgBase,\n colorTextBase: colorTextBase,\n colorText: getAlphaColor(colorTextBase, 0.88),\n colorTextSecondary: getAlphaColor(colorTextBase, 0.65),\n colorTextTertiary: getAlphaColor(colorTextBase, 0.45),\n colorTextQuaternary: getAlphaColor(colorTextBase, 0.25),\n colorFill: getAlphaColor(colorTextBase, 0.15),\n colorFillSecondary: getAlphaColor(colorTextBase, 0.06),\n colorFillTertiary: getAlphaColor(colorTextBase, 0.04),\n colorFillQuaternary: getAlphaColor(colorTextBase, 0.02),\n colorBgLayout: getSolidColor(colorBgBase, 4),\n colorBgContainer: getSolidColor(colorBgBase, 0),\n colorBgElevated: getSolidColor(colorBgBase, 0),\n colorBgSpotlight: getAlphaColor(colorTextBase, 0.85),\n colorBorder: getSolidColor(colorBgBase, 15),\n colorBorderSecondary: getSolidColor(colorBgBase, 6)\n };\n};","import { TinyColor } from '@ctrl/tinycolor';\nfunction isStableColor(color) {\n return color >= 0 && color <= 255;\n}\nfunction getAlphaColor(frontColor, backgroundColor) {\n var _TinyColor$toRgb = new TinyColor(frontColor).toRgb(),\n fR = _TinyColor$toRgb.r,\n fG = _TinyColor$toRgb.g,\n fB = _TinyColor$toRgb.b,\n originAlpha = _TinyColor$toRgb.a;\n if (originAlpha < 1) {\n return frontColor;\n }\n var _TinyColor$toRgb2 = new TinyColor(backgroundColor).toRgb(),\n bR = _TinyColor$toRgb2.r,\n bG = _TinyColor$toRgb2.g,\n bB = _TinyColor$toRgb2.b;\n for (var fA = 0.01; fA <= 1; fA += 0.01) {\n var r = Math.round((fR - bR * (1 - fA)) / fA);\n var g = Math.round((fG - bG * (1 - fA)) / fA);\n var b = Math.round((fB - bB * (1 - fA)) / fA);\n if (isStableColor(r) && isStableColor(g) && isStableColor(b)) return new TinyColor({\n r: r,\n g: g,\n b: b,\n a: Math.round(fA * 100) / 100\n }).toRgbString();\n }\n // fallback\n /* istanbul ignore next */\n return new TinyColor({\n r: fR,\n g: fG,\n b: fB,\n a: 1\n }).toRgbString();\n}\nexport default getAlphaColor;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { TinyColor } from '@ctrl/tinycolor';\nimport getAlphaColor from './getAlphaColor';\nimport seedToken from '../themes/seed';\n/**\n * Seed (designer) > Derivative (designer) > Alias (developer).\n *\n * Merge seed & derivative & override token and generate alias token for developer.\n */\nexport default function formatToken(derivativeToken) {\n var override = derivativeToken.override,\n restToken = __rest(derivativeToken, [\"override\"]);\n var overrideTokens = _extends({}, override);\n Object.keys(seedToken).forEach(function (token) {\n delete overrideTokens[token];\n });\n var mergedToken = _extends(_extends({}, restToken), overrideTokens);\n var fontSizes = mergedToken.fontSizes,\n lineHeights = mergedToken.lineHeights;\n var screenXS = 480;\n var screenSM = 576;\n var screenMD = 768;\n var screenLG = 992;\n var screenXL = 1200;\n var screenXXL = 1600;\n var fontSizeSM = fontSizes[0];\n // Generate alias token\n var aliasToken = _extends(_extends(_extends({}, mergedToken), {\n colorLink: mergedToken.colorInfoText,\n colorLinkHover: mergedToken.colorInfoHover,\n colorLinkActive: mergedToken.colorInfoActive,\n // ============== Background ============== //\n colorFillContent: mergedToken.colorFillSecondary,\n colorFillContentHover: mergedToken.colorFill,\n colorFillAlter: mergedToken.colorFillQuaternary,\n colorBgContainerDisabled: mergedToken.colorFillTertiary,\n // ============== Split ============== //\n colorBorderBg: mergedToken.colorBgContainer,\n colorSplit: getAlphaColor(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),\n // ============== Text ============== //\n colorTextPlaceholder: mergedToken.colorTextQuaternary,\n colorTextDisabled: mergedToken.colorTextQuaternary,\n colorTextHeading: mergedToken.colorText,\n colorTextLabel: mergedToken.colorTextSecondary,\n colorTextDescription: mergedToken.colorTextTertiary,\n colorTextLightSolid: mergedToken.colorWhite,\n colorHighlight: mergedToken.colorError,\n colorBgTextHover: mergedToken.colorFillSecondary,\n colorBgTextActive: mergedToken.colorFill,\n colorIcon: mergedToken.colorTextTertiary,\n colorIconHover: mergedToken.colorText,\n colorErrorOutline: getAlphaColor(mergedToken.colorErrorBg, mergedToken.colorBgContainer),\n colorWarningOutline: getAlphaColor(mergedToken.colorWarningBg, mergedToken.colorBgContainer),\n // Font\n fontSizeSM: fontSizeSM,\n fontSize: fontSizes[1],\n fontSizeLG: fontSizes[2],\n fontSizeXL: fontSizes[3],\n fontSizeHeading1: fontSizes[6],\n fontSizeHeading2: fontSizes[5],\n fontSizeHeading3: fontSizes[4],\n fontSizeHeading4: fontSizes[3],\n fontSizeHeading5: fontSizes[2],\n fontSizeIcon: fontSizeSM,\n lineHeight: lineHeights[1],\n lineHeightLG: lineHeights[2],\n lineHeightSM: lineHeights[0],\n lineHeightHeading1: lineHeights[6],\n lineHeightHeading2: lineHeights[5],\n lineHeightHeading3: lineHeights[4],\n lineHeightHeading4: lineHeights[3],\n lineHeightHeading5: lineHeights[2],\n // Control\n lineWidth: mergedToken.lineWidth,\n controlOutlineWidth: mergedToken.lineWidth * 2,\n // Checkbox size and expand icon size\n controlInteractiveSize: mergedToken.controlHeight / 2,\n controlItemBgHover: mergedToken.colorFillTertiary,\n controlItemBgActive: mergedToken.colorPrimaryBg,\n controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,\n controlItemBgActiveDisabled: mergedToken.colorFill,\n controlTmpOutline: mergedToken.colorFillQuaternary,\n controlOutline: getAlphaColor(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),\n lineType: mergedToken.lineType,\n borderRadius: mergedToken.borderRadius,\n borderRadiusXS: mergedToken.borderRadiusXS,\n borderRadiusSM: mergedToken.borderRadiusSM,\n borderRadiusLG: mergedToken.borderRadiusLG,\n fontWeightStrong: 600,\n opacityLoading: 0.65,\n linkDecoration: 'none',\n linkHoverDecoration: 'none',\n linkFocusDecoration: 'none',\n controlPaddingHorizontal: 12,\n controlPaddingHorizontalSM: 8,\n paddingXXS: mergedToken.sizeXXS,\n paddingXS: mergedToken.sizeXS,\n paddingSM: mergedToken.sizeSM,\n padding: mergedToken.size,\n paddingMD: mergedToken.sizeMD,\n paddingLG: mergedToken.sizeLG,\n paddingXL: mergedToken.sizeXL,\n paddingContentHorizontalLG: mergedToken.sizeLG,\n paddingContentVerticalLG: mergedToken.sizeMS,\n paddingContentHorizontal: mergedToken.sizeMS,\n paddingContentVertical: mergedToken.sizeSM,\n paddingContentHorizontalSM: mergedToken.size,\n paddingContentVerticalSM: mergedToken.sizeXS,\n marginXXS: mergedToken.sizeXXS,\n marginXS: mergedToken.sizeXS,\n marginSM: mergedToken.sizeSM,\n margin: mergedToken.size,\n marginMD: mergedToken.sizeMD,\n marginLG: mergedToken.sizeLG,\n marginXL: mergedToken.sizeXL,\n marginXXL: mergedToken.sizeXXL,\n boxShadow: \"\\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\\n \",\n boxShadowSecondary: \"\\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\\n \",\n screenXS: screenXS,\n screenXSMin: screenXS,\n screenXSMax: screenXS - 1,\n screenSM: screenSM,\n screenSMMin: screenSM,\n screenSMMax: screenSM - 1,\n screenMD: screenMD,\n screenMDMin: screenMD,\n screenMDMax: screenMD - 1,\n screenLG: screenLG,\n screenLGMin: screenLG,\n screenLGMax: screenLG - 1,\n screenXL: screenXL,\n screenXLMin: screenXL,\n screenXLMax: screenXL - 1,\n screenXXL: screenXXL,\n screenXXLMin: screenXXL,\n screenXXLMax: screenXXL - 1,\n // FIXME: component box-shadow, should be removed\n boxShadowPopoverArrow: \"3px 3px 7px rgba(0, 0, 0, 0.1)\",\n boxShadowCard: \"\\n 0 1px 2px -2px \" + new TinyColor('rgba(0, 0, 0, 0.16)').toRgbString() + \",\\n 0 3px 6px 0 \" + new TinyColor('rgba(0, 0, 0, 0.12)').toRgbString() + \",\\n 0 5px 12px 4px \" + new TinyColor('rgba(0, 0, 0, 0.09)').toRgbString() + \"\\n \",\n boxShadowDrawerRight: \"\\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\\n \",\n boxShadowDrawerLeft: \"\\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\\n \",\n boxShadowDrawerUp: \"\\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\\n \",\n boxShadowDrawerDown: \"\\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\\n \",\n boxShadowTabsOverflowLeft: \"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)\",\n boxShadowTabsOverflowRight: \"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)\",\n boxShadowTabsOverflowTop: \"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)\",\n boxShadowTabsOverflowBottom: \"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)\"\n }), overrideTokens);\n return aliasToken;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { createTheme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs';\nimport React from 'react';\nimport version from '../version';\nimport { PresetColors } from './interface';\nimport defaultDerivative from './themes/default';\nimport defaultSeedToken from './themes/seed';\nimport formatToken from './util/alias';\nimport genComponentStyleHook from './util/genComponentStyleHook';\nimport statisticToken, { merge as mergeToken, statistic } from './util/statistic';\nvar defaultTheme = createTheme(defaultDerivative);\nexport {\n// colors\nPresetColors,\n// Statistic\nstatistic, statisticToken, mergeToken,\n// hooks\nuseStyleRegister, genComponentStyleHook };\n// ================================ Context =================================\n// To ensure snapshot stable. We disable hashed in test env.\nexport var defaultConfig = {\n token: defaultSeedToken,\n hashed: true\n};\nexport var DesignTokenContext = /*#__PURE__*/React.createContext(defaultConfig);\n// ================================== Hook ==================================\n// In dev env, we refresh salt per hour to avoid user use this\n// Note: Do not modify this to real time update which will make debug harder\nvar saltPrefix = process.env.NODE_ENV === 'production' ? version : version + \"-\" + new Date().getHours();\nexport function useToken() {\n var _React$useContext = React.useContext(DesignTokenContext),\n rootDesignToken = _React$useContext.token,\n hashed = _React$useContext.hashed,\n theme = _React$useContext.theme,\n components = _React$useContext.components;\n var salt = saltPrefix + \"-\" + (hashed || '');\n var mergedTheme = theme || defaultTheme;\n var _useCacheToken = useCacheToken(mergedTheme, [defaultSeedToken, rootDesignToken], {\n salt: salt,\n override: _extends({\n override: rootDesignToken\n }, components),\n formatToken: formatToken\n }),\n _useCacheToken2 = _slicedToArray(_useCacheToken, 2),\n token = _useCacheToken2[0],\n hashId = _useCacheToken2[1];\n return [mergedTheme, token, hashed ? hashId : ''];\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { generate } from '@ant-design/colors';\nimport genControlHeight from '../shared/genControlHeight';\nimport genSizeMapToken from '../shared/genSizeMapToken';\nimport { defaultPresetColors } from '../seed';\nimport genColorMapToken from '../shared/genColorMapToken';\nimport genCommonMapToken from '../shared/genCommonMapToken';\nimport { generateColorPalettes, generateNeutralColorPalettes } from './colors';\nexport default function derivative(token) {\n var colorPalettes = Object.keys(defaultPresetColors).map(function (colorKey) {\n var colors = generate(token[colorKey]);\n return new Array(10).fill(1).reduce(function (prev, _, i) {\n prev[colorKey + \"-\" + (i + 1)] = colors[i];\n return prev;\n }, {});\n }).reduce(function (prev, cur) {\n prev = _extends(_extends({}, prev), cur);\n return prev;\n }, {});\n return _extends(_extends(_extends(_extends(_extends(_extends({}, token), colorPalettes), genColorMapToken(token, {\n generateColorPalettes: generateColorPalettes,\n generateNeutralColorPalettes: generateNeutralColorPalettes\n })), genSizeMapToken(token)), genControlHeight(token)), genCommonMapToken(token));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { TinyColor } from '@ctrl/tinycolor';\nexport default function genColorMapToken(seed, _ref) {\n var generateColorPalettes = _ref.generateColorPalettes,\n generateNeutralColorPalettes = _ref.generateNeutralColorPalettes;\n var colorSuccessBase = seed.colorSuccess,\n colorWarningBase = seed.colorWarning,\n colorErrorBase = seed.colorError,\n colorInfoBase = seed.colorInfo,\n colorPrimaryBase = seed.colorPrimary,\n colorBgBase = seed.colorBgBase,\n colorTextBase = seed.colorTextBase;\n var primaryColors = generateColorPalettes(colorPrimaryBase);\n var successColors = generateColorPalettes(colorSuccessBase);\n var warningColors = generateColorPalettes(colorWarningBase);\n var errorColors = generateColorPalettes(colorErrorBase);\n var infoColors = generateColorPalettes(colorInfoBase);\n var neutralColors = generateNeutralColorPalettes(colorBgBase, colorTextBase);\n return _extends(_extends({}, neutralColors), {\n colorPrimaryBg: primaryColors[1],\n colorPrimaryBgHover: primaryColors[2],\n colorPrimaryBorder: primaryColors[3],\n colorPrimaryBorderHover: primaryColors[4],\n colorPrimaryHover: primaryColors[5],\n colorPrimary: primaryColors[6],\n colorPrimaryActive: primaryColors[7],\n colorPrimaryTextHover: primaryColors[8],\n colorPrimaryText: primaryColors[9],\n colorPrimaryTextActive: primaryColors[10],\n colorSuccessBg: successColors[1],\n colorSuccessBgHover: successColors[2],\n colorSuccessBorder: successColors[3],\n colorSuccessBorderHover: successColors[4],\n colorSuccessHover: successColors[4],\n colorSuccess: successColors[6],\n colorSuccessActive: successColors[7],\n colorSuccessTextHover: successColors[8],\n colorSuccessText: successColors[9],\n colorSuccessTextActive: successColors[10],\n colorErrorBg: errorColors[1],\n colorErrorBgHover: errorColors[2],\n colorErrorBorder: errorColors[3],\n colorErrorBorderHover: errorColors[4],\n colorErrorHover: errorColors[4],\n colorError: errorColors[5],\n colorErrorActive: errorColors[7],\n colorErrorTextHover: errorColors[8],\n colorErrorText: errorColors[9],\n colorErrorTextActive: errorColors[10],\n colorWarningBg: warningColors[1],\n colorWarningBgHover: warningColors[2],\n colorWarningBorder: warningColors[3],\n colorWarningBorderHover: warningColors[4],\n colorWarningHover: warningColors[4],\n colorWarning: warningColors[6],\n colorWarningActive: warningColors[7],\n colorWarningTextHover: warningColors[8],\n colorWarningText: warningColors[9],\n colorWarningTextActive: warningColors[10],\n colorInfoBg: infoColors[1],\n colorInfoBgHover: infoColors[2],\n colorInfoBorder: infoColors[3],\n colorInfoBorderHover: infoColors[4],\n colorInfoHover: infoColors[4],\n colorInfo: infoColors[6],\n colorInfoActive: infoColors[7],\n colorInfoTextHover: infoColors[8],\n colorInfoText: infoColors[9],\n colorInfoTextActive: infoColors[10],\n colorBgMask: new TinyColor('#000').setAlpha(0.45).toRgbString(),\n colorWhite: '#fff'\n });\n}","export default function genSizeMapToken(token) {\n var sizeUnit = token.sizeUnit,\n sizeStep = token.sizeStep;\n return {\n sizeXXL: sizeUnit * (sizeStep + 8),\n sizeXL: sizeUnit * (sizeStep + 4),\n sizeLG: sizeUnit * (sizeStep + 2),\n sizeMD: sizeUnit * (sizeStep + 1),\n sizeMS: sizeUnit * sizeStep,\n size: sizeUnit * sizeStep,\n sizeSM: sizeUnit * (sizeStep - 1),\n sizeXS: sizeUnit * (sizeStep - 2),\n sizeXXS: sizeUnit * (sizeStep - 3) // 4\n };\n}","import * as React from 'react';\nimport canUseDom from '../Dom/canUseDom';\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nvar useLayoutEffect = process.env.NODE_ENV !== 'test' && canUseDom() ? React.useLayoutEffect : React.useEffect;\nexport default useLayoutEffect;\nexport var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {\n var firstMountRef = React.useRef(true);\n useLayoutEffect(function () {\n if (!firstMountRef.current) {\n return callback();\n }\n }, deps);\n // We tell react that first mount has passed\n useLayoutEffect(function () {\n firstMountRef.current = false;\n return function () {\n firstMountRef.current = true;\n };\n }, []);\n};","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return possibleConstructorReturn(this, result);\n };\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import * as React from 'react';\nvar isValidElement = React.isValidElement;\nexport { isValidElement };\nexport function isFragment(child) {\n return child && isValidElement(child) && child.type === React.Fragment;\n}\nexport function replaceElement(element, replacement, props) {\n if (!isValidElement(element)) {\n return replacement;\n }\n return /*#__PURE__*/React.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);\n}\nexport function cloneElement(element, props) {\n return replaceElement(element, element, props);\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nexport default function omit(obj, fields) {\n var clone = _objectSpread({}, obj);\n if (Array.isArray(fields)) {\n fields.forEach(function (key) {\n delete clone[key];\n });\n }\n return clone;\n}","import * as React from 'react';\nvar SizeContext = /*#__PURE__*/React.createContext(undefined);\nexport var SizeContextProvider = function SizeContextProvider(_ref) {\n var children = _ref.children,\n size = _ref.size;\n return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (originSize) {\n return /*#__PURE__*/React.createElement(SizeContext.Provider, {\n value: size || originSize\n }, children);\n });\n};\nexport default SizeContext;","// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead\nexport var tuple = function tuple() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return args;\n};\nexport var tupleNum = function tupleNum() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return args;\n};","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport useEvent from './useEvent';\nimport useLayoutEffect, { useLayoutUpdateEffect } from './useLayoutEffect';\nimport useState from './useState';\nvar Source;\n(function (Source) {\n Source[Source[\"INNER\"] = 0] = \"INNER\";\n Source[Source[\"PROP\"] = 1] = \"PROP\";\n})(Source || (Source = {}));\n/** We only think `undefined` is empty */\nfunction hasValue(value) {\n return value !== undefined;\n}\n/**\n * Similar to `useState` but will use props value if provided.\n * Note that internal use rc-util `useState` hook.\n */\nexport default function useMergedState(defaultStateValue, option) {\n var _ref = option || {},\n defaultValue = _ref.defaultValue,\n value = _ref.value,\n onChange = _ref.onChange,\n postState = _ref.postState;\n // ======================= Init =======================\n var _useState = useState(function () {\n var finalValue = undefined;\n var source;\n if (hasValue(value)) {\n finalValue = value;\n source = Source.PROP;\n } else if (hasValue(defaultValue)) {\n finalValue = typeof defaultValue === 'function' ? defaultValue() : defaultValue;\n source = Source.PROP;\n } else {\n finalValue = typeof defaultStateValue === 'function' ? defaultStateValue() : defaultStateValue;\n source = Source.INNER;\n }\n return [finalValue, source, finalValue];\n }),\n _useState2 = _slicedToArray(_useState, 2),\n mergedValue = _useState2[0],\n setMergedValue = _useState2[1];\n var chosenValue = hasValue(value) ? value : mergedValue[0];\n var postMergedValue = postState ? postState(chosenValue) : chosenValue;\n // ======================= Sync =======================\n useLayoutUpdateEffect(function () {\n setMergedValue(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 1),\n prevValue = _ref3[0];\n return [value, Source.PROP, prevValue];\n });\n }, [value]);\n // ====================== Update ======================\n var changeEventPrevRef = React.useRef();\n var triggerChange = useEvent(function (updater, ignoreDestroy) {\n setMergedValue(function (prev) {\n var _prev = _slicedToArray(prev, 3),\n prevValue = _prev[0],\n prevSource = _prev[1],\n prevPrevValue = _prev[2];\n var nextValue = typeof updater === 'function' ? updater(prevValue) : updater;\n // Do nothing if value not change\n if (nextValue === prevValue) {\n return prev;\n }\n // Use prev prev value if is in a batch update to avoid missing data\n var overridePrevValue = prevSource === Source.INNER && changeEventPrevRef.current !== prevPrevValue ? prevPrevValue : prevValue;\n return [nextValue, Source.INNER, overridePrevValue];\n }, ignoreDestroy);\n });\n // ====================== Change ======================\n var onChangeFn = useEvent(onChange);\n useLayoutEffect(function () {\n var _mergedValue = _slicedToArray(mergedValue, 3),\n current = _mergedValue[0],\n source = _mergedValue[1],\n prev = _mergedValue[2];\n if (current !== prev && source === Source.INNER) {\n onChangeFn(current, prev);\n changeEventPrevRef.current = prev;\n }\n }, [mergedValue]);\n return [postMergedValue, triggerChange];\n}","import _typeof from \"./typeof.js\";\nexport default function _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n };\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}","import warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nexport var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar warningFunc = function warningFunc() {\n warning(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');\n};\nvar Context = /*#__PURE__*/React.createContext({\n getFieldValue: warningFunc,\n getFieldsValue: warningFunc,\n getFieldError: warningFunc,\n getFieldWarning: warningFunc,\n getFieldsError: warningFunc,\n isFieldsTouched: warningFunc,\n isFieldTouched: warningFunc,\n isFieldValidating: warningFunc,\n isFieldsValidating: warningFunc,\n resetFields: warningFunc,\n setFields: warningFunc,\n setFieldValue: warningFunc,\n setFieldsValue: warningFunc,\n validateFields: warningFunc,\n submit: warningFunc,\n getInternalHooks: function getInternalHooks() {\n warningFunc();\n return {\n dispatch: warningFunc,\n initEntityValue: warningFunc,\n registerField: warningFunc,\n useSubscribe: warningFunc,\n setInitialValues: warningFunc,\n destroyForm: warningFunc,\n setCallbacks: warningFunc,\n registerWatch: warningFunc,\n getFields: warningFunc,\n setValidateMessages: warningFunc,\n setPreserve: warningFunc,\n getInitialValue: warningFunc\n };\n }\n});\nexport default Context;","export function toArray(value) {\n if (value === undefined || value === null) {\n return [];\n }\n return Array.isArray(value) ? value : [value];\n}","var typeTemplate = \"'${name}' is not a valid ${type}\";\nexport var defaultValidateMessages = {\n default: \"Validation error on field '${name}'\",\n required: \"'${name}' is required\",\n enum: \"'${name}' must be one of [${enum}]\",\n whitespace: \"'${name}' cannot be empty\",\n date: {\n format: \"'${name}' is invalid for format date\",\n parse: \"'${name}' could not be parsed as date\",\n invalid: \"'${name}' is invalid date\"\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: \"'${name}' must be exactly ${len} characters\",\n min: \"'${name}' must be at least ${min} characters\",\n max: \"'${name}' cannot be longer than ${max} characters\",\n range: \"'${name}' must be between ${min} and ${max} characters\"\n },\n number: {\n len: \"'${name}' must equal ${len}\",\n min: \"'${name}' cannot be less than ${min}\",\n max: \"'${name}' cannot be greater than ${max}\",\n range: \"'${name}' must be between ${min} and ${max}\"\n },\n array: {\n len: \"'${name}' must be exactly ${len} in length\",\n min: \"'${name}' cannot be less than ${min} in length\",\n max: \"'${name}' cannot be greater than ${max} in length\",\n range: \"'${name}' must be between ${min} and ${max} in length\"\n },\n pattern: {\n mismatch: \"'${name}' does not match pattern ${pattern}\"\n }\n};","export default function get(entity, path) {\n var current = entity;\n for (var i = 0; i < path.length; i += 1) {\n if (current === null || current === undefined) {\n return undefined;\n }\n current = current[path[i]];\n }\n return current;\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport get from './get';\nfunction internalSet(entity, paths, value, removeIfUndefined) {\n if (!paths.length) {\n return value;\n }\n var _paths = _toArray(paths),\n path = _paths[0],\n restPath = _paths.slice(1);\n var clone;\n if (!entity && typeof path === 'number') {\n clone = [];\n } else if (Array.isArray(entity)) {\n clone = _toConsumableArray(entity);\n } else {\n clone = _objectSpread({}, entity);\n }\n // Delete prop if `removeIfUndefined` and value is undefined\n if (removeIfUndefined && value === undefined && restPath.length === 1) {\n delete clone[path][restPath[0]];\n } else {\n clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);\n }\n return clone;\n}\nexport default function set(entity, paths, value) {\n var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n // Do nothing if `removeIfUndefined` and parent object not exist\n if (paths.length && removeIfUndefined && value === undefined && !get(entity, paths.slice(0, -1))) {\n return entity;\n }\n return internalSet(entity, paths, value, removeIfUndefined);\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nfunction cloneDeep(val) {\n if (Array.isArray(val)) {\n return cloneArrayDeep(val);\n } else if (_typeof(val) === 'object' && val !== null) {\n return cloneObjectDeep(val);\n }\n return val;\n}\nfunction cloneObjectDeep(val) {\n if (Object.getPrototypeOf(val) === Object.prototype) {\n var res = {};\n for (var key in val) {\n res[key] = cloneDeep(val[key]);\n }\n return res;\n }\n return val;\n}\nfunction cloneArrayDeep(val) {\n return val.map(function (item) {\n return cloneDeep(item);\n });\n}\nexport default cloneDeep;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport get from \"rc-util/es/utils/get\";\nimport set from \"rc-util/es/utils/set\";\nimport { toArray } from './typeUtil';\nimport cloneDeep from '../utils/cloneDeep';\n/**\n * Convert name to internal supported format.\n * This function should keep since we still thinking if need support like `a.b.c` format.\n * 'a' => ['a']\n * 123 => [123]\n * ['a', 123] => ['a', 123]\n */\nexport function getNamePath(path) {\n return toArray(path);\n}\nexport function getValue(store, namePath) {\n var value = get(store, namePath);\n return value;\n}\nexport function setValue(store, namePath, value) {\n var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var newStore = set(store, namePath, value, removeIfUndefined);\n return newStore;\n}\nexport function cloneByNamePathList(store, namePathList) {\n var newStore = {};\n namePathList.forEach(function (namePath) {\n var value = getValue(store, namePath);\n newStore = setValue(newStore, namePath, value);\n });\n return newStore;\n}\nexport function containsNamePath(namePathList, namePath) {\n return namePathList && namePathList.some(function (path) {\n return matchNamePath(path, namePath);\n });\n}\nfunction isObject(obj) {\n return _typeof(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;\n}\n/**\n * Copy values into store and return a new values object\n * ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } }\n */\nfunction internalSetValues(store, values) {\n var newStore = Array.isArray(store) ? _toConsumableArray(store) : _objectSpread({}, store);\n if (!values) {\n return newStore;\n }\n Object.keys(values).forEach(function (key) {\n var prevValue = newStore[key];\n var value = values[key];\n // If both are object (but target is not array), we use recursion to set deep value\n var recursive = isObject(prevValue) && isObject(value);\n newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : cloneDeep(value); // Clone deep for arrays\n });\n\n return newStore;\n}\nexport function setValues(store) {\n for (var _len = arguments.length, restValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n restValues[_key - 1] = arguments[_key];\n }\n return restValues.reduce(function (current, newStore) {\n return internalSetValues(current, newStore);\n }, store);\n}\nexport function matchNamePath(namePath, changedNamePath) {\n if (!namePath || !changedNamePath || namePath.length !== changedNamePath.length) {\n return false;\n }\n return namePath.every(function (nameUnit, i) {\n return changedNamePath[i] === nameUnit;\n });\n}\nexport function isSimilar(source, target) {\n if (source === target) {\n return true;\n }\n if (!source && target || source && !target) {\n return false;\n }\n if (!source || !target || _typeof(source) !== 'object' || _typeof(target) !== 'object') {\n return false;\n }\n var sourceKeys = Object.keys(source);\n var targetKeys = Object.keys(target);\n var keys = new Set([].concat(sourceKeys, targetKeys));\n return _toConsumableArray(keys).every(function (key) {\n var sourceValue = source[key];\n var targetValue = target[key];\n if (typeof sourceValue === 'function' && typeof targetValue === 'function') {\n return true;\n }\n return sourceValue === targetValue;\n });\n}\nexport function defaultGetValueFromEvent(valuePropName) {\n var event = arguments.length <= 1 ? undefined : arguments[1];\n if (event && event.target && _typeof(event.target) === 'object' && valuePropName in event.target) {\n return event.target[valuePropName];\n }\n return event;\n}\n/**\n * Moves an array item from one position in an array to another.\n *\n * Note: This is a pure function so a new array will be returned, instead\n * of altering the array argument.\n *\n * @param array Array in which to move an item. (required)\n * @param moveIndex The index of the item to move. (required)\n * @param toIndex The index to move item at moveIndex to. (required)\n */\nexport function move(array, moveIndex, toIndex) {\n var length = array.length;\n if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {\n return array;\n }\n var item = array[moveIndex];\n var diff = moveIndex - toIndex;\n if (diff > 0) {\n // move left\n return [].concat(_toConsumableArray(array.slice(0, toIndex)), [item], _toConsumableArray(array.slice(toIndex, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, length)));\n }\n if (diff < 0) {\n // move right\n return [].concat(_toConsumableArray(array.slice(0, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, toIndex + 1)), [item], _toConsumableArray(array.slice(toIndex + 1, length)));\n }\n return array;\n}","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport RawAsyncValidator from 'async-validator';\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport { defaultValidateMessages } from './messages';\nimport { setValues } from './valueUtil';\n// Remove incorrect original ts define\nvar AsyncValidator = RawAsyncValidator;\n/**\n * Replace with template.\n * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo\n */\nfunction replaceMessage(template, kv) {\n return template.replace(/\\$\\{\\w+\\}/g, function (str) {\n var key = str.slice(2, -1);\n return kv[key];\n });\n}\nvar CODE_LOGIC_ERROR = 'CODE_LOGIC_ERROR';\nfunction validateRule(_x, _x2, _x3, _x4, _x5) {\n return _validateRule.apply(this, arguments);\n}\n/**\n * We use `async-validator` to validate the value.\n * But only check one value in a time to avoid namePath validate issue.\n */\nfunction _validateRule() {\n _validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {\n var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n cloneRule = _objectSpread({}, rule); // Bug of `async-validator`\n // https://github.com/react-component/field-form/issues/316\n // https://github.com/react-component/field-form/issues/313\n delete cloneRule.ruleIndex;\n if (cloneRule.validator) {\n originValidator = cloneRule.validator;\n cloneRule.validator = function () {\n try {\n return originValidator.apply(void 0, arguments);\n } catch (error) {\n console.error(error);\n return Promise.reject(CODE_LOGIC_ERROR);\n }\n };\n }\n // We should special handle array validate\n subRuleField = null;\n if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {\n subRuleField = cloneRule.defaultField;\n delete cloneRule.defaultField;\n }\n validator = new AsyncValidator(_defineProperty({}, name, [cloneRule]));\n messages = setValues({}, defaultValidateMessages, options.validateMessages);\n validator.messages(messages);\n result = [];\n _context2.prev = 9;\n _context2.next = 12;\n return Promise.resolve(validator.validate(_defineProperty({}, name, value), _objectSpread({}, options)));\n case 12:\n _context2.next = 17;\n break;\n case 14:\n _context2.prev = 14;\n _context2.t0 = _context2[\"catch\"](9);\n if (_context2.t0.errors) {\n result = _context2.t0.errors.map(function (_ref4, index) {\n var message = _ref4.message;\n var mergedMessage = message === CODE_LOGIC_ERROR ? messages.default : message;\n return /*#__PURE__*/React.isValidElement(mergedMessage) ?\n /*#__PURE__*/\n // Wrap ReactNode with `key`\n React.cloneElement(mergedMessage, {\n key: \"error_\".concat(index)\n }) : mergedMessage;\n });\n }\n case 17:\n if (!(!result.length && subRuleField)) {\n _context2.next = 22;\n break;\n }\n _context2.next = 20;\n return Promise.all(value.map(function (subValue, i) {\n return validateRule(\"\".concat(name, \".\").concat(i), subValue, subRuleField, options, messageVariables);\n }));\n case 20:\n subResults = _context2.sent;\n return _context2.abrupt(\"return\", subResults.reduce(function (prev, errors) {\n return [].concat(_toConsumableArray(prev), _toConsumableArray(errors));\n }, []));\n case 22:\n // Replace message with variables\n kv = _objectSpread(_objectSpread({}, rule), {}, {\n name: name,\n enum: (rule.enum || []).join(', ')\n }, messageVariables);\n fillVariableResult = result.map(function (error) {\n if (typeof error === 'string') {\n return replaceMessage(error, kv);\n }\n return error;\n });\n return _context2.abrupt(\"return\", fillVariableResult);\n case 25:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[9, 14]]);\n }));\n return _validateRule.apply(this, arguments);\n}\nexport function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {\n var name = namePath.join('.');\n // Fill rule with context\n var filledRules = rules.map(function (currentRule, ruleIndex) {\n var originValidatorFunc = currentRule.validator;\n var cloneRule = _objectSpread(_objectSpread({}, currentRule), {}, {\n ruleIndex: ruleIndex\n });\n // Replace validator if needed\n if (originValidatorFunc) {\n cloneRule.validator = function (rule, val, callback) {\n var hasPromise = false;\n // Wrap callback only accept when promise not provided\n var wrappedCallback = function wrappedCallback() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Wait a tick to make sure return type is a promise\n Promise.resolve().then(function () {\n warning(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');\n if (!hasPromise) {\n callback.apply(void 0, args);\n }\n });\n };\n // Get promise\n var promise = originValidatorFunc(rule, val, wrappedCallback);\n hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';\n /**\n * 1. Use promise as the first priority.\n * 2. If promise not exist, use callback with warning instead\n */\n warning(hasPromise, '`callback` is deprecated. Please return a promise instead.');\n if (hasPromise) {\n promise.then(function () {\n callback();\n }).catch(function (err) {\n callback(err || ' ');\n });\n }\n };\n }\n return cloneRule;\n }).sort(function (_ref, _ref2) {\n var w1 = _ref.warningOnly,\n i1 = _ref.ruleIndex;\n var w2 = _ref2.warningOnly,\n i2 = _ref2.ruleIndex;\n if (!!w1 === !!w2) {\n // Let keep origin order\n return i1 - i2;\n }\n if (w1) {\n return 1;\n }\n return -1;\n });\n // Do validate rules\n var summaryPromise;\n if (validateFirst === true) {\n // >>>>> Validate by serialization\n summaryPromise = new Promise( /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {\n var i, rule, errors;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n i = 0;\n case 1:\n if (!(i < filledRules.length)) {\n _context.next = 12;\n break;\n }\n rule = filledRules[i];\n _context.next = 5;\n return validateRule(name, value, rule, options, messageVariables);\n case 5:\n errors = _context.sent;\n if (!errors.length) {\n _context.next = 9;\n break;\n }\n reject([{\n errors: errors,\n rule: rule\n }]);\n return _context.abrupt(\"return\");\n case 9:\n i += 1;\n _context.next = 1;\n break;\n case 12:\n /* eslint-enable */\n resolve([]);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n return function (_x6, _x7) {\n return _ref3.apply(this, arguments);\n };\n }());\n } else {\n // >>>>> Validate by parallel\n var rulePromises = filledRules.map(function (rule) {\n return validateRule(name, value, rule, options, messageVariables).then(function (errors) {\n return {\n errors: errors,\n rule: rule\n };\n });\n });\n summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {\n // Always change to rejection for Field to catch\n return Promise.reject(errors);\n });\n }\n // Internal catch error to avoid console error log.\n summaryPromise.catch(function (e) {\n return e;\n });\n return summaryPromise;\n}\nfunction finishOnAllFailed(_x8) {\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction _finishOnAllFailed() {\n _finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rulePromises) {\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", Promise.all(rulePromises).then(function (errorsList) {\n var _ref5;\n var errors = (_ref5 = []).concat.apply(_ref5, _toConsumableArray(errorsList));\n return errors;\n }));\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3);\n }));\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction finishOnFirstFailed(_x9) {\n return _finishOnFirstFailed.apply(this, arguments);\n}\nfunction _finishOnFirstFailed() {\n _finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(rulePromises) {\n var count;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n count = 0;\n return _context4.abrupt(\"return\", new Promise(function (resolve) {\n rulePromises.forEach(function (promise) {\n promise.then(function (ruleError) {\n if (ruleError.errors.length) {\n resolve([ruleError]);\n }\n count += 1;\n if (count === rulePromises.length) {\n resolve([]);\n }\n });\n });\n }));\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4);\n }));\n return _finishOnFirstFailed.apply(this, arguments);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nvar _excluded = [\"name\"];\nimport toChildrenArray from \"rc-util/es/Children/toArray\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport FieldContext, { HOOK_MARK } from './FieldContext';\nimport { toArray } from './utils/typeUtil';\nimport { validateRules } from './utils/validateUtil';\nimport { containsNamePath, defaultGetValueFromEvent, getNamePath, getValue } from './utils/valueUtil';\nvar EMPTY_ERRORS = [];\nfunction requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {\n if (typeof shouldUpdate === 'function') {\n return shouldUpdate(prev, next, 'source' in info ? {\n source: info.source\n } : {});\n }\n return prevValue !== nextValue;\n}\n// We use Class instead of Hooks here since it will cost much code by using Hooks.\nvar Field = /*#__PURE__*/function (_React$Component) {\n _inherits(Field, _React$Component);\n var _super = _createSuper(Field);\n /**\n * Follow state should not management in State since it will async update by React.\n * This makes first render of form can not get correct state value.\n */\n\n /**\n * Mark when touched & validated. Currently only used for `dependencies`.\n * Note that we do not think field with `initialValue` is dirty\n * but this will be by `isFieldDirty` func.\n */\n\n // ============================== Subscriptions ==============================\n function Field(props) {\n var _this;\n _classCallCheck(this, Field);\n _this = _super.call(this, props);\n // Register on init\n _this.state = {\n resetCount: 0\n };\n _this.cancelRegisterFunc = null;\n _this.mounted = false;\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = null;\n _this.prevValidating = void 0;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.cancelRegister = function () {\n var _this$props = _this.props,\n preserve = _this$props.preserve,\n isListField = _this$props.isListField,\n name = _this$props.name;\n if (_this.cancelRegisterFunc) {\n _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));\n }\n _this.cancelRegisterFunc = null;\n };\n _this.getNamePath = function () {\n var _this$props2 = _this.props,\n name = _this$props2.name,\n fieldContext = _this$props2.fieldContext;\n var _fieldContext$prefixN = fieldContext.prefixName,\n prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;\n return name !== undefined ? [].concat(_toConsumableArray(prefixName), _toConsumableArray(name)) : [];\n };\n _this.getRules = function () {\n var _this$props3 = _this.props,\n _this$props3$rules = _this$props3.rules,\n rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,\n fieldContext = _this$props3.fieldContext;\n return rules.map(function (rule) {\n if (typeof rule === 'function') {\n return rule(fieldContext);\n }\n return rule;\n });\n };\n _this.refresh = function () {\n if (!_this.mounted) return;\n /**\n * Clean up current node.\n */\n _this.setState(function (_ref) {\n var resetCount = _ref.resetCount;\n return {\n resetCount: resetCount + 1\n };\n });\n };\n _this.triggerMetaEvent = function (destroy) {\n var onMetaChange = _this.props.onMetaChange;\n onMetaChange === null || onMetaChange === void 0 ? void 0 : onMetaChange(_objectSpread(_objectSpread({}, _this.getMeta()), {}, {\n destroy: destroy\n }));\n };\n _this.onStoreChange = function (prevStore, namePathList, info) {\n var _this$props4 = _this.props,\n shouldUpdate = _this$props4.shouldUpdate,\n _this$props4$dependen = _this$props4.dependencies,\n dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,\n onReset = _this$props4.onReset;\n var store = info.store;\n var namePath = _this.getNamePath();\n var prevValue = _this.getValue(prevStore);\n var curValue = _this.getValue(store);\n var namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n // `setFieldsValue` is a quick access to update related status\n if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) {\n _this.touched = true;\n _this.dirty = true;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n }\n switch (info.type) {\n case 'reset':\n if (!namePathList || namePathMatch) {\n // Clean up state\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n onReset === null || onReset === void 0 ? void 0 : onReset();\n _this.refresh();\n return;\n }\n break;\n /**\n * In case field with `preserve = false` nest deps like:\n * - A = 1 => show B\n * - B = 1 => show C\n * - Reset A, need clean B, C\n */\n case 'remove':\n {\n if (shouldUpdate) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'setField':\n {\n if (namePathMatch) {\n var data = info.data;\n if ('touched' in data) {\n _this.touched = data.touched;\n }\n if ('validating' in data && !('originRCField' in data)) {\n _this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if ('errors' in data) {\n _this.errors = data.errors || EMPTY_ERRORS;\n }\n if ('warnings' in data) {\n _this.warnings = data.warnings || EMPTY_ERRORS;\n }\n _this.dirty = true;\n _this.triggerMetaEvent();\n _this.reRender();\n return;\n }\n // Handle update by `setField` with `shouldUpdate`\n if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'dependenciesUpdate':\n {\n /**\n * Trigger when marked `dependencies` updated. Related fields will all update\n */\n var dependencyList = dependencies.map(getNamePath);\n // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be\n // emitted earlier and they will work there\n // If set it may cause unnecessary twice rerendering\n if (dependencyList.some(function (dependency) {\n return containsNamePath(info.relatedFields, dependency);\n })) {\n _this.reRender();\n return;\n }\n break;\n }\n default:\n // 1. If `namePath` exists in `namePathList`, means it's related value and should update\n // For example
\n // If `namePathList` is [['list']] (List value update), Field should be updated\n // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated\n // 2.\n // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,\n // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`\n // is not provided\n // 2.2 If `shouldUpdate` provided, use customize logic to update the field\n // else to check if value changed\n if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n if (shouldUpdate === true) {\n _this.reRender();\n }\n };\n _this.validateRules = function (options) {\n // We should fixed namePath & value to avoid developer change then by form function\n var namePath = _this.getNamePath();\n var currentValue = _this.getValue();\n // Force change to async to avoid rule OOD under renderProps field\n var rootPromise = Promise.resolve().then(function () {\n if (!_this.mounted) {\n return [];\n }\n var _this$props5 = _this.props,\n _this$props5$validate = _this$props5.validateFirst,\n validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate,\n messageVariables = _this$props5.messageVariables;\n var _ref2 = options || {},\n triggerName = _ref2.triggerName;\n var filteredRules = _this.getRules();\n if (triggerName) {\n filteredRules = filteredRules.filter(function (rule) {\n return rule;\n }).filter(function (rule) {\n var validateTrigger = rule.validateTrigger;\n if (!validateTrigger) {\n return true;\n }\n var triggerList = toArray(validateTrigger);\n return triggerList.includes(triggerName);\n });\n }\n var promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);\n promise.catch(function (e) {\n return e;\n }).then(function () {\n var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;\n if (_this.validatePromise === rootPromise) {\n var _ruleErrors$forEach;\n _this.validatePromise = null;\n // Get errors & warnings\n var nextErrors = [];\n var nextWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref3) {\n var warningOnly = _ref3.rule.warningOnly,\n _ref3$errors = _ref3.errors,\n errors = _ref3$errors === void 0 ? EMPTY_ERRORS : _ref3$errors;\n if (warningOnly) {\n nextWarnings.push.apply(nextWarnings, _toConsumableArray(errors));\n } else {\n nextErrors.push.apply(nextErrors, _toConsumableArray(errors));\n }\n });\n _this.errors = nextErrors;\n _this.warnings = nextWarnings;\n _this.triggerMetaEvent();\n _this.reRender();\n }\n });\n return promise;\n });\n _this.validatePromise = rootPromise;\n _this.dirty = true;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n // Force trigger re-render since we need sync renderProps with new meta\n _this.reRender();\n return rootPromise;\n };\n _this.isFieldValidating = function () {\n return !!_this.validatePromise;\n };\n _this.isFieldTouched = function () {\n return _this.touched;\n };\n _this.isFieldDirty = function () {\n // Touched or validate or has initialValue\n if (_this.dirty || _this.props.initialValue !== undefined) {\n return true;\n }\n // Form set initialValue\n var fieldContext = _this.props.fieldContext;\n var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),\n getInitialValue = _fieldContext$getInte.getInitialValue;\n if (getInitialValue(_this.getNamePath()) !== undefined) {\n return true;\n }\n return false;\n };\n _this.getErrors = function () {\n return _this.errors;\n };\n _this.getWarnings = function () {\n return _this.warnings;\n };\n _this.isListField = function () {\n return _this.props.isListField;\n };\n _this.isList = function () {\n return _this.props.isList;\n };\n _this.isPreserve = function () {\n return _this.props.preserve;\n };\n _this.getMeta = function () {\n // Make error & validating in cache to save perf\n _this.prevValidating = _this.isFieldValidating();\n var meta = {\n touched: _this.isFieldTouched(),\n validating: _this.prevValidating,\n errors: _this.errors,\n warnings: _this.warnings,\n name: _this.getNamePath()\n };\n return meta;\n };\n _this.getOnlyChild = function (children) {\n // Support render props\n if (typeof children === 'function') {\n var meta = _this.getMeta();\n return _objectSpread(_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.props.fieldContext))), {}, {\n isFunction: true\n });\n }\n // Filed element only\n var childList = toChildrenArray(children);\n if (childList.length !== 1 || ! /*#__PURE__*/React.isValidElement(childList[0])) {\n return {\n child: childList,\n isFunction: false\n };\n }\n return {\n child: childList[0],\n isFunction: false\n };\n };\n _this.getValue = function (store) {\n var getFieldsValue = _this.props.fieldContext.getFieldsValue;\n var namePath = _this.getNamePath();\n return getValue(store || getFieldsValue(true), namePath);\n };\n _this.getControlled = function () {\n var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _this$props6 = _this.props,\n trigger = _this$props6.trigger,\n validateTrigger = _this$props6.validateTrigger,\n getValueFromEvent = _this$props6.getValueFromEvent,\n normalize = _this$props6.normalize,\n valuePropName = _this$props6.valuePropName,\n getValueProps = _this$props6.getValueProps,\n fieldContext = _this$props6.fieldContext;\n var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n var namePath = _this.getNamePath();\n var getInternalHooks = fieldContext.getInternalHooks,\n getFieldsValue = fieldContext.getFieldsValue;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n dispatch = _getInternalHooks.dispatch;\n var value = _this.getValue();\n var mergedGetValueProps = getValueProps || function (val) {\n return _defineProperty({}, valuePropName, val);\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var originTriggerFunc = childProps[trigger];\n var control = _objectSpread(_objectSpread({}, childProps), mergedGetValueProps(value));\n // Add trigger\n control[trigger] = function () {\n // Mark as touched\n _this.touched = true;\n _this.dirty = true;\n _this.triggerMetaEvent();\n var newValue;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (getValueFromEvent) {\n newValue = getValueFromEvent.apply(void 0, args);\n } else {\n newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));\n }\n if (normalize) {\n newValue = normalize(newValue, value, getFieldsValue(true));\n }\n dispatch({\n type: 'updateValue',\n namePath: namePath,\n value: newValue\n });\n if (originTriggerFunc) {\n originTriggerFunc.apply(void 0, args);\n }\n };\n // Add validateTrigger\n var validateTriggerList = toArray(mergedValidateTrigger || []);\n validateTriggerList.forEach(function (triggerName) {\n // Wrap additional function of component, so that we can get latest value from store\n var originTrigger = control[triggerName];\n control[triggerName] = function () {\n if (originTrigger) {\n originTrigger.apply(void 0, arguments);\n }\n // Always use latest rules\n var rules = _this.props.rules;\n if (rules && rules.length) {\n // We dispatch validate to root,\n // since it will update related data with other field with same name\n dispatch({\n type: 'validateField',\n namePath: namePath,\n triggerName: triggerName\n });\n }\n };\n });\n return control;\n };\n if (props.fieldContext) {\n var getInternalHooks = props.fieldContext.getInternalHooks;\n var _getInternalHooks2 = getInternalHooks(HOOK_MARK),\n initEntityValue = _getInternalHooks2.initEntityValue;\n initEntityValue(_assertThisInitialized(_this));\n }\n return _this;\n }\n _createClass(Field, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n shouldUpdate = _this$props7.shouldUpdate,\n fieldContext = _this$props7.fieldContext;\n this.mounted = true;\n // Register on init\n if (fieldContext) {\n var getInternalHooks = fieldContext.getInternalHooks;\n var _getInternalHooks3 = getInternalHooks(HOOK_MARK),\n registerField = _getInternalHooks3.registerField;\n this.cancelRegisterFunc = registerField(this);\n }\n // One more render for component in case fields not ready\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n }, {\n key: \"reRender\",\n value: function reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n var resetCount = this.state.resetCount;\n var children = this.props.children;\n var _this$getOnlyChild = this.getOnlyChild(children),\n child = _this$getOnlyChild.child,\n isFunction = _this$getOnlyChild.isFunction;\n // Not need to `cloneElement` since user can handle this in render function self\n var returnChildNode;\n if (isFunction) {\n returnChildNode = child;\n } else if ( /*#__PURE__*/React.isValidElement(child)) {\n returnChildNode = /*#__PURE__*/React.cloneElement(child, this.getControlled(child.props));\n } else {\n warning(!child, '`children` of Field is not validate ReactElement.');\n returnChildNode = child;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: resetCount\n }, returnChildNode);\n }\n }]);\n return Field;\n}(React.Component);\nField.contextType = FieldContext;\nField.defaultProps = {\n trigger: 'onChange',\n valuePropName: 'value'\n};\nfunction WrapperField(_ref5) {\n var name = _ref5.name,\n restProps = _objectWithoutProperties(_ref5, _excluded);\n var fieldContext = React.useContext(FieldContext);\n var namePath = name !== undefined ? getNamePath(name) : undefined;\n var key = 'keep';\n if (!restProps.isListField) {\n key = \"_\".concat((namePath || []).join('_'));\n }\n // Warning if it's a directly list field.\n // We can still support multiple level field preserve.\n if (process.env.NODE_ENV !== 'production' && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {\n warning(false, '`preserve` should not apply on Form.List fields.');\n }\n return /*#__PURE__*/React.createElement(Field, _extends({\n key: key,\n name: namePath\n }, restProps, {\n fieldContext: fieldContext\n }));\n}\nexport default WrapperField;","import * as React from 'react';\nvar ListContext = /*#__PURE__*/React.createContext(null);\nexport default ListContext;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport FieldContext from './FieldContext';\nimport Field from './Field';\nimport { move as _move, getNamePath } from './utils/valueUtil';\nimport ListContext from './ListContext';\nvar List = function List(_ref) {\n var name = _ref.name,\n initialValue = _ref.initialValue,\n children = _ref.children,\n rules = _ref.rules,\n validateTrigger = _ref.validateTrigger;\n var context = React.useContext(FieldContext);\n var keyRef = React.useRef({\n keys: [],\n id: 0\n });\n var keyManager = keyRef.current;\n var prefixName = React.useMemo(function () {\n var parentPrefixName = getNamePath(context.prefixName) || [];\n return [].concat(_toConsumableArray(parentPrefixName), _toConsumableArray(getNamePath(name)));\n }, [context.prefixName, name]);\n var fieldContext = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, context), {}, {\n prefixName: prefixName\n });\n }, [context, prefixName]);\n // List context\n var listContext = React.useMemo(function () {\n return {\n getKey: function getKey(namePath) {\n var len = prefixName.length;\n var pathName = namePath[len];\n return [keyManager.keys[pathName], namePath.slice(len + 1)];\n }\n };\n }, [prefixName]);\n // User should not pass `children` as other type.\n if (typeof children !== 'function') {\n warning(false, 'Form.List only accepts function as children.');\n return null;\n }\n var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {\n var source = _ref2.source;\n if (source === 'internal') {\n return false;\n }\n return prevValue !== nextValue;\n };\n return /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: listContext\n }, /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: fieldContext\n }, /*#__PURE__*/React.createElement(Field, {\n name: [],\n shouldUpdate: shouldUpdate,\n rules: rules,\n validateTrigger: validateTrigger,\n initialValue: initialValue,\n isList: true\n }, function (_ref3, meta) {\n var _ref3$value = _ref3.value,\n value = _ref3$value === void 0 ? [] : _ref3$value,\n onChange = _ref3.onChange;\n var getFieldValue = context.getFieldValue;\n var getNewValue = function getNewValue() {\n var values = getFieldValue(prefixName || []);\n return values || [];\n };\n /**\n * Always get latest value in case user update fields by `form` api.\n */\n var operations = {\n add: function add(defaultValue, index) {\n // Mapping keys\n var newValue = getNewValue();\n if (index >= 0 && index <= newValue.length) {\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys.slice(0, index)), [keyManager.id], _toConsumableArray(keyManager.keys.slice(index)));\n onChange([].concat(_toConsumableArray(newValue.slice(0, index)), [defaultValue], _toConsumableArray(newValue.slice(index))));\n } else {\n if (process.env.NODE_ENV !== 'production' && (index < 0 || index > newValue.length)) {\n warning(false, 'The second parameter of the add function should be a valid positive number.');\n }\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys), [keyManager.id]);\n onChange([].concat(_toConsumableArray(newValue), [defaultValue]));\n }\n keyManager.id += 1;\n },\n remove: function remove(index) {\n var newValue = getNewValue();\n var indexSet = new Set(Array.isArray(index) ? index : [index]);\n if (indexSet.size <= 0) {\n return;\n }\n keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {\n return !indexSet.has(keysIndex);\n });\n // Trigger store change\n onChange(newValue.filter(function (_, valueIndex) {\n return !indexSet.has(valueIndex);\n }));\n },\n move: function move(from, to) {\n if (from === to) {\n return;\n }\n var newValue = getNewValue();\n // Do not handle out of range\n if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {\n return;\n }\n keyManager.keys = _move(keyManager.keys, from, to);\n // Trigger store change\n onChange(_move(newValue, from, to));\n }\n };\n var listValue = value || [];\n if (!Array.isArray(listValue)) {\n listValue = [];\n if (process.env.NODE_ENV !== 'production') {\n warning(false, \"Current value of '\".concat(prefixName.join(' > '), \"' is not an array type.\"));\n }\n }\n return children(listValue.map(function (__, index) {\n var key = keyManager.keys[index];\n if (key === undefined) {\n keyManager.keys[index] = keyManager.id;\n key = keyManager.keys[index];\n keyManager.id += 1;\n }\n return {\n name: index,\n key: key,\n isListField: true\n };\n }), operations, meta);\n })));\n};\nexport default List;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar SPLIT = '__@field_split__';\n/**\n * Convert name path into string to fast the fetch speed of Map.\n */\nfunction normalize(namePath) {\n return namePath.map(function (cell) {\n return \"\".concat(_typeof(cell), \":\").concat(cell);\n })\n // Magic split\n .join(SPLIT);\n}\n/**\n * NameMap like a `Map` but accepts `string[]` as key.\n */\nvar NameMap = /*#__PURE__*/function () {\n function NameMap() {\n _classCallCheck(this, NameMap);\n this.kvs = new Map();\n }\n _createClass(NameMap, [{\n key: \"set\",\n value: function set(key, value) {\n this.kvs.set(normalize(key), value);\n }\n }, {\n key: \"get\",\n value: function get(key) {\n return this.kvs.get(normalize(key));\n }\n }, {\n key: \"update\",\n value: function update(key, updater) {\n var origin = this.get(key);\n var next = updater(origin);\n if (!next) {\n this.delete(key);\n } else {\n this.set(key, next);\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n this.kvs.delete(normalize(key));\n }\n // Since we only use this in test, let simply realize this\n }, {\n key: \"map\",\n value: function map(callback) {\n return _toConsumableArray(this.kvs.entries()).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n var cells = key.split(SPLIT);\n return callback({\n key: cells.map(function (cell) {\n var _cell$match = cell.match(/^([^:]*):(.*)$/),\n _cell$match2 = _slicedToArray(_cell$match, 3),\n type = _cell$match2[1],\n unit = _cell$match2[2];\n return type === 'number' ? Number(unit) : unit;\n }),\n value: value\n });\n });\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var json = {};\n this.map(function (_ref3) {\n var key = _ref3.key,\n value = _ref3.value;\n json[key.join('.')] = value;\n return null;\n });\n return json;\n }\n }]);\n return NameMap;\n}();\nexport default NameMap;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nvar _excluded = [\"name\", \"errors\"];\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { HOOK_MARK } from './FieldContext';\nimport { allPromiseFinish } from './utils/asyncUtil';\nimport cloneDeep from './utils/cloneDeep';\nimport { defaultValidateMessages } from './utils/messages';\nimport NameMap from './utils/NameMap';\nimport { cloneByNamePathList, containsNamePath, getNamePath, getValue, matchNamePath, setValue, setValues } from './utils/valueUtil';\nexport var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {\n var _this = this;\n _classCallCheck(this, FormStore);\n this.formHooked = false;\n this.forceRootUpdate = void 0;\n this.subscribable = true;\n this.store = {};\n this.fieldEntities = [];\n this.initialValues = {};\n this.callbacks = {};\n this.validateMessages = null;\n this.preserve = null;\n this.lastValidatePromise = null;\n this.getForm = function () {\n return {\n getFieldValue: _this.getFieldValue,\n getFieldsValue: _this.getFieldsValue,\n getFieldError: _this.getFieldError,\n getFieldWarning: _this.getFieldWarning,\n getFieldsError: _this.getFieldsError,\n isFieldsTouched: _this.isFieldsTouched,\n isFieldTouched: _this.isFieldTouched,\n isFieldValidating: _this.isFieldValidating,\n isFieldsValidating: _this.isFieldsValidating,\n resetFields: _this.resetFields,\n setFields: _this.setFields,\n setFieldValue: _this.setFieldValue,\n setFieldsValue: _this.setFieldsValue,\n validateFields: _this.validateFields,\n submit: _this.submit,\n _init: true,\n getInternalHooks: _this.getInternalHooks\n };\n };\n this.getInternalHooks = function (key) {\n if (key === HOOK_MARK) {\n _this.formHooked = true;\n return {\n dispatch: _this.dispatch,\n initEntityValue: _this.initEntityValue,\n registerField: _this.registerField,\n useSubscribe: _this.useSubscribe,\n setInitialValues: _this.setInitialValues,\n destroyForm: _this.destroyForm,\n setCallbacks: _this.setCallbacks,\n setValidateMessages: _this.setValidateMessages,\n getFields: _this.getFields,\n setPreserve: _this.setPreserve,\n getInitialValue: _this.getInitialValue,\n registerWatch: _this.registerWatch\n };\n }\n warning(false, '`getInternalHooks` is internal usage. Should not call directly.');\n return null;\n };\n this.useSubscribe = function (subscribable) {\n _this.subscribable = subscribable;\n };\n this.prevWithoutPreserves = null;\n this.setInitialValues = function (initialValues, init) {\n _this.initialValues = initialValues || {};\n if (init) {\n var _this$prevWithoutPres;\n var nextStore = setValues({}, initialValues, _this.store);\n // We will take consider prev form unmount fields.\n // When the field is not `preserve`, we need fill this with initialValues instead of store.\n // eslint-disable-next-line array-callback-return\n (_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 ? void 0 : _this$prevWithoutPres.map(function (_ref) {\n var namePath = _ref.key;\n nextStore = setValue(nextStore, namePath, getValue(initialValues, namePath));\n });\n _this.prevWithoutPreserves = null;\n _this.updateStore(nextStore);\n }\n };\n this.destroyForm = function () {\n var prevWithoutPreserves = new NameMap();\n _this.getFieldEntities(true).forEach(function (entity) {\n if (!_this.isMergedPreserve(entity.isPreserve())) {\n prevWithoutPreserves.set(entity.getNamePath(), true);\n }\n });\n _this.prevWithoutPreserves = prevWithoutPreserves;\n };\n this.getInitialValue = function (namePath) {\n var initValue = getValue(_this.initialValues, namePath);\n // Not cloneDeep when without `namePath`\n return namePath.length ? cloneDeep(initValue) : initValue;\n };\n this.setCallbacks = function (callbacks) {\n _this.callbacks = callbacks;\n };\n this.setValidateMessages = function (validateMessages) {\n _this.validateMessages = validateMessages;\n };\n this.setPreserve = function (preserve) {\n _this.preserve = preserve;\n };\n this.watchList = [];\n this.registerWatch = function (callback) {\n _this.watchList.push(callback);\n return function () {\n _this.watchList = _this.watchList.filter(function (fn) {\n return fn !== callback;\n });\n };\n };\n this.notifyWatch = function () {\n var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // No need to cost perf when nothing need to watch\n if (_this.watchList.length) {\n var values = _this.getFieldsValue();\n _this.watchList.forEach(function (callback) {\n callback(values, namePath);\n });\n }\n };\n this.timeoutId = null;\n this.warningUnhooked = function () {\n if (process.env.NODE_ENV !== 'production' && !_this.timeoutId && typeof window !== 'undefined') {\n _this.timeoutId = setTimeout(function () {\n _this.timeoutId = null;\n if (!_this.formHooked) {\n warning(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');\n }\n });\n }\n };\n this.updateStore = function (nextStore) {\n _this.store = nextStore;\n };\n this.getFieldEntities = function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!pure) {\n return _this.fieldEntities;\n }\n return _this.fieldEntities.filter(function (field) {\n return field.getNamePath().length;\n });\n };\n this.getFieldsMap = function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cache = new NameMap();\n _this.getFieldEntities(pure).forEach(function (field) {\n var namePath = field.getNamePath();\n cache.set(namePath, field);\n });\n return cache;\n };\n this.getFieldEntitiesForNamePathList = function (nameList) {\n if (!nameList) {\n return _this.getFieldEntities(true);\n }\n var cache = _this.getFieldsMap(true);\n return nameList.map(function (name) {\n var namePath = getNamePath(name);\n return cache.get(namePath) || {\n INVALIDATE_NAME_PATH: getNamePath(name)\n };\n });\n };\n this.getFieldsValue = function (nameList, filterFunc) {\n _this.warningUnhooked();\n if (nameList === true && !filterFunc) {\n return _this.store;\n }\n var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(nameList) ? nameList : null);\n var filteredNameList = [];\n fieldEntities.forEach(function (entity) {\n var _entity$isListField;\n var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();\n // Ignore when it's a list item and not specific the namePath,\n // since parent field is already take in count\n if (!nameList && ((_entity$isListField = entity.isListField) === null || _entity$isListField === void 0 ? void 0 : _entity$isListField.call(entity))) {\n return;\n }\n if (!filterFunc) {\n filteredNameList.push(namePath);\n } else {\n var meta = 'getMeta' in entity ? entity.getMeta() : null;\n if (filterFunc(meta)) {\n filteredNameList.push(namePath);\n }\n }\n });\n return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));\n };\n this.getFieldValue = function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n return getValue(_this.store, namePath);\n };\n this.getFieldsError = function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);\n return fieldEntities.map(function (entity, index) {\n if (entity && !('INVALIDATE_NAME_PATH' in entity)) {\n return {\n name: entity.getNamePath(),\n errors: entity.getErrors(),\n warnings: entity.getWarnings()\n };\n }\n return {\n name: getNamePath(nameList[index]),\n errors: [],\n warnings: []\n };\n });\n };\n this.getFieldError = function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.errors;\n };\n this.getFieldWarning = function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.warnings;\n };\n this.isFieldsTouched = function () {\n _this.warningUnhooked();\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var arg0 = args[0],\n arg1 = args[1];\n var namePathList;\n var isAllFieldsTouched = false;\n if (args.length === 0) {\n namePathList = null;\n } else if (args.length === 1) {\n if (Array.isArray(arg0)) {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = false;\n } else {\n namePathList = null;\n isAllFieldsTouched = arg0;\n }\n } else {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = arg1;\n }\n var fieldEntities = _this.getFieldEntities(true);\n var isFieldTouched = function isFieldTouched(field) {\n return field.isFieldTouched();\n };\n // ===== Will get fully compare when not config namePathList =====\n if (!namePathList) {\n return isAllFieldsTouched ? fieldEntities.every(isFieldTouched) : fieldEntities.some(isFieldTouched);\n }\n // Generate a nest tree for validate\n var map = new NameMap();\n namePathList.forEach(function (shortNamePath) {\n map.set(shortNamePath, []);\n });\n fieldEntities.forEach(function (field) {\n var fieldNamePath = field.getNamePath();\n // Find matched entity and put into list\n namePathList.forEach(function (shortNamePath) {\n if (shortNamePath.every(function (nameUnit, i) {\n return fieldNamePath[i] === nameUnit;\n })) {\n map.update(shortNamePath, function (list) {\n return [].concat(_toConsumableArray(list), [field]);\n });\n }\n });\n });\n // Check if NameMap value is touched\n var isNamePathListTouched = function isNamePathListTouched(entities) {\n return entities.some(isFieldTouched);\n };\n var namePathListEntities = map.map(function (_ref2) {\n var value = _ref2.value;\n return value;\n });\n return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);\n };\n this.isFieldTouched = function (name) {\n _this.warningUnhooked();\n return _this.isFieldsTouched([name]);\n };\n this.isFieldsValidating = function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntities();\n if (!nameList) {\n return fieldEntities.some(function (testField) {\n return testField.isFieldValidating();\n });\n }\n var namePathList = nameList.map(getNamePath);\n return fieldEntities.some(function (testField) {\n var fieldNamePath = testField.getNamePath();\n return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();\n });\n };\n this.isFieldValidating = function (name) {\n _this.warningUnhooked();\n return _this.isFieldsValidating([name]);\n };\n this.resetWithFieldInitialValue = function () {\n var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Create cache\n var cache = new NameMap();\n var fieldEntities = _this.getFieldEntities(true);\n fieldEntities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n var namePath = field.getNamePath();\n // Record only if has `initialValue`\n if (initialValue !== undefined) {\n var records = cache.get(namePath) || new Set();\n records.add({\n entity: field,\n value: initialValue\n });\n cache.set(namePath, records);\n }\n });\n // Reset\n var resetWithFields = function resetWithFields(entities) {\n entities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = field.getNamePath();\n var formInitialValue = _this.getInitialValue(namePath);\n if (formInitialValue !== undefined) {\n // Warning if conflict with form initialValues and do not modify value\n warning(false, \"Form already set 'initialValues' with path '\".concat(namePath.join('.'), \"'. Field can not overwrite it.\"));\n } else {\n var records = cache.get(namePath);\n if (records && records.size > 1) {\n // Warning if multiple field set `initialValue`and do not modify value\n warning(false, \"Multiple Field with path '\".concat(namePath.join('.'), \"' set 'initialValue'. Can not decide which one to pick.\"));\n } else if (records) {\n var originValue = _this.getFieldValue(namePath);\n // Set `initialValue`\n if (!info.skipExist || originValue === undefined) {\n _this.updateStore(setValue(_this.store, namePath, _toConsumableArray(records)[0].value));\n }\n }\n }\n }\n });\n };\n var requiredFieldEntities;\n if (info.entities) {\n requiredFieldEntities = info.entities;\n } else if (info.namePathList) {\n requiredFieldEntities = [];\n info.namePathList.forEach(function (namePath) {\n var records = cache.get(namePath);\n if (records) {\n var _requiredFieldEntitie;\n (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, _toConsumableArray(_toConsumableArray(records).map(function (r) {\n return r.entity;\n })));\n }\n });\n } else {\n requiredFieldEntities = fieldEntities;\n }\n resetWithFields(requiredFieldEntities);\n };\n this.resetFields = function (nameList) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (!nameList) {\n _this.updateStore(setValues({}, _this.initialValues));\n _this.resetWithFieldInitialValue();\n _this.notifyObservers(prevStore, null, {\n type: 'reset'\n });\n _this.notifyWatch();\n return;\n }\n // Reset by `nameList`\n var namePathList = nameList.map(getNamePath);\n namePathList.forEach(function (namePath) {\n var initialValue = _this.getInitialValue(namePath);\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n });\n _this.resetWithFieldInitialValue({\n namePathList: namePathList\n });\n _this.notifyObservers(prevStore, namePathList, {\n type: 'reset'\n });\n _this.notifyWatch(namePathList);\n };\n this.setFields = function (fields) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n var namePathList = [];\n fields.forEach(function (fieldData) {\n var name = fieldData.name,\n errors = fieldData.errors,\n data = _objectWithoutProperties(fieldData, _excluded);\n var namePath = getNamePath(name);\n namePathList.push(namePath);\n // Value\n if ('value' in data) {\n _this.updateStore(setValue(_this.store, namePath, data.value));\n }\n _this.notifyObservers(prevStore, [namePath], {\n type: 'setField',\n data: fieldData\n });\n });\n _this.notifyWatch(namePathList);\n };\n this.getFields = function () {\n var entities = _this.getFieldEntities(true);\n var fields = entities.map(function (field) {\n var namePath = field.getNamePath();\n var meta = field.getMeta();\n var fieldData = _objectSpread(_objectSpread({}, meta), {}, {\n name: namePath,\n value: _this.getFieldValue(namePath)\n });\n Object.defineProperty(fieldData, 'originRCField', {\n value: true\n });\n return fieldData;\n });\n return fields;\n };\n this.initEntityValue = function (entity) {\n var initialValue = entity.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = entity.getNamePath();\n var prevValue = getValue(_this.store, namePath);\n if (prevValue === undefined) {\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n }\n }\n };\n this.isMergedPreserve = function (fieldPreserve) {\n var mergedPreserve = fieldPreserve !== undefined ? fieldPreserve : _this.preserve;\n return mergedPreserve !== null && mergedPreserve !== void 0 ? mergedPreserve : true;\n };\n this.registerField = function (entity) {\n _this.fieldEntities.push(entity);\n var namePath = entity.getNamePath();\n _this.notifyWatch([namePath]);\n // Set initial values\n if (entity.props.initialValue !== undefined) {\n var prevStore = _this.store;\n _this.resetWithFieldInitialValue({\n entities: [entity],\n skipExist: true\n });\n _this.notifyObservers(prevStore, [entity.getNamePath()], {\n type: 'valueUpdate',\n source: 'internal'\n });\n }\n // un-register field callback\n return function (isListField, preserve) {\n var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n _this.fieldEntities = _this.fieldEntities.filter(function (item) {\n return item !== entity;\n });\n // Clean up store value if not preserve\n if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {\n var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);\n if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {\n return (\n // Only reset when no namePath exist\n !matchNamePath(field.getNamePath(), namePath)\n );\n })) {\n var _prevStore = _this.store;\n _this.updateStore(setValue(_prevStore, namePath, defaultValue, true));\n // Notify that field is unmount\n _this.notifyObservers(_prevStore, [namePath], {\n type: 'remove'\n });\n // Dependencies update\n _this.triggerDependenciesUpdate(_prevStore, namePath);\n }\n }\n _this.notifyWatch([namePath]);\n };\n };\n this.dispatch = function (action) {\n switch (action.type) {\n case 'updateValue':\n {\n var namePath = action.namePath,\n value = action.value;\n _this.updateValue(namePath, value);\n break;\n }\n case 'validateField':\n {\n var _namePath = action.namePath,\n triggerName = action.triggerName;\n _this.validateFields([_namePath], {\n triggerName: triggerName\n });\n break;\n }\n default:\n // Currently we don't have other action. Do nothing.\n }\n };\n this.notifyObservers = function (prevStore, namePathList, info) {\n if (_this.subscribable) {\n var mergedInfo = _objectSpread(_objectSpread({}, info), {}, {\n store: _this.getFieldsValue(true)\n });\n _this.getFieldEntities().forEach(function (_ref3) {\n var onStoreChange = _ref3.onStoreChange;\n onStoreChange(prevStore, namePathList, mergedInfo);\n });\n } else {\n _this.forceRootUpdate();\n }\n };\n this.triggerDependenciesUpdate = function (prevStore, namePath) {\n var childrenFields = _this.getDependencyChildrenFields(namePath);\n if (childrenFields.length) {\n _this.validateFields(childrenFields);\n }\n _this.notifyObservers(prevStore, childrenFields, {\n type: 'dependenciesUpdate',\n relatedFields: [namePath].concat(_toConsumableArray(childrenFields))\n });\n return childrenFields;\n };\n this.updateValue = function (name, value) {\n var namePath = getNamePath(name);\n var prevStore = _this.store;\n _this.updateStore(setValue(_this.store, namePath, value));\n _this.notifyObservers(prevStore, [namePath], {\n type: 'valueUpdate',\n source: 'internal'\n });\n _this.notifyWatch([namePath]);\n // Dependencies update\n var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);\n // trigger callback function\n var onValuesChange = _this.callbacks.onValuesChange;\n if (onValuesChange) {\n var changedValues = cloneByNamePathList(_this.store, [namePath]);\n onValuesChange(changedValues, _this.getFieldsValue());\n }\n _this.triggerOnFieldsChange([namePath].concat(_toConsumableArray(childrenFields)));\n };\n this.setFieldsValue = function (store) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (store) {\n var nextStore = setValues(_this.store, store);\n _this.updateStore(nextStore);\n }\n _this.notifyObservers(prevStore, null, {\n type: 'valueUpdate',\n source: 'external'\n });\n _this.notifyWatch();\n };\n this.setFieldValue = function (name, value) {\n _this.setFields([{\n name: name,\n value: value\n }]);\n };\n this.getDependencyChildrenFields = function (rootNamePath) {\n var children = new Set();\n var childrenFields = [];\n var dependencies2fields = new NameMap();\n /**\n * Generate maps\n * Can use cache to save perf if user report performance issue with this\n */\n _this.getFieldEntities().forEach(function (field) {\n var dependencies = field.props.dependencies;\n (dependencies || []).forEach(function (dependency) {\n var dependencyNamePath = getNamePath(dependency);\n dependencies2fields.update(dependencyNamePath, function () {\n var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();\n fields.add(field);\n return fields;\n });\n });\n });\n var fillChildren = function fillChildren(namePath) {\n var fields = dependencies2fields.get(namePath) || new Set();\n fields.forEach(function (field) {\n if (!children.has(field)) {\n children.add(field);\n var fieldNamePath = field.getNamePath();\n if (field.isFieldDirty() && fieldNamePath.length) {\n childrenFields.push(fieldNamePath);\n fillChildren(fieldNamePath);\n }\n }\n });\n };\n fillChildren(rootNamePath);\n return childrenFields;\n };\n this.triggerOnFieldsChange = function (namePathList, filedErrors) {\n var onFieldsChange = _this.callbacks.onFieldsChange;\n if (onFieldsChange) {\n var fields = _this.getFields();\n /**\n * Fill errors since `fields` may be replaced by controlled fields\n */\n if (filedErrors) {\n var cache = new NameMap();\n filedErrors.forEach(function (_ref4) {\n var name = _ref4.name,\n errors = _ref4.errors;\n cache.set(name, errors);\n });\n fields.forEach(function (field) {\n // eslint-disable-next-line no-param-reassign\n field.errors = cache.get(field.name) || field.errors;\n });\n }\n var changedFields = fields.filter(function (_ref5) {\n var fieldName = _ref5.name;\n return containsNamePath(namePathList, fieldName);\n });\n onFieldsChange(changedFields, fields);\n }\n };\n this.validateFields = function (nameList, options) {\n _this.warningUnhooked();\n var provideNameList = !!nameList;\n var namePathList = provideNameList ? nameList.map(getNamePath) : [];\n // Collect result in promise list\n var promiseList = [];\n _this.getFieldEntities(true).forEach(function (field) {\n // Add field if not provide `nameList`\n if (!provideNameList) {\n namePathList.push(field.getNamePath());\n }\n /**\n * Recursive validate if configured.\n * TODO: perf improvement @zombieJ\n */\n if ((options === null || options === void 0 ? void 0 : options.recursive) && provideNameList) {\n var namePath = field.getNamePath();\n if (\n // nameList[i] === undefined 说明是以 nameList 开头的\n // ['name'] -> ['name','list']\n namePath.every(function (nameUnit, i) {\n return nameList[i] === nameUnit || nameList[i] === undefined;\n })) {\n namePathList.push(namePath);\n }\n }\n // Skip if without rule\n if (!field.props.rules || !field.props.rules.length) {\n return;\n }\n var fieldNamePath = field.getNamePath();\n // Add field validate rule in to promise list\n if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) {\n var promise = field.validateRules(_objectSpread({\n validateMessages: _objectSpread(_objectSpread({}, defaultValidateMessages), _this.validateMessages)\n }, options));\n // Wrap promise with field\n promiseList.push(promise.then(function () {\n return {\n name: fieldNamePath,\n errors: [],\n warnings: []\n };\n }).catch(function (ruleErrors) {\n var _ruleErrors$forEach;\n var mergedErrors = [];\n var mergedWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref6) {\n var warningOnly = _ref6.rule.warningOnly,\n errors = _ref6.errors;\n if (warningOnly) {\n mergedWarnings.push.apply(mergedWarnings, _toConsumableArray(errors));\n } else {\n mergedErrors.push.apply(mergedErrors, _toConsumableArray(errors));\n }\n });\n if (mergedErrors.length) {\n return Promise.reject({\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n });\n }\n return {\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n };\n }));\n }\n });\n var summaryPromise = allPromiseFinish(promiseList);\n _this.lastValidatePromise = summaryPromise;\n // Notify fields with rule that validate has finished and need update\n summaryPromise.catch(function (results) {\n return results;\n }).then(function (results) {\n var resultNamePathList = results.map(function (_ref7) {\n var name = _ref7.name;\n return name;\n });\n _this.notifyObservers(_this.store, resultNamePathList, {\n type: 'validateFinish'\n });\n _this.triggerOnFieldsChange(resultNamePathList, results);\n });\n var returnPromise = summaryPromise.then(function () {\n if (_this.lastValidatePromise === summaryPromise) {\n return Promise.resolve(_this.getFieldsValue(namePathList));\n }\n return Promise.reject([]);\n }).catch(function (results) {\n var errorList = results.filter(function (result) {\n return result && result.errors.length;\n });\n return Promise.reject({\n values: _this.getFieldsValue(namePathList),\n errorFields: errorList,\n outOfDate: _this.lastValidatePromise !== summaryPromise\n });\n });\n // Do not throw in console\n returnPromise.catch(function (e) {\n return e;\n });\n return returnPromise;\n };\n this.submit = function () {\n _this.warningUnhooked();\n _this.validateFields().then(function (values) {\n var onFinish = _this.callbacks.onFinish;\n if (onFinish) {\n try {\n onFinish(values);\n } catch (err) {\n // Should print error if user `onFinish` callback failed\n console.error(err);\n }\n }\n }).catch(function (e) {\n var onFinishFailed = _this.callbacks.onFinishFailed;\n if (onFinishFailed) {\n onFinishFailed(e);\n }\n });\n };\n this.forceRootUpdate = forceRootUpdate;\n});\nfunction useForm(form) {\n var formRef = React.useRef();\n var _React$useState = React.useState({}),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n forceUpdate = _React$useState2[1];\n if (!formRef.current) {\n if (form) {\n formRef.current = form;\n } else {\n // Create a new FormStore if not provided\n var forceReRender = function forceReRender() {\n forceUpdate({});\n };\n var formStore = new FormStore(forceReRender);\n formRef.current = formStore.getForm();\n }\n }\n return [formRef.current];\n}\nexport default useForm;","export function allPromiseFinish(promiseList) {\n var hasError = false;\n var count = promiseList.length;\n var results = [];\n if (!promiseList.length) {\n return Promise.resolve([]);\n }\n return new Promise(function (resolve, reject) {\n promiseList.forEach(function (promise, index) {\n promise.catch(function (e) {\n hasError = true;\n return e;\n }).then(function (result) {\n count -= 1;\n results[index] = result;\n if (count > 0) {\n return;\n }\n if (hasError) {\n reject(results);\n }\n resolve(results);\n });\n });\n });\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nvar FormContext = /*#__PURE__*/React.createContext({\n triggerFormChange: function triggerFormChange() {},\n triggerFormFinish: function triggerFormFinish() {},\n registerForm: function registerForm() {},\n unregisterForm: function unregisterForm() {}\n});\nvar FormProvider = function FormProvider(_ref) {\n var validateMessages = _ref.validateMessages,\n onFormChange = _ref.onFormChange,\n onFormFinish = _ref.onFormFinish,\n children = _ref.children;\n var formContext = React.useContext(FormContext);\n var formsRef = React.useRef({});\n return /*#__PURE__*/React.createElement(FormContext.Provider, {\n value: _objectSpread(_objectSpread({}, formContext), {}, {\n validateMessages: _objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages),\n // =========================================================\n // = Global Form Control =\n // =========================================================\n triggerFormChange: function triggerFormChange(name, changedFields) {\n if (onFormChange) {\n onFormChange(name, {\n changedFields: changedFields,\n forms: formsRef.current\n });\n }\n formContext.triggerFormChange(name, changedFields);\n },\n triggerFormFinish: function triggerFormFinish(name, values) {\n if (onFormFinish) {\n onFormFinish(name, {\n values: values,\n forms: formsRef.current\n });\n }\n formContext.triggerFormFinish(name, values);\n },\n registerForm: function registerForm(name, form) {\n if (name) {\n formsRef.current = _objectSpread(_objectSpread({}, formsRef.current), {}, _defineProperty({}, name, form));\n }\n formContext.registerForm(name, form);\n },\n unregisterForm: function unregisterForm(name) {\n var newForms = _objectSpread({}, formsRef.current);\n delete newForms[name];\n formsRef.current = newForms;\n formContext.unregisterForm(name);\n }\n })\n }, children);\n};\nexport { FormProvider };\nexport default FormContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"name\", \"initialValues\", \"fields\", \"form\", \"preserve\", \"children\", \"component\", \"validateMessages\", \"validateTrigger\", \"onValuesChange\", \"onFieldsChange\", \"onFinish\", \"onFinishFailed\"];\nimport * as React from 'react';\nimport useForm from './useForm';\nimport FieldContext, { HOOK_MARK } from './FieldContext';\nimport FormContext from './FormContext';\nimport { isSimilar } from './utils/valueUtil';\nvar Form = function Form(_ref, ref) {\n var name = _ref.name,\n initialValues = _ref.initialValues,\n fields = _ref.fields,\n form = _ref.form,\n preserve = _ref.preserve,\n children = _ref.children,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? 'form' : _ref$component,\n validateMessages = _ref.validateMessages,\n _ref$validateTrigger = _ref.validateTrigger,\n validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,\n onValuesChange = _ref.onValuesChange,\n _onFieldsChange = _ref.onFieldsChange,\n _onFinish = _ref.onFinish,\n onFinishFailed = _ref.onFinishFailed,\n restProps = _objectWithoutProperties(_ref, _excluded);\n var formContext = React.useContext(FormContext);\n // We customize handle event since Context will makes all the consumer re-render:\n // https://reactjs.org/docs/context.html#contextprovider\n var _useForm = useForm(form),\n _useForm2 = _slicedToArray(_useForm, 1),\n formInstance = _useForm2[0];\n var _formInstance$getInte = formInstance.getInternalHooks(HOOK_MARK),\n useSubscribe = _formInstance$getInte.useSubscribe,\n setInitialValues = _formInstance$getInte.setInitialValues,\n setCallbacks = _formInstance$getInte.setCallbacks,\n setValidateMessages = _formInstance$getInte.setValidateMessages,\n setPreserve = _formInstance$getInte.setPreserve,\n destroyForm = _formInstance$getInte.destroyForm;\n // Pass ref with form instance\n React.useImperativeHandle(ref, function () {\n return formInstance;\n });\n // Register form into Context\n React.useEffect(function () {\n formContext.registerForm(name, formInstance);\n return function () {\n formContext.unregisterForm(name);\n };\n }, [formContext, formInstance, name]);\n // Pass props to store\n setValidateMessages(_objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages));\n setCallbacks({\n onValuesChange: onValuesChange,\n onFieldsChange: function onFieldsChange(changedFields) {\n formContext.triggerFormChange(name, changedFields);\n if (_onFieldsChange) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n _onFieldsChange.apply(void 0, [changedFields].concat(rest));\n }\n },\n onFinish: function onFinish(values) {\n formContext.triggerFormFinish(name, values);\n if (_onFinish) {\n _onFinish(values);\n }\n },\n onFinishFailed: onFinishFailed\n });\n setPreserve(preserve);\n // Set initial value, init store value when first mount\n var mountRef = React.useRef(null);\n setInitialValues(initialValues, !mountRef.current);\n if (!mountRef.current) {\n mountRef.current = true;\n }\n React.useEffect(function () {\n return destroyForm;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n // Prepare children by `children` type\n var childrenNode;\n var childrenRenderProps = typeof children === 'function';\n if (childrenRenderProps) {\n var values = formInstance.getFieldsValue(true);\n childrenNode = children(values, formInstance);\n } else {\n childrenNode = children;\n }\n // Not use subscribe when using render props\n useSubscribe(!childrenRenderProps);\n // Listen if fields provided. We use ref to save prev data here to avoid additional render\n var prevFieldsRef = React.useRef();\n React.useEffect(function () {\n if (!isSimilar(prevFieldsRef.current || [], fields || [])) {\n formInstance.setFields(fields || []);\n }\n prevFieldsRef.current = fields;\n }, [fields, formInstance]);\n var formContextValue = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, formInstance), {}, {\n validateTrigger: validateTrigger\n });\n }, [formInstance, validateTrigger]);\n var wrapperNode = /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: formContextValue\n }, childrenNode);\n if (Component === false) {\n return wrapperNode;\n }\n return /*#__PURE__*/React.createElement(Component, _extends({}, restProps, {\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n event.stopPropagation();\n formInstance.submit();\n },\n onReset: function onReset(event) {\n var _restProps$onReset;\n event.preventDefault();\n formInstance.resetFields();\n (_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 ? void 0 : _restProps$onReset.call(restProps, event);\n }\n }), wrapperNode);\n};\nexport default Form;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { FieldContext } from '.';\nimport warning from \"rc-util/es/warning\";\nimport { HOOK_MARK } from './FieldContext';\nimport { useState, useContext, useEffect, useRef, useMemo } from 'react';\nimport { getNamePath, getValue } from './utils/valueUtil';\nexport function stringify(value) {\n try {\n return JSON.stringify(value);\n } catch (err) {\n return Math.random();\n }\n}\nfunction useWatch() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var _args$ = args[0],\n dependencies = _args$ === void 0 ? [] : _args$,\n form = args[1];\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n value = _useState2[0],\n setValue = _useState2[1];\n var valueStr = useMemo(function () {\n return stringify(value);\n }, [value]);\n var valueStrRef = useRef(valueStr);\n valueStrRef.current = valueStr;\n var fieldContext = useContext(FieldContext);\n var formInstance = form || fieldContext;\n var isValidForm = formInstance && formInstance._init;\n // Warning if not exist form instance\n if (process.env.NODE_ENV !== 'production') {\n warning(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');\n }\n var namePath = getNamePath(dependencies);\n var namePathRef = useRef(namePath);\n namePathRef.current = namePath;\n useEffect(function () {\n // Skip if not exist form instance\n if (!isValidForm) {\n return;\n }\n var getFieldsValue = formInstance.getFieldsValue,\n getInternalHooks = formInstance.getInternalHooks;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n registerWatch = _getInternalHooks.registerWatch;\n var cancelRegister = registerWatch(function (store) {\n var newValue = getValue(store, namePathRef.current);\n var nextValueStr = stringify(newValue);\n // Compare stringify in case it's nest object\n if (valueStrRef.current !== nextValueStr) {\n valueStrRef.current = nextValueStr;\n setValue(newValue);\n }\n });\n // TODO: We can improve this perf in future\n var initialValue = getValue(getFieldsValue(), namePathRef.current);\n setValue(initialValue);\n return cancelRegister;\n },\n // We do not need re-register since namePath content is the same\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isValidForm]);\n return value;\n}\nexport default useWatch;","import * as React from 'react';\nimport Field from './Field';\nimport List from './List';\nimport useForm from './useForm';\nimport FieldForm from './Form';\nimport { FormProvider } from './FormContext';\nimport FieldContext from './FieldContext';\nimport ListContext from './ListContext';\nimport useWatch from './useWatch';\nvar InternalForm = /*#__PURE__*/React.forwardRef(FieldForm);\nvar RefForm = InternalForm;\nRefForm.FormProvider = FormProvider;\nRefForm.Field = Field;\nRefForm.List = List;\nRefForm.useForm = useForm;\nRefForm.useWatch = useWatch;\nexport { Field, List, useForm, FormProvider, FieldContext, ListContext, useWatch };\nexport default RefForm;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\n/**\n * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.\n * We do not make this auto is to avoid real memory leak.\n * Developer should confirm it's safe to ignore themselves.\n */\nexport default function useSafeState(defaultValue) {\n var destroyRef = React.useRef(false);\n var _React$useState = React.useState(defaultValue),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n value = _React$useState2[0],\n setValue = _React$useState2[1];\n React.useEffect(function () {\n destroyRef.current = false;\n return function () {\n destroyRef.current = true;\n };\n }, []);\n function safeSetState(updater, ignoreDestroy) {\n if (ignoreDestroy && destroyRef.current) {\n return;\n }\n setValue(updater);\n }\n return [value, safeSetState];\n}","import canUseDom from './canUseDom';\nimport contains from './contains';\nvar APPEND_ORDER = 'data-rc-order';\nvar MARK_KEY = \"rc-util-key\";\nvar containerCache = new Map();\nfunction getMark() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n mark = _ref.mark;\n if (mark) {\n return mark.startsWith('data-') ? mark : \"data-\".concat(mark);\n }\n return MARK_KEY;\n}\nfunction getContainer(option) {\n if (option.attachTo) {\n return option.attachTo;\n }\n var head = document.querySelector('head');\n return head || document.body;\n}\nfunction getOrder(prepend) {\n if (prepend === 'queue') {\n return 'prependQueue';\n }\n return prepend ? 'prepend' : 'append';\n}\n/**\n * Find style which inject by rc-util\n */\nfunction findStyles(container) {\n return Array.from((containerCache.get(container) || container).children).filter(function (node) {\n return node.tagName === 'STYLE';\n });\n}\nexport function injectCSS(css) {\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!canUseDom()) {\n return null;\n }\n var csp = option.csp,\n prepend = option.prepend;\n var styleNode = document.createElement('style');\n styleNode.setAttribute(APPEND_ORDER, getOrder(prepend));\n if (csp === null || csp === void 0 ? void 0 : csp.nonce) {\n styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;\n }\n styleNode.innerHTML = css;\n var container = getContainer(option);\n var firstChild = container.firstChild;\n if (prepend) {\n // If is queue `prepend`, it will prepend first style and then append rest style\n if (prepend === 'queue') {\n var existStyle = findStyles(container).filter(function (node) {\n return ['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER));\n });\n if (existStyle.length) {\n container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);\n return styleNode;\n }\n }\n // Use `insertBefore` as `prepend`\n container.insertBefore(styleNode, firstChild);\n } else {\n container.appendChild(styleNode);\n }\n return styleNode;\n}\nfunction findExistNode(key) {\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var container = getContainer(option);\n return findStyles(container).find(function (node) {\n return node.getAttribute(getMark(option)) === key;\n });\n}\nexport function removeCSS(key) {\n var _existNode$parentNode;\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var existNode = findExistNode(key, option);\n existNode === null || existNode === void 0 ? void 0 : (_existNode$parentNode = existNode.parentNode) === null || _existNode$parentNode === void 0 ? void 0 : _existNode$parentNode.removeChild(existNode);\n}\n/**\n * qiankun will inject `appendChild` to insert into other\n */\nfunction syncRealContainer(container, option) {\n var cachedRealContainer = containerCache.get(container);\n // Find real container when not cached or cached container removed\n if (!cachedRealContainer || !contains(document, cachedRealContainer)) {\n var placeholderStyle = injectCSS('', option);\n var parentNode = placeholderStyle.parentNode;\n containerCache.set(container, parentNode);\n parentNode.removeChild(placeholderStyle);\n }\n}\nexport function updateCSS(css, key) {\n var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var container = getContainer(option);\n // Sync real parent\n syncRealContainer(container, option);\n var existNode = findExistNode(key, option);\n if (existNode) {\n var _option$csp, _option$csp2;\n if (((_option$csp = option.csp) === null || _option$csp === void 0 ? void 0 : _option$csp.nonce) && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) {\n var _option$csp3;\n existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce;\n }\n if (existNode.innerHTML !== css) {\n existNode.innerHTML = css;\n }\n return existNode;\n }\n var newNode = injectCSS(css, option);\n newNode.setAttribute(getMark(option), key);\n return newNode;\n}","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","import * as React from 'react';\nvar DisabledContext = /*#__PURE__*/React.createContext(false);\nexport var DisabledContextProvider = function DisabledContextProvider(_ref) {\n var children = _ref.children,\n disabled = _ref.disabled;\n var originDisabled = React.useContext(DisabledContext);\n return /*#__PURE__*/React.createElement(DisabledContext.Provider, {\n value: disabled || originDisabled\n }, children);\n};\nexport default DisabledContext;","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport canUseDOM from \"rc-util/es/Dom/canUseDom\"; // ================= Transition =================\n// Event wrapper. Copy from react source code\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\".concat(styleProp)] = \"webkit\".concat(eventName);\n prefixes[\"Moz\".concat(styleProp)] = \"moz\".concat(eventName);\n prefixes[\"ms\".concat(styleProp)] = \"MS\".concat(eventName);\n prefixes[\"O\".concat(styleProp)] = \"o\".concat(eventName.toLowerCase());\n return prefixes;\n}\n\nexport function getVendorPrefixes(domSupport, win) {\n var prefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n\n if (domSupport) {\n if (!('AnimationEvent' in win)) {\n delete prefixes.animationend.animation;\n }\n\n if (!('TransitionEvent' in win)) {\n delete prefixes.transitionend.transition;\n }\n }\n\n return prefixes;\n}\nvar vendorPrefixes = getVendorPrefixes(canUseDOM(), typeof window !== 'undefined' ? window : {});\nvar style = {};\n\nif (canUseDOM()) {\n var _document$createEleme = document.createElement('div');\n\n style = _document$createEleme.style;\n}\n\nvar prefixedEventNames = {};\nexport function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n if (prefixMap) {\n var stylePropList = Object.keys(prefixMap);\n var len = stylePropList.length;\n\n for (var i = 0; i < len; i += 1) {\n var styleProp = stylePropList[i];\n\n if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {\n prefixedEventNames[eventName] = prefixMap[styleProp];\n return prefixedEventNames[eventName];\n }\n }\n }\n\n return '';\n}\nvar internalAnimationEndName = getVendorPrefixedEventName('animationend');\nvar internalTransitionEndName = getVendorPrefixedEventName('transitionend');\nexport var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);\nexport var animationEndName = internalAnimationEndName || 'animationend';\nexport var transitionEndName = internalTransitionEndName || 'transitionend';\nexport function getTransitionName(transitionName, transitionType) {\n if (!transitionName) return null;\n\n if (_typeof(transitionName) === 'object') {\n var type = transitionType.replace(/-\\w/g, function (match) {\n return match[1].toUpperCase();\n });\n return transitionName[type];\n }\n\n return \"\".concat(transitionName, \"-\").concat(transitionType);\n}","export var STATUS_NONE = 'none';\nexport var STATUS_APPEAR = 'appear';\nexport var STATUS_ENTER = 'enter';\nexport var STATUS_LEAVE = 'leave';\nexport var STEP_NONE = 'none';\nexport var STEP_PREPARE = 'prepare';\nexport var STEP_START = 'start';\nexport var STEP_ACTIVE = 'active';\nexport var STEP_ACTIVATED = 'end';","import { useEffect, useLayoutEffect } from 'react';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\"; // It's safe to use `useLayoutEffect` but the warning is annoying\n\nvar useIsomorphicLayoutEffect = canUseDom() ? useLayoutEffect : useEffect;\nexport default useIsomorphicLayoutEffect;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport useState from \"rc-util/es/hooks/useState\";\nimport { STEP_PREPARE, STEP_ACTIVE, STEP_START, STEP_ACTIVATED, STEP_NONE } from '../interface';\nimport useNextFrame from './useNextFrame';\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nvar STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED];\n/** Skip current step */\n\nexport var SkipStep = false;\n/** Current step should be update in */\n\nexport var DoStep = true;\nexport function isActive(step) {\n return step === STEP_ACTIVE || step === STEP_ACTIVATED;\n}\nexport default (function (status, callback) {\n var _useState = useState(STEP_NONE),\n _useState2 = _slicedToArray(_useState, 2),\n step = _useState2[0],\n setStep = _useState2[1];\n\n var _useNextFrame = useNextFrame(),\n _useNextFrame2 = _slicedToArray(_useNextFrame, 2),\n nextFrame = _useNextFrame2[0],\n cancelNextFrame = _useNextFrame2[1];\n\n function startQueue() {\n setStep(STEP_PREPARE, true);\n }\n\n useIsomorphicLayoutEffect(function () {\n if (step !== STEP_NONE && step !== STEP_ACTIVATED) {\n var index = STEP_QUEUE.indexOf(step);\n var nextStep = STEP_QUEUE[index + 1];\n var result = callback(step);\n\n if (result === SkipStep) {\n // Skip when no needed\n setStep(nextStep, true);\n } else {\n // Do as frame for step update\n nextFrame(function (info) {\n function doNext() {\n // Skip since current queue is ood\n if (info.isCanceled()) return;\n setStep(nextStep, true);\n }\n\n if (result === true) {\n doNext();\n } else {\n // Only promise should be async\n Promise.resolve(result).then(doNext);\n }\n });\n }\n }\n }, [status, step]);\n React.useEffect(function () {\n return function () {\n cancelNextFrame();\n };\n }, []);\n return [startQueue, step];\n});","import * as React from 'react';\nimport raf from \"rc-util/es/raf\";\nexport default (function () {\n var nextFrameRef = React.useRef(null);\n\n function cancelNextFrame() {\n raf.cancel(nextFrameRef.current);\n }\n\n function nextFrame(callback) {\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n cancelNextFrame();\n var nextFrameId = raf(function () {\n if (delay <= 1) {\n callback({\n isCanceled: function isCanceled() {\n return nextFrameId !== nextFrameRef.current;\n }\n });\n } else {\n nextFrame(callback, delay - 1);\n }\n });\n nextFrameRef.current = nextFrameId;\n }\n\n React.useEffect(function () {\n return function () {\n cancelNextFrame();\n };\n }, []);\n return [nextFrame, cancelNextFrame];\n});","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { useRef, useEffect } from 'react';\nimport useState from \"rc-util/es/hooks/useState\";\nimport { STATUS_APPEAR, STATUS_NONE, STATUS_LEAVE, STATUS_ENTER, STEP_PREPARE, STEP_START, STEP_ACTIVE } from '../interface';\nimport useStepQueue, { DoStep, SkipStep, isActive } from './useStepQueue';\nimport useDomMotionEvents from './useDomMotionEvents';\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nexport default function useStatus(supportMotion, visible, getElement, _ref) {\n var _ref$motionEnter = _ref.motionEnter,\n motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,\n _ref$motionAppear = _ref.motionAppear,\n motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,\n _ref$motionLeave = _ref.motionLeave,\n motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,\n motionDeadline = _ref.motionDeadline,\n motionLeaveImmediately = _ref.motionLeaveImmediately,\n onAppearPrepare = _ref.onAppearPrepare,\n onEnterPrepare = _ref.onEnterPrepare,\n onLeavePrepare = _ref.onLeavePrepare,\n onAppearStart = _ref.onAppearStart,\n onEnterStart = _ref.onEnterStart,\n onLeaveStart = _ref.onLeaveStart,\n onAppearActive = _ref.onAppearActive,\n onEnterActive = _ref.onEnterActive,\n onLeaveActive = _ref.onLeaveActive,\n onAppearEnd = _ref.onAppearEnd,\n onEnterEnd = _ref.onEnterEnd,\n onLeaveEnd = _ref.onLeaveEnd,\n onVisibleChanged = _ref.onVisibleChanged;\n\n // Used for outer render usage to avoid `visible: false & status: none` to render nothing\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n asyncVisible = _useState2[0],\n setAsyncVisible = _useState2[1];\n\n var _useState3 = useState(STATUS_NONE),\n _useState4 = _slicedToArray(_useState3, 2),\n status = _useState4[0],\n setStatus = _useState4[1];\n\n var _useState5 = useState(null),\n _useState6 = _slicedToArray(_useState5, 2),\n style = _useState6[0],\n setStyle = _useState6[1];\n\n var mountedRef = useRef(false);\n var deadlineRef = useRef(null); // =========================== Dom Node ===========================\n\n function getDomElement() {\n return getElement();\n } // ========================== Motion End ==========================\n\n\n var activeRef = useRef(false);\n\n function onInternalMotionEnd(event) {\n var element = getDomElement();\n\n if (event && !event.deadline && event.target !== element) {\n // event exists\n // not initiated by deadline\n // transitionEnd not fired by inner elements\n return;\n }\n\n var currentActive = activeRef.current;\n var canEnd;\n\n if (status === STATUS_APPEAR && currentActive) {\n canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);\n } else if (status === STATUS_ENTER && currentActive) {\n canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);\n } else if (status === STATUS_LEAVE && currentActive) {\n canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);\n } // Only update status when `canEnd` and not destroyed\n\n\n if (status !== STATUS_NONE && currentActive && canEnd !== false) {\n setStatus(STATUS_NONE, true);\n setStyle(null, true);\n }\n }\n\n var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),\n _useDomMotionEvents2 = _slicedToArray(_useDomMotionEvents, 1),\n patchMotionEvents = _useDomMotionEvents2[0]; // ============================= Step =============================\n\n\n var eventHandlers = React.useMemo(function () {\n var _ref2, _ref3, _ref4;\n\n switch (status) {\n case STATUS_APPEAR:\n return _ref2 = {}, _defineProperty(_ref2, STEP_PREPARE, onAppearPrepare), _defineProperty(_ref2, STEP_START, onAppearStart), _defineProperty(_ref2, STEP_ACTIVE, onAppearActive), _ref2;\n\n case STATUS_ENTER:\n return _ref3 = {}, _defineProperty(_ref3, STEP_PREPARE, onEnterPrepare), _defineProperty(_ref3, STEP_START, onEnterStart), _defineProperty(_ref3, STEP_ACTIVE, onEnterActive), _ref3;\n\n case STATUS_LEAVE:\n return _ref4 = {}, _defineProperty(_ref4, STEP_PREPARE, onLeavePrepare), _defineProperty(_ref4, STEP_START, onLeaveStart), _defineProperty(_ref4, STEP_ACTIVE, onLeaveActive), _ref4;\n\n default:\n return {};\n }\n }, [status]);\n\n var _useStepQueue = useStepQueue(status, function (newStep) {\n // Only prepare step can be skip\n if (newStep === STEP_PREPARE) {\n var onPrepare = eventHandlers[STEP_PREPARE];\n\n if (!onPrepare) {\n return SkipStep;\n }\n\n return onPrepare(getDomElement());\n } // Rest step is sync update\n\n\n // Rest step is sync update\n if (step in eventHandlers) {\n var _eventHandlers$step;\n\n setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);\n }\n\n if (step === STEP_ACTIVE) {\n // Patch events when motion needed\n patchMotionEvents(getDomElement());\n\n if (motionDeadline > 0) {\n clearTimeout(deadlineRef.current);\n deadlineRef.current = setTimeout(function () {\n onInternalMotionEnd({\n deadline: true\n });\n }, motionDeadline);\n }\n }\n\n return DoStep;\n }),\n _useStepQueue2 = _slicedToArray(_useStepQueue, 2),\n startStep = _useStepQueue2[0],\n step = _useStepQueue2[1];\n\n var active = isActive(step);\n activeRef.current = active; // ============================ Status ============================\n // Update with new status\n\n useIsomorphicLayoutEffect(function () {\n setAsyncVisible(visible);\n var isMounted = mountedRef.current;\n mountedRef.current = true;\n\n if (!supportMotion) {\n return;\n }\n\n var nextStatus; // Appear\n\n if (!isMounted && visible && motionAppear) {\n nextStatus = STATUS_APPEAR;\n } // Enter\n\n\n if (isMounted && visible && motionEnter) {\n nextStatus = STATUS_ENTER;\n } // Leave\n\n\n if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {\n nextStatus = STATUS_LEAVE;\n } // Update to next status\n\n\n if (nextStatus) {\n setStatus(nextStatus);\n startStep();\n }\n }, [visible]); // ============================ Effect ============================\n // Reset when motion changed\n\n useEffect(function () {\n if ( // Cancel appear\n status === STATUS_APPEAR && !motionAppear || // Cancel enter\n status === STATUS_ENTER && !motionEnter || // Cancel leave\n status === STATUS_LEAVE && !motionLeave) {\n setStatus(STATUS_NONE);\n }\n }, [motionAppear, motionEnter, motionLeave]);\n useEffect(function () {\n return function () {\n mountedRef.current = false;\n clearTimeout(deadlineRef.current);\n };\n }, []); // Trigger `onVisibleChanged`\n\n var firstMountChangeRef = React.useRef(false);\n useEffect(function () {\n // [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged\n if (asyncVisible) {\n firstMountChangeRef.current = true;\n }\n\n if (asyncVisible !== undefined && status === STATUS_NONE) {\n // Skip first render is invisible since it's nothing changed\n if (firstMountChangeRef.current || asyncVisible) {\n onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible);\n }\n\n firstMountChangeRef.current = true;\n }\n }, [asyncVisible, status]); // ============================ Styles ============================\n\n var mergedStyle = style;\n\n if (eventHandlers[STEP_PREPARE] && step === STEP_START) {\n mergedStyle = _objectSpread({\n transition: 'none'\n }, mergedStyle);\n }\n\n return [status, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];\n}","import * as React from 'react';\nimport { useRef } from 'react';\nimport { animationEndName, transitionEndName } from '../util/motion';\nexport default (function (callback) {\n var cacheElementRef = useRef(); // Cache callback\n\n var callbackRef = useRef(callback);\n callbackRef.current = callback; // Internal motion event handler\n\n var onInternalMotionEnd = React.useCallback(function (event) {\n callbackRef.current(event);\n }, []); // Remove events\n\n function removeMotionEvents(element) {\n if (element) {\n element.removeEventListener(transitionEndName, onInternalMotionEnd);\n element.removeEventListener(animationEndName, onInternalMotionEnd);\n }\n } // Patch events\n\n\n function patchMotionEvents(element) {\n if (cacheElementRef.current && cacheElementRef.current !== element) {\n removeMotionEvents(cacheElementRef.current);\n }\n\n if (element && element !== cacheElementRef.current) {\n element.addEventListener(transitionEndName, onInternalMotionEnd);\n element.addEventListener(animationEndName, onInternalMotionEnd); // Save as cache in case dom removed trigger by `motionDeadline`\n\n cacheElementRef.current = element;\n }\n } // Clean up when removed\n\n\n React.useEffect(function () {\n return function () {\n removeMotionEvents(cacheElementRef.current);\n };\n }, []);\n return [patchMotionEvents, removeMotionEvents];\n});","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\n\nvar DomWrapper = /*#__PURE__*/function (_React$Component) {\n _inherits(DomWrapper, _React$Component);\n\n var _super = _createSuper(DomWrapper);\n\n function DomWrapper() {\n _classCallCheck(this, DomWrapper);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(DomWrapper, [{\n key: \"render\",\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return DomWrapper;\n}(React.Component);\n\nexport default DomWrapper;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\n\n/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport { fillRef, supportRef } from \"rc-util/es/ref\";\nimport classNames from 'classnames';\nimport { getTransitionName, supportTransition } from './util/motion';\nimport { STATUS_NONE, STEP_PREPARE, STEP_START } from './interface';\nimport useStatus from './hooks/useStatus';\nimport DomWrapper from './DomWrapper';\nimport { isActive } from './hooks/useStepQueue';\n/**\n * `transitionSupport` is used for none transition test case.\n * Default we use browser transition event support check.\n */\n\nexport function genCSSMotion(config) {\n var transitionSupport = config;\n\n if (_typeof(config) === 'object') {\n transitionSupport = config.transitionSupport;\n }\n\n function isSupportTransition(props) {\n return !!(props.motionName && transitionSupport);\n }\n\n var CSSMotion = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$visible = props.visible,\n visible = _props$visible === void 0 ? true : _props$visible,\n _props$removeOnLeave = props.removeOnLeave,\n removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave,\n forceRender = props.forceRender,\n children = props.children,\n motionName = props.motionName,\n leavedClassName = props.leavedClassName,\n eventProps = props.eventProps;\n var supportMotion = isSupportTransition(props); // Ref to the react node, it may be a HTMLElement\n\n var nodeRef = useRef(); // Ref to the dom wrapper in case ref can not pass to HTMLElement\n\n var wrapperNodeRef = useRef();\n\n function getDomElement() {\n try {\n // Here we're avoiding call for findDOMNode since it's deprecated\n // in strict mode. We're calling it only when node ref is not\n // an instance of DOM HTMLElement. Otherwise use\n // findDOMNode as a final resort\n return nodeRef.current instanceof HTMLElement ? nodeRef.current : findDOMNode(wrapperNodeRef.current);\n } catch (e) {\n // Only happen when `motionDeadline` trigger but element removed.\n return null;\n }\n }\n\n var _useStatus = useStatus(supportMotion, visible, getDomElement, props),\n _useStatus2 = _slicedToArray(_useStatus, 4),\n status = _useStatus2[0],\n statusStep = _useStatus2[1],\n statusStyle = _useStatus2[2],\n mergedVisible = _useStatus2[3]; // Record whether content has rendered\n // Will return null for un-rendered even when `removeOnLeave={false}`\n\n\n var renderedRef = React.useRef(mergedVisible);\n\n if (mergedVisible) {\n renderedRef.current = true;\n } // ====================== Refs ======================\n\n\n var setNodeRef = React.useCallback(function (node) {\n nodeRef.current = node;\n fillRef(ref, node);\n }, [ref]); // ===================== Render =====================\n\n var motionChildren;\n\n var mergedProps = _objectSpread(_objectSpread({}, eventProps), {}, {\n visible: visible\n });\n\n if (!children) {\n // No children\n motionChildren = null;\n } else if (status === STATUS_NONE || !isSupportTransition(props)) {\n // Stable children\n if (mergedVisible) {\n motionChildren = children(_objectSpread({}, mergedProps), setNodeRef);\n } else if (!removeOnLeave && renderedRef.current) {\n motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {\n className: leavedClassName\n }), setNodeRef);\n } else if (forceRender) {\n motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {\n style: {\n display: 'none'\n }\n }), setNodeRef);\n } else {\n motionChildren = null;\n }\n } else {\n var _classNames;\n\n // In motion\n var statusSuffix;\n\n if (statusStep === STEP_PREPARE) {\n statusSuffix = 'prepare';\n } else if (isActive(statusStep)) {\n statusSuffix = 'active';\n } else if (statusStep === STEP_START) {\n statusSuffix = 'start';\n }\n\n motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {\n className: classNames(getTransitionName(motionName, status), (_classNames = {}, _defineProperty(_classNames, getTransitionName(motionName, \"\".concat(status, \"-\").concat(statusSuffix)), statusSuffix), _defineProperty(_classNames, motionName, typeof motionName === 'string'), _classNames)),\n style: statusStyle\n }), setNodeRef);\n } // Auto inject ref if child node not have `ref` props\n\n\n if ( /*#__PURE__*/React.isValidElement(motionChildren) && supportRef(motionChildren)) {\n var _motionChildren = motionChildren,\n originNodeRef = _motionChildren.ref;\n\n if (!originNodeRef) {\n motionChildren = /*#__PURE__*/React.cloneElement(motionChildren, {\n ref: setNodeRef\n });\n }\n }\n\n return /*#__PURE__*/React.createElement(DomWrapper, {\n ref: wrapperNodeRef\n }, motionChildren);\n });\n CSSMotion.displayName = 'CSSMotion';\n return CSSMotion;\n}\nexport default genCSSMotion(supportTransition);","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport var STATUS_ADD = 'add';\nexport var STATUS_KEEP = 'keep';\nexport var STATUS_REMOVE = 'remove';\nexport var STATUS_REMOVED = 'removed';\nexport function wrapKeyToObject(key) {\n var keyObj;\n\n if (key && _typeof(key) === 'object' && 'key' in key) {\n keyObj = key;\n } else {\n keyObj = {\n key: key\n };\n }\n\n return _objectSpread(_objectSpread({}, keyObj), {}, {\n key: String(keyObj.key)\n });\n}\nexport function parseKeys() {\n var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n return keys.map(wrapKeyToObject);\n}\nexport function diffKeys() {\n var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var list = [];\n var currentIndex = 0;\n var currentLen = currentKeys.length;\n var prevKeyObjects = parseKeys(prevKeys);\n var currentKeyObjects = parseKeys(currentKeys); // Check prev keys to insert or keep\n\n prevKeyObjects.forEach(function (keyObj) {\n var hit = false;\n\n for (var i = currentIndex; i < currentLen; i += 1) {\n var currentKeyObj = currentKeyObjects[i];\n\n if (currentKeyObj.key === keyObj.key) {\n // New added keys should add before current key\n if (currentIndex < i) {\n list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {\n return _objectSpread(_objectSpread({}, obj), {}, {\n status: STATUS_ADD\n });\n }));\n currentIndex = i;\n }\n\n list.push(_objectSpread(_objectSpread({}, currentKeyObj), {}, {\n status: STATUS_KEEP\n }));\n currentIndex += 1;\n hit = true;\n break;\n }\n } // If not hit, it means key is removed\n\n\n if (!hit) {\n list.push(_objectSpread(_objectSpread({}, keyObj), {}, {\n status: STATUS_REMOVE\n }));\n }\n }); // Add rest to the list\n\n if (currentIndex < currentLen) {\n list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {\n return _objectSpread(_objectSpread({}, obj), {}, {\n status: STATUS_ADD\n });\n }));\n }\n /**\n * Merge same key when it remove and add again:\n * [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]\n */\n\n\n var keys = {};\n list.forEach(function (_ref) {\n var key = _ref.key;\n keys[key] = (keys[key] || 0) + 1;\n });\n var duplicatedKeys = Object.keys(keys).filter(function (key) {\n return keys[key] > 1;\n });\n duplicatedKeys.forEach(function (matchKey) {\n // Remove `STATUS_REMOVE` node.\n list = list.filter(function (_ref2) {\n var key = _ref2.key,\n status = _ref2.status;\n return key !== matchKey || status !== STATUS_REMOVE;\n }); // Update `STATUS_ADD` to `STATUS_KEEP`\n\n list.forEach(function (node) {\n if (node.key === matchKey) {\n // eslint-disable-next-line no-param-reassign\n node.status = STATUS_KEEP;\n }\n });\n });\n return list;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nvar _excluded = [\"component\", \"children\", \"onVisibleChanged\", \"onAllRemoved\"],\n _excluded2 = [\"status\"];\n\n/* eslint react/prop-types: 0 */\nimport * as React from 'react';\nimport OriginCSSMotion from './CSSMotion';\nimport { supportTransition } from './util/motion';\nimport { STATUS_ADD, STATUS_KEEP, STATUS_REMOVE, STATUS_REMOVED, diffKeys, parseKeys } from './util/diff';\nvar MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];\n/**\n * Generate a CSSMotionList component with config\n * @param transitionSupport No need since CSSMotionList no longer depends on transition support\n * @param CSSMotion CSSMotion component\n */\n\nexport function genCSSMotionList(transitionSupport) {\n var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : OriginCSSMotion;\n\n var CSSMotionList = /*#__PURE__*/function (_React$Component) {\n _inherits(CSSMotionList, _React$Component);\n\n var _super = _createSuper(CSSMotionList);\n\n function CSSMotionList() {\n var _this;\n\n _classCallCheck(this, CSSMotionList);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.state = {\n keyEntities: []\n };\n\n _this.removeKey = function (removeKey) {\n var keyEntities = _this.state.keyEntities;\n var nextKeyEntities = keyEntities.map(function (entity) {\n if (entity.key !== removeKey) return entity;\n return _objectSpread(_objectSpread({}, entity), {}, {\n status: STATUS_REMOVED\n });\n });\n\n _this.setState({\n keyEntities: nextKeyEntities\n });\n\n return nextKeyEntities.filter(function (_ref) {\n var status = _ref.status;\n return status !== STATUS_REMOVED;\n }).length;\n };\n\n return _this;\n }\n\n _createClass(CSSMotionList, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var keyEntities = this.state.keyEntities;\n\n var _this$props = this.props,\n component = _this$props.component,\n children = _this$props.children,\n _onVisibleChanged = _this$props.onVisibleChanged,\n onAllRemoved = _this$props.onAllRemoved,\n restProps = _objectWithoutProperties(_this$props, _excluded);\n\n var Component = component || React.Fragment;\n var motionProps = {};\n MOTION_PROP_NAMES.forEach(function (prop) {\n motionProps[prop] = restProps[prop];\n delete restProps[prop];\n });\n delete restProps.keys;\n return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2) {\n var status = _ref2.status,\n eventProps = _objectWithoutProperties(_ref2, _excluded2);\n\n var visible = status === STATUS_ADD || status === STATUS_KEEP;\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({}, motionProps, {\n key: eventProps.key,\n visible: visible,\n eventProps: eventProps,\n onVisibleChanged: function onVisibleChanged(changedVisible) {\n _onVisibleChanged === null || _onVisibleChanged === void 0 ? void 0 : _onVisibleChanged(changedVisible, {\n key: eventProps.key\n });\n\n if (!changedVisible) {\n var restKeysCount = _this2.removeKey(eventProps.key);\n\n if (restKeysCount === 0 && onAllRemoved) {\n onAllRemoved();\n }\n }\n }\n }), children);\n }));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref3, _ref4) {\n var keys = _ref3.keys;\n var keyEntities = _ref4.keyEntities;\n var parsedKeyObjects = parseKeys(keys);\n var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);\n return {\n keyEntities: mixedKeyEntities.filter(function (entity) {\n var prevEntity = keyEntities.find(function (_ref5) {\n var key = _ref5.key;\n return entity.key === key;\n }); // Remove if already mark as removed\n\n if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) {\n return false;\n }\n\n return true;\n })\n };\n } // ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.\n\n }]);\n\n return CSSMotionList;\n }(React.Component);\n\n CSSMotionList.defaultProps = {\n component: 'div'\n };\n return CSSMotionList;\n}\nexport default genCSSMotionList(supportTransition);","import CSSMotion from './CSSMotion';\nimport CSSMotionList from './CSSMotionList';\nexport { CSSMotionList };\nexport default CSSMotion;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport classNames from 'classnames';\nimport { tuple } from './type';\nvar InputStatuses = tuple('warning', 'error', '');\nexport function getStatusClassNames(prefixCls, status, hasFeedback) {\n var _classNames;\n return classNames((_classNames = {}, _defineProperty(_classNames, prefixCls + \"-status-success\", status === 'success'), _defineProperty(_classNames, prefixCls + \"-status-warning\", status === 'warning'), _defineProperty(_classNames, prefixCls + \"-status-error\", status === 'error'), _defineProperty(_classNames, prefixCls + \"-status-validating\", status === 'validating'), _defineProperty(_classNames, prefixCls + \"-has-feedback\", hasFeedback), _classNames));\n}\nexport var getMergedStatus = function getMergedStatus(contextStatus, customStatus) {\n return customStatus || contextStatus;\n};","'use strict';\n\n/**\n * Utility functions\n */\n\nfunction typeOf(obj) {\n return Object.prototype.toString.call(obj);\n}\n\nfunction isString(obj) {\n return typeOf(obj) === '[object String]';\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty;\n\nfunction has(object, key) {\n return object\n ? hasOwn.call(object, key)\n : false;\n}\n\n// Extend objects\n//\nfunction assign(obj /*from1, from2, from3, ...*/) {\n var sources = [].slice.call(arguments, 1);\n\n sources.forEach(function (source) {\n if (!source) { return; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be object');\n }\n\n Object.keys(source).forEach(function (key) {\n obj[key] = source[key];\n });\n });\n\n return obj;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar UNESCAPE_MD_RE = /\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;\n\nfunction unescapeMd(str) {\n if (str.indexOf('\\\\') < 0) { return str; }\n return str.replace(UNESCAPE_MD_RE, '$1');\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nfunction isValidEntityCode(c) {\n /*eslint no-bitwise:0*/\n // broken sequence\n if (c >= 0xD800 && c <= 0xDFFF) { return false; }\n // never used\n if (c >= 0xFDD0 && c <= 0xFDEF) { return false; }\n if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false; }\n // control codes\n if (c >= 0x00 && c <= 0x08) { return false; }\n if (c === 0x0B) { return false; }\n if (c >= 0x0E && c <= 0x1F) { return false; }\n if (c >= 0x7F && c <= 0x9F) { return false; }\n // out of range\n if (c > 0x10FFFF) { return false; }\n return true;\n}\n\nfunction fromCodePoint(c) {\n /*eslint no-bitwise:0*/\n if (c > 0xffff) {\n c -= 0x10000;\n var surrogate1 = 0xd800 + (c >> 10),\n surrogate2 = 0xdc00 + (c & 0x3ff);\n\n return String.fromCharCode(surrogate1, surrogate2);\n }\n return String.fromCharCode(c);\n}\n\nvar NAMED_ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi;\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;\nvar entities = require('./entities');\n\nfunction replaceEntityPattern(match, name) {\n var code = 0;\n\n if (has(entities, name)) {\n return entities[name];\n } else if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n code = name[1].toLowerCase() === 'x' ?\n parseInt(name.slice(2), 16)\n :\n parseInt(name.slice(1), 10);\n if (isValidEntityCode(code)) {\n return fromCodePoint(code);\n }\n }\n return match;\n}\n\nfunction replaceEntities(str) {\n if (str.indexOf('&') < 0) { return str; }\n\n return str.replace(NAMED_ENTITY_RE, replaceEntityPattern);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"'\n};\n\nfunction replaceUnsafeChar(ch) {\n return HTML_REPLACEMENTS[ch];\n}\n\nfunction escapeHtml(str) {\n if (HTML_ESCAPE_TEST_RE.test(str)) {\n return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n }\n return str;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\nexports.assign = assign;\nexports.isString = isString;\nexports.has = has;\nexports.unescapeMd = unescapeMd;\nexports.isValidEntityCode = isValidEntityCode;\nexports.fromCodePoint = fromCodePoint;\nexports.replaceEntities = replaceEntities;\nexports.escapeHtml = escapeHtml;\n","import { tuple } from './type';\n// ================== Collapse Motion ==================\nvar getCollapsedHeight = function getCollapsedHeight() {\n return {\n height: 0,\n opacity: 0\n };\n};\nvar getRealHeight = function getRealHeight(node) {\n var scrollHeight = node.scrollHeight;\n return {\n height: scrollHeight,\n opacity: 1\n };\n};\nvar getCurrentHeight = function getCurrentHeight(node) {\n return {\n height: node ? node.offsetHeight : 0\n };\n};\nvar skipOpacityTransition = function skipOpacityTransition(_, event) {\n return (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';\n};\nvar initCollapseMotion = function initCollapseMotion() {\n var rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ant';\n return {\n motionName: rootCls + \"-motion-collapse\",\n onAppearStart: getCollapsedHeight,\n onEnterStart: getCollapsedHeight,\n onAppearActive: getRealHeight,\n onEnterActive: getRealHeight,\n onLeaveStart: getCurrentHeight,\n onLeaveActive: getCollapsedHeight,\n onAppearEnd: skipOpacityTransition,\n onEnterEnd: skipOpacityTransition,\n onLeaveEnd: skipOpacityTransition,\n motionDeadline: 500\n };\n};\nvar SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight');\nvar getTransitionDirection = function getTransitionDirection(placement) {\n if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {\n return \"slide-down\";\n }\n return \"slide-up\";\n};\nvar getTransitionName = function getTransitionName(rootPrefixCls, motion, transitionName) {\n if (transitionName !== undefined) {\n return transitionName;\n }\n return rootPrefixCls + \"-\" + motion;\n};\nexport { getTransitionName, getTransitionDirection };\nexport default initCollapseMotion;","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default {\n // Options.jsx\n items_per_page: '/ page',\n jump_to: 'Go to',\n jump_to_confirm: 'confirm',\n page: 'Page',\n // Pagination.jsx\n prev_page: 'Previous Page',\n next_page: 'Next Page',\n prev_5: 'Previous 5 Pages',\n next_5: 'Next 5 Pages',\n prev_3: 'Previous 3 Pages',\n next_3: 'Next 3 Pages',\n page_size: 'Page Size'\n};","var locale = {\n locale: 'en_US',\n today: 'Today',\n now: 'Now',\n backToToday: 'Back to today',\n ok: 'OK',\n clear: 'Clear',\n month: 'Month',\n year: 'Year',\n timeSelect: 'select time',\n dateSelect: 'select date',\n weekSelect: 'Choose a week',\n monthSelect: 'Choose a month',\n yearSelect: 'Choose a year',\n decadeSelect: 'Choose a decade',\n yearFormat: 'YYYY',\n dateFormat: 'M/D/YYYY',\n dayFormat: 'D',\n dateTimeFormat: 'M/D/YYYY HH:mm:ss',\n monthBeforeYear: true,\n previousMonth: 'Previous month (PageUp)',\n nextMonth: 'Next month (PageDown)',\n previousYear: 'Last year (Control + left)',\n nextYear: 'Next year (Control + right)',\n previousDecade: 'Last decade',\n nextDecade: 'Next decade',\n previousCentury: 'Last century',\n nextCentury: 'Next century'\n};\nexport default locale;","var locale = {\n placeholder: 'Select time',\n rangePlaceholder: ['Start time', 'End time']\n};\nexport default locale;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport CalendarLocale from \"rc-picker/es/locale/en_US\";\nimport TimePickerLocale from '../../time-picker/locale/en_US';\n// Merge into a locale object\nvar locale = {\n lang: _extends({\n placeholder: 'Select date',\n yearPlaceholder: 'Select year',\n quarterPlaceholder: 'Select quarter',\n monthPlaceholder: 'Select month',\n weekPlaceholder: 'Select week',\n rangePlaceholder: ['Start date', 'End date'],\n rangeYearPlaceholder: ['Start year', 'End year'],\n rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],\n rangeMonthPlaceholder: ['Start month', 'End month'],\n rangeWeekPlaceholder: ['Start week', 'End week']\n }, CalendarLocale),\n timePickerLocale: _extends({}, TimePickerLocale)\n};\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nexport default locale;","/* eslint-disable no-template-curly-in-string */\nimport Pagination from \"rc-pagination/es/locale/en_US\";\nimport Calendar from '../calendar/locale/en_US';\nimport DatePicker from '../date-picker/locale/en_US';\nimport TimePicker from '../time-picker/locale/en_US';\nvar typeTemplate = '${label} is not a valid ${type}';\nvar localeValues = {\n locale: 'en',\n Pagination: Pagination,\n DatePicker: DatePicker,\n TimePicker: TimePicker,\n Calendar: Calendar,\n global: {\n placeholder: 'Please select'\n },\n Table: {\n filterTitle: 'Filter menu',\n filterConfirm: 'OK',\n filterReset: 'Reset',\n filterEmptyText: 'No filters',\n filterCheckall: 'Select all items',\n filterSearchPlaceholder: 'Search in filters',\n emptyText: 'No data',\n selectAll: 'Select current page',\n selectInvert: 'Invert current page',\n selectNone: 'Clear all data',\n selectionAll: 'Select all data',\n sortTitle: 'Sort',\n expand: 'Expand row',\n collapse: 'Collapse row',\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting'\n },\n Tour: {\n Next: 'Next',\n Previous: 'Previous',\n Finish: 'Finish'\n },\n Modal: {\n okText: 'OK',\n cancelText: 'Cancel',\n justOkText: 'OK'\n },\n Popconfirm: {\n okText: 'OK',\n cancelText: 'Cancel'\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: 'Search here',\n itemUnit: 'item',\n itemsUnit: 'items',\n remove: 'Remove',\n selectCurrent: 'Select current page',\n removeCurrent: 'Remove current page',\n selectAll: 'Select all data',\n removeAll: 'Remove all data',\n selectInvert: 'Invert current page'\n },\n Upload: {\n uploading: 'Uploading...',\n removeFile: 'Remove file',\n uploadError: 'Upload error',\n previewFile: 'Preview file',\n downloadFile: 'Download file'\n },\n Empty: {\n description: 'No data'\n },\n Icon: {\n icon: 'icon'\n },\n Text: {\n edit: 'Edit',\n copy: 'Copy',\n copied: 'Copied',\n expand: 'Expand'\n },\n PageHeader: {\n back: 'Back'\n },\n Form: {\n optional: '(optional)',\n defaultValidateMessages: {\n \"default\": 'Field validation error for ${label}',\n required: 'Please enter ${label}',\n \"enum\": '${label} must be one of [${enum}]',\n whitespace: '${label} cannot be a blank character',\n date: {\n format: '${label} date format is invalid',\n parse: '${label} cannot be converted to a date',\n invalid: '${label} is an invalid date'\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n \"boolean\": typeTemplate,\n integer: typeTemplate,\n \"float\": typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: '${label} must be ${len} characters',\n min: '${label} must be at least ${min} characters',\n max: '${label} must be up to ${max} characters',\n range: '${label} must be between ${min}-${max} characters'\n },\n number: {\n len: '${label} must be equal to ${len}',\n min: '${label} must be minimum ${min}',\n max: '${label} must be maximum ${max}',\n range: '${label} must be between ${min}-${max}'\n },\n array: {\n len: 'Must be ${len} ${label}',\n min: 'At least ${min} ${label}',\n max: 'At most ${max} ${label}',\n range: 'The amount of ${label} must be between ${min}-${max}'\n },\n pattern: {\n mismatch: '${label} does not match the pattern ${pattern}'\n }\n }\n },\n Image: {\n preview: 'Preview'\n }\n};\nexport default localeValues;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport LocaleContext from './context';\nimport defaultLocaleData from '../locale/en_US';\nvar LocaleReceiver = function LocaleReceiver(props) {\n var _props$componentName = props.componentName,\n componentName = _props$componentName === void 0 ? 'global' : _props$componentName,\n defaultLocale = props.defaultLocale,\n children = props.children;\n var antLocale = React.useContext(LocaleContext);\n var getLocale = React.useMemo(function () {\n var _a;\n var locale = defaultLocale || defaultLocaleData[componentName];\n var localeFromContext = (_a = antLocale === null || antLocale === void 0 ? void 0 : antLocale[componentName]) !== null && _a !== void 0 ? _a : {};\n return _extends(_extends({}, locale instanceof Function ? locale() : locale), localeFromContext || {});\n }, [componentName, defaultLocale, antLocale]);\n var getLocaleCode = React.useMemo(function () {\n var localeCode = antLocale && antLocale.locale;\n // Had use LocaleProvide but didn't set locale\n if (antLocale && antLocale.exist && !localeCode) {\n return defaultLocaleData.locale;\n }\n return localeCode;\n }, [antLocale]);\n return children(getLocale, getLocaleCode, antLocale);\n};\nexport default LocaleReceiver;\nexport var useLocaleReceiver = function useLocaleReceiver(componentName, defaultLocale) {\n var antLocale = React.useContext(LocaleContext);\n var getLocale = React.useMemo(function () {\n var _a;\n var locale = defaultLocale || defaultLocaleData[componentName];\n var localeFromContext = (_a = antLocale === null || antLocale === void 0 ? void 0 : antLocale[componentName]) !== null && _a !== void 0 ? _a : {};\n return _extends(_extends({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});\n }, [componentName, defaultLocale, antLocale]);\n return [getLocale];\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nexport var defaultIconPrefixCls = 'anticon';\nvar defaultGetPrefixCls = function defaultGetPrefixCls(suffixCls, customizePrefixCls) {\n if (customizePrefixCls) return customizePrefixCls;\n return suffixCls ? \"ant-\" + suffixCls : 'ant';\n};\n// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will case circular dependency.\nexport var ConfigContext = /*#__PURE__*/React.createContext({\n // We provide a default function for Context without provider\n getPrefixCls: defaultGetPrefixCls,\n iconPrefixCls: defaultIconPrefixCls\n});\nexport var ConfigConsumer = ConfigContext.Consumer;\n/** @deprecated Use hooks instead. This is a legacy function */\nexport function withConfigConsumer(config) {\n return function withConfigConsumerFunc(Component) {\n // Wrap with ConfigConsumer. Since we need compatible with react 15, be care when using ref methods\n var SFC = function SFC(props) {\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (configProps) {\n var basicPrefixCls = config.prefixCls;\n var getPrefixCls = configProps.getPrefixCls;\n var customizePrefixCls = props.prefixCls;\n var prefixCls = getPrefixCls(basicPrefixCls, customizePrefixCls);\n return /*#__PURE__*/React.createElement(Component, _extends({}, configProps, props, {\n prefixCls: prefixCls\n }));\n });\n };\n var cons = Component.constructor;\n var name = cons && cons.displayName || Component.name || 'Component';\n if (process.env.NODE_ENV !== 'production') {\n SFC.displayName = \"withConfigConsumer(\" + name + \")\";\n }\n return SFC;\n };\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import React from 'react';\nimport { isFragment } from 'react-is';\nexport default function toArray(children) {\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var ret = [];\n React.Children.forEach(children, function (child) {\n if ((child === undefined || child === null) && !option.keepEmpty) {\n return;\n }\n if (Array.isArray(child)) {\n ret = ret.concat(toArray(child));\n } else if (isFragment(child) && child.props) {\n ret = ret.concat(toArray(child.props.children, option));\n } else {\n ret.push(child);\n }\n });\n return ret;\n}","import defineProperty from \"./defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","export default function contains(root, n) {\n if (!root) {\n return false;\n }\n // Use native if support\n if (root.contains) {\n return root.contains(n);\n }\n // `document.contains` not support with IE11\n var node = n;\n while (node) {\n if (node === root) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}","// This icon file is generated automatically.\nvar CloseCircleFilled = { \"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\" };\nexport default CloseCircleFilled;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport CloseCircleFilledSvg from \"@ant-design/icons-svg/es/asn/CloseCircleFilled\";\nimport AntdIcon from '../components/AntdIcon';\nvar CloseCircleFilled = function CloseCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: CloseCircleFilledSvg\n }));\n};\nCloseCircleFilled.displayName = 'CloseCircleFilled';\nexport default /*#__PURE__*/React.forwardRef(CloseCircleFilled);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar genSpaceCompactStyle = function genSpaceCompactStyle(token) {\n var componentCls = token.componentCls;\n return _defineProperty({}, componentCls, {\n display: 'inline-flex',\n '&-block': {\n display: 'flex',\n width: '100%'\n },\n '&-vertical': {\n flexDirection: 'column'\n }\n });\n};\n// ============================== Export ==============================\nexport default genSpaceCompactStyle;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { genComponentStyleHook } from '../../theme';\nimport genSpaceCompactStyle from './compact';\nvar genSpaceStyle = function genSpaceStyle(token) {\n var componentCls = token.componentCls;\n return _defineProperty({}, componentCls, _defineProperty({\n display: 'inline-flex',\n '&-rtl': {\n direction: 'rtl'\n },\n '&-vertical': {\n flexDirection: 'column'\n },\n '&-align': {\n flexDirection: 'column',\n '&-center': {\n alignItems: 'center'\n },\n '&-start': {\n alignItems: 'flex-start'\n },\n '&-end': {\n alignItems: 'flex-end'\n },\n '&-baseline': {\n alignItems: 'flex-baseline'\n }\n }\n }, componentCls + \"-space-item\", {\n '&:empty': {\n display: 'none'\n }\n }));\n};\n// ============================== Export ==============================\nexport default genComponentStyleHook('Space', function (token) {\n return [genSpaceStyle(token), genSpaceCompactStyle(token)];\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nexport var SpaceCompactItemContext = /*#__PURE__*/React.createContext(null);\nexport var useCompactItemContext = function useCompactItemContext(prefixCls, direction) {\n var compactItemContext = React.useContext(SpaceCompactItemContext);\n var compactItemClassnames = React.useMemo(function () {\n var _classNames;\n if (!compactItemContext) return '';\n var compactDirection = compactItemContext.compactDirection,\n isFirstItem = compactItemContext.isFirstItem,\n isLastItem = compactItemContext.isLastItem;\n var separator = compactDirection === 'vertical' ? '-vertical-' : '-';\n return classNames((_classNames = {}, _defineProperty(_classNames, prefixCls + \"-compact\" + separator + \"item\", true), _defineProperty(_classNames, prefixCls + \"-compact\" + separator + \"first-item\", isFirstItem), _defineProperty(_classNames, prefixCls + \"-compact\" + separator + \"last-item\", isLastItem), _defineProperty(_classNames, prefixCls + \"-compact\" + separator + \"item-rtl\", direction === 'rtl'), _classNames));\n }, [prefixCls, direction, compactItemContext]);\n return {\n compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,\n compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,\n compactItemClassnames: compactItemClassnames\n };\n};\nexport var NoCompactStyle = function NoCompactStyle(_ref) {\n var children = _ref.children;\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: null\n }, children);\n};\nvar CompactItem = function CompactItem(_a) {\n var children = _a.children,\n otherProps = __rest(_a, [\"children\"]);\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: otherProps\n }, children);\n};\nvar Compact = function Compact(props) {\n var _classNames2;\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n directionConfig = _React$useContext.direction;\n var _props$size = props.size,\n size = _props$size === void 0 ? 'middle' : _props$size,\n direction = props.direction,\n block = props.block,\n customizePrefixCls = props.prefixCls,\n className = props.className,\n children = props.children,\n restProps = __rest(props, [\"size\", \"direction\", \"block\", \"prefixCls\", \"className\", \"children\"]);\n var prefixCls = getPrefixCls('space-compact', customizePrefixCls);\n var _useStyle = useStyle(prefixCls),\n _useStyle2 = _slicedToArray(_useStyle, 2),\n wrapSSR = _useStyle2[0],\n hashId = _useStyle2[1];\n var clx = classNames(prefixCls, hashId, (_classNames2 = {}, _defineProperty(_classNames2, prefixCls + \"-rtl\", directionConfig === 'rtl'), _defineProperty(_classNames2, prefixCls + \"-block\", block), _defineProperty(_classNames2, prefixCls + \"-vertical\", direction === 'vertical'), _classNames2), className);\n var compactItemContext = React.useContext(SpaceCompactItemContext);\n var childNodes = toArray(children);\n var nodes = React.useMemo(function () {\n return childNodes.map(function (child, i) {\n var key = child && child.key || prefixCls + \"-item-\" + i;\n return /*#__PURE__*/React.createElement(CompactItem, {\n key: key,\n compactSize: size,\n compactDirection: direction,\n isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),\n isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))\n }, child);\n });\n }, [size, childNodes, compactItemContext]);\n // =========================== Render ===========================\n if (childNodes.length === 0) {\n return null;\n }\n return wrapSSR( /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clx\n }, restProps), nodes));\n};\nexport default Compact;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","import { inputToRGB, rgbToHex, rgbToHsv } from '@ctrl/tinycolor';\n\nvar hueStep = 2; // 色相阶梯\n\nvar saturationStep = 0.16; // 饱和度阶梯,浅色部分\n\nvar saturationStep2 = 0.05; // 饱和度阶梯,深色部分\n\nvar brightnessStep1 = 0.05; // 亮度阶梯,浅色部分\n\nvar brightnessStep2 = 0.15; // 亮度阶梯,深色部分\n\nvar lightColorCount = 5; // 浅色数量,主色上\n\nvar darkColorCount = 4; // 深色数量,主色下\n// 暗色主题颜色映射关系表\n\nvar darkColorMap = [{\n index: 7,\n opacity: 0.15\n}, {\n index: 6,\n opacity: 0.25\n}, {\n index: 5,\n opacity: 0.3\n}, {\n index: 5,\n opacity: 0.45\n}, {\n index: 5,\n opacity: 0.65\n}, {\n index: 5,\n opacity: 0.85\n}, {\n index: 4,\n opacity: 0.9\n}, {\n index: 3,\n opacity: 0.95\n}, {\n index: 2,\n opacity: 0.97\n}, {\n index: 1,\n opacity: 0.98\n}]; // Wrapper function ported from TinyColor.prototype.toHsv\n// Keep it here because of `hsv.h * 360`\n\nfunction toHsv(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b;\n var hsv = rgbToHsv(r, g, b);\n return {\n h: hsv.h * 360,\n s: hsv.s,\n v: hsv.v\n };\n} // Wrapper function ported from TinyColor.prototype.toHexString\n// Keep it here because of the prefix `#`\n\n\nfunction toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat(rgbToHex(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.\n// Amount in range [0, 1]\n// Assume color1 & color2 has no alpha, since the following src code did so.\n\n\nfunction mix(rgb1, rgb2, amount) {\n var p = amount / 100;\n var rgb = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b\n };\n return rgb;\n}\n\nfunction getHue(hsv, i, light) {\n var hue; // 根据色相不同,色相转向不同\n\n if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {\n hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;\n } else {\n hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;\n }\n\n if (hue < 0) {\n hue += 360;\n } else if (hue >= 360) {\n hue -= 360;\n }\n\n return hue;\n}\n\nfunction getSaturation(hsv, i, light) {\n // grey color don't change saturation\n if (hsv.h === 0 && hsv.s === 0) {\n return hsv.s;\n }\n\n var saturation;\n\n if (light) {\n saturation = hsv.s - saturationStep * i;\n } else if (i === darkColorCount) {\n saturation = hsv.s + saturationStep;\n } else {\n saturation = hsv.s + saturationStep2 * i;\n } // 边界值修正\n\n\n if (saturation > 1) {\n saturation = 1;\n } // 第一格的 s 限制在 0.06-0.1 之间\n\n\n if (light && i === lightColorCount && saturation > 0.1) {\n saturation = 0.1;\n }\n\n if (saturation < 0.06) {\n saturation = 0.06;\n }\n\n return Number(saturation.toFixed(2));\n}\n\nfunction getValue(hsv, i, light) {\n var value;\n\n if (light) {\n value = hsv.v + brightnessStep1 * i;\n } else {\n value = hsv.v - brightnessStep2 * i;\n }\n\n if (value > 1) {\n value = 1;\n }\n\n return Number(value.toFixed(2));\n}\n\nfunction generate(color) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var patterns = [];\n var pColor = inputToRGB(color);\n\n for (var i = lightColorCount; i > 0; i -= 1) {\n var hsv = toHsv(pColor);\n var colorString = toHex(inputToRGB({\n h: getHue(hsv, i, true),\n s: getSaturation(hsv, i, true),\n v: getValue(hsv, i, true)\n }));\n patterns.push(colorString);\n }\n\n patterns.push(toHex(pColor));\n\n for (var _i = 1; _i <= darkColorCount; _i += 1) {\n var _hsv = toHsv(pColor);\n\n var _colorString = toHex(inputToRGB({\n h: getHue(_hsv, _i),\n s: getSaturation(_hsv, _i),\n v: getValue(_hsv, _i)\n }));\n\n patterns.push(_colorString);\n } // dark theme patterns\n\n\n if (opts.theme === 'dark') {\n return darkColorMap.map(function (_ref3) {\n var index = _ref3.index,\n opacity = _ref3.opacity;\n var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100));\n return darkColorString;\n });\n }\n\n return patterns;\n}\n\nvar presetPrimaryColors = {\n red: '#F5222D',\n volcano: '#FA541C',\n orange: '#FA8C16',\n gold: '#FAAD14',\n yellow: '#FADB14',\n lime: '#A0D911',\n green: '#52C41A',\n cyan: '#13C2C2',\n blue: '#1890FF',\n geekblue: '#2F54EB',\n purple: '#722ED1',\n magenta: '#EB2F96',\n grey: '#666666'\n};\nvar presetPalettes = {};\nvar presetDarkPalettes = {};\nObject.keys(presetPrimaryColors).forEach(function (key) {\n presetPalettes[key] = generate(presetPrimaryColors[key]);\n presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes\n\n presetDarkPalettes[key] = generate(presetPrimaryColors[key], {\n theme: 'dark',\n backgroundColor: '#141414'\n });\n presetDarkPalettes[key].primary = presetDarkPalettes[key][5];\n});\nvar red = presetPalettes.red;\nvar volcano = presetPalettes.volcano;\nvar gold = presetPalettes.gold;\nvar orange = presetPalettes.orange;\nvar yellow = presetPalettes.yellow;\nvar lime = presetPalettes.lime;\nvar green = presetPalettes.green;\nvar cyan = presetPalettes.cyan;\nvar blue = presetPalettes.blue;\nvar geekblue = presetPalettes.geekblue;\nvar purple = presetPalettes.purple;\nvar magenta = presetPalettes.magenta;\nvar grey = presetPalettes.grey;\n\nexport { blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow };\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport var defaultPresetColors = {\n blue: '#1677ff',\n purple: '#722ED1',\n cyan: '#13C2C2',\n green: '#52C41A',\n magenta: '#EB2F96',\n pink: '#eb2f96',\n red: '#F5222D',\n orange: '#FA8C16',\n yellow: '#FADB14',\n volcano: '#FA541C',\n geekblue: '#2F54EB',\n gold: '#FAAD14',\n lime: '#A0D911'\n};\nvar seedToken = _extends(_extends({}, defaultPresetColors), {\n // Color\n colorPrimary: '#1677ff',\n colorSuccess: '#52c41a',\n colorWarning: '#faad14',\n colorError: '#f5222d',\n colorInfo: '#1677ff',\n colorTextBase: '',\n colorBgBase: '',\n // Font\n fontFamily: \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\\n'Noto Color Emoji'\",\n fontSize: 14,\n // Line\n lineWidth: 1,\n lineType: 'solid',\n // Motion\n motionUnit: 0.1,\n motionBase: 0,\n motionEaseOutCirc: \"cubic-bezier(0.08, 0.82, 0.17, 1)\",\n motionEaseInOutCirc: \"cubic-bezier(0.78, 0.14, 0.15, 0.86)\",\n motionEaseOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n motionEaseInOut: \"cubic-bezier(0.645, 0.045, 0.355, 1)\",\n motionEaseOutBack: \"cubic-bezier(0.12, 0.4, 0.29, 1.46)\",\n motionEaseInBack: \"cubic-bezier(0.71, -0.46, 0.88, 0.6)\",\n motionEaseInQuint: \"cubic-bezier(0.645, 0.045, 0.355, 1)\",\n motionEaseOutQuint: \"cubic-bezier(0.23, 1, 0.32, 1)\",\n // Radius\n borderRadius: 6,\n // Size\n sizeUnit: 4,\n sizeStep: 4,\n sizePopupArrow: 16,\n // Control Base\n controlHeight: 32,\n // zIndex\n zIndexBase: 0,\n zIndexPopupBase: 1000,\n // Image\n opacityImage: 1,\n // Wireframe\n wireframe: false\n});\nexport default seedToken;","import ReactDOM from 'react-dom';\n/**\n * Return if a node is a DOM node. Else will return by `findDOMNode`\n */\nexport default function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n return ReactDOM.findDOMNode(node);\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nvar attributes = \"accept acceptCharset accessKey action allowFullScreen allowTransparency\\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\\n charSet checked classID className colSpan cols content contentEditable contextMenu\\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\\n mediaGroup method min minLength multiple muted name noValidate nonce open\\n optimum pattern placeholder poster preload radioGroup readOnly rel required\\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\\n summary tabIndex target title type useMap value width wmode wrap\";\nvar eventsName = \"onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError\";\nvar propList = \"\".concat(attributes, \" \").concat(eventsName).split(/[\\s\\n]+/);\n/* eslint-enable max-len */\nvar ariaPrefix = 'aria-';\nvar dataPrefix = 'data-';\nfunction match(key, prefix) {\n return key.indexOf(prefix) === 0;\n}\n/**\n * Picker props from exist props with filter\n * @param props Passed props\n * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config\n */\nexport default function pickAttrs(props) {\n var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var mergedConfig;\n if (ariaOnly === false) {\n mergedConfig = {\n aria: true,\n data: true,\n attr: true\n };\n } else if (ariaOnly === true) {\n mergedConfig = {\n aria: true\n };\n } else {\n mergedConfig = _objectSpread({}, ariaOnly);\n }\n var attrs = {};\n Object.keys(props).forEach(function (key) {\n if (\n // Aria\n mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||\n // Data\n mergedConfig.data && match(key, dataPrefix) ||\n // Attr\n mergedConfig.attr && propList.includes(key)) {\n attrs[key] = props[key];\n }\n });\n return attrs;\n}","import * as React from 'react';\nexport default function useMemo(getValue, condition, shouldUpdate) {\n var cacheRef = React.useRef({});\n if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {\n cacheRef.current.value = getValue();\n cacheRef.current.condition = condition;\n }\n return cacheRef.current.value;\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nvar initMotionCommon = function initMotionCommon(duration) {\n return {\n animationDuration: duration,\n animationFillMode: 'both'\n };\n};\n// FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove\nvar initMotionCommonLeave = function initMotionCommonLeave(duration) {\n return {\n animationDuration: duration,\n animationFillMode: 'both'\n };\n};\nexport var initMotion = function initMotion(motionCls, inKeyframes, outKeyframes, duration) {\n var _ref;\n var sameLevel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var sameLevelPrefix = sameLevel ? '&' : '';\n return _ref = {}, _defineProperty(_ref, \"\\n \" + sameLevelPrefix + motionCls + \"-enter,\\n \" + sameLevelPrefix + motionCls + \"-appear\\n \", _extends(_extends({}, initMotionCommon(duration)), {\n animationPlayState: 'paused'\n })), _defineProperty(_ref, \"\" + sameLevelPrefix + motionCls + \"-leave\", _extends(_extends({}, initMotionCommonLeave(duration)), {\n animationPlayState: 'paused'\n })), _defineProperty(_ref, \"\\n \" + sameLevelPrefix + motionCls + \"-enter\" + motionCls + \"-enter-active,\\n \" + sameLevelPrefix + motionCls + \"-appear\" + motionCls + \"-appear-active\\n \", {\n animationName: inKeyframes,\n animationPlayState: 'running'\n }), _defineProperty(_ref, \"\" + sameLevelPrefix + motionCls + \"-leave\" + motionCls + \"-leave-active\", {\n animationName: outKeyframes,\n animationPlayState: 'running',\n pointerEvents: 'none'\n }), _ref;\n};","import ResizeObserver from 'resize-observer-polyfill'; // =============================== Const ===============================\n\nvar elementListeners = new Map();\n\nfunction onResize(entities) {\n entities.forEach(function (entity) {\n var _elementListeners$get;\n\n var target = entity.target;\n (_elementListeners$get = elementListeners.get(target)) === null || _elementListeners$get === void 0 ? void 0 : _elementListeners$get.forEach(function (listener) {\n return listener(target);\n });\n });\n} // Note: ResizeObserver polyfill not support option to measure border-box resize\n\n\nvar resizeObserver = new ResizeObserver(onResize); // Dev env only\n\nexport var _el = process.env.NODE_ENV !== 'production' ? elementListeners : null; // eslint-disable-line\n\nexport var _rs = process.env.NODE_ENV !== 'production' ? onResize : null; // eslint-disable-line\n// ============================== Observe ==============================\n\nexport function observe(element, callback) {\n if (!elementListeners.has(element)) {\n elementListeners.set(element, new Set());\n resizeObserver.observe(element);\n }\n\n elementListeners.get(element).add(callback);\n}\nexport function unobserve(element, callback) {\n if (elementListeners.has(element)) {\n elementListeners.get(element).delete(callback);\n\n if (!elementListeners.get(element).size) {\n resizeObserver.unobserve(element);\n elementListeners.delete(element);\n }\n }\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\n/**\n * Fallback to findDOMNode if origin ref do not provide any dom element\n */\n\nvar DomWrapper = /*#__PURE__*/function (_React$Component) {\n _inherits(DomWrapper, _React$Component);\n\n var _super = _createSuper(DomWrapper);\n\n function DomWrapper() {\n _classCallCheck(this, DomWrapper);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(DomWrapper, [{\n key: \"render\",\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return DomWrapper;\n}(React.Component);\n\nexport { DomWrapper as default };","import * as React from 'react';\nexport var CollectionContext = /*#__PURE__*/React.createContext(null);\n/**\n * Collect all the resize event from children ResizeObserver\n */\n\nexport function Collection(_ref) {\n var children = _ref.children,\n onBatchResize = _ref.onBatchResize;\n var resizeIdRef = React.useRef(0);\n var resizeInfosRef = React.useRef([]);\n var onCollectionResize = React.useContext(CollectionContext);\n var onResize = React.useCallback(function (size, element, data) {\n resizeIdRef.current += 1;\n var currentId = resizeIdRef.current;\n resizeInfosRef.current.push({\n size: size,\n element: element,\n data: data\n });\n Promise.resolve().then(function () {\n if (currentId === resizeIdRef.current) {\n onBatchResize === null || onBatchResize === void 0 ? void 0 : onBatchResize(resizeInfosRef.current);\n resizeInfosRef.current = [];\n }\n }); // Continue bubbling if parent exist\n\n onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(size, element, data);\n }, [onBatchResize, onCollectionResize]);\n return /*#__PURE__*/React.createElement(CollectionContext.Provider, {\n value: onResize\n }, children);\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport { composeRef, supportRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport { observe, unobserve } from '../utils/observerUtil';\nimport DomWrapper from './DomWrapper';\nimport { CollectionContext } from '../Collection';\nexport default function SingleObserver(props) {\n var children = props.children,\n disabled = props.disabled;\n var elementRef = React.useRef(null);\n var wrapperRef = React.useRef(null);\n var onCollectionResize = React.useContext(CollectionContext); // =========================== Children ===========================\n\n var isRenderProps = typeof children === 'function';\n var mergedChildren = isRenderProps ? children(elementRef) : children; // ============================= Size =============================\n\n var sizeRef = React.useRef({\n width: -1,\n height: -1,\n offsetWidth: -1,\n offsetHeight: -1\n }); // ============================= Ref ==============================\n\n var canRef = !isRenderProps && /*#__PURE__*/React.isValidElement(mergedChildren) && supportRef(mergedChildren);\n var originRef = canRef ? mergedChildren.ref : null;\n var mergedRef = React.useMemo(function () {\n return composeRef(originRef, elementRef);\n }, [originRef, elementRef]); // =========================== Observe ============================\n\n var propsRef = React.useRef(props);\n propsRef.current = props; // Handler\n\n var onInternalResize = React.useCallback(function (target) {\n var _propsRef$current = propsRef.current,\n onResize = _propsRef$current.onResize,\n data = _propsRef$current.data;\n\n var _target$getBoundingCl = target.getBoundingClientRect(),\n width = _target$getBoundingCl.width,\n height = _target$getBoundingCl.height;\n\n var offsetWidth = target.offsetWidth,\n offsetHeight = target.offsetHeight;\n /**\n * Resize observer trigger when content size changed.\n * In most case we just care about element size,\n * let's use `boundary` instead of `contentRect` here to avoid shaking.\n */\n\n var fixedWidth = Math.floor(width);\n var fixedHeight = Math.floor(height);\n\n if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {\n var size = {\n width: fixedWidth,\n height: fixedHeight,\n offsetWidth: offsetWidth,\n offsetHeight: offsetHeight\n };\n sizeRef.current = size; // IE is strange, right?\n\n var mergedOffsetWidth = offsetWidth === Math.round(width) ? width : offsetWidth;\n var mergedOffsetHeight = offsetHeight === Math.round(height) ? height : offsetHeight;\n\n var sizeInfo = _objectSpread(_objectSpread({}, size), {}, {\n offsetWidth: mergedOffsetWidth,\n offsetHeight: mergedOffsetHeight\n }); // Let collection know what happened\n\n\n onCollectionResize === null || onCollectionResize === void 0 ? void 0 : onCollectionResize(sizeInfo, target, data);\n\n if (onResize) {\n // defer the callback but not defer to next frame\n Promise.resolve().then(function () {\n onResize(sizeInfo, target);\n });\n }\n }\n }, []); // Dynamic observe\n\n React.useEffect(function () {\n var currentElement = findDOMNode(elementRef.current) || findDOMNode(wrapperRef.current);\n\n if (currentElement && !disabled) {\n observe(currentElement, onInternalResize);\n }\n\n return function () {\n return unobserve(currentElement, onInternalResize);\n };\n }, [elementRef.current, disabled]); // ============================ Render ============================\n\n return /*#__PURE__*/React.createElement(DomWrapper, {\n ref: wrapperRef\n }, canRef ? /*#__PURE__*/React.cloneElement(mergedChildren, {\n ref: mergedRef\n }) : mergedChildren);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport { warning } from \"rc-util/es/warning\";\nimport SingleObserver from './SingleObserver';\nimport { Collection } from './Collection';\nvar INTERNAL_PREFIX_KEY = 'rc-observer-key';\n\nfunction ResizeObserver(props) {\n var children = props.children;\n var childNodes = typeof children === 'function' ? [children] : toArray(children);\n\n if (process.env.NODE_ENV !== 'production') {\n if (childNodes.length > 1) {\n warning(false, 'Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.');\n } else if (childNodes.length === 0) {\n warning(false, '`children` of ResizeObserver is empty. Nothing is in observe.');\n }\n }\n\n return childNodes.map(function (child, index) {\n var key = (child === null || child === void 0 ? void 0 : child.key) || \"\".concat(INTERNAL_PREFIX_KEY, \"-\").concat(index);\n return /*#__PURE__*/React.createElement(SingleObserver, _extends({}, props, {\n key: key\n }), child);\n });\n}\n\nResizeObserver.Collection = Collection;\nexport default ResizeObserver;","/* jshint node:true */\n\n'use strict';\n\nvar IntlMessageFormat = require('./lib/main')['default'];\n\n// Add all locale data to `IntlMessageFormat`. This module will be ignored when\n// bundling for the browser with Browserify/Webpack.\nrequire('./lib/locales');\n\n// Re-export `IntlMessageFormat` as the CommonJS default exports with all the\n// locale data registered, and with English set as the default locale. Define\n// the `default` prop for use with other compiled ES6 Modules.\nexports = module.exports = IntlMessageFormat;\nexports['default'] = exports;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nvar enableStatistic = process.env.NODE_ENV !== 'production' || typeof CSSINJS_STATISTIC !== 'undefined';\nvar recording = true;\n/**\n * This function will do as `Object.assign` in production. But will use Object.defineProperty:get to\n * pass all value access in development. To support statistic field usage with alias token.\n */\nexport function merge() {\n for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {\n objs[_key] = arguments[_key];\n }\n /* istanbul ignore next */\n if (!enableStatistic) {\n return _extends.apply(void 0, [{}].concat(objs));\n }\n recording = false;\n var ret = {};\n objs.forEach(function (obj) {\n var keys = Object.keys(obj);\n keys.forEach(function (key) {\n Object.defineProperty(ret, key, {\n configurable: true,\n enumerable: true,\n get: function get() {\n return obj[key];\n }\n });\n });\n });\n recording = true;\n return ret;\n}\n/** @private Internal Usage. Not use in your production. */\nexport var statistic = {};\n/** @private Internal Usage. Not use in your production. */\n// eslint-disable-next-line camelcase\nexport var _statistic_build_ = {};\n/* istanbul ignore next */\nfunction noop() {}\n/** Statistic token usage case. Should use `merge` function if you do not want spread record. */\nexport default function statisticToken(token) {\n var tokenKeys;\n var proxy = token;\n var flush = noop;\n if (enableStatistic) {\n tokenKeys = new Set();\n proxy = new Proxy(token, {\n get: function get(obj, prop) {\n if (recording) {\n tokenKeys.add(prop);\n }\n return obj[prop];\n }\n });\n flush = function flush(componentName, componentToken) {\n statistic[componentName] = {\n global: Array.from(tokenKeys),\n component: componentToken\n };\n };\n }\n return {\n token: proxy,\n keys: tokenKeys,\n flush: flush\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport defaultLocale from '../locale/en_US';\nvar runtimeLocale = _extends({}, defaultLocale.Modal);\nexport function changeConfirmLocale(newLocale) {\n if (newLocale) {\n runtimeLocale = _extends(_extends({}, runtimeLocale), newLocale);\n } else {\n runtimeLocale = _extends({}, defaultLocale.Modal);\n }\n}\nexport function getConfirmLocale() {\n return runtimeLocale;\n}","import Button from './button';\nexport default Button;","// This icon file is generated automatically.\nvar LoadingOutlined = { \"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\" };\nexport default LoadingOutlined;\n","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\nimport * as React from 'react';\nimport LoadingOutlinedSvg from \"@ant-design/icons-svg/es/asn/LoadingOutlined\";\nimport AntdIcon from '../components/AntdIcon';\nvar LoadingOutlined = function LoadingOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread(_objectSpread({}, props), {}, {\n ref: ref,\n icon: LoadingOutlinedSvg\n }));\n};\nLoadingOutlined.displayName = 'LoadingOutlined';\nexport default /*#__PURE__*/React.forwardRef(LoadingOutlined);","import ReactDOM from 'react-dom';\nexport default function addEventListenerWrap(target, eventType, cb, option) {\n /* eslint camelcase: 2 */\n var callback = ReactDOM.unstable_batchedUpdates ? function run(e) {\n ReactDOM.unstable_batchedUpdates(cb, e);\n } : cb;\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, option);\n }\n return {\n remove: function remove() {\n if (target.removeEventListener) {\n target.removeEventListener(eventType, callback, option);\n }\n }\n };\n}","import { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb } from './conversion';\nimport { names } from './css-color-names';\nimport { boundAlpha, convertToPercentage } from './util';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// \nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// \nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import { createContext } from 'react';\nvar IconContext = /*#__PURE__*/createContext({});\nexport default IconContext;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n// handle border collapse\nfunction compactItemBorder(token, borderedItemCls, popoverFocusedCls) {\n var childCombinator = borderedItemCls ? '> *' : '';\n return {\n '&-item:not(&-last-item)': {\n marginInlineEnd: -token.lineWidth\n },\n '&-item': _extends(_extends(_defineProperty({}, \"&:hover \" + childCombinator + \", &:focus \" + childCombinator + \", &:active \" + childCombinator, {\n zIndex: 2\n }), popoverFocusedCls ? _defineProperty({}, \"&\" + popoverFocusedCls, {\n zIndex: 2\n }) : {}), _defineProperty({}, \"&[disabled] \" + childCombinator, {\n zIndex: 0\n }))\n };\n}\n// handle border-radius\nfunction compactItemBorderRadius(prefixCls, borderedElementCls) {\n var _ref2;\n var childCombinator = borderedElementCls ? \"> \" + borderedElementCls : '';\n return _ref2 = {}, _defineProperty(_ref2, \"&-item:not(&-first-item):not(&-last-item) \" + childCombinator, {\n borderRadius: 0\n }), _defineProperty(_ref2, '&-item&-first-item', _defineProperty({}, \"& \" + childCombinator + \", &\" + prefixCls + \"-sm \" + childCombinator + \", &\" + prefixCls + \"-lg \" + childCombinator, {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n })), _defineProperty(_ref2, '&-item&-last-item', _defineProperty({}, \"& \" + childCombinator + \", &\" + prefixCls + \"-sm \" + childCombinator + \", &\" + prefixCls + \"-lg \" + childCombinator, {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n })), _ref2;\n}\nexport function genCompactItemStyle(token, prefixCls, /** Some component borders are implemented on child elements like `Select` */\nborderedElementCls,\n/**\n * Some components have special `focus` className especially with popovers like `Select` and\n * `DatePicker`\n */\npopoverFocusedCls) {\n return {\n '&-compact': _extends(_extends({}, compactItemBorder(token, borderedElementCls, popoverFocusedCls)), compactItemBorderRadius(prefixCls, borderedElementCls))\n };\n}","import raf from \"rc-util/es/raf\";\nvar id = 0;\nvar ids = {};\n// Support call raf with delay specified frame\nexport default function wrapperRaf(callback) {\n var delayFrames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var myId = id++;\n var restFrames = delayFrames;\n function internalCallback() {\n restFrames -= 1;\n if (restFrames <= 0) {\n callback();\n delete ids[myId];\n } else {\n ids[myId] = raf(internalCallback);\n }\n }\n ids[myId] = raf(internalCallback);\n return myId;\n}\nwrapperRaf.cancel = function cancel(pid) {\n if (pid === undefined) return;\n raf.cancel(ids[pid]);\n delete ids[pid];\n};\nwrapperRaf.ids = ids; // export this for test usage","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport { updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport { composeRef, supportRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport { ConfigConsumer, ConfigContext } from '../../config-provider';\nimport raf from '../raf';\nimport { cloneElement } from '../reactNode';\nimport useStyle from './style';\nvar styleForPseudo;\n// Where el is the DOM element you'd like to test for visibility\nfunction isHidden(element) {\n if (process.env.NODE_ENV === 'test') {\n return false;\n }\n return !element || element.offsetParent === null || element.hidden;\n}\nfunction getValidateContainer(nodeRoot) {\n if (nodeRoot instanceof Document) {\n return nodeRoot.body;\n }\n return Array.from(nodeRoot.childNodes).find(function (ele) {\n return (ele === null || ele === void 0 ? void 0 : ele.nodeType) === Node.ELEMENT_NODE;\n });\n}\nfunction isNotGrey(color) {\n // eslint-disable-next-line no-useless-escape\n var match = (color || '').match(/rgba?\\((\\d*), (\\d*), (\\d*)(, [\\d.]*)?\\)/);\n if (match && match[1] && match[2] && match[3]) {\n return !(match[1] === match[2] && match[2] === match[3]);\n }\n return true;\n}\nfunction isValidWaveColor(color) {\n return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && isNotGrey(color) && !/rgba\\((?:\\d*, ){3}0\\)/.test(color) &&\n // any transparent rgba color\n color !== 'transparent';\n}\nfunction getTargetWaveColor(node) {\n var computedStyle = getComputedStyle(node);\n var borderTopColor = computedStyle.getPropertyValue('border-top-color');\n var borderColor = computedStyle.getPropertyValue('border-color');\n var backgroundColor = computedStyle.getPropertyValue('background-color');\n if (isValidWaveColor(borderTopColor)) {\n return borderTopColor;\n }\n if (isValidWaveColor(borderColor)) {\n return borderColor;\n }\n return backgroundColor;\n}\nexport var InternalWave = /*#__PURE__*/function (_React$Component) {\n _inherits(InternalWave, _React$Component);\n var _super = _createSuper(InternalWave);\n function InternalWave() {\n var _this;\n _classCallCheck(this, InternalWave);\n _this = _super.apply(this, arguments);\n _this.containerRef = /*#__PURE__*/React.createRef();\n _this.animationStart = false;\n _this.destroyed = false;\n _this.onClick = function (node, waveColor) {\n var _a, _b;\n var _this$props = _this.props,\n insertExtraNode = _this$props.insertExtraNode,\n disabled = _this$props.disabled;\n if (disabled || !node || isHidden(node) || node.className.includes('-leave')) {\n return;\n }\n _this.extraNode = document.createElement('div');\n var _assertThisInitialize = _assertThisInitialized(_this),\n extraNode = _assertThisInitialize.extraNode;\n var getPrefixCls = _this.context.getPrefixCls;\n extraNode.className = getPrefixCls('') + \"-click-animating-node\";\n var attributeName = _this.getAttributeName();\n node.setAttribute(attributeName, 'true');\n // Not white or transparent or grey\n if (isValidWaveColor(waveColor)) {\n extraNode.style.borderColor = waveColor;\n var nodeRoot = ((_a = node.getRootNode) === null || _a === void 0 ? void 0 : _a.call(node)) || node.ownerDocument;\n var nodeBody = (_b = getValidateContainer(nodeRoot)) !== null && _b !== void 0 ? _b : nodeRoot;\n styleForPseudo = updateCSS(\"\\n [\" + getPrefixCls('') + \"-click-animating-without-extra-node='true']::after, .\" + getPrefixCls('') + \"-click-animating-node {\\n --antd-wave-shadow-color: \" + waveColor + \";\\n }\", 'antd-wave', {\n csp: _this.csp,\n attachTo: nodeBody\n });\n }\n if (insertExtraNode) {\n node.appendChild(extraNode);\n }\n ['transition', 'animation'].forEach(function (name) {\n node.addEventListener(name + \"start\", _this.onTransitionStart);\n node.addEventListener(name + \"end\", _this.onTransitionEnd);\n });\n };\n _this.onTransitionStart = function (e) {\n if (_this.destroyed) {\n return;\n }\n var node = _this.containerRef.current;\n if (!e || e.target !== node || _this.animationStart) {\n return;\n }\n _this.resetEffect(node);\n };\n _this.onTransitionEnd = function (e) {\n if (!e || e.animationName !== 'fadeEffect') {\n return;\n }\n _this.resetEffect(e.target);\n };\n _this.bindAnimationEvent = function (node) {\n if (!node || !node.getAttribute || node.getAttribute('disabled') || node.className.includes('disabled')) {\n return;\n }\n var onClick = function onClick(e) {\n // Fix radio button click twice\n if (e.target.tagName === 'INPUT' || isHidden(e.target)) {\n return;\n }\n _this.resetEffect(node);\n // Get wave color from target\n var waveColor = getTargetWaveColor(node);\n _this.clickWaveTimeoutId = window.setTimeout(function () {\n return _this.onClick(node, waveColor);\n }, 0);\n raf.cancel(_this.animationStartId);\n _this.animationStart = true;\n // Render to trigger transition event cost 3 frames. Let's delay 10 frames to reset this.\n _this.animationStartId = raf(function () {\n _this.animationStart = false;\n }, 10);\n };\n node.addEventListener('click', onClick, true);\n return {\n cancel: function cancel() {\n node.removeEventListener('click', onClick, true);\n }\n };\n };\n _this.renderWave = function (_ref) {\n var csp = _ref.csp;\n var children = _this.props.children;\n _this.csp = csp;\n if (! /*#__PURE__*/React.isValidElement(children)) return children;\n var ref = _this.containerRef;\n if (supportRef(children)) {\n ref = composeRef(children.ref, _this.containerRef);\n }\n return cloneElement(children, {\n ref: ref\n });\n };\n return _this;\n }\n _createClass(InternalWave, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.destroyed = false;\n var node = this.containerRef.current;\n if (!node || node.nodeType !== 1) {\n return;\n }\n this.instance = this.bindAnimationEvent(node);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.instance) {\n this.instance.cancel();\n }\n if (this.clickWaveTimeoutId) {\n clearTimeout(this.clickWaveTimeoutId);\n }\n this.destroyed = true;\n }\n }, {\n key: \"getAttributeName\",\n value: function getAttributeName() {\n var getPrefixCls = this.context.getPrefixCls;\n var insertExtraNode = this.props.insertExtraNode;\n return insertExtraNode ? getPrefixCls('') + \"-click-animating\" : getPrefixCls('') + \"-click-animating-without-extra-node\";\n }\n }, {\n key: \"resetEffect\",\n value: function resetEffect(node) {\n var _this2 = this;\n if (!node || node === this.extraNode || !(node instanceof Element)) {\n return;\n }\n var insertExtraNode = this.props.insertExtraNode;\n var attributeName = this.getAttributeName();\n node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466\n if (styleForPseudo) {\n styleForPseudo.innerHTML = '';\n }\n if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {\n node.removeChild(this.extraNode);\n }\n ['transition', 'animation'].forEach(function (name) {\n node.removeEventListener(name + \"start\", _this2.onTransitionStart);\n node.removeEventListener(name + \"end\", _this2.onTransitionEnd);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(ConfigConsumer, null, this.renderWave);\n }\n }]);\n return InternalWave;\n}(React.Component);\nInternalWave.contextType = ConfigContext;\nvar Wave = /*#__PURE__*/forwardRef(function (props, ref) {\n useStyle();\n return /*#__PURE__*/React.createElement(InternalWave, _extends({\n ref: ref\n }, props));\n});\nexport default Wave;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { Keyframes, useStyleRegister } from '@ant-design/cssinjs';\nimport { useContext } from 'react';\nimport { ConfigContext } from '../../config-provider';\nimport { useToken } from '../../theme';\nvar genWaveStyle = function genWaveStyle(token) {\n var _ref;\n var waveEffect = new Keyframes('waveEffect', {\n '100%': {\n boxShadow: \"0 0 0 6px var(--antd-wave-shadow-color)\"\n }\n });\n var fadeEffect = new Keyframes('fadeEffect', {\n '100%': {\n opacity: 0\n }\n });\n return [(_ref = {}, _defineProperty(_ref, token.clickAnimatingWithoutExtraNodeTrue + \",\\n \" + token.clickAnimatingTrue, {\n '--antd-wave-shadow-color': token.colorPrimary,\n '--scroll-bar': 0,\n position: 'relative'\n }), _defineProperty(_ref, token.clickAnimatingWithoutExtraNodeTrueAfter + \",\\n & \" + token.clickAnimatingNode, {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n insetInlineEnd: 0,\n bottom: 0,\n display: 'block',\n borderRadius: 'inherit',\n boxShadow: \"0 0 0 0 var(--antd-wave-shadow-color)\",\n opacity: 0.2,\n animation: {\n _skip_check_: true,\n value: fadeEffect.getName(token.hashId) + \" 2s \" + token.motionEaseOutCirc + \", \" + waveEffect.getName(token.hashId) + \" 0.4s \" + token.motionEaseOutCirc\n },\n animationFillMode: 'forwards',\n content: '\"\"',\n pointerEvents: 'none'\n }), _ref), {}, waveEffect, fadeEffect];\n};\nexport default (function () {\n var _useToken = useToken(),\n _useToken2 = _slicedToArray(_useToken, 3),\n theme = _useToken2[0],\n token = _useToken2[1],\n hashId = _useToken2[2];\n var _useContext = useContext(ConfigContext),\n getPrefixCls = _useContext.getPrefixCls;\n var rootPrefixCls = getPrefixCls();\n var clickAnimatingTrue = \"[\" + rootPrefixCls + \"-click-animating='true']\";\n var clickAnimatingWithoutExtraNodeTrue = \"[\" + rootPrefixCls + \"-click-animating-without-extra-node='true']\";\n var clickAnimatingNode = \".\" + rootPrefixCls + \"-click-animating-node\";\n var waveToken = _extends(_extends({}, token), {\n hashId: hashId,\n clickAnimatingNode: clickAnimatingNode,\n clickAnimatingTrue: clickAnimatingTrue,\n clickAnimatingWithoutExtraNodeTrue: clickAnimatingWithoutExtraNodeTrue,\n clickAnimatingWithoutExtraNodeTrueAfter: clickAnimatingWithoutExtraNodeTrue + \"::after\"\n });\n return [useStyleRegister({\n theme: theme,\n token: token,\n hashId: hashId,\n path: ['wave']\n }, function () {\n return [genWaveStyle(waveToken)];\n }), hashId];\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { useToken } from '../theme';\nimport warning from '../_util/warning';\nexport var GroupSizeContext = /*#__PURE__*/React.createContext(undefined);\nvar ButtonGroup = function ButtonGroup(props) {\n var _classNames;\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n var customizePrefixCls = props.prefixCls,\n size = props.size,\n className = props.className,\n others = __rest(props, [\"prefixCls\", \"size\", \"className\"]);\n var prefixCls = getPrefixCls('btn-group', customizePrefixCls);\n // Here we only need hashId\n var _useToken = useToken(),\n _useToken2 = _slicedToArray(_useToken, 3),\n hashId = _useToken2[2];\n // large => lg\n // small => sm\n var sizeCls = '';\n switch (size) {\n case 'large':\n sizeCls = 'lg';\n break;\n case 'small':\n sizeCls = 'sm';\n break;\n case 'middle':\n case undefined:\n break;\n default:\n process.env.NODE_ENV !== \"production\" ? warning(!size, 'Button.Group', 'Invalid prop `size`.') : void 0;\n }\n var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, prefixCls + \"-\" + sizeCls, sizeCls), _defineProperty(_classNames, prefixCls + \"-rtl\", direction === 'rtl'), _classNames), className, hashId);\n return /*#__PURE__*/React.createElement(GroupSizeContext.Provider, {\n value: size\n }, /*#__PURE__*/React.createElement(\"div\", _extends({}, others, {\n className: classes\n })));\n};\nexport default ButtonGroup;","import LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport CSSMotion from 'rc-motion';\nimport React from 'react';\nvar getCollapsedWidth = function getCollapsedWidth() {\n return {\n width: 0,\n opacity: 0,\n transform: 'scale(0)'\n };\n};\nvar getRealWidth = function getRealWidth(node) {\n return {\n width: node.scrollWidth,\n opacity: 1,\n transform: 'scale(1)'\n };\n};\nvar LoadingIcon = function LoadingIcon(_ref) {\n var prefixCls = _ref.prefixCls,\n loading = _ref.loading,\n existIcon = _ref.existIcon;\n var visible = !!loading;\n if (existIcon) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"-loading-icon\"\n }, /*#__PURE__*/React.createElement(LoadingOutlined, null));\n }\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: visible,\n // We do not really use this motionName\n motionName: prefixCls + \"-loading-icon-motion\",\n removeOnLeave: true,\n onAppearStart: getCollapsedWidth,\n onAppearActive: getRealWidth,\n onEnterStart: getCollapsedWidth,\n onEnterActive: getRealWidth,\n onLeaveStart: getRealWidth,\n onLeaveActive: getCollapsedWidth\n }, function (_ref2, ref) {\n var className = _ref2.className,\n style = _ref2.style;\n return /*#__PURE__*/React.createElement(\"span\", {\n className: prefixCls + \"-loading-icon\",\n style: style,\n ref: ref\n }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: className\n }));\n });\n};\nexport default LoadingIcon;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar genButtonBorderStyle = function genButtonBorderStyle(buttonTypeCls, borderColor) {\n return _defineProperty({}, \"> span, > \" + buttonTypeCls, {\n '&:not(:last-child)': _defineProperty({}, \"&, & > \" + buttonTypeCls, {\n '&:not(:disabled)': {\n borderInlineEndColor: borderColor\n }\n }),\n '&:not(:first-child)': _defineProperty({}, \"&, & > \" + buttonTypeCls, {\n '&:not(:disabled)': {\n borderInlineStartColor: borderColor\n }\n })\n });\n};\nvar genGroupStyle = function genGroupStyle(token) {\n var _componentCls, _ref2;\n var componentCls = token.componentCls,\n fontSize = token.fontSize,\n lineWidth = token.lineWidth,\n colorPrimaryHover = token.colorPrimaryHover,\n colorErrorHover = token.colorErrorHover;\n return _defineProperty({}, componentCls + \"-group\", [(_ref2 = {\n position: 'relative',\n display: 'inline-flex'\n }, _defineProperty(_ref2, \"> span, > \" + componentCls, {\n '&:not(:last-child)': _defineProperty({}, \"&, & > \" + componentCls, {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }),\n '&:not(:first-child)': _defineProperty({\n marginInlineStart: -lineWidth\n }, \"&, & > \" + componentCls, {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n })\n }), _defineProperty(_ref2, componentCls, (_componentCls = {\n position: 'relative',\n zIndex: 1\n }, _defineProperty(_componentCls, \"&:hover,\\n &:focus,\\n &:active\", {\n zIndex: 2\n }), _defineProperty(_componentCls, '&[disabled]', {\n zIndex: 0\n }), _componentCls)), _defineProperty(_ref2, componentCls + \"-icon-only\", {\n fontSize: fontSize\n }), _ref2),\n // Border Color\n genButtonBorderStyle(componentCls + \"-primary\", colorPrimaryHover), genButtonBorderStyle(componentCls + \"-danger\", colorErrorHover)]);\n};\nexport default genGroupStyle;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nfunction compactItemVerticalBorder(token) {\n return {\n // border collapse\n '&-item:not(&-last-item)': {\n marginBottom: -token.lineWidth\n },\n '&-item': {\n '&:hover,&:focus,&:active': {\n zIndex: 2\n },\n '&[disabled]': {\n zIndex: 0\n }\n }\n };\n}\nfunction compactItemBorderVerticalRadius(prefixCls) {\n return {\n '&-item:not(&-first-item):not(&-last-item)': {\n borderRadius: 0\n },\n '&-item&-first-item': _defineProperty({}, \"&, &\" + prefixCls + \"-sm, &\" + prefixCls + \"-lg\", {\n borderEndEndRadius: 0,\n borderEndStartRadius: 0\n }),\n '&-item&-last-item': _defineProperty({}, \"&, &\" + prefixCls + \"-sm, &\" + prefixCls + \"-lg\", {\n borderStartStartRadius: 0,\n borderStartEndRadius: 0\n })\n };\n}\nexport function genCompactItemVerticalStyle(token, prefixCls) {\n return {\n '&-compact-vertical': _extends(_extends({}, compactItemVerticalBorder(token)), compactItemBorderVerticalRadius(prefixCls))\n };\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { genComponentStyleHook, mergeToken } from '../../theme';\nimport genGroupStyle from './group';\nimport { genFocusStyle } from '../../style';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { genCompactItemVerticalStyle } from '../../style/compact-item-vertical';\n// ============================== Shared ==============================\nvar genSharedButtonStyle = function genSharedButtonStyle(token) {\n var _extends2, _extends3;\n var componentCls = token.componentCls,\n iconCls = token.iconCls;\n return _defineProperty({}, componentCls, _extends(_extends(_extends((_extends2 = {\n outline: 'none',\n position: 'relative',\n display: 'inline-block',\n fontWeight: 400,\n whiteSpace: 'nowrap',\n textAlign: 'center',\n backgroundImage: 'none',\n backgroundColor: 'transparent',\n border: token.lineWidth + \"px \" + token.lineType + \" transparent\",\n cursor: 'pointer',\n transition: \"all \" + token.motionDurationMid + \" \" + token.motionEaseInOut,\n userSelect: 'none',\n touchAction: 'manipulation',\n lineHeight: token.lineHeight,\n color: token.colorText,\n '> span': {\n display: 'inline-block'\n }\n }, _defineProperty(_extends2, \"> \" + iconCls + \" + span, > span + \" + iconCls, {\n marginInlineStart: token.marginXS\n }), _defineProperty(_extends2, \"&\" + componentCls + \"-block\", {\n width: '100%'\n }), _defineProperty(_extends2, '&:not(:disabled)', _extends({}, genFocusStyle(token))), _extends2), genCompactItemStyle(token, componentCls)), genCompactItemVerticalStyle(token, componentCls)), (_extends3 = {\n // make `btn-icon-only` not too narrow\n '&-icon-only&-compact-item': {\n flex: 'none'\n }\n }, _defineProperty(_extends3, \"&-compact-item\" + componentCls + \"-primary\", {\n '&:not([disabled]) + &:not([disabled])': {\n position: 'relative',\n '&:after': {\n position: 'absolute',\n top: -token.lineWidth,\n insetInlineStart: -token.lineWidth,\n display: 'inline-block',\n width: token.lineWidth,\n height: \"calc(100% + \" + token.lineWidth * 2 + \"px)\",\n backgroundColor: token.colorPrimaryBorder,\n content: '\"\"'\n }\n }\n }), _defineProperty(_extends3, '&-compact-vertical-item', _defineProperty({}, \"&\" + componentCls + \"-primary\", {\n '&:not([disabled]) + &:not([disabled])': {\n position: 'relative',\n '&:after': {\n position: 'absolute',\n top: -token.lineWidth,\n insetInlineStart: -token.lineWidth,\n display: 'inline-block',\n width: \"calc(100% + \" + token.lineWidth * 2 + \"px)\",\n height: token.lineWidth,\n backgroundColor: token.colorPrimaryBorder,\n content: '\"\"'\n }\n }\n })), _extends3)));\n};\nvar genHoverActiveButtonStyle = function genHoverActiveButtonStyle(hoverStyle, activeStyle) {\n return {\n '&:not(:disabled)': {\n '&:hover': hoverStyle,\n '&:active': activeStyle\n }\n };\n};\n// ============================== Shape ===============================\nvar genCircleButtonStyle = function genCircleButtonStyle(token) {\n return {\n minWidth: token.controlHeight,\n paddingInlineStart: 0,\n paddingInlineEnd: 0,\n borderRadius: '50%'\n };\n};\nvar genRoundButtonStyle = function genRoundButtonStyle(token) {\n return {\n borderRadius: token.controlHeight,\n paddingInlineStart: token.controlHeight / 2,\n paddingInlineEnd: token.controlHeight / 2,\n width: 'auto'\n };\n};\n// =============================== Type ===============================\nvar genGhostButtonStyle = function genGhostButtonStyle(btnCls, textColor, borderColor, textColorDisabled, borderColorDisabled, hoverStyle, activeStyle) {\n return _defineProperty({}, \"&\" + btnCls + \"-background-ghost\", _extends(_extends({\n color: textColor || undefined,\n backgroundColor: 'transparent',\n borderColor: borderColor || undefined,\n boxShadow: 'none'\n }, genHoverActiveButtonStyle(_extends({\n backgroundColor: 'transparent'\n }, hoverStyle), _extends({\n backgroundColor: 'transparent'\n }, activeStyle))), {\n '&:disabled': {\n cursor: 'not-allowed',\n color: textColorDisabled || undefined,\n borderColor: borderColorDisabled || undefined\n }\n }));\n};\nvar genSolidDisabledButtonStyle = function genSolidDisabledButtonStyle(token) {\n return {\n '&:disabled': {\n cursor: 'not-allowed',\n borderColor: token.colorBorder,\n color: token.colorTextDisabled,\n backgroundColor: token.colorBgContainerDisabled,\n boxShadow: 'none'\n }\n };\n};\nvar genSolidButtonStyle = function genSolidButtonStyle(token) {\n return _extends({}, genSolidDisabledButtonStyle(token));\n};\nvar genPureDisabledButtonStyle = function genPureDisabledButtonStyle(token) {\n return {\n '&:disabled': {\n cursor: 'not-allowed',\n color: token.colorTextDisabled\n }\n };\n};\n// Type: Default\nvar genDefaultButtonStyle = function genDefaultButtonStyle(token) {\n return _extends(_extends(_extends(_extends(_extends({}, genSolidButtonStyle(token)), {\n backgroundColor: token.colorBgContainer,\n borderColor: token.colorBorder,\n boxShadow: \"0 \" + token.controlOutlineWidth + \"px 0 \" + token.controlTmpOutline\n }), genHoverActiveButtonStyle({\n color: token.colorPrimaryHover,\n borderColor: token.colorPrimaryHover\n }, {\n color: token.colorPrimaryActive,\n borderColor: token.colorPrimaryActive\n })), genGhostButtonStyle(token.componentCls, token.colorBgContainer, token.colorBgContainer, token.colorTextDisabled, token.colorBorder)), _defineProperty({}, \"&\" + token.componentCls + \"-dangerous\", _extends(_extends(_extends({\n color: token.colorError,\n borderColor: token.colorError\n }, genHoverActiveButtonStyle({\n color: token.colorErrorHover,\n borderColor: token.colorErrorBorder\n }, {\n color: token.colorErrorActive,\n borderColor: token.colorErrorActive\n })), genGhostButtonStyle(token.componentCls, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder)), genSolidDisabledButtonStyle(token))));\n};\n// Type: Primary\nvar genPrimaryButtonStyle = function genPrimaryButtonStyle(token) {\n return _extends(_extends(_extends(_extends(_extends({}, genSolidButtonStyle(token)), {\n color: token.colorTextLightSolid,\n backgroundColor: token.colorPrimary,\n boxShadow: \"0 \" + token.controlOutlineWidth + \"px 0 \" + token.controlOutline\n }), genHoverActiveButtonStyle({\n color: token.colorTextLightSolid,\n backgroundColor: token.colorPrimaryHover\n }, {\n color: token.colorTextLightSolid,\n backgroundColor: token.colorPrimaryActive\n })), genGhostButtonStyle(token.componentCls, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {\n color: token.colorPrimaryHover,\n borderColor: token.colorPrimaryHover\n }, {\n color: token.colorPrimaryActive,\n borderColor: token.colorPrimaryActive\n })), _defineProperty({}, \"&\" + token.componentCls + \"-dangerous\", _extends(_extends(_extends({\n backgroundColor: token.colorError,\n boxShadow: \"0 \" + token.controlOutlineWidth + \"px 0 \" + token.colorErrorOutline\n }, genHoverActiveButtonStyle({\n backgroundColor: token.colorErrorHover\n }, {\n backgroundColor: token.colorErrorActive\n })), genGhostButtonStyle(token.componentCls, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {\n color: token.colorErrorHover,\n borderColor: token.colorErrorHover\n }, {\n color: token.colorErrorActive,\n borderColor: token.colorErrorActive\n })), genSolidDisabledButtonStyle(token))));\n};\n// Type: Dashed\nvar genDashedButtonStyle = function genDashedButtonStyle(token) {\n return _extends(_extends({}, genDefaultButtonStyle(token)), {\n borderStyle: 'dashed'\n });\n};\n// Type: Link\nvar genLinkButtonStyle = function genLinkButtonStyle(token) {\n return _extends(_extends(_extends({\n color: token.colorLink\n }, genHoverActiveButtonStyle({\n color: token.colorLinkHover\n }, {\n color: token.colorLinkActive\n })), genPureDisabledButtonStyle(token)), _defineProperty({}, \"&\" + token.componentCls + \"-dangerous\", _extends(_extends({\n color: token.colorError\n }, genHoverActiveButtonStyle({\n color: token.colorErrorHover\n }, {\n color: token.colorErrorActive\n })), genPureDisabledButtonStyle(token))));\n};\n// Type: Text\nvar genTextButtonStyle = function genTextButtonStyle(token) {\n return _extends(_extends(_extends({}, genHoverActiveButtonStyle({\n color: token.colorText,\n backgroundColor: token.colorBgTextHover\n }, {\n color: token.colorText,\n backgroundColor: token.colorBgTextActive\n })), genPureDisabledButtonStyle(token)), _defineProperty({}, \"&\" + token.componentCls + \"-dangerous\", _extends(_extends({\n color: token.colorError\n }, genPureDisabledButtonStyle(token)), genHoverActiveButtonStyle({\n color: token.colorErrorHover,\n backgroundColor: token.colorErrorBg\n }, {\n color: token.colorErrorHover,\n backgroundColor: token.colorErrorBg\n }))));\n};\nvar genTypeButtonStyle = function genTypeButtonStyle(token) {\n var _ref3;\n var componentCls = token.componentCls;\n return _ref3 = {}, _defineProperty(_ref3, componentCls + \"-default\", genDefaultButtonStyle(token)), _defineProperty(_ref3, componentCls + \"-primary\", genPrimaryButtonStyle(token)), _defineProperty(_ref3, componentCls + \"-dashed\", genDashedButtonStyle(token)), _defineProperty(_ref3, componentCls + \"-link\", genLinkButtonStyle(token)), _defineProperty(_ref3, componentCls + \"-text\", genTextButtonStyle(token)), _ref3;\n};\n// =============================== Size ===============================\nvar genSizeButtonStyle = function genSizeButtonStyle(token) {\n var _ref4;\n var sizePrefixCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var componentCls = token.componentCls,\n iconCls = token.iconCls;\n var paddingVertical = Math.max(0, (token.controlHeight - token.fontSize * token.lineHeight) / 2 - token.lineWidth);\n var paddingHorizontal = token.buttonPaddingHorizontal - token.lineWidth;\n var iconOnlyCls = componentCls + \"-icon-only\";\n return [// Size\n _defineProperty({}, \"\" + componentCls + sizePrefixCls, (_ref4 = {\n fontSize: token.fontSize,\n height: token.controlHeight,\n padding: paddingVertical + \"px \" + paddingHorizontal + \"px\",\n borderRadius: token.borderRadius\n }, _defineProperty(_ref4, \"&\" + iconOnlyCls, {\n width: token.controlHeight,\n paddingInlineStart: 0,\n paddingInlineEnd: 0,\n '> span': {\n transform: 'scale(1.143)' // 14px -> 16px\n }\n }), _defineProperty(_ref4, \"&\" + componentCls + \"-loading\", {\n opacity: token.opacityLoading,\n cursor: 'default'\n }), _defineProperty(_ref4, componentCls + \"-loading-icon\", {\n transition: \"width \" + token.motionDurationSlow + \" \" + token.motionEaseInOut + \", opacity \" + token.motionDurationSlow + \" \" + token.motionEaseInOut\n }), _defineProperty(_ref4, \"&:not(\" + iconOnlyCls + \") \" + componentCls + \"-loading-icon > \" + iconCls, {\n marginInlineEnd: token.marginXS\n }), _ref4)), // Shape - patch prefixCls again to override solid border radius style\n _defineProperty({}, \"\" + componentCls + componentCls + \"-circle\" + sizePrefixCls, genCircleButtonStyle(token)), _defineProperty({}, \"\" + componentCls + componentCls + \"-round\" + sizePrefixCls, genRoundButtonStyle(token))];\n};\nvar genSizeBaseButtonStyle = function genSizeBaseButtonStyle(token) {\n return genSizeButtonStyle(token);\n};\nvar genSizeSmallButtonStyle = function genSizeSmallButtonStyle(token) {\n var smallToken = mergeToken(token, {\n controlHeight: token.controlHeightSM,\n padding: token.paddingXS,\n buttonPaddingHorizontal: 8,\n borderRadius: token.borderRadiusSM\n });\n return genSizeButtonStyle(smallToken, token.componentCls + \"-sm\");\n};\nvar genSizeLargeButtonStyle = function genSizeLargeButtonStyle(token) {\n var largeToken = mergeToken(token, {\n controlHeight: token.controlHeightLG,\n fontSize: token.fontSizeLG,\n borderRadius: token.borderRadiusLG\n });\n return genSizeButtonStyle(largeToken, token.componentCls + \"-lg\");\n};\n// ============================== Export ==============================\nexport default genComponentStyleHook('Button', function (token) {\n var controlTmpOutline = token.controlTmpOutline,\n paddingContentHorizontal = token.paddingContentHorizontal;\n var buttonToken = mergeToken(token, {\n colorOutlineDefault: controlTmpOutline,\n buttonPaddingHorizontal: paddingContentHorizontal\n });\n return [\n // Shared\n genSharedButtonStyle(buttonToken),\n // Size\n genSizeSmallButtonStyle(buttonToken), genSizeBaseButtonStyle(buttonToken), genSizeLargeButtonStyle(buttonToken),\n // Group (type, ghost, danger, disabled, loading)\n genTypeButtonStyle(buttonToken),\n // Button Group\n genGroupStyle(buttonToken)];\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable react/button-has-type */\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport SizeContext from '../config-provider/SizeContext';\nimport { useCompactItemContext } from '../space/Compact';\nimport { cloneElement, isFragment } from '../_util/reactNode';\nimport { tuple } from '../_util/type';\nimport warning from '../_util/warning';\nimport Wave from '../_util/wave';\nimport Group, { GroupSizeContext } from './button-group';\nimport LoadingIcon from './LoadingIcon';\n// CSSINJS\nimport useStyle from './style';\nvar rxTwoCNChar = /^[\\u4e00-\\u9fa5]{2}$/;\nvar isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);\nfunction isString(str) {\n return typeof str === 'string';\n}\nfunction isUnBorderedButtonType(type) {\n return type === 'text' || type === 'link';\n}\n// Insert one space between two chinese characters automatically.\nfunction insertSpace(child, needInserted) {\n // Check the child if is undefined or null.\n if (child === null || child === undefined) {\n return;\n }\n var SPACE = needInserted ? ' ' : '';\n // strictNullChecks oops.\n if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {\n return cloneElement(child, {\n children: child.props.children.split('').join(SPACE)\n });\n }\n if (typeof child === 'string') {\n return isTwoCNChar(child) ? /*#__PURE__*/React.createElement(\"span\", null, child.split('').join(SPACE)) : /*#__PURE__*/React.createElement(\"span\", null, child);\n }\n if (isFragment(child)) {\n return /*#__PURE__*/React.createElement(\"span\", null, child);\n }\n return child;\n}\nfunction spaceChildren(children, needInserted) {\n var isPrevChildPure = false;\n var childList = [];\n React.Children.forEach(children, function (child) {\n var type = _typeof(child);\n var isCurrentChildPure = type === 'string' || type === 'number';\n if (isPrevChildPure && isCurrentChildPure) {\n var lastIndex = childList.length - 1;\n var lastChild = childList[lastIndex];\n childList[lastIndex] = \"\" + lastChild + child;\n } else {\n childList.push(child);\n }\n isPrevChildPure = isCurrentChildPure;\n });\n // Pass to React.Children.map to auto fill key\n return React.Children.map(childList, function (child) {\n return insertSpace(child, needInserted);\n });\n}\nvar ButtonTypes = tuple('default', 'primary', 'ghost', 'dashed', 'link', 'text');\nvar ButtonShapes = tuple('default', 'circle', 'round');\nvar ButtonHTMLTypes = tuple('submit', 'button', 'reset');\nexport function convertLegacyProps(type) {\n if (type === 'danger') {\n return {\n danger: true\n };\n }\n return {\n type: type\n };\n}\nvar InternalButton = function InternalButton(props, ref) {\n var _classNames;\n var _props$loading = props.loading,\n loading = _props$loading === void 0 ? false : _props$loading,\n customizePrefixCls = props.prefixCls,\n _props$type = props.type,\n type = _props$type === void 0 ? 'default' : _props$type,\n danger = props.danger,\n _props$shape = props.shape,\n shape = _props$shape === void 0 ? 'default' : _props$shape,\n customizeSize = props.size,\n customDisabled = props.disabled,\n className = props.className,\n children = props.children,\n icon = props.icon,\n _props$ghost = props.ghost,\n ghost = _props$ghost === void 0 ? false : _props$ghost,\n _props$block = props.block,\n block = _props$block === void 0 ? false : _props$block,\n _props$htmlType = props.htmlType,\n htmlType = _props$htmlType === void 0 ? 'button' : _props$htmlType,\n rest = __rest(props, [\"loading\", \"prefixCls\", \"type\", \"danger\", \"shape\", \"size\", \"disabled\", \"className\", \"children\", \"icon\", \"ghost\", \"block\", \"htmlType\"]);\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n autoInsertSpaceInButton = _React$useContext.autoInsertSpaceInButton,\n direction = _React$useContext.direction;\n var prefixCls = getPrefixCls('btn', customizePrefixCls);\n // Style\n var _useStyle = useStyle(prefixCls),\n _useStyle2 = _slicedToArray(_useStyle, 2),\n wrapSSR = _useStyle2[0],\n hashId = _useStyle2[1];\n var size = React.useContext(SizeContext);\n // ===================== Disabled =====================\n var disabled = React.useContext(DisabledContext);\n var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n var groupSize = React.useContext(GroupSizeContext);\n var _React$useState = React.useState(!!loading),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n innerLoading = _React$useState2[0],\n setLoading = _React$useState2[1];\n var _React$useState3 = React.useState(false),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n hasTwoCNChar = _React$useState4[0],\n setHasTwoCNChar = _React$useState4[1];\n var buttonRef = ref || /*#__PURE__*/React.createRef();\n var isNeedInserted = function isNeedInserted() {\n return React.Children.count(children) === 1 && !icon && !isUnBorderedButtonType(type);\n };\n var fixTwoCNChar = function fixTwoCNChar() {\n // Fix for HOC usage like \n if (!buttonRef || !buttonRef.current || autoInsertSpaceInButton === false) {\n return;\n }\n var buttonText = buttonRef.current.textContent;\n if (isNeedInserted() && isTwoCNChar(buttonText)) {\n if (!hasTwoCNChar) {\n setHasTwoCNChar(true);\n }\n } else if (hasTwoCNChar) {\n setHasTwoCNChar(false);\n }\n };\n // =============== Update Loading ===============\n var loadingOrDelay = typeof loading === 'boolean' ? loading : (loading === null || loading === void 0 ? void 0 : loading.delay) || true;\n React.useEffect(function () {\n var delayTimer = null;\n if (typeof loadingOrDelay === 'number') {\n delayTimer = window.setTimeout(function () {\n delayTimer = null;\n setLoading(loadingOrDelay);\n }, loadingOrDelay);\n } else {\n setLoading(loadingOrDelay);\n }\n return function () {\n if (delayTimer) {\n // in order to not perform a React state update on an unmounted component\n // and clear timer after 'loadingOrDelay' updated.\n window.clearTimeout(delayTimer);\n delayTimer = null;\n }\n };\n }, [loadingOrDelay]);\n React.useEffect(fixTwoCNChar, [buttonRef]);\n var handleClick = function handleClick(e) {\n var onClick = props.onClick;\n // https://github.com/ant-design/ant-design/issues/30207\n if (innerLoading || mergedDisabled) {\n e.preventDefault();\n return;\n }\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n };\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof icon === 'string' && icon.length > 2), 'Button', \"`icon` is using ReactNode instead of string naming in v4. Please check `\" + icon + \"` at https://ant.design/components/icon\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(ghost && isUnBorderedButtonType(type)), 'Button', \"`link` or `text` button can't be a `ghost` button.\") : void 0;\n var autoInsertSpace = autoInsertSpaceInButton !== false;\n var _useCompactItemContex = useCompactItemContext(prefixCls, direction),\n compactSize = _useCompactItemContex.compactSize,\n compactItemClassnames = _useCompactItemContex.compactItemClassnames;\n var sizeClassNameMap = {\n large: 'lg',\n small: 'sm',\n middle: undefined\n };\n var sizeFullname = compactSize || groupSize || customizeSize || size;\n var sizeCls = sizeFullname ? sizeClassNameMap[sizeFullname] || '' : '';\n var iconType = innerLoading ? 'loading' : icon;\n var linkButtonRestProps = omit(rest, ['navigate']);\n var classes = classNames(prefixCls, hashId, (_classNames = {}, _defineProperty(_classNames, prefixCls + \"-\" + shape, shape !== 'default' && shape), _defineProperty(_classNames, prefixCls + \"-\" + type, type), _defineProperty(_classNames, prefixCls + \"-\" + sizeCls, sizeCls), _defineProperty(_classNames, prefixCls + \"-icon-only\", !children && children !== 0 && !!iconType), _defineProperty(_classNames, prefixCls + \"-background-ghost\", ghost && !isUnBorderedButtonType(type)), _defineProperty(_classNames, prefixCls + \"-loading\", innerLoading), _defineProperty(_classNames, prefixCls + \"-two-chinese-chars\", hasTwoCNChar && autoInsertSpace && !innerLoading), _defineProperty(_classNames, prefixCls + \"-block\", block), _defineProperty(_classNames, prefixCls + \"-dangerous\", !!danger), _defineProperty(_classNames, prefixCls + \"-rtl\", direction === 'rtl'), _defineProperty(_classNames, prefixCls + \"-disabled\", linkButtonRestProps.href !== undefined && mergedDisabled), _classNames), compactItemClassnames, className);\n var iconNode = icon && !innerLoading ? icon : /*#__PURE__*/React.createElement(LoadingIcon, {\n existIcon: !!icon,\n prefixCls: prefixCls,\n loading: !!innerLoading\n });\n var kids = children || children === 0 ? spaceChildren(children, isNeedInserted() && autoInsertSpace) : null;\n if (linkButtonRestProps.href !== undefined) {\n return wrapSSR( /*#__PURE__*/React.createElement(\"a\", _extends({}, linkButtonRestProps, {\n className: classes,\n onClick: handleClick,\n ref: buttonRef\n }), iconNode, kids));\n }\n var buttonNode = /*#__PURE__*/React.createElement(\"button\", _extends({}, rest, {\n type: htmlType,\n className: classes,\n onClick: handleClick,\n disabled: mergedDisabled,\n ref: buttonRef\n }), iconNode, kids);\n if (!isUnBorderedButtonType(type)) {\n buttonNode = /*#__PURE__*/React.createElement(Wave, {\n disabled: !!innerLoading\n }, buttonNode);\n }\n return wrapSSR(buttonNode);\n};\nvar Button = /*#__PURE__*/React.forwardRef(InternalButton);\nif (process.env.NODE_ENV !== 'production') {\n Button.displayName = 'Button';\n}\nButton.Group = Group;\nButton.__ANT_BUTTON = true;\nexport default Button;","/* jshint node:true */\n\n'use strict';\n\nvar IntlRelativeFormat = require('./lib/main')['default'];\n\n// Add all locale data to `IntlRelativeFormat`. This module will be ignored when\n// bundling for the browser with Browserify/Webpack.\nrequire('./lib/locales');\n\n// Re-export `IntlRelativeFormat` as the CommonJS default exports with all the\n// locale data registered, and with English set as the default locale. Define\n// the `default` prop for use with other compiled ES6 Modules.\nexports = module.exports = IntlRelativeFormat;\nexports['default'] = exports;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n return arr2;\n}","// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n","import { createContext } from 'react';\nvar LocaleContext = /*#__PURE__*/createContext(undefined);\nexport default LocaleContext;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport RowContext from './RowContext';\nimport { useColStyle } from './style';\nfunction parseFlex(flex) {\n if (typeof flex === 'number') {\n return flex + \" \" + flex + \" auto\";\n }\n if (/^\\d+(\\.\\d+)?(px|em|rem|%)$/.test(flex)) {\n return \"0 0 \" + flex;\n }\n return flex;\n}\nvar sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];\nvar Col = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _classNames;\n var _React$useContext = React.useContext(ConfigContext),\n getPrefixCls = _React$useContext.getPrefixCls,\n direction = _React$useContext.direction;\n var _React$useContext2 = React.useContext(RowContext),\n gutter = _React$useContext2.gutter,\n wrap = _React$useContext2.wrap,\n supportFlexGap = _React$useContext2.supportFlexGap;\n var customizePrefixCls = props.prefixCls,\n span = props.span,\n order = props.order,\n offset = props.offset,\n push = props.push,\n pull = props.pull,\n className = props.className,\n children = props.children,\n flex = props.flex,\n style = props.style,\n others = __rest(props, [\"prefixCls\", \"span\", \"order\", \"offset\", \"push\", \"pull\", \"className\", \"children\", \"flex\", \"style\"]);\n var prefixCls = getPrefixCls('col', customizePrefixCls);\n var _useColStyle = useColStyle(prefixCls),\n _useColStyle2 = _slicedToArray(_useColStyle, 2),\n wrapSSR = _useColStyle2[0],\n hashId = _useColStyle2[1];\n var sizeClassObj = {};\n sizes.forEach(function (size) {\n var _extends2;\n var sizeProps = {};\n var propSize = props[size];\n if (typeof propSize === 'number') {\n sizeProps.span = propSize;\n } else if (_typeof(propSize) === 'object') {\n sizeProps = propSize || {};\n }\n delete others[size];\n sizeClassObj = _extends(_extends({}, sizeClassObj), (_extends2 = {}, _defineProperty(_extends2, prefixCls + \"-\" + size + \"-\" + sizeProps.span, sizeProps.span !== undefined), _defineProperty(_extends2, prefixCls + \"-\" + size + \"-order-\" + sizeProps.order, sizeProps.order || sizeProps.order === 0), _defineProperty(_extends2, prefixCls + \"-\" + size + \"-offset-\" + sizeProps.offset, sizeProps.offset || sizeProps.offset === 0), _defineProperty(_extends2, prefixCls + \"-\" + size + \"-push-\" + sizeProps.push, sizeProps.push || sizeProps.push === 0), _defineProperty(_extends2, prefixCls + \"-\" + size + \"-pull-\" + sizeProps.pull, sizeProps.pull || sizeProps.pull === 0), _defineProperty(_extends2, prefixCls + \"-rtl\", direction === 'rtl'), _extends2));\n });\n var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, prefixCls + \"-\" + span, span !== undefined), _defineProperty(_classNames, prefixCls + \"-order-\" + order, order), _defineProperty(_classNames, prefixCls + \"-offset-\" + offset, offset), _defineProperty(_classNames, prefixCls + \"-push-\" + push, push), _defineProperty(_classNames, prefixCls + \"-pull-\" + pull, pull), _classNames), className, sizeClassObj, hashId);\n var mergedStyle = {};\n // Horizontal gutter use padding\n if (gutter && gutter[0] > 0) {\n var horizontalGutter = gutter[0] / 2;\n mergedStyle.paddingLeft = horizontalGutter;\n mergedStyle.paddingRight = horizontalGutter;\n }\n // Vertical gutter use padding when gap not support\n if (gutter && gutter[1] > 0 && !supportFlexGap) {\n var verticalGutter = gutter[1] / 2;\n mergedStyle.paddingTop = verticalGutter;\n mergedStyle.paddingBottom = verticalGutter;\n }\n if (flex) {\n mergedStyle.flex = parseFlex(flex);\n // Hack for Firefox to avoid size issue\n // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553\n if (wrap === false && !mergedStyle.minWidth) {\n mergedStyle.minWidth = 0;\n }\n }\n return wrapSSR( /*#__PURE__*/React.createElement(\"div\", _extends({}, others, {\n style: _extends(_extends({}, mergedStyle), style),\n className: classes,\n ref: ref\n }), children));\n});\nif (process.env.NODE_ENV !== 'production') {\n Col.displayName = 'Col';\n}\nexport default Col;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","'use strict';\n\n/**\n * Ruler is a helper class for building responsibility chains from\n * parse rules. It allows:\n *\n * - easy stack rules chains\n * - getting main chain and named chains content (as arrays of functions)\n *\n * Helper methods, should not be used directly.\n * @api private\n */\n\nfunction Ruler() {\n // List of added rules. Each element is:\n //\n // { name: XXX,\n // enabled: Boolean,\n // fn: Function(),\n // alt: [ name2, name3 ] }\n //\n this.__rules__ = [];\n\n // Cached rule chains.\n //\n // First level - chain name, '' for default.\n // Second level - digital anchor for fast filtering by charcodes.\n //\n this.__cache__ = null;\n}\n\n/**\n * Find the index of a rule by `name`.\n *\n * @param {String} `name`\n * @return {Number} Index of the given `name`\n * @api private\n */\n\nRuler.prototype.__find__ = function (name) {\n var len = this.__rules__.length;\n var i = -1;\n\n while (len--) {\n if (this.__rules__[++i].name === name) {\n return i;\n }\n }\n return -1;\n};\n\n/**\n * Build the rules lookup cache\n *\n * @api private\n */\n\nRuler.prototype.__compile__ = function () {\n var self = this;\n var chains = [ '' ];\n\n // collect unique names\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n\n rule.alt.forEach(function (altName) {\n if (chains.indexOf(altName) < 0) {\n chains.push(altName);\n }\n });\n });\n\n self.__cache__ = {};\n\n chains.forEach(function (chain) {\n self.__cache__[chain] = [];\n self.__rules__.forEach(function (rule) {\n if (!rule.enabled) {\n return;\n }\n\n if (chain && rule.alt.indexOf(chain) < 0) {\n return;\n }\n self.__cache__[chain].push(rule.fn);\n });\n });\n};\n\n/**\n * Ruler public methods\n * ------------------------------------------------\n */\n\n/**\n * Replace rule function\n *\n * @param {String} `name` Rule name\n * @param {Function `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.at = function (name, fn, options) {\n var idx = this.__find__(name);\n var opt = options || {};\n\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + name);\n }\n\n this.__rules__[idx].fn = fn;\n this.__rules__[idx].alt = opt.alt || [];\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain before given the `ruleName`.\n *\n * @param {String} `beforeName`\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n var idx = this.__find__(beforeName);\n var opt = options || {};\n\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + beforeName);\n }\n\n this.__rules__.splice(idx, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the chain after the given `ruleName`.\n *\n * @param {String} `afterName`\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @api private\n */\n\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n var idx = this.__find__(afterName);\n var opt = options || {};\n\n if (idx === -1) {\n throw new Error('Parser rule not found: ' + afterName);\n }\n\n this.__rules__.splice(idx + 1, 0, {\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Add a rule to the end of chain.\n *\n * @param {String} `ruleName`\n * @param {Function} `fn`\n * @param {Object} `options`\n * @return {String}\n */\n\nRuler.prototype.push = function (ruleName, fn, options) {\n var opt = options || {};\n\n this.__rules__.push({\n name: ruleName,\n enabled: true,\n fn: fn,\n alt: opt.alt || []\n });\n\n this.__cache__ = null;\n};\n\n/**\n * Enable a rule or list of rules.\n *\n * @param {String|Array} `list` Name or array of rule names to enable\n * @param {Boolean} `strict` If `true`, all non listed rules will be disabled.\n * @api private\n */\n\nRuler.prototype.enable = function (list, strict) {\n list = !Array.isArray(list)\n ? [ list ]\n : list;\n\n // In strict mode disable all existing rules first\n if (strict) {\n this.__rules__.forEach(function (rule) {\n rule.enabled = false;\n });\n }\n\n // Search by name and enable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n if (idx < 0) {\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = true;\n }, this);\n\n this.__cache__ = null;\n};\n\n\n/**\n * Disable a rule or list of rules.\n *\n * @param {String|Array} `list` Name or array of rule names to disable\n * @api private\n */\n\nRuler.prototype.disable = function (list) {\n list = !Array.isArray(list)\n ? [ list ]\n : list;\n\n // Search by name and disable\n list.forEach(function (name) {\n var idx = this.__find__(name);\n if (idx < 0) {\n throw new Error('Rules manager: invalid rule name ' + name);\n }\n this.__rules__[idx].enabled = false;\n }, this);\n\n this.__cache__ = null;\n};\n\n/**\n * Get a rules list as an array of functions.\n *\n * @param {String} `chainName`\n * @return {Object}\n * @api private\n */\n\nRuler.prototype.getRules = function (chainName) {\n if (this.__cache__ === null) {\n this.__compile__();\n }\n return this.__cache__[chainName] || [];\n};\n\n/**\n * Expose `Ruler`\n */\n\nmodule.exports = Ruler;\n","'use strict';\n\n/**\n * Parse link labels\n *\n * This function assumes that first character (`[`) already matches;\n * returns the end of the label.\n *\n * @param {Object} state\n * @param {Number} start\n * @api private\n */\n\nmodule.exports = function parseLinkLabel(state, start) {\n var level, found, marker,\n labelEnd = -1,\n max = state.posMax,\n oldPos = state.pos,\n oldFlag = state.isInLabel;\n\n if (state.isInLabel) { return -1; }\n\n if (state.labelUnmatchedScopes) {\n state.labelUnmatchedScopes--;\n return -1;\n }\n\n state.pos = start + 1;\n state.isInLabel = true;\n level = 1;\n\n while (state.pos < max) {\n marker = state.src.charCodeAt(state.pos);\n if (marker === 0x5B /* [ */) {\n level++;\n } else if (marker === 0x5D /* ] */) {\n level--;\n if (level === 0) {\n found = true;\n break;\n }\n }\n\n state.parser.skipToken(state);\n }\n\n if (found) {\n labelEnd = state.pos;\n state.labelUnmatchedScopes = 0;\n } else {\n state.labelUnmatchedScopes = level - 1;\n }\n\n // restore old state\n state.pos = oldPos;\n state.isInLabel = oldFlag;\n\n return labelEnd;\n};\n","export var roundedArrow = function roundedArrow(width, innerRadius, outerRadius, bgColor, boxShadow) {\n var unitWidth = width / 2;\n var ax = unitWidth - outerRadius * (Math.sqrt(2) - 1);\n var ay = unitWidth;\n var bx = unitWidth + outerRadius * (1 - 1 / Math.sqrt(2));\n var by = unitWidth - outerRadius * (1 - 1 / Math.sqrt(2));\n var cx = 2 * unitWidth - innerRadius * (1 / Math.sqrt(2));\n var cy = innerRadius * (1 / Math.sqrt(2));\n var dx = 4 * unitWidth - cx;\n var dy = cy;\n var ex = 4 * unitWidth - bx;\n var ey = by;\n var fx = 4 * unitWidth - ax;\n var fy = ay;\n return {\n borderRadius: {\n _skip_check_: true,\n value: \"0 0 \" + innerRadius + \"px\"\n },\n pointerEvents: 'none',\n width: width * 2,\n height: width * 2,\n overflow: 'hidden',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n width: width / Math.sqrt(2),\n height: width / Math.sqrt(2),\n bottom: 0,\n insetInline: 0,\n margin: 'auto',\n borderRadius: {\n _skip_check_: true,\n value: \"0 0 \" + innerRadius + \"px 0\"\n },\n transform: 'translateY(50%) rotate(-135deg)',\n boxShadow: boxShadow,\n zIndex: 0,\n background: 'transparent'\n },\n '&::before': {\n position: 'absolute',\n bottom: 0,\n insetInlineStart: 0,\n width: width * 2,\n height: width / 2,\n background: bgColor,\n clipPath: \"path('M \" + ax + \" \" + ay + \" A \" + outerRadius + \" \" + outerRadius + \" 0 0 0 \" + bx + \" \" + by + \" L \" + cx + \" \" + cy + \" A \" + innerRadius + \" \" + innerRadius + \" 0 0 1 \" + dx + \" \" + dy + \" L \" + ex + \" \" + ey + \" A \" + outerRadius + \" \" + outerRadius + \" 0 0 0 \" + fx + \" \" + fy + \" Z')\",\n content: '\"\"'\n }\n };\n};","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useStyleRegister } from '@ant-design/cssinjs';\nimport { useContext } from 'react';\nimport { genCommonStyle, genLinkStyle } from '../../style';\nimport { ConfigContext } from '../../config-provider/context';\nimport { mergeToken, statisticToken, useToken } from '../index';\nexport default function genComponentStyleHook(component, styleFn, getDefaultToken) {\n return function (prefixCls) {\n var _useToken = useToken(),\n _useToken2 = _slicedToArray(_useToken, 3),\n theme = _useToken2[0],\n token = _useToken2[1],\n hashId = _useToken2[2];\n var _useContext = useContext(ConfigContext),\n getPrefixCls = _useContext.getPrefixCls,\n iconPrefixCls = _useContext.iconPrefixCls;\n var rootPrefixCls = getPrefixCls();\n // Generate style for all a tags in antd component.\n useStyleRegister({\n theme: theme,\n token: token,\n hashId: hashId,\n path: ['Shared', rootPrefixCls]\n }, function () {\n return [{\n // Link\n '&': genLinkStyle(token)\n }];\n });\n return [useStyleRegister({\n theme: theme,\n token: token,\n hashId: hashId,\n path: [component, prefixCls, iconPrefixCls]\n }, function () {\n var _statisticToken = statisticToken(token),\n proxyToken = _statisticToken.token,\n flush = _statisticToken.flush;\n var defaultComponentToken = typeof getDefaultToken === 'function' ? getDefaultToken(proxyToken) : getDefaultToken;\n var mergedComponentToken = _extends(_extends({}, defaultComponentToken), token[component]);\n var componentCls = \".\" + prefixCls;\n var mergedToken = mergeToken(proxyToken, {\n componentCls: componentCls,\n prefixCls: prefixCls,\n iconCls: \".\" + iconPrefixCls,\n antCls: \".\" + rootPrefixCls\n }, mergedComponentToken);\n var styleInterpolation = styleFn(mergedToken, {\n hashId: hashId,\n prefixCls: prefixCls,\n rootPrefixCls: rootPrefixCls,\n iconPrefixCls: iconPrefixCls,\n overrideComponentToken: token[component]\n });\n flush(component, mergedComponentToken);\n return [genCommonStyle(token, prefixCls), styleInterpolation];\n }), hashId];\n };\n}","import canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { isStyleSupport } from \"rc-util/es/Dom/styleChecker\";\nexport var canUseDocElement = function canUseDocElement() {\n return canUseDom() && window.document.documentElement;\n};\nexport { isStyleSupport };\nvar flexGapSupported;\nexport var detectFlexGapSupported = function detectFlexGapSupported() {\n if (!canUseDocElement()) {\n return false;\n }\n if (flexGapSupported !== undefined) {\n return flexGapSupported;\n }\n // create flex container with row-gap set\n var flex = document.createElement('div');\n flex.style.display = 'flex';\n flex.style.flexDirection = 'column';\n flex.style.rowGap = '1px';\n // create two, elements inside it\n flex.appendChild(document.createElement('div'));\n flex.appendChild(document.createElement('div'));\n // append to the DOM (needed to obtain scrollHeight)\n document.body.appendChild(flex);\n flexGapSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap\n document.body.removeChild(flex);\n return flexGapSupported;\n};","export default (function () {\n if (typeof navigator === 'undefined' || typeof window === 'undefined') {\n return false;\n }\n var agent = navigator.userAgent || navigator.vendor || window.opera;\n return /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent === null || agent === void 0 ? void 0 : agent.substr(0, 4));\n});","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element ().\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { genComponentStyleHook, mergeToken } from '../../theme';\n// ============================== Row-Shared ==============================\nvar genGridRowStyle = function genGridRowStyle(token) {\n var componentCls = token.componentCls;\n return _defineProperty({}, componentCls, {\n display: 'flex',\n flexFlow: 'row wrap',\n minWidth: 0,\n '&::before, &::after': {\n display: 'flex'\n },\n '&-no-wrap': {\n flexWrap: 'nowrap'\n },\n // The origin of the X-axis\n '&-start': {\n justifyContent: 'flex-start'\n },\n // The center of the X-axis\n '&-center': {\n justifyContent: 'center'\n },\n // The opposite of the X-axis\n '&-end': {\n justifyContent: 'flex-end'\n },\n '&-space-between': {\n justifyContent: 'space-between'\n },\n '&-space-around ': {\n justifyContent: 'space-around'\n },\n // Align at the top\n '&-top': {\n alignItems: 'flex-start'\n },\n // Align at the center\n '&-middle': {\n alignItems: 'center'\n },\n '&-bottom': {\n alignItems: 'flex-end'\n }\n });\n};\n// ============================== Col-Shared ==============================\nvar genGridColStyle = function genGridColStyle(token) {\n var componentCls = token.componentCls;\n return _defineProperty({}, componentCls, {\n position: 'relative',\n maxWidth: '100%',\n // Prevent columns from collapsing when empty\n minHeight: 1\n });\n};\nvar genLoopGridColumnsStyle = function genLoopGridColumnsStyle(token, sizeCls) {\n var componentCls = token.componentCls,\n gridColumns = token.gridColumns;\n var gridColumnsStyle = {};\n for (var i = gridColumns; i >= 0; i--) {\n if (i === 0) {\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-\" + i] = {\n display: 'none'\n };\n gridColumnsStyle[componentCls + \"-push-\" + i] = {\n insetInlineStart: 'auto'\n };\n gridColumnsStyle[componentCls + \"-pull-\" + i] = {\n insetInlineEnd: 'auto'\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-push-\" + i] = {\n insetInlineStart: 'auto'\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-pull-\" + i] = {\n insetInlineEnd: 'auto'\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-offset-\" + i] = {\n marginInlineEnd: 0\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-order-\" + i] = {\n order: 0\n };\n } else {\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-\" + i] = {\n display: 'block',\n flex: \"0 0 \" + i / gridColumns * 100 + \"%\",\n maxWidth: i / gridColumns * 100 + \"%\"\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-push-\" + i] = {\n insetInlineStart: i / gridColumns * 100 + \"%\"\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-pull-\" + i] = {\n insetInlineEnd: i / gridColumns * 100 + \"%\"\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-offset-\" + i] = {\n marginInlineStart: i / gridColumns * 100 + \"%\"\n };\n gridColumnsStyle[\"\" + componentCls + sizeCls + \"-order-\" + i] = {\n order: i\n };\n }\n }\n return gridColumnsStyle;\n};\nvar genGridStyle = function genGridStyle(token, sizeCls) {\n return genLoopGridColumnsStyle(token, sizeCls);\n};\nvar genGridMediaStyle = function genGridMediaStyle(token, screenSize, sizeCls) {\n return _defineProperty({}, \"@media (min-width: \" + screenSize + \"px)\", _extends({}, genGridStyle(token, sizeCls)));\n};\n// ============================== Export ==============================\nexport var useRowStyle = genComponentStyleHook('Grid', function (token) {\n return [genGridRowStyle(token)];\n});\nexport var useColStyle = genComponentStyleHook('Grid', function (token) {\n var gridToken = mergeToken(token, {\n gridColumns: 24 // Row is divided into 24 parts in Grid\n });\n\n var gridMediaSizesMap = {\n '-sm': gridToken.screenSMMin,\n '-md': gridToken.screenMDMin,\n '-lg': gridToken.screenLGMin,\n '-xl': gridToken.screenXLMin,\n '-xxl': gridToken.screenXXLMin\n };\n return [genGridColStyle(gridToken), genGridStyle(gridToken, ''), genGridStyle(gridToken, '-xs'), Object.keys(gridMediaSizesMap).map(function (key) {\n return genGridMediaStyle(gridToken, gridMediaSizesMap[key], key);\n }).reduce(function (pre, cur) {\n return _extends(_extends({}, pre), cur);\n }, {})];\n});","import { createContext } from 'react';\nvar RowContext = /*#__PURE__*/createContext({});\nexport default RowContext;","import { useRef, useEffect, forwardRef, useImperativeHandle } from 'react';\nimport ReactDOM from 'react-dom';\nimport canUseDom from './Dom/canUseDom';\nvar Portal = /*#__PURE__*/forwardRef(function (props, ref) {\n var didUpdate = props.didUpdate,\n getContainer = props.getContainer,\n children = props.children;\n var parentRef = useRef();\n var containerRef = useRef();\n // Ref return nothing, only for wrapper check exist\n useImperativeHandle(ref, function () {\n return {};\n });\n // Create container in client side with sync to avoid useEffect not get ref\n var initRef = useRef(false);\n if (!initRef.current && canUseDom()) {\n containerRef.current = getContainer();\n parentRef.current = containerRef.current.parentNode;\n initRef.current = true;\n }\n // [Legacy] Used by `rc-trigger`\n useEffect(function () {\n didUpdate === null || didUpdate === void 0 ? void 0 : didUpdate(props);\n });\n useEffect(function () {\n // Restore container to original place\n // React 18 StrictMode will unmount first and mount back for effect test:\n // https://reactjs.org/blog/2022/03/29/react-v18.html#new-strict-mode-behaviors\n if (containerRef.current.parentNode === null && parentRef.current !== null) {\n parentRef.current.appendChild(containerRef.current);\n }\n return function () {\n var _containerRef$current, _containerRef$current2;\n // [Legacy] This should not be handle by Portal but parent PortalWrapper instead.\n // Since some component use `Portal` directly, we have to keep the logic here.\n (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : (_containerRef$current2 = _containerRef$current.parentNode) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.removeChild(containerRef.current);\n };\n }, []);\n return containerRef.current ? /*#__PURE__*/ReactDOM.createPortal(children, containerRef.current) : null;\n});\nexport default Portal;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n\nfunction isPointsEq(a1, a2, isAlignPoint) {\n if (isAlignPoint) {\n return a1[0] === a2[0];\n }\n\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\n\nexport function getAlignFromPlacement(builtinPlacements, placementStr, align) {\n var baseAlign = builtinPlacements[placementStr] || {};\n return _objectSpread(_objectSpread({}, baseAlign), align);\n}\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n var points = align.points;\n var placements = Object.keys(builtinPlacements);\n\n for (var i = 0; i < placements.length; i += 1) {\n var placement = placements[i];\n\n if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {\n return \"\".concat(prefixCls, \"-placement-\").concat(placement);\n }\n }\n\n return '';\n}","export function getMotion(_ref) {\n var prefixCls = _ref.prefixCls,\n motion = _ref.motion,\n animation = _ref.animation,\n transitionName = _ref.transitionName;\n\n if (motion) {\n return motion;\n }\n\n if (animation) {\n return {\n motionName: \"\".concat(prefixCls, \"-\").concat(animation)\n };\n }\n\n if (transitionName) {\n return {\n motionName: transitionName\n };\n }\n\n return null;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport { getMotion } from \"../utils/legacyUtil\";\nexport default function Mask(props) {\n var prefixCls = props.prefixCls,\n visible = props.visible,\n zIndex = props.zIndex,\n mask = props.mask,\n maskMotion = props.maskMotion,\n maskAnimation = props.maskAnimation,\n maskTransitionName = props.maskTransitionName;\n\n if (!mask) {\n return null;\n }\n\n var motion = {};\n\n if (maskMotion || maskTransitionName || maskAnimation) {\n motion = _objectSpread({\n motionAppear: true\n }, getMotion({\n motion: maskMotion,\n prefixCls: prefixCls,\n transitionName: maskTransitionName,\n animation: maskAnimation\n }));\n }\n\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({}, motion, {\n visible: visible,\n removeOnLeave: true\n }), function (_ref) {\n var className = _ref.className;\n return /*#__PURE__*/React.createElement(\"div\", {\n style: {\n zIndex: zIndex\n },\n className: classNames(\"\".concat(prefixCls, \"-mask\"), className)\n });\n });\n}","let vendorPrefix;\n\nconst jsCssMap = {\n Webkit: '-webkit-',\n Moz: '-moz-',\n // IE did it wrong again ...\n ms: '-ms-',\n O: '-o-',\n};\n\nfunction getVendorPrefix() {\n if (vendorPrefix !== undefined) {\n return vendorPrefix;\n }\n vendorPrefix = '';\n const style = document.createElement('p').style;\n const testProp = 'Transform';\n for (const key in jsCssMap) {\n if (key + testProp in style) {\n vendorPrefix = key;\n }\n }\n return vendorPrefix;\n}\n\nfunction getTransitionName() {\n return getVendorPrefix()\n ? `${getVendorPrefix()}TransitionProperty`\n : 'transitionProperty';\n}\n\nexport function getTransformName() {\n return getVendorPrefix() ? `${getVendorPrefix()}Transform` : 'transform';\n}\n\nexport function setTransitionProperty(node, value) {\n const name = getTransitionName();\n if (name) {\n node.style[name] = value;\n if (name !== 'transitionProperty') {\n node.style.transitionProperty = value;\n }\n }\n}\n\nfunction setTransform(node, value) {\n const name = getTransformName();\n if (name) {\n node.style[name] = value;\n if (name !== 'transform') {\n node.style.transform = value;\n }\n }\n}\n\nexport function getTransitionProperty(node) {\n return node.style.transitionProperty || node.style[getTransitionName()];\n}\n\nexport function getTransformXY(node) {\n const style = window.getComputedStyle(node, null);\n const transform =\n style.getPropertyValue('transform') ||\n style.getPropertyValue(getTransformName());\n if (transform && transform !== 'none') {\n const matrix = transform.replace(/[^0-9\\-.,]/g, '').split(',');\n return {\n x: parseFloat(matrix[12] || matrix[4], 0),\n y: parseFloat(matrix[13] || matrix[5], 0),\n };\n }\n return {\n x: 0,\n y: 0,\n };\n}\n\nconst matrix2d = /matrix\\((.*)\\)/;\nconst matrix3d = /matrix3d\\((.*)\\)/;\n\nexport function setTransformXY(node, xy) {\n const style = window.getComputedStyle(node, null);\n const transform =\n style.getPropertyValue('transform') ||\n style.getPropertyValue(getTransformName());\n if (transform && transform !== 'none') {\n let arr;\n let match2d = transform.match(matrix2d);\n if (match2d) {\n match2d = match2d[1];\n arr = match2d.split(',').map(item => {\n return parseFloat(item, 10);\n });\n arr[4] = xy.x;\n arr[5] = xy.y;\n setTransform(node, `matrix(${arr.join(',')})`);\n } else {\n const match3d = transform.match(matrix3d)[1];\n arr = match3d.split(',').map(item => {\n return parseFloat(item, 10);\n });\n arr[12] = xy.x;\n arr[13] = xy.y;\n setTransform(node, `matrix3d(${arr.join(',')})`);\n }\n } else {\n setTransform(\n node,\n `translateX(${xy.x}px) translateY(${xy.y}px) translateZ(0)`,\n );\n }\n}\n","import {\n setTransitionProperty,\n getTransitionProperty,\n getTransformXY,\n setTransformXY,\n getTransformName,\n} from './propertyUtils';\n\nconst RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nlet getComputedStyleX;\n\n// https://stackoverflow.com/a/3485654/3040605\nfunction forceRelayout(elem) {\n const originalStyle = elem.style.display;\n elem.style.display = 'none';\n elem.offsetHeight; // eslint-disable-line\n elem.style.display = originalStyle;\n}\n\nfunction css(el, name, v) {\n let value = v;\n if (typeof name === 'object') {\n for (const i in name) {\n if (name.hasOwnProperty(i)) {\n css(el, i, name[i]);\n }\n }\n return undefined;\n }\n if (typeof value !== 'undefined') {\n if (typeof value === 'number') {\n value = `${value}px`;\n }\n el.style[name] = value;\n return undefined;\n }\n return getComputedStyleX(el, name);\n}\n\nfunction getClientPosition(elem) {\n let box;\n let x;\n let y;\n const doc = elem.ownerDocument;\n const body = doc.body;\n const docElem = doc && doc.documentElement;\n // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n box = elem.getBoundingClientRect();\n\n // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n x = Math.floor(box.left);\n y = Math.floor(box.top);\n\n // In IE, most of the time, 2 extra pixels are added to the top and left\n // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and\n // IE6 standards mode, this border can be overridden by setting the\n // document element's border to zero -- thus, we cannot rely on the\n // offset always being 2 pixels.\n\n // In quirks mode, the offset can be determined by querying the body's\n // clientLeft/clientTop, but in standards mode, it is found by querying\n // the document element's clientLeft/clientTop. Since we already called\n // getClientBoundingRect we have already forced a reflow, so it is not\n // too expensive just to query them all.\n\n // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n // 窗口边框标准是设 documentElement ,quirks 时设置 body\n // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n // 标准 ie 下 docElem.clientTop 就是 border-top\n // ie7 html 即窗口边框改变不了。永远为 2\n // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n x -= docElem.clientLeft || body.clientLeft || 0;\n y -= docElem.clientTop || body.clientTop || 0;\n\n return {\n left: x,\n top: y,\n };\n}\n\nfunction getScroll(w, top) {\n let ret = w[`page${top ? 'Y' : 'X'}Offset`];\n const method = `scroll${top ? 'Top' : 'Left'}`;\n if (typeof ret !== 'number') {\n const d = w.document;\n // ie6,7,8 standard mode\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n // quirks mode\n ret = d.body[method];\n }\n }\n return ret;\n}\n\nfunction getScrollLeft(w) {\n return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n const pos = getClientPosition(el);\n const doc = el.ownerDocument;\n const w = doc.defaultView || doc.parentWindow;\n pos.left += getScrollLeft(w);\n pos.top += getScrollTop(w);\n return pos;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n // must use == for ie8\n /* eslint eqeqeq:0 */\n return obj !== null && obj !== undefined && obj == obj.window;\n}\n\nfunction getDocument(node) {\n if (isWindow(node)) {\n return node.document;\n }\n if (node.nodeType === 9) {\n return node;\n }\n return node.ownerDocument;\n}\n\nfunction _getComputedStyle(elem, name, cs) {\n let computedStyle = cs;\n let val = '';\n const d = getDocument(elem);\n computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null);\n\n // https://github.com/kissyteam/kissy/issues/61\n if (computedStyle) {\n val = computedStyle.getPropertyValue(name) || computedStyle[name];\n }\n\n return val;\n}\n\nconst _RE_NUM_NO_PX = new RegExp(`^(${RE_NUM})(?!px)[a-z%]+$`, 'i');\nconst RE_POS = /^(top|right|bottom|left)$/;\nconst CURRENT_STYLE = 'currentStyle';\nconst RUNTIME_STYLE = 'runtimeStyle';\nconst LEFT = 'left';\nconst PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n // currentStyle maybe null\n // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n let ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n // 在 ie 下不对,需要直接用 offset 方式\n // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n // From the awesome hack by Dean Edwards\n // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n // If we're not dealing with a regular pixel number\n // but a number that has a weird ending, we need to convert it to pixels\n // exclude left right for relativity\n if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n // Remember the original values\n const style = elem.style;\n const left = style[LEFT];\n const rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n // prevent flashing of content\n elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n // Put in the new values to get a computed value out\n style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n ret = style.pixelLeft + PX;\n\n // Revert the changed values\n style[LEFT] = left;\n\n elem[RUNTIME_STYLE][LEFT] = rsLeft;\n }\n return ret === '' ? 'auto' : ret;\n}\n\nif (typeof window !== 'undefined') {\n getComputedStyleX = window.getComputedStyle\n ? _getComputedStyle\n : _getComputedStyleIE;\n}\n\nfunction getOffsetDirection(dir, option) {\n if (dir === 'left') {\n return option.useCssRight ? 'right' : dir;\n }\n return option.useCssBottom ? 'bottom' : dir;\n}\n\nfunction oppositeOffsetDirection(dir) {\n if (dir === 'left') {\n return 'right';\n } else if (dir === 'right') {\n return 'left';\n } else if (dir === 'top') {\n return 'bottom';\n } else if (dir === 'bottom') {\n return 'top';\n }\n}\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setLeftTop(elem, offset, option) {\n // set position first, in-case top/left are set even on static elem\n if (css(elem, 'position') === 'static') {\n elem.style.position = 'relative';\n }\n let presetH = -999;\n let presetV = -999;\n const horizontalProperty = getOffsetDirection('left', option);\n const verticalProperty = getOffsetDirection('top', option);\n const oppositeHorizontalProperty = oppositeOffsetDirection(\n horizontalProperty,\n );\n const oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);\n\n if (horizontalProperty !== 'left') {\n presetH = 999;\n }\n\n if (verticalProperty !== 'top') {\n presetV = 999;\n }\n let originalTransition = '';\n const originalOffset = getOffset(elem);\n if ('left' in offset || 'top' in offset) {\n originalTransition = getTransitionProperty(elem) || '';\n setTransitionProperty(elem, 'none');\n }\n if ('left' in offset) {\n elem.style[oppositeHorizontalProperty] = '';\n elem.style[horizontalProperty] = `${presetH}px`;\n }\n if ('top' in offset) {\n elem.style[oppositeVerticalProperty] = '';\n elem.style[verticalProperty] = `${presetV}px`;\n }\n // force relayout\n forceRelayout(elem);\n const old = getOffset(elem);\n const originalStyle = {};\n for (const key in offset) {\n if (offset.hasOwnProperty(key)) {\n const dir = getOffsetDirection(key, option);\n const preset = key === 'left' ? presetH : presetV;\n const off = originalOffset[key] - old[key];\n if (dir === key) {\n originalStyle[dir] = preset + off;\n } else {\n originalStyle[dir] = preset - off;\n }\n }\n }\n css(elem, originalStyle);\n // force relayout\n forceRelayout(elem);\n if ('left' in offset || 'top' in offset) {\n setTransitionProperty(elem, originalTransition);\n }\n const ret = {};\n for (const key in offset) {\n if (offset.hasOwnProperty(key)) {\n const dir = getOffsetDirection(key, option);\n const off = offset[key] - originalOffset[key];\n if (key === dir) {\n ret[dir] = originalStyle[dir] + off;\n } else {\n ret[dir] = originalStyle[dir] - off;\n }\n }\n }\n css(elem, ret);\n}\n\nfunction setTransform(elem, offset) {\n const originalOffset = getOffset(elem);\n const originalXY = getTransformXY(elem);\n const resultXY = { x: originalXY.x, y: originalXY.y };\n if ('left' in offset) {\n resultXY.x = originalXY.x + offset.left - originalOffset.left;\n }\n if ('top' in offset) {\n resultXY.y = originalXY.y + offset.top - originalOffset.top;\n }\n setTransformXY(elem, resultXY);\n}\n\nfunction setOffset(elem, offset, option) {\n if (option.ignoreShake) {\n const oriOffset = getOffset(elem);\n\n const oLeft = oriOffset.left.toFixed(0);\n const oTop = oriOffset.top.toFixed(0);\n const tLeft = offset.left.toFixed(0);\n const tTop = offset.top.toFixed(0);\n\n if (oLeft === tLeft && oTop === tTop) {\n return;\n }\n }\n\n if (option.useCssRight || option.useCssBottom) {\n setLeftTop(elem, offset, option);\n } else if (\n option.useCssTransform &&\n getTransformName() in document.body.style\n ) {\n setTransform(elem, offset, option);\n } else {\n setLeftTop(elem, offset, option);\n }\n}\n\nfunction each(arr, fn) {\n for (let i = 0; i < arr.length; i++) {\n fn(arr[i]);\n }\n}\n\nfunction isBorderBoxFn(elem) {\n return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nconst BOX_MODELS = ['margin', 'border', 'padding'];\nconst CONTENT_INDEX = -1;\nconst PADDING_INDEX = 2;\nconst BORDER_INDEX = 1;\nconst MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n const old = {};\n const style = elem.style;\n let name;\n\n // Remember the old values, and insert the new ones\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n old[name] = style[name];\n style[name] = options[name];\n }\n }\n\n callback.call(elem);\n\n // Revert the old values\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n style[name] = old[name];\n }\n }\n}\n\nfunction getPBMWidth(elem, props, which) {\n let value = 0;\n let prop;\n let j;\n let i;\n for (j = 0; j < props.length; j++) {\n prop = props[j];\n if (prop) {\n for (i = 0; i < which.length; i++) {\n let cssProp;\n if (prop === 'border') {\n cssProp = `${prop}${which[i]}Width`;\n } else {\n cssProp = prop + which[i];\n }\n value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n }\n }\n }\n return value;\n}\n\nconst domUtils = {\n getParent(element) {\n let parent = element;\n do {\n if (parent.nodeType === 11 && parent.host) {\n parent = parent.host;\n } else {\n parent = parent.parentNode;\n }\n } while (parent && parent.nodeType !== 1 && parent.nodeType !== 9);\n return parent;\n },\n};\n\neach(['Width', 'Height'], name => {\n domUtils[`doc${name}`] = refWin => {\n const d = refWin.document;\n return Math.max(\n // firefox chrome documentElement.scrollHeight< body.scrollHeight\n // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n d.documentElement[`scroll${name}`],\n // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n d.body[`scroll${name}`],\n domUtils[`viewport${name}`](d),\n );\n };\n\n domUtils[`viewport${name}`] = win => {\n // pc browser includes scrollbar in window.innerWidth\n const prop = `client${name}`;\n const doc = win.document;\n const body = doc.body;\n const documentElement = doc.documentElement;\n const documentElementProp = documentElement[prop];\n // 标准模式取 documentElement\n // backcompat 取 body\n return (\n (doc.compatMode === 'CSS1Compat' && documentElementProp) ||\n (body && body[prop]) ||\n documentElementProp\n );\n };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra] 'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, ex) {\n let extra = ex;\n if (isWindow(elem)) {\n return name === 'width'\n ? domUtils.viewportWidth(elem)\n : domUtils.viewportHeight(elem);\n } else if (elem.nodeType === 9) {\n return name === 'width'\n ? domUtils.docWidth(elem)\n : domUtils.docHeight(elem);\n }\n const which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n let borderBoxValue =\n name === 'width'\n ? Math.floor(elem.getBoundingClientRect().width)\n : Math.floor(elem.getBoundingClientRect().height);\n const isBorderBox = isBorderBoxFn(elem);\n let cssBoxValue = 0;\n if (\n borderBoxValue === null ||\n borderBoxValue === undefined ||\n borderBoxValue <= 0\n ) {\n borderBoxValue = undefined;\n // Fall back to computed then un computed css if necessary\n cssBoxValue = getComputedStyleX(elem, name);\n if (\n cssBoxValue === null ||\n cssBoxValue === undefined ||\n Number(cssBoxValue) < 0\n ) {\n cssBoxValue = elem.style[name] || 0;\n }\n // Normalize '', auto, and prepare for extra\n cssBoxValue = Math.floor(parseFloat(cssBoxValue)) || 0;\n }\n if (extra === undefined) {\n extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n }\n const borderBoxValueOrIsBorderBox =\n borderBoxValue !== undefined || isBorderBox;\n const val = borderBoxValue || cssBoxValue;\n if (extra === CONTENT_INDEX) {\n if (borderBoxValueOrIsBorderBox) {\n return val - getPBMWidth(elem, ['border', 'padding'], which);\n }\n return cssBoxValue;\n } else if (borderBoxValueOrIsBorderBox) {\n if (extra === BORDER_INDEX) {\n return val;\n }\n return (\n val +\n (extra === PADDING_INDEX\n ? -getPBMWidth(elem, ['border'], which)\n : getPBMWidth(elem, ['margin'], which))\n );\n }\n return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which);\n}\n\nconst cssShow = {\n position: 'absolute',\n visibility: 'hidden',\n display: 'block',\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(...args) {\n let val;\n const elem = args[0];\n // in case elem is window\n // elem.offsetWidth === undefined\n if (elem.offsetWidth !== 0) {\n val = getWH.apply(undefined, args);\n } else {\n swap(elem, cssShow, () => {\n val = getWH.apply(undefined, args);\n });\n }\n return val;\n}\n\neach(['width', 'height'], name => {\n const first = name.charAt(0).toUpperCase() + name.slice(1);\n domUtils[`outer${first}`] = (el, includeMargin) => {\n return (\n el &&\n getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX)\n );\n };\n const which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n domUtils[name] = (elem, v) => {\n let val = v;\n if (val !== undefined) {\n if (elem) {\n const isBorderBox = isBorderBoxFn(elem);\n if (isBorderBox) {\n val += getPBMWidth(elem, ['padding', 'border'], which);\n }\n return css(elem, name, val);\n }\n return undefined;\n }\n return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n };\n});\n\nfunction mix(to, from) {\n for (const i in from) {\n if (from.hasOwnProperty(i)) {\n to[i] = from[i];\n }\n }\n return to;\n}\n\nconst utils = {\n getWindow(node) {\n if (node && node.document && node.setTimeout) {\n return node;\n }\n const doc = node.ownerDocument || node;\n return doc.defaultView || doc.parentWindow;\n },\n getDocument,\n offset(el, value, option) {\n if (typeof value !== 'undefined') {\n setOffset(el, value, option || {});\n } else {\n return getOffset(el);\n }\n },\n isWindow,\n each,\n css,\n clone(obj) {\n let i;\n const ret = {};\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret[i] = obj[i];\n }\n }\n const overflow = obj.overflow;\n if (overflow) {\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret.overflow[i] = obj.overflow[i];\n }\n }\n }\n return ret;\n },\n mix,\n getWindowScrollLeft(w) {\n return getScrollLeft(w);\n },\n getWindowScrollTop(w) {\n return getScrollTop(w);\n },\n merge(...args) {\n const ret = {};\n for (let i = 0; i < args.length; i++) {\n utils.mix(ret, args[i]);\n }\n return ret;\n },\n viewportWidth: 0,\n viewportHeight: 0,\n};\n\nmix(utils, domUtils);\n\nexport default utils;\n","import utils from './utils';\n\n/**\n * 得到会导致元素显示不全的祖先元素\n */\nconst { getParent } = utils;\n\nfunction getOffsetParent(element) {\n if (utils.isWindow(element) || element.nodeType === 9) {\n return null;\n }\n // ie 这个也不是完全可行\n /*\n \n
\n 元素 6 高 100px 宽 50px
\n
\n
\n */\n // element.offsetParent does the right thing in ie7 and below. Return parent with layout!\n // In other browsers it only includes elements with position absolute, relative or\n // fixed, not elements with overflow set to auto or scroll.\n // if (UA.ie && ieMode < 8) {\n // return element.offsetParent;\n // }\n // 统一的 offsetParent 方法\n const doc = utils.getDocument(element);\n const body = doc.body;\n let parent;\n let positionStyle = utils.css(element, 'position');\n const skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute';\n\n if (!skipStatic) {\n return element.nodeName.toLowerCase() === 'html'\n ? null\n : getParent(element);\n }\n\n for (\n parent = getParent(element);\n parent && parent !== body && parent.nodeType !== 9;\n parent = getParent(parent)\n ) {\n positionStyle = utils.css(parent, 'position');\n if (positionStyle !== 'static') {\n return parent;\n }\n }\n return null;\n}\n\nexport default getOffsetParent;\n","import utils from './utils';\n\nconst { getParent } = utils;\n\nexport default function isAncestorFixed(element) {\n if (utils.isWindow(element) || element.nodeType === 9) {\n return false;\n }\n\n const doc = utils.getDocument(element);\n const body = doc.body;\n let parent = null;\n for (\n parent = getParent(element);\n // 修复元素位于 document.documentElement 下导致崩溃问题\n parent && parent !== body && parent !== doc;\n parent = getParent(parent)\n ) {\n const positionStyle = utils.css(parent, 'position');\n if (positionStyle === 'fixed') {\n return true;\n }\n }\n return false;\n}\n","import utils from './utils';\nimport getOffsetParent from './getOffsetParent';\nimport isAncestorFixed from './isAncestorFixed';\n\n/**\n * 获得元素的显示部分的区域\n */\nfunction getVisibleRectForElement(element, alwaysByViewport) {\n const visibleRect = {\n left: 0,\n right: Infinity,\n top: 0,\n bottom: Infinity,\n };\n let el = getOffsetParent(element);\n const doc = utils.getDocument(element);\n const win = doc.defaultView || doc.parentWindow;\n const body = doc.body;\n const documentElement = doc.documentElement;\n\n // Determine the size of the visible rect by climbing the dom accounting for\n // all scrollable containers.\n while (el) {\n // clientWidth is zero for inline block elements in ie.\n if (\n (navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) &&\n // body may have overflow set on it, yet we still get the entire\n // viewport. In some browsers, el.offsetParent may be\n // document.documentElement, so check for that too.\n (el !== body &&\n el !== documentElement &&\n utils.css(el, 'overflow') !== 'visible')\n ) {\n const pos = utils.offset(el);\n // add border\n pos.left += el.clientLeft;\n pos.top += el.clientTop;\n visibleRect.top = Math.max(visibleRect.top, pos.top);\n visibleRect.right = Math.min(\n visibleRect.right,\n // consider area without scrollBar\n pos.left + el.clientWidth,\n );\n visibleRect.bottom = Math.min(\n visibleRect.bottom,\n pos.top + el.clientHeight,\n );\n visibleRect.left = Math.max(visibleRect.left, pos.left);\n } else if (el === body || el === documentElement) {\n break;\n }\n el = getOffsetParent(el);\n }\n\n // Set element position to fixed\n // make sure absolute element itself don't affect it's visible area\n // https://github.com/ant-design/ant-design/issues/7601\n let originalPosition = null;\n if (!utils.isWindow(element) && element.nodeType !== 9) {\n originalPosition = element.style.position;\n const position = utils.css(element, 'position');\n if (position === 'absolute') {\n element.style.position = 'fixed';\n }\n }\n\n const scrollX = utils.getWindowScrollLeft(win);\n const scrollY = utils.getWindowScrollTop(win);\n const viewportWidth = utils.viewportWidth(win);\n const viewportHeight = utils.viewportHeight(win);\n let documentWidth = documentElement.scrollWidth;\n let documentHeight = documentElement.scrollHeight;\n\n // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX.\n // We should cut this ourself.\n const bodyStyle = window.getComputedStyle(body);\n if (bodyStyle.overflowX === 'hidden') {\n documentWidth = win.innerWidth;\n }\n if (bodyStyle.overflowY === 'hidden') {\n documentHeight = win.innerHeight;\n }\n\n // Reset element position after calculate the visible area\n if (element.style) {\n element.style.position = originalPosition;\n }\n\n if (alwaysByViewport || isAncestorFixed(element)) {\n // Clip by viewport's size.\n visibleRect.left = Math.max(visibleRect.left, scrollX);\n visibleRect.top = Math.max(visibleRect.top, scrollY);\n visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth);\n visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight);\n } else {\n // Clip by document's size.\n const maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth);\n visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth);\n\n const maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight);\n visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight);\n }\n\n return visibleRect.top >= 0 &&\n visibleRect.left >= 0 &&\n visibleRect.bottom > visibleRect.top &&\n visibleRect.right > visibleRect.left\n ? visibleRect\n : null;\n}\n\nexport default getVisibleRectForElement;\n","import utils from './utils';\n\nfunction getRegion(node) {\n let offset;\n let w;\n let h;\n if (!utils.isWindow(node) && node.nodeType !== 9) {\n offset = utils.offset(node);\n w = utils.outerWidth(node);\n h = utils.outerHeight(node);\n } else {\n const win = utils.getWindow(node);\n offset = {\n left: utils.getWindowScrollLeft(win),\n top: utils.getWindowScrollTop(win),\n };\n w = utils.viewportWidth(win);\n h = utils.viewportHeight(win);\n }\n offset.width = w;\n offset.height = h;\n return offset;\n}\n\nexport default getRegion;\n","/**\n * 获取 node 上的 align 对齐点 相对于页面的坐标\n */\n\nfunction getAlignOffset(region, align) {\n const V = align.charAt(0);\n const H = align.charAt(1);\n const w = region.width;\n const h = region.height;\n\n let x = region.left;\n let y = region.top;\n\n if (V === 'c') {\n y += h / 2;\n } else if (V === 'b') {\n y += h;\n }\n\n if (H === 'c') {\n x += w / 2;\n } else if (H === 'r') {\n x += w;\n }\n\n return {\n left: x,\n top: y,\n };\n}\n\nexport default getAlignOffset;\n","import getAlignOffset from './getAlignOffset';\n\nfunction getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) {\n const p1 = getAlignOffset(refNodeRegion, points[1]);\n const p2 = getAlignOffset(elRegion, points[0]);\n const diff = [p2.left - p1.left, p2.top - p1.top];\n\n return {\n left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]),\n top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1]),\n };\n}\n\nexport default getElFuturePos;\n","/**\n * align dom node flexibly\n * @author yiminghe@gmail.com\n */\n\nimport utils from '../utils';\nimport getVisibleRectForElement from '../getVisibleRectForElement';\nimport adjustForViewport from '../adjustForViewport';\nimport getRegion from '../getRegion';\nimport getElFuturePos from '../getElFuturePos';\n\n// http://yiminghe.iteye.com/blog/1124720\n\nfunction isFailX(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.left < visibleRect.left ||\n elFuturePos.left + elRegion.width > visibleRect.right\n );\n}\n\nfunction isFailY(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.top < visibleRect.top ||\n elFuturePos.top + elRegion.height > visibleRect.bottom\n );\n}\n\nfunction isCompleteFailX(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.left > visibleRect.right ||\n elFuturePos.left + elRegion.width < visibleRect.left\n );\n}\n\nfunction isCompleteFailY(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.top > visibleRect.bottom ||\n elFuturePos.top + elRegion.height < visibleRect.top\n );\n}\n\nfunction flip(points, reg, map) {\n const ret = [];\n utils.each(points, p => {\n ret.push(\n p.replace(reg, m => {\n return map[m];\n }),\n );\n });\n return ret;\n}\n\nfunction flipOffset(offset, index) {\n offset[index] = -offset[index];\n return offset;\n}\n\nfunction convertOffset(str, offsetLen) {\n let n;\n if (/%$/.test(str)) {\n n = (parseInt(str.substring(0, str.length - 1), 10) / 100) * offsetLen;\n } else {\n n = parseInt(str, 10);\n }\n return n || 0;\n}\n\nfunction normalizeOffset(offset, el) {\n offset[0] = convertOffset(offset[0], el.width);\n offset[1] = convertOffset(offset[1], el.height);\n}\n\n/**\n * @param el\n * @param tgtRegion 参照节点所占的区域: { left, top, width, height }\n * @param align\n */\nfunction doAlign(el, tgtRegion, align, isTgtRegionVisible) {\n let points = align.points;\n let offset = align.offset || [0, 0];\n let targetOffset = align.targetOffset || [0, 0];\n let overflow = align.overflow;\n const source = align.source || el;\n offset = [].concat(offset);\n targetOffset = [].concat(targetOffset);\n overflow = overflow || {};\n const newOverflowCfg = {};\n let fail = 0;\n const alwaysByViewport = !!(overflow && overflow.alwaysByViewport);\n // 当前节点可以被放置的显示区域\n const visibleRect = getVisibleRectForElement(source, alwaysByViewport);\n // 当前节点所占的区域, left/top/width/height\n const elRegion = getRegion(source);\n // 将 offset 转换成数值,支持百分比\n normalizeOffset(offset, elRegion);\n normalizeOffset(targetOffset, tgtRegion);\n // 当前节点将要被放置的位置\n let elFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n points,\n offset,\n targetOffset,\n );\n // 当前节点将要所处的区域\n let newElRegion = utils.merge(elRegion, elFuturePos);\n\n // 如果可视区域不能完全放置当前节点时允许调整\n if (\n visibleRect &&\n (overflow.adjustX || overflow.adjustY) &&\n isTgtRegionVisible\n ) {\n if (overflow.adjustX) {\n // 如果横向不能放下\n if (isFailX(elFuturePos, elRegion, visibleRect)) {\n // 对齐位置反下\n const newPoints = flip(points, /[lr]/gi, {\n l: 'r',\n r: 'l',\n });\n // 偏移量也反下\n const newOffset = flipOffset(offset, 0);\n const newTargetOffset = flipOffset(targetOffset, 0);\n const newElFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n newPoints,\n newOffset,\n newTargetOffset,\n );\n\n if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {\n fail = 1;\n points = newPoints;\n offset = newOffset;\n targetOffset = newTargetOffset;\n }\n }\n }\n\n if (overflow.adjustY) {\n // 如果纵向不能放下\n if (isFailY(elFuturePos, elRegion, visibleRect)) {\n // 对齐位置反下\n const newPoints = flip(points, /[tb]/gi, {\n t: 'b',\n b: 't',\n });\n // 偏移量也反下\n const newOffset = flipOffset(offset, 1);\n const newTargetOffset = flipOffset(targetOffset, 1);\n const newElFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n newPoints,\n newOffset,\n newTargetOffset,\n );\n\n if (!isCompleteFailY(newElFuturePos, elRegion, visibleRect)) {\n fail = 1;\n points = newPoints;\n offset = newOffset;\n targetOffset = newTargetOffset;\n }\n }\n }\n\n // 如果失败,重新计算当前节点将要被放置的位置\n if (fail) {\n elFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n points,\n offset,\n targetOffset,\n );\n utils.mix(newElRegion, elFuturePos);\n }\n const isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);\n const isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);\n // 检查反下后的位置是否可以放下了,如果仍然放不下:\n // 1. 复原修改过的定位参数\n if (isStillFailX || isStillFailY) {\n let newPoints = points;\n\n // 重置对应部分的翻转逻辑\n if (isStillFailX) {\n newPoints = flip(points, /[lr]/gi, {\n l: 'r',\n r: 'l',\n });\n }\n if (isStillFailY) {\n newPoints = flip(points, /[tb]/gi, {\n t: 'b',\n b: 't',\n });\n }\n\n points = newPoints;\n\n offset = align.offset || [0, 0];\n targetOffset = align.targetOffset || [0, 0];\n }\n // 2. 只有指定了可以调整当前方向才调整\n newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;\n newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;\n\n // 确实要调整,甚至可能会调整高度宽度\n if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {\n newElRegion = adjustForViewport(\n elFuturePos,\n elRegion,\n visibleRect,\n newOverflowCfg,\n );\n }\n }\n\n // need judge to in case set fixed with in css on height auto element\n if (newElRegion.width !== elRegion.width) {\n utils.css(\n source,\n 'width',\n utils.width(source) + newElRegion.width - elRegion.width,\n );\n }\n\n if (newElRegion.height !== elRegion.height) {\n utils.css(\n source,\n 'height',\n utils.height(source) + newElRegion.height - elRegion.height,\n );\n }\n\n // https://github.com/kissyteam/kissy/issues/190\n // 相对于屏幕位置没变,而 left/top 变了\n // 例如
\n utils.offset(\n source,\n {\n left: newElRegion.left,\n top: newElRegion.top,\n },\n {\n useCssRight: align.useCssRight,\n useCssBottom: align.useCssBottom,\n useCssTransform: align.useCssTransform,\n ignoreShake: align.ignoreShake,\n },\n );\n\n return {\n points,\n offset,\n targetOffset,\n overflow: newOverflowCfg,\n };\n}\n\nexport default doAlign;\n/**\n * 2012-04-26 yiminghe@gmail.com\n * - 优化智能对齐算法\n * - 慎用 resizeXX\n *\n * 2011-07-13 yiminghe@gmail.com note:\n * - 增加智能对齐,以及大小调整选项\n **/\n","import utils from './utils';\n\nfunction adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {\n const pos = utils.clone(elFuturePos);\n const size = {\n width: elRegion.width,\n height: elRegion.height,\n };\n\n if (overflow.adjustX && pos.left < visibleRect.left) {\n pos.left = visibleRect.left;\n }\n\n // Left edge inside and right edge outside viewport, try to resize it.\n if (\n overflow.resizeWidth &&\n pos.left >= visibleRect.left &&\n pos.left + size.width > visibleRect.right\n ) {\n size.width -= pos.left + size.width - visibleRect.right;\n }\n\n // Right edge outside viewport, try to move it.\n if (overflow.adjustX && pos.left + size.width > visibleRect.right) {\n // 保证左边界和可视区域左边界对齐\n pos.left = Math.max(visibleRect.right - size.width, visibleRect.left);\n }\n\n // Top edge outside viewport, try to move it.\n if (overflow.adjustY && pos.top < visibleRect.top) {\n pos.top = visibleRect.top;\n }\n\n // Top edge inside and bottom edge outside viewport, try to resize it.\n if (\n overflow.resizeHeight &&\n pos.top >= visibleRect.top &&\n pos.top + size.height > visibleRect.bottom\n ) {\n size.height -= pos.top + size.height - visibleRect.bottom;\n }\n\n // Bottom edge outside viewport, try to move it.\n if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) {\n // 保证上边界和可视区域上边界对齐\n pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top);\n }\n\n return utils.mix(pos, size);\n}\n\nexport default adjustForViewport;\n","import doAlign from './align';\nimport getOffsetParent from '../getOffsetParent';\nimport getVisibleRectForElement from '../getVisibleRectForElement';\nimport getRegion from '../getRegion';\n\nfunction isOutOfVisibleRect(target, alwaysByViewport) {\n const visibleRect = getVisibleRectForElement(target, alwaysByViewport);\n const targetRegion = getRegion(target);\n\n return (\n !visibleRect ||\n targetRegion.left + targetRegion.width <= visibleRect.left ||\n targetRegion.top + targetRegion.height <= visibleRect.top ||\n targetRegion.left >= visibleRect.right ||\n targetRegion.top >= visibleRect.bottom\n );\n}\n\nfunction alignElement(el, refNode, align) {\n const target = align.target || refNode;\n const refNodeRegion = getRegion(target);\n\n const isTargetNotOutOfVisible = !isOutOfVisibleRect(\n target,\n align.overflow && align.overflow.alwaysByViewport,\n );\n\n return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible);\n}\n\nalignElement.__getOffsetParent = getOffsetParent;\n\nalignElement.__getVisibleRectForElement = getVisibleRectForElement;\n\nexport default alignElement;\n","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport ResizeObserver from 'resize-observer-polyfill';\nimport contains from \"rc-util/es/Dom/contains\";\nexport function isSamePoint(prev, next) {\n if (prev === next) return true;\n if (!prev || !next) return false;\n\n if ('pageX' in next && 'pageY' in next) {\n return prev.pageX === next.pageX && prev.pageY === next.pageY;\n }\n\n if ('clientX' in next && 'clientY' in next) {\n return prev.clientX === next.clientX && prev.clientY === next.clientY;\n }\n\n return false;\n}\nexport function restoreFocus(activeElement, container) {\n // Focus back if is in the container\n if (activeElement !== document.activeElement && contains(container, activeElement) && typeof activeElement.focus === 'function') {\n activeElement.focus();\n }\n}\nexport function monitorResize(element, callback) {\n var prevWidth = null;\n var prevHeight = null;\n\n function onResize(_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n target = _ref2[0].target;\n\n if (!document.documentElement.contains(target)) return;\n\n var _target$getBoundingCl = target.getBoundingClientRect(),\n width = _target$getBoundingCl.width,\n height = _target$getBoundingCl.height;\n\n var fixedWidth = Math.floor(width);\n var fixedHeight = Math.floor(height);\n\n if (prevWidth !== fixedWidth || prevHeight !== fixedHeight) {\n // https://webkit.org/blog/9997/resizeobserver-in-webkit/\n Promise.resolve().then(function () {\n callback({\n width: fixedWidth,\n height: fixedHeight\n });\n });\n }\n\n prevWidth = fixedWidth;\n prevHeight = fixedHeight;\n }\n\n var resizeObserver = new ResizeObserver(onResize);\n\n if (element) {\n resizeObserver.observe(element);\n }\n\n return function () {\n resizeObserver.disconnect();\n };\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\n\n/**\n * Removed props:\n * - childrenProps\n */\nimport React from 'react';\nimport { composeRef } from \"rc-util/es/ref\";\nimport isVisible from \"rc-util/es/Dom/isVisible\";\nimport { alignElement, alignPoint } from 'dom-align';\nimport addEventListener from \"rc-util/es/Dom/addEventListener\";\nimport isEqual from 'lodash/isEqual';\nimport { isSamePoint, restoreFocus, monitorResize } from './util';\nimport useBuffer from './hooks/useBuffer';\n\nfunction getElement(func) {\n if (typeof func !== 'function') return null;\n return func();\n}\n\nfunction getPoint(point) {\n if (_typeof(point) !== 'object' || !point) return null;\n return point;\n}\n\nvar Align = function Align(_ref, ref) {\n var children = _ref.children,\n disabled = _ref.disabled,\n target = _ref.target,\n align = _ref.align,\n onAlign = _ref.onAlign,\n monitorWindowResize = _ref.monitorWindowResize,\n _ref$monitorBufferTim = _ref.monitorBufferTime,\n monitorBufferTime = _ref$monitorBufferTim === void 0 ? 0 : _ref$monitorBufferTim;\n var cacheRef = React.useRef({});\n var nodeRef = React.useRef();\n var childNode = React.Children.only(children); // ===================== Align ======================\n // We save the props here to avoid closure makes props ood\n\n var forceAlignPropsRef = React.useRef({});\n forceAlignPropsRef.current.disabled = disabled;\n forceAlignPropsRef.current.target = target;\n forceAlignPropsRef.current.align = align;\n forceAlignPropsRef.current.onAlign = onAlign;\n\n var _useBuffer = useBuffer(function () {\n var _forceAlignPropsRef$c = forceAlignPropsRef.current,\n latestDisabled = _forceAlignPropsRef$c.disabled,\n latestTarget = _forceAlignPropsRef$c.target,\n latestAlign = _forceAlignPropsRef$c.align,\n latestOnAlign = _forceAlignPropsRef$c.onAlign;\n\n if (!latestDisabled && latestTarget) {\n var source = nodeRef.current;\n var result;\n var element = getElement(latestTarget);\n var point = getPoint(latestTarget);\n cacheRef.current.element = element;\n cacheRef.current.point = point;\n cacheRef.current.align = latestAlign; // IE lose focus after element realign\n // We should record activeElement and restore later\n\n // IE lose focus after element realign\n // We should record activeElement and restore later\n var _document = document,\n activeElement = _document.activeElement; // We only align when element is visible\n\n // We only align when element is visible\n if (element && isVisible(element)) {\n result = alignElement(source, element, latestAlign);\n } else if (point) {\n result = alignPoint(source, point, latestAlign);\n }\n\n restoreFocus(activeElement, source);\n\n if (latestOnAlign && result) {\n latestOnAlign(source, result);\n }\n\n return true;\n }\n\n return false;\n }, monitorBufferTime),\n _useBuffer2 = _slicedToArray(_useBuffer, 2),\n _forceAlign = _useBuffer2[0],\n cancelForceAlign = _useBuffer2[1]; // ===================== Effect =====================\n // Listen for target updated\n\n\n var resizeMonitor = React.useRef({\n cancel: function cancel() {}\n }); // Listen for source updated\n\n var sourceResizeMonitor = React.useRef({\n cancel: function cancel() {}\n });\n React.useEffect(function () {\n var element = getElement(target);\n var point = getPoint(target);\n\n if (nodeRef.current !== sourceResizeMonitor.current.element) {\n sourceResizeMonitor.current.cancel();\n sourceResizeMonitor.current.element = nodeRef.current;\n sourceResizeMonitor.current.cancel = monitorResize(nodeRef.current, _forceAlign);\n }\n\n if (cacheRef.current.element !== element || !isSamePoint(cacheRef.current.point, point) || !isEqual(cacheRef.current.align, align)) {\n _forceAlign(); // Add resize observer\n\n\n if (resizeMonitor.current.element !== element) {\n resizeMonitor.current.cancel();\n resizeMonitor.current.element = element;\n resizeMonitor.current.cancel = monitorResize(element, _forceAlign);\n }\n }\n }); // Listen for disabled change\n\n React.useEffect(function () {\n if (!disabled) {\n _forceAlign();\n } else {\n cancelForceAlign();\n }\n }, [disabled]); // Listen for window resize\n\n var winResizeRef = React.useRef(null);\n React.useEffect(function () {\n if (monitorWindowResize) {\n if (!winResizeRef.current) {\n winResizeRef.current = addEventListener(window, 'resize', _forceAlign);\n }\n } else if (winResizeRef.current) {\n winResizeRef.current.remove();\n winResizeRef.current = null;\n }\n }, [monitorWindowResize]); // Clear all if unmount\n\n React.useEffect(function () {\n return function () {\n resizeMonitor.current.cancel();\n sourceResizeMonitor.current.cancel();\n if (winResizeRef.current) winResizeRef.current.remove();\n cancelForceAlign();\n };\n }, []); // ====================== Ref =======================\n\n React.useImperativeHandle(ref, function () {\n return {\n forceAlign: function forceAlign() {\n return _forceAlign(true);\n }\n };\n }); // ===================== Render =====================\n\n if ( /*#__PURE__*/React.isValidElement(childNode)) {\n childNode = /*#__PURE__*/React.cloneElement(childNode, {\n ref: composeRef(childNode.ref, nodeRef)\n });\n }\n\n return childNode;\n};\n\nvar RcAlign = /*#__PURE__*/React.forwardRef(Align);\nRcAlign.displayName = 'Align';\nexport default RcAlign;","import React from 'react';\nexport default (function (callback, buffer) {\n var calledRef = React.useRef(false);\n var timeoutRef = React.useRef(null);\n\n function cancelTrigger() {\n window.clearTimeout(timeoutRef.current);\n }\n\n function trigger(force) {\n cancelTrigger();\n\n if (!calledRef.current || force === true) {\n if (callback() === false) {\n // Not delay since callback cancelled self\n return;\n }\n\n calledRef.current = true;\n timeoutRef.current = window.setTimeout(function () {\n calledRef.current = false;\n }, buffer);\n } else {\n timeoutRef.current = window.setTimeout(function () {\n calledRef.current = false;\n trigger();\n }, buffer);\n }\n }\n\n return [trigger, function () {\n calledRef.current = false;\n cancelTrigger();\n }];\n});","import utils from '../utils';\nimport doAlign from './align';\n\n/**\n * `tgtPoint`: { pageX, pageY } or { clientX, clientY }.\n * If client position provided, will internal convert to page position.\n */\n\nfunction alignPoint(el, tgtPoint, align) {\n let pageX;\n let pageY;\n\n const doc = utils.getDocument(el);\n const win = doc.defaultView || doc.parentWindow;\n\n const scrollX = utils.getWindowScrollLeft(win);\n const scrollY = utils.getWindowScrollTop(win);\n const viewportWidth = utils.viewportWidth(win);\n const viewportHeight = utils.viewportHeight(win);\n\n if ('pageX' in tgtPoint) {\n pageX = tgtPoint.pageX;\n } else {\n pageX = scrollX + tgtPoint.clientX;\n }\n\n if ('pageY' in tgtPoint) {\n pageY = tgtPoint.pageY;\n } else {\n pageY = scrollY + tgtPoint.clientY;\n }\n\n const tgtRegion = {\n left: pageX,\n top: pageY,\n width: 0,\n height: 0,\n };\n\n const pointInView =\n pageX >= 0 &&\n pageX <= scrollX + viewportWidth &&\n (pageY >= 0 && pageY <= scrollY + viewportHeight);\n\n // Provide default target point\n const points = [align.points[0], 'cc'];\n\n return doAlign(el, tgtRegion, { ...align, points }, pointInView);\n}\n\nexport default alignPoint;\n","// export this package's api\nimport Align from './Align';\nexport default Align;","import _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport { useEffect, useRef } from 'react';\nimport raf from \"rc-util/es/raf\";\nimport useState from \"rc-util/es/hooks/useState\";\n/**\n * Popup should follow the steps for each component work correctly:\n * measure - check for the current stretch size\n * align - let component align the position\n * aligned - re-align again in case additional className changed the size\n * afterAlign - choice next step is trigger motion or finished\n * beforeMotion - should reset motion to invisible so that CSSMotion can do normal motion\n * motion - play the motion\n * stable - everything is done\n */\n\nvar StatusQueue = ['measure', 'alignPre', 'align', null, 'motion'];\nexport default (function (visible, doMeasure) {\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n status = _useState2[0],\n setInternalStatus = _useState2[1];\n\n var rafRef = useRef();\n\n function setStatus(nextStatus) {\n setInternalStatus(nextStatus, true);\n }\n\n function cancelRaf() {\n raf.cancel(rafRef.current);\n }\n\n function goNextStatus(callback) {\n cancelRaf();\n rafRef.current = raf(function () {\n // Only align should be manually trigger\n setStatus(function (prev) {\n switch (status) {\n case 'align':\n return 'motion';\n\n case 'motion':\n return 'stable';\n\n default:\n }\n\n return prev;\n });\n callback === null || callback === void 0 ? void 0 : callback();\n });\n } // Init status\n\n\n useEffect(function () {\n setStatus('measure');\n }, [visible]); // Go next status\n\n useEffect(function () {\n switch (status) {\n case 'measure':\n doMeasure();\n break;\n\n default:\n }\n\n if (status) {\n rafRef.current = raf( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n var index, nextStatus;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n index = StatusQueue.indexOf(status);\n nextStatus = StatusQueue[index + 1];\n\n if (nextStatus && index !== -1) {\n setStatus(nextStatus);\n }\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n })));\n }\n }, [status]);\n useEffect(function () {\n return function () {\n cancelRaf();\n };\n }, []);\n return [status, goNextStatus];\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { useRef, useState } from 'react';\nimport Align from 'rc-align';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport CSSMotion from 'rc-motion';\nimport classNames from 'classnames';\nimport useVisibleStatus from \"./useVisibleStatus\";\nimport { getMotion } from \"../utils/legacyUtil\";\nimport useStretchStyle from \"./useStretchStyle\";\nvar PopupInner = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var visible = props.visible,\n prefixCls = props.prefixCls,\n className = props.className,\n style = props.style,\n children = props.children,\n zIndex = props.zIndex,\n stretch = props.stretch,\n destroyPopupOnHide = props.destroyPopupOnHide,\n forceRender = props.forceRender,\n align = props.align,\n point = props.point,\n getRootDomNode = props.getRootDomNode,\n getClassNameFromAlign = props.getClassNameFromAlign,\n onAlign = props.onAlign,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n onMouseDown = props.onMouseDown,\n onTouchStart = props.onTouchStart,\n onClick = props.onClick;\n var alignRef = useRef();\n var elementRef = useRef();\n\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n alignedClassName = _useState2[0],\n setAlignedClassName = _useState2[1]; // ======================= Measure ========================\n\n\n var _useStretchStyle = useStretchStyle(stretch),\n _useStretchStyle2 = _slicedToArray(_useStretchStyle, 2),\n stretchStyle = _useStretchStyle2[0],\n measureStretchStyle = _useStretchStyle2[1];\n\n function doMeasure() {\n if (stretch) {\n measureStretchStyle(getRootDomNode());\n }\n } // ======================== Status ========================\n\n\n var _useVisibleStatus = useVisibleStatus(visible, doMeasure),\n _useVisibleStatus2 = _slicedToArray(_useVisibleStatus, 2),\n status = _useVisibleStatus2[0],\n goNextStatus = _useVisibleStatus2[1]; // ======================== Aligns ========================\n\n /**\n * `alignedClassName` may modify `source` size,\n * which means one time align may not move to the correct position at once.\n *\n * We will reset `alignTimes` for each status switch to `alignPre`\n * and let `rc-align` to align for multiple times to ensure get final stable place.\n * Currently we mark `alignTimes < 2` repeat align, it will increase if user report for align issue.\n * \n * Update:\n * In React 18. `rc-align` effect of align may faster than ref called trigger `forceAlign`.\n * We adjust this to `alignTimes < 2`.\n * We need refactor `rc-align` to support mark of `forceAlign` call if this still happen.\n */\n\n\n var _useState3 = useState(0),\n _useState4 = _slicedToArray(_useState3, 2),\n alignTimes = _useState4[0],\n setAlignTimes = _useState4[1];\n\n var prepareResolveRef = useRef();\n useLayoutEffect(function () {\n if (status === 'alignPre') {\n setAlignTimes(0);\n }\n }, [status]); // `target` on `rc-align` can accept as a function to get the bind element or a point.\n // ref: https://www.npmjs.com/package/rc-align\n\n function getAlignTarget() {\n if (point) {\n return point;\n }\n\n return getRootDomNode;\n }\n\n function forceAlign() {\n var _alignRef$current;\n\n (_alignRef$current = alignRef.current) === null || _alignRef$current === void 0 ? void 0 : _alignRef$current.forceAlign();\n }\n\n function onInternalAlign(popupDomNode, matchAlign) {\n var nextAlignedClassName = getClassNameFromAlign(matchAlign);\n\n if (alignedClassName !== nextAlignedClassName) {\n setAlignedClassName(nextAlignedClassName);\n } // We will retry multi times to make sure that the element has been align in the right position.\n\n\n setAlignTimes(function (val) {\n return val + 1;\n });\n\n if (status === 'align') {\n onAlign === null || onAlign === void 0 ? void 0 : onAlign(popupDomNode, matchAlign);\n }\n } // Delay to go to next status\n\n\n useLayoutEffect(function () {\n if (status === 'align') {\n // Repeat until not more align needed\n if (alignTimes < 3) {\n forceAlign();\n } else {\n goNextStatus(function () {\n var _prepareResolveRef$cu;\n\n (_prepareResolveRef$cu = prepareResolveRef.current) === null || _prepareResolveRef$cu === void 0 ? void 0 : _prepareResolveRef$cu.call(prepareResolveRef);\n });\n }\n }\n }, [alignTimes]); // ======================== Motion ========================\n\n var motion = _objectSpread({}, getMotion(props));\n\n ['onAppearEnd', 'onEnterEnd', 'onLeaveEnd'].forEach(function (eventName) {\n var originHandler = motion[eventName];\n\n motion[eventName] = function (element, event) {\n goNextStatus();\n return originHandler === null || originHandler === void 0 ? void 0 : originHandler(element, event);\n };\n });\n\n function onShowPrepare() {\n return new Promise(function (resolve) {\n prepareResolveRef.current = resolve;\n });\n } // Go to stable directly when motion not provided\n\n\n React.useEffect(function () {\n if (!motion.motionName && status === 'motion') {\n goNextStatus();\n }\n }, [motion.motionName, status]); // ========================= Refs =========================\n\n React.useImperativeHandle(ref, function () {\n return {\n forceAlign: forceAlign,\n getElement: function getElement() {\n return elementRef.current;\n }\n };\n }); // ======================== Render ========================\n\n var mergedStyle = _objectSpread(_objectSpread({}, stretchStyle), {}, {\n zIndex: zIndex,\n opacity: status === 'motion' || status === 'stable' || !visible ? undefined : 0,\n // Cannot interact with disappearing elements\n // https://github.com/ant-design/ant-design/issues/35051#issuecomment-1101340714\n pointerEvents: !visible && status !== 'stable' ? 'none' : undefined\n }, style); // Align status\n\n\n var alignDisabled = true;\n\n if (align !== null && align !== void 0 && align.points && (status === 'align' || status === 'stable')) {\n alignDisabled = false;\n }\n\n var childNode = children; // Wrapper when multiple children\n\n if (React.Children.count(children) > 1) {\n childNode = /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-content\")\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n visible: visible,\n ref: elementRef,\n leavedClassName: \"\".concat(prefixCls, \"-hidden\")\n }, motion, {\n onAppearPrepare: onShowPrepare,\n onEnterPrepare: onShowPrepare,\n removeOnLeave: destroyPopupOnHide,\n forceRender: forceRender\n }), function (_ref, motionRef) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n var mergedClassName = classNames(prefixCls, className, alignedClassName, motionClassName);\n return /*#__PURE__*/React.createElement(Align, {\n target: getAlignTarget(),\n key: \"popup\",\n ref: alignRef,\n monitorWindowResize: true,\n disabled: alignDisabled,\n align: align,\n onAlign: onInternalAlign\n }, /*#__PURE__*/React.createElement(\"div\", {\n ref: motionRef,\n className: mergedClassName,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseDownCapture: onMouseDown,\n onTouchStartCapture: onTouchStart,\n onClick: onClick,\n style: _objectSpread(_objectSpread({}, motionStyle), mergedStyle)\n }, childNode));\n });\n});\nPopupInner.displayName = 'PopupInner';\nexport default PopupInner;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nexport default (function (stretch) {\n var _React$useState = React.useState({\n width: 0,\n height: 0\n }),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n targetSize = _React$useState2[0],\n setTargetSize = _React$useState2[1];\n\n function measureStretch(element) {\n setTargetSize({\n width: element.offsetWidth,\n height: element.offsetHeight\n });\n } // Merge stretch style\n\n\n var style = React.useMemo(function () {\n var sizeStyle = {};\n\n if (stretch) {\n var width = targetSize.width,\n height = targetSize.height; // Stretch with target\n\n if (stretch.indexOf('height') !== -1 && height) {\n sizeStyle.height = height;\n } else if (stretch.indexOf('minHeight') !== -1 && height) {\n sizeStyle.minHeight = height;\n }\n\n if (stretch.indexOf('width') !== -1 && width) {\n sizeStyle.width = width;\n } else if (stretch.indexOf('minWidth') !== -1 && width) {\n sizeStyle.minWidth = width;\n }\n }\n\n return sizeStyle;\n }, [stretch, targetSize]);\n return [style, measureStretch];\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport CSSMotion from 'rc-motion';\nimport classNames from 'classnames';\nvar MobilePopupInner = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n visible = props.visible,\n zIndex = props.zIndex,\n children = props.children,\n _props$mobile = props.mobile;\n _props$mobile = _props$mobile === void 0 ? {} : _props$mobile;\n var popupClassName = _props$mobile.popupClassName,\n popupStyle = _props$mobile.popupStyle,\n _props$mobile$popupMo = _props$mobile.popupMotion,\n popupMotion = _props$mobile$popupMo === void 0 ? {} : _props$mobile$popupMo,\n popupRender = _props$mobile.popupRender,\n onClick = props.onClick;\n var elementRef = React.useRef(); // ========================= Refs =========================\n\n React.useImperativeHandle(ref, function () {\n return {\n forceAlign: function forceAlign() {},\n getElement: function getElement() {\n return elementRef.current;\n }\n };\n }); // ======================== Render ========================\n\n var mergedStyle = _objectSpread({\n zIndex: zIndex\n }, popupStyle);\n\n var childNode = children; // Wrapper when multiple children\n\n if (React.Children.count(children) > 1) {\n childNode = /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-content\")\n }, children);\n } // Mobile support additional render\n\n\n if (popupRender) {\n childNode = popupRender(childNode);\n }\n\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n visible: visible,\n ref: elementRef,\n removeOnLeave: true\n }, popupMotion), function (_ref, motionRef) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n var mergedClassName = classNames(prefixCls, popupClassName, motionClassName);\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: motionRef,\n className: mergedClassName,\n onClick: onClick,\n style: _objectSpread(_objectSpread({}, motionStyle), mergedStyle)\n }, childNode);\n });\n});\nMobilePopupInner.displayName = 'MobilePopupInner';\nexport default MobilePopupInner;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"visible\", \"mobile\"];\nimport * as React from 'react';\nimport { useState, useEffect } from 'react';\nimport isMobile from \"rc-util/es/isMobile\";\nimport Mask from \"./Mask\";\nimport PopupInner from \"./PopupInner\";\nimport MobilePopupInner from \"./MobilePopupInner\";\nvar Popup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var visible = _ref.visible,\n mobile = _ref.mobile,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var _useState = useState(visible),\n _useState2 = _slicedToArray(_useState, 2),\n innerVisible = _useState2[0],\n serInnerVisible = _useState2[1];\n\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n inMobile = _useState4[0],\n setInMobile = _useState4[1];\n\n var cloneProps = _objectSpread(_objectSpread({}, props), {}, {\n visible: innerVisible\n }); // We check mobile in visible changed here.\n // And this also delay set `innerVisible` to avoid popup component render flash\n\n\n useEffect(function () {\n serInnerVisible(visible);\n\n if (visible && mobile) {\n setInMobile(isMobile());\n }\n }, [visible, mobile]);\n var popupNode = inMobile ? /*#__PURE__*/React.createElement(MobilePopupInner, _extends({}, cloneProps, {\n mobile: mobile,\n ref: ref\n })) : /*#__PURE__*/React.createElement(PopupInner, _extends({}, cloneProps, {\n ref: ref\n })); // We can use fragment directly but this may failed some selector usage. Keep as origin logic\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(Mask, cloneProps), popupNode);\n});\nPopup.displayName = 'Popup';\nexport default Popup;","import * as React from 'react';\nvar TriggerContext = /*#__PURE__*/React.createContext(null);\nexport default TriggerContext;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport raf from \"rc-util/es/raf\";\nimport contains from \"rc-util/es/Dom/contains\";\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport { composeRef, supportRef } from \"rc-util/es/ref\";\nimport addEventListener from \"rc-util/es/Dom/addEventListener\";\nimport Portal from \"rc-util/es/Portal\";\nimport classNames from 'classnames';\nimport { getAlignFromPlacement, getAlignPopupClassName } from \"./utils/alignUtil\";\nimport Popup from \"./Popup\";\nimport TriggerContext from \"./context\";\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument(element) {\n if (element) {\n return element.ownerDocument;\n }\n\n return window.document;\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n\n/**\n * Internal usage. Do not use in your code since this will be removed.\n */\nexport function generateTrigger(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n _inherits(Trigger, _React$Component);\n\n var _super = _createSuper(Trigger);\n\n // ensure `getContainer` will be called only once\n function Trigger(props) {\n var _this;\n\n _classCallCheck(this, Trigger);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"popupRef\", /*#__PURE__*/React.createRef());\n\n _defineProperty(_assertThisInitialized(_this), \"triggerRef\", /*#__PURE__*/React.createRef());\n\n _defineProperty(_assertThisInitialized(_this), \"portalContainer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"attachId\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"clickOutsideHandler\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"touchOutsideHandler\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"contextMenuOutsideHandler1\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"contextMenuOutsideHandler2\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"mouseDownTimeout\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"focusTime\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"preClickTime\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"preTouchTime\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"delayTimer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"hasPopupMouseDown\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseEnter\", function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseMove\", function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseLeave\", function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPopupMouseEnter\", function () {\n _this.clearDelayTimer();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPopupMouseLeave\", function (e) {\n var _this$popupRef$curren;\n\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && contains((_this$popupRef$curren = _this.popupRef.current) === null || _this$popupRef$curren === void 0 ? void 0 : _this$popupRef$curren.getElement(), e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onFocus\", function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseDown\", function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTouchStart\", function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onBlur\", function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onContextMenu\", function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onContextMenuClose\", function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onPopupMouseDown\", function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDocumentClick\", function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if ( // mousedown on the target should also close popup when action is contextMenu.\n // https://github.com/ant-design/ant-design/issues/29853\n (!contains(root, target) || _this.isContextMenuOnly()) && !contains(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getRootDomNode\", function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = findDOMNode(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return ReactDOM.findDOMNode(_assertThisInitialized(_this));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getPopupClassNameFromAlign\", function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getComponent\", function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint,\n mobile = _this$props2.mobile,\n forceRender = _this$props2.forceRender,\n onPopupClick = _this$props2.onPopupClick;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return /*#__PURE__*/React.createElement(Popup, _extends({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion,\n mobile: mobile,\n forceRender: forceRender,\n onClick: onPopupClick\n }), typeof popup === 'function' ? popup() : popup);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"attachParent\", function (popupContainer) {\n raf.cancel(_this.attachId);\n var _this$props3 = _this.props,\n getPopupContainer = _this$props3.getPopupContainer,\n getDocument = _this$props3.getDocument;\n\n var domNode = _this.getRootDomNode();\n\n var mountNode;\n\n if (!getPopupContainer) {\n mountNode = getDocument(_this.getRootDomNode()).body;\n } else if (domNode || getPopupContainer.length === 0) {\n // Compatible for legacy getPopupContainer with domNode argument.\n // If no need `domNode` argument, will call directly.\n // https://codesandbox.io/s/eloquent-mclean-ss93m?file=/src/App.js\n mountNode = getPopupContainer(domNode);\n }\n\n if (mountNode) {\n mountNode.appendChild(popupContainer);\n } else {\n // Retry after frame render in case parent not ready\n _this.attachId = raf(function () {\n _this.attachParent(popupContainer);\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"getContainer\", function () {\n if (!_this.portalContainer) {\n // In React.StrictMode component will call render multiple time in first mount.\n // When you want to refactor with FC, useRef will also init multiple time and\n // point to different useRef instance which will create multiple element\n // (This multiple render will not trigger effect so you can not clean up this\n // in effect). But this is safe with class component since it always point to same class instance.\n var getDocument = _this.props.getDocument;\n var popupContainer = getDocument(_this.getRootDomNode()).createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n _this.portalContainer = popupContainer;\n }\n\n _this.attachParent(_this.portalContainer);\n\n return _this.portalContainer;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"setPoint\", function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handlePortalUpdate\", function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"triggerContextValue\", {\n onPopupMouseDown: _this.onPopupMouseDown\n });\n\n var _popupVisible;\n\n if ('popupVisible' in props) {\n _popupVisible = !!props.popupVisible;\n } else {\n _popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: _popupVisible,\n popupVisible: _popupVisible\n };\n ALL_HANDLERS.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n _createClass(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument(this.getRootDomNode());\n this.clickOutsideHandler = addEventListener(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.touchOutsideHandler = addEventListener(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument(this.getRootDomNode());\n this.contextMenuOutsideHandler1 = addEventListener(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListener(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n raf.cancel(this.attachId);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n var _this$popupRef$curren2;\n\n // for test\n return ((_this$popupRef$curren2 = this.popupRef.current) === null || _this$popupRef$curren2 === void 0 ? void 0 : _this$popupRef$curren2.getElement()) || null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n }, {\n key: \"setPopupVisible\",\n value:\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event && popupVisible) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuOnly\",\n value: function isContextMenuOnly() {\n var action = this.props.action;\n return action === 'contextMenu' || action.length === 1 && action[0] === 'contextMenu';\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n showAction = _this$props5.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n hideAction = _this$props6.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n showAction = _this$props7.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n hideAction = _this$props8.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n showAction = _this$props9.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props10 = this.props,\n action = _this$props10.action,\n hideAction = _this$props10.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible) {\n var _this$popupRef$curren3;\n\n (_this$popupRef$curren3 = this.popupRef.current) === null || _this$popupRef$curren3 === void 0 ? void 0 : _this$popupRef$curren3.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props11 = this.props,\n children = _this$props11.children,\n forceRender = _this$props11.forceRender,\n alignPoint = _this$props11.alignPoint,\n className = _this$props11.className,\n autoDestroy = _this$props11.autoDestroy;\n var child = React.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n }; // ============================== Visible Handlers ==============================\n // >>> ContextMenu\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n } // >>> Click\n\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n } // >>> Hover(enter)\n\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter; // Point align\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n } // >>> Hover(leave)\n\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n } // >>> Focus\n\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n } // =================================== Render ===================================\n\n\n var childrenClassName = classNames(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = _objectSpread({}, newChildProps);\n\n if (supportRef(child)) {\n cloneProps.ref = composeRef(this.triggerRef, child.ref);\n }\n\n var trigger = /*#__PURE__*/React.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = /*#__PURE__*/React.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n if (!popupVisible && autoDestroy) {\n portal = null;\n }\n\n return /*#__PURE__*/React.createElement(TriggerContext.Provider, {\n value: this.triggerContextValue\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n\n return Trigger;\n }(React.Component);\n\n _defineProperty(Trigger, \"contextType\", TriggerContext);\n\n _defineProperty(Trigger, \"defaultProps\", {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: [],\n autoDestroy: false\n });\n\n return Trigger;\n}\nexport default generateTrigger(Portal);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nexport default function Mask(props) {\n var prefixCls = props.prefixCls,\n style = props.style,\n visible = props.visible,\n maskProps = props.maskProps,\n motionName = props.motionName;\n return /*#__PURE__*/React.createElement(CSSMotion, {\n key: \"mask\",\n visible: visible,\n motionName: motionName,\n leavedClassName: \"\".concat(prefixCls, \"-mask-hidden\")\n }, function (_ref, ref) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n style: _objectSpread(_objectSpread({}, motionStyle), style),\n className: classNames(\"\".concat(prefixCls, \"-mask\"), motionClassName)\n }, maskProps));\n });\n}","// =============================== Motion ===============================\nexport function getMotionName(prefixCls, transitionName, animationName) {\n var motionName = transitionName;\n if (!motionName && animationName) {\n motionName = \"\".concat(prefixCls, \"-\").concat(animationName);\n }\n return motionName;\n}\n// =============================== Offset ===============================\nfunction getScroll(w, top) {\n var ret = w[\"page\".concat(top ? 'Y' : 'X', \"Offset\")];\n var method = \"scroll\".concat(top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n ret = d.body[method];\n }\n }\n return ret;\n}\nexport function offset(el) {\n var rect = el.getBoundingClientRect();\n var pos = {\n left: rect.left,\n top: rect.top\n };\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScroll(w);\n pos.top += getScroll(w, true);\n return pos;\n}","import * as React from 'react';\nexport default /*#__PURE__*/React.memo(function (_ref) {\n var children = _ref.children;\n return children;\n}, function (_, _ref2) {\n var shouldUpdate = _ref2.shouldUpdate;\n return !shouldUpdate;\n});","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React, { useRef } from 'react';\nimport classNames from 'classnames';\nimport MemoChildren from './MemoChildren';\nvar sentinelStyle = {\n width: 0,\n height: 0,\n overflow: 'hidden',\n outline: 'none'\n};\nvar Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n className = props.className,\n style = props.style,\n title = props.title,\n ariaId = props.ariaId,\n footer = props.footer,\n closable = props.closable,\n closeIcon = props.closeIcon,\n onClose = props.onClose,\n children = props.children,\n bodyStyle = props.bodyStyle,\n bodyProps = props.bodyProps,\n modalRender = props.modalRender,\n onMouseDown = props.onMouseDown,\n onMouseUp = props.onMouseUp,\n holderRef = props.holderRef,\n visible = props.visible,\n forceRender = props.forceRender,\n width = props.width,\n height = props.height;\n // ================================= Refs =================================\n var sentinelStartRef = useRef();\n var sentinelEndRef = useRef();\n React.useImperativeHandle(ref, function () {\n return {\n focus: function focus() {\n var _sentinelStartRef$cur;\n (_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 ? void 0 : _sentinelStartRef$cur.focus();\n },\n changeActive: function changeActive(next) {\n var _document = document,\n activeElement = _document.activeElement;\n if (next && activeElement === sentinelEndRef.current) {\n sentinelStartRef.current.focus();\n } else if (!next && activeElement === sentinelStartRef.current) {\n sentinelEndRef.current.focus();\n }\n }\n };\n });\n // ================================ Style =================================\n var contentStyle = {};\n if (width !== undefined) {\n contentStyle.width = width;\n }\n if (height !== undefined) {\n contentStyle.height = height;\n }\n // ================================ Render ================================\n var footerNode;\n if (footer) {\n footerNode = /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-footer\")\n }, footer);\n }\n var headerNode;\n if (title) {\n headerNode = /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-header\")\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-title\"),\n id: ariaId\n }, title));\n }\n var closer;\n if (closable) {\n closer = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\",\n className: \"\".concat(prefixCls, \"-close\")\n }, closeIcon || /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-close-x\")\n }));\n }\n var content = /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-content\")\n }, closer, headerNode, /*#__PURE__*/React.createElement(\"div\", _extends({\n className: \"\".concat(prefixCls, \"-body\"),\n style: bodyStyle\n }, bodyProps), children), footerNode);\n return /*#__PURE__*/React.createElement(\"div\", {\n key: \"dialog-element\",\n role: \"dialog\",\n \"aria-labelledby\": title ? ariaId : null,\n \"aria-modal\": \"true\",\n ref: holderRef,\n style: _objectSpread(_objectSpread({}, style), contentStyle),\n className: classNames(prefixCls, className),\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp\n }, /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStartRef,\n style: sentinelStyle,\n \"aria-hidden\": \"true\"\n }), /*#__PURE__*/React.createElement(MemoChildren, {\n shouldUpdate: visible || forceRender\n }, modalRender ? modalRender(content) : content), /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEndRef,\n style: sentinelStyle,\n \"aria-hidden\": \"true\"\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n Panel.displayName = 'Panel';\n}\nexport default Panel;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport { offset } from '../../util';\nimport Panel from './Panel';\nvar Content = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n title = props.title,\n style = props.style,\n className = props.className,\n visible = props.visible,\n forceRender = props.forceRender,\n destroyOnClose = props.destroyOnClose,\n motionName = props.motionName,\n ariaId = props.ariaId,\n onVisibleChanged = props.onVisibleChanged,\n mousePosition = props.mousePosition;\n var dialogRef = useRef();\n // ============================= Style ==============================\n var _React$useState = React.useState(),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n transformOrigin = _React$useState2[0],\n setTransformOrigin = _React$useState2[1];\n var contentStyle = {};\n if (transformOrigin) {\n contentStyle.transformOrigin = transformOrigin;\n }\n function onPrepare() {\n var elementOffset = offset(dialogRef.current);\n setTransformOrigin(mousePosition ? \"\".concat(mousePosition.x - elementOffset.left, \"px \").concat(mousePosition.y - elementOffset.top, \"px\") : '');\n }\n // ============================= Render =============================\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: visible,\n onVisibleChanged: onVisibleChanged,\n onAppearPrepare: onPrepare,\n onEnterPrepare: onPrepare,\n forceRender: forceRender,\n motionName: motionName,\n removeOnLeave: destroyOnClose,\n ref: dialogRef\n }, function (_ref, motionRef) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n return /*#__PURE__*/React.createElement(Panel, _extends({}, props, {\n ref: ref,\n title: title,\n ariaId: ariaId,\n prefixCls: prefixCls,\n holderRef: motionRef,\n style: _objectSpread(_objectSpread(_objectSpread({}, motionStyle), style), contentStyle),\n className: classNames(className, motionClassName)\n }));\n });\n});\nContent.displayName = 'Content';\nexport default Content;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { useRef, useEffect } from 'react';\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport useId from \"rc-util/es/hooks/useId\";\nimport contains from \"rc-util/es/Dom/contains\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport Mask from './Mask';\nimport { getMotionName } from '../util';\nimport Content from './Content';\nexport default function Dialog(props) {\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-dialog' : _props$prefixCls,\n zIndex = props.zIndex,\n _props$visible = props.visible,\n visible = _props$visible === void 0 ? false : _props$visible,\n _props$keyboard = props.keyboard,\n keyboard = _props$keyboard === void 0 ? true : _props$keyboard,\n _props$focusTriggerAf = props.focusTriggerAfterClose,\n focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf,\n wrapStyle = props.wrapStyle,\n wrapClassName = props.wrapClassName,\n wrapProps = props.wrapProps,\n onClose = props.onClose,\n afterClose = props.afterClose,\n transitionName = props.transitionName,\n animation = props.animation,\n _props$closable = props.closable,\n closable = _props$closable === void 0 ? true : _props$closable,\n _props$mask = props.mask,\n mask = _props$mask === void 0 ? true : _props$mask,\n maskTransitionName = props.maskTransitionName,\n maskAnimation = props.maskAnimation,\n _props$maskClosable = props.maskClosable,\n maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,\n maskStyle = props.maskStyle,\n maskProps = props.maskProps,\n rootClassName = props.rootClassName;\n var lastOutSideActiveElementRef = useRef();\n var wrapperRef = useRef();\n var contentRef = useRef();\n var _React$useState = React.useState(visible),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n animatedVisible = _React$useState2[0],\n setAnimatedVisible = _React$useState2[1];\n // ========================== Init ==========================\n var ariaId = useId();\n function saveLastOutSideActiveElementRef() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n lastOutSideActiveElementRef.current = document.activeElement;\n }\n }\n function focusDialogContent() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n var _contentRef$current;\n (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.focus();\n }\n }\n // ========================= Events =========================\n function onDialogVisibleChanged(newVisible) {\n // Try to focus\n if (newVisible) {\n focusDialogContent();\n } else {\n // Clean up scroll bar & focus back\n setAnimatedVisible(false);\n if (mask && lastOutSideActiveElementRef.current && focusTriggerAfterClose) {\n try {\n lastOutSideActiveElementRef.current.focus({\n preventScroll: true\n });\n } catch (e) {\n // Do nothing\n }\n lastOutSideActiveElementRef.current = null;\n }\n // Trigger afterClose only when change visible from true to false\n if (animatedVisible) {\n afterClose === null || afterClose === void 0 ? void 0 : afterClose();\n }\n }\n }\n function onInternalClose(e) {\n onClose === null || onClose === void 0 ? void 0 : onClose(e);\n }\n // >>> Content\n var contentClickRef = useRef(false);\n var contentTimeoutRef = useRef();\n // We need record content click incase content popup out of dialog\n var onContentMouseDown = function onContentMouseDown() {\n clearTimeout(contentTimeoutRef.current);\n contentClickRef.current = true;\n };\n var onContentMouseUp = function onContentMouseUp() {\n contentTimeoutRef.current = setTimeout(function () {\n contentClickRef.current = false;\n });\n };\n // >>> Wrapper\n // Close only when element not on dialog\n var onWrapperClick = null;\n if (maskClosable) {\n onWrapperClick = function onWrapperClick(e) {\n if (contentClickRef.current) {\n contentClickRef.current = false;\n } else if (wrapperRef.current === e.target) {\n onInternalClose(e);\n }\n };\n }\n function onWrapperKeyDown(e) {\n if (keyboard && e.keyCode === KeyCode.ESC) {\n e.stopPropagation();\n onInternalClose(e);\n return;\n }\n // keep focus inside dialog\n if (visible) {\n if (e.keyCode === KeyCode.TAB) {\n contentRef.current.changeActive(!e.shiftKey);\n }\n }\n }\n // ========================= Effect =========================\n useEffect(function () {\n if (visible) {\n setAnimatedVisible(true);\n saveLastOutSideActiveElementRef();\n }\n }, [visible]);\n // Remove direct should also check the scroll bar update\n useEffect(function () {\n return function () {\n clearTimeout(contentTimeoutRef.current);\n };\n }, []);\n // ========================= Render =========================\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: classNames(\"\".concat(prefixCls, \"-root\"), rootClassName)\n }, pickAttrs(props, {\n data: true\n })), /*#__PURE__*/React.createElement(Mask, {\n prefixCls: prefixCls,\n visible: mask && visible,\n motionName: getMotionName(prefixCls, maskTransitionName, maskAnimation),\n style: _objectSpread({\n zIndex: zIndex\n }, maskStyle),\n maskProps: maskProps\n }), /*#__PURE__*/React.createElement(\"div\", _extends({\n tabIndex: -1,\n onKeyDown: onWrapperKeyDown,\n className: classNames(\"\".concat(prefixCls, \"-wrap\"), wrapClassName),\n ref: wrapperRef,\n onClick: onWrapperClick,\n style: _objectSpread(_objectSpread({\n zIndex: zIndex\n }, wrapStyle), {}, {\n display: !animatedVisible ? 'none' : null\n })\n }, wrapProps), /*#__PURE__*/React.createElement(Content, _extends({}, props, {\n onMouseDown: onContentMouseDown,\n onMouseUp: onContentMouseUp,\n ref: contentRef,\n closable: closable,\n ariaId: ariaId,\n prefixCls: prefixCls,\n visible: visible && animatedVisible,\n onClose: onInternalClose,\n onVisibleChanged: onDialogVisibleChanged,\n motionName: getMotionName(prefixCls, transitionName, animation)\n }))));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport Portal from '@rc-component/portal';\nimport Dialog from './Dialog';\n// fix issue #10656\n/*\n * getContainer remarks\n * Custom container should not be return, because in the Portal component, it will remove the\n * return container element here, if the custom container is the only child of it's component,\n * like issue #10656, It will has a conflict with removeChild method in react-dom.\n * So here should add a child (div element) to custom container.\n * */\nvar DialogWrap = function DialogWrap(props) {\n var visible = props.visible,\n getContainer = props.getContainer,\n forceRender = props.forceRender,\n _props$destroyOnClose = props.destroyOnClose,\n destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,\n _afterClose = props.afterClose;\n var _React$useState = React.useState(visible),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n animatedVisible = _React$useState2[0],\n setAnimatedVisible = _React$useState2[1];\n React.useEffect(function () {\n if (visible) {\n setAnimatedVisible(true);\n }\n }, [visible]);\n // // 渲染在当前 dom 里;\n // if (getContainer === false) {\n // return (\n //