!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=100)}([function(e,t,n){"use strict";e.exports=n(101)},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41);var o=n(52),i=n(35);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=function(e){return+setTimeout(e,16)},o=function(e){return clearTimeout(e)};function i(e){return r(e)}"undefined"!=typeof window&&"requestAnimationFrame"in window&&(r=function(e){return window.requestAnimationFrame(e)},o=function(e){return window.cancelAnimationFrame(e)}),i.cancel=o},function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=r||o||i,l=a&&(r?document.documentMode||6:+(i||o)[1]),c=!i&&/WebKit\//.test(e),u=c&&/Qt\/\d+\.\d+/.test(e),s=!i&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!i&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,c=!0);var O=y&&(u||f&&(null==x||x<12.11)),C=n||a&&l>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,E=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return j(e).appendChild(t)}function P(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i=t)return a+(t-i);a+=l-i,a+=n-a%n,i=l+1}}m?D=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(D=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function H(e,t){for(var n=0;n=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var $=[""];function G(e){for(;$.length<=e;)$.push(Y($)+" ");return $[e]}function Y(e){return e[e.length-1]}function q(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var ae=null;function le(e,t,n){var r;ae=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:ae=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:ae=o)}return null!=r?r:ae}var ce=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,l){var c="ltr"==l?"L":"R";if(0==a.length||"ltr"==l&&!e.test(a))return!1;for(var u,s=a.length,f=[],d=0;d-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function he(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function ye(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Oe(e){be(e),we(e)}function Ce(e){return e.target||e.srcElement}function Se(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var ke,Ee,je=function(){if(a&&l<9)return!1;var e=P("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==ke){var t=P("span","​");T(e,P("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ke=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=ke?P("span","​"):P("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Pe(e){if(null!=Ee)return Ee;var t=T(e,document.createTextNode("AخA")),n=k(t,0,1).getBoundingClientRect(),r=k(t,1,2).getBoundingClientRect();return j(e),!(!n||n.left==n.right)&&(Ee=r.right-n.right<3)}var Ne,Me=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Le=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ae="oncopy"in(Ne=P("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),_e=null,De={},Ie={};function Re(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),De[e]=t}function ze(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Fe(e,t){t=ze(t);var n=De[t.name];if(!n)return Fe(e,"text/plain");var r=n(e,t);if(He.hasOwnProperty(t.name)){var o=He[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var He={};function We(e,t){R(t,He.hasOwnProperty(e)?He[e]:He[e]={})}function Be(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ue(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ve(e,t,n){return!e.startState||e.startState(t,n)}var Ke=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function $e(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t=e.first&&tn?et(n,$e(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,$e(e,t.line).text.length)}function ct(e,t){for(var n=[],r=0;r=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.post},Ke.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},st=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,n,r){var o=[e.state.modeGen],i={};wt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,l=function(r){n.baseTokens=o;var l=e.state.overlays[r],c=1,u=0;n.state=!0,wt(e,t.text,l.mode,n,(function(e,t){for(var n=c;ue&&o.splice(c,1,e,o[c+1],r),c+=2,u=Math.min(e,r)}if(t)if(l.opaque)o.splice(n,c-n,e,"overlay "+t),c=n+2;else for(;ne.options.maxHighlightLength&&Be(e.doc.mode,r.state),i=ft(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new st(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=i.first)return i.first;var c=$e(i,l-1),u=c.stateAfter;if(u&&(!n||l+(u instanceof ut?u.lookAhead:0)<=i.modeFrontier))return l;var s=z(c.text,null,e.options.tabSize);(null==o||r>s)&&(o=l-1,r=s)}return o}(e,t,n),a=i>r.first&&$e(r,i-1).stateAfter,l=a?st.fromSaved(r,a,i):new st(r,Ve(r.mode),i);return r.iter(i,t,(function(n){ht(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&rt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}st.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},st.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},st.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},st.fromSaved=function(e,t,n){return t instanceof ut?new st(e,Be(e.mode,t.state),n,t.lookAhead):new st(e,Be(e.mode,t),n)},st.prototype.save=function(e){var t=!1!==e?Be(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var o,i,a=e.doc,l=a.mode,c=$e(a,(t=lt(a,t)).line),u=pt(e,t.line,n),s=new Ke(c.text,e.options.tabSize,u);for(r&&(i=[]);(r||s.pose.options.maxHighlightLength?(l=!1,a&&ht(e,t,r,f.pos),f.pos=t.length,c=null):c=bt(vt(n,f,r.state,d),i),d){var p=d[0].name;p&&(c="m-"+(c?p+" "+c:p))}if(!l||s!=c){for(;u=t:i.to>t);(r||(r=[])).push(new Ct(a,i.from,l?null:i.to))}}return r}(n,o,a),c=function(e,t,n){var r;if(e)for(var o=0;o=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&l)for(var b=0;bt)&&(!n||Lt(n,i.marker)<0)&&(n=i.marker)}return n}function Rt(e,t,n,r,o){var i=$e(e,t),a=Ot&&i.markedSpans;if(a)for(var l=0;l=0&&f<=0||s<=0&&f>=0)&&(s<=0&&(c.marker.inclusiveRight&&o.inclusiveLeft?tt(u.to,n)>=0:tt(u.to,n)>0)||s>=0&&(c.marker.inclusiveRight&&o.inclusiveLeft?tt(u.from,r)<=0:tt(u.from,r)<0)))return!0}}}function zt(e){for(var t;t=_t(e);)e=t.find(-1,!0).line;return e}function Ft(e,t){var n=$e(e,t),r=zt(n);return n==r?t:Xe(r)}function Ht(e,t){if(t>e.lastLine())return t;var n,r=$e(e,t);if(!Wt(e,r))return t;for(;n=Dt(r);)r=n.find(1,!0).line;return Xe(r)+1}function Wt(e,t){var n=Ot&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var $t=function(e,t,n){this.text=e,Pt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,Tt(e)}$t.prototype.lineNo=function(){return Xe(this)},ye($t);var Yt={},qt={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?qt:Yt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var n=N("span",null,null,c?"padding-right: .1px":null),r={pre:N("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=Zt,Pe(e.display.measure)&&(a=ue(i,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(i,r,dt(e,i,t!=e.display.externalMeasured&&Xe(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=_(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=_(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Te(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var l=r.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=_(r.pre.className,r.textClass||"")),r}function Jt(e){var t=P("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,o,i,c){if(t){var u,s=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;ou&&f.from<=u);d++);if(f.to>=s)return e(n,r,o,i,a,l,c);e(n,r.slice(0,f.to-u),o,i,null,l,c),i=null,r=r.slice(f.to-u),u=f.to}}}function tn(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,l,c,u,s,f,d,p=o.length,h=0,m=1,v="",g=0;;){if(g==h){c=u=s=l="",d=null,f=null,g=1/0;for(var y=[],b=void 0,w=0;wh||O.collapsed&&x.to==h&&x.from==h)){if(null!=x.to&&x.to!=h&&g>x.to&&(g=x.to,u=""),O.className&&(c+=" "+O.className),O.css&&(l=(l?l+";":"")+O.css),O.startStyle&&x.from==h&&(s+=" "+O.startStyle),O.endStyle&&x.to==g&&(b||(b=[])).push(O.endStyle,x.to),O.title&&((d||(d={})).title=O.title),O.attributes)for(var C in O.attributes)(d||(d={}))[C]=O.attributes[C];O.collapsed&&(!f||Lt(f.marker,O)<0)&&(f=x)}else x.from>h&&g>x.from&&(g=x.from)}if(b)for(var S=0;S=p)break;for(var E=Math.min(p,g);;){if(v){var j=h+v.length;if(!f){var T=j>E?v.slice(0,E-h):v;t.addToken(t,T,a?a+c:c,s,h+T.length==g?u:"",l,d)}if(j>=E){v=v.slice(E-h),h=E;break}h=j,s=""}v=o.slice(i,i=n[m++]),a=Xt(n[m++],t.cm.options)}}else for(var P=1;Pn)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Nn(e,t,n,r){return An(e,Ln(e,t),n,r)}function Mn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&i.push((c.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=In(t.map,n,r),c=i.node,u=i.start,s=i.end,f=i.collapse;if(3==c.nodeType){for(var d=0;d<4;d++){for(;u&&re(t.line.text.charAt(i.coverStart+u));)--u;for(;i.coverStart+s1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,o))}else{var p;u>0&&(f=r="right"),o=e.options.lineWrapping&&(p=c.getClientRects()).length>1?p["right"==r?p.length-1:0]:c.getBoundingClientRect()}if(a&&l<9&&!u&&(!o||!o.left&&!o.right)){var h=c.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+or(e.display),top:h.top,bottom:h.bottom}:Dn}for(var m=o.top-t.rect.top,v=o.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,b=0;bt)&&(o=(i=c-l)-1,t>=c&&(a="right")),null!=o){if(r=e[u+2],l==c&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&o==c-l)for(;u=0&&(n=e[o]).left==n.right;o--);return n}function zn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(c=r.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return a("before"==u?c-1:c,"before"==u);function s(e,t,n){return a(n?e-1:e,1==l[t].level!=n)}var f=le(l,c,u),d=ae,p=s(c,f,"before"==u);return null!=d&&(p.other=s(c,d,"before"!=u)),p}function Yn(e,t){var n=0;t=lt(e.doc,t),e.options.lineWrapping||(n=or(e.display)*t.ch);var r=$e(e.doc,t.line),o=Ut(r)+Cn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function qn(e,t,n,r,o){var i=et(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function Xn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return qn(r.first,0,null,-1,-1);var o=Qe(r,n),i=r.first+r.size-1;if(o>i)return qn(r.first+r.size-1,$e(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=$e(r,o);;){var l=er(e,a,o,t,n),c=It(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!c)return l;var u=c.find(1);if(u.line==o)return u;a=$e(r,o=u.line)}}function Qn(e,t,n,r){r-=Un(t);var o=t.text.length,i=ie((function(t){return An(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ie((function(t){return An(e,n,t).top>r}),i,o)}}function Jn(e,t,n,r){return n||(n=Ln(e,t)),Qn(e,t,n,Vn(e,t,An(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,o){o-=Ut(t);var i=Ln(e,t),a=Un(t),l=0,c=t.text.length,u=!0,s=ue(t,e.doc.direction);if(s){var f=(e.options.lineWrapping?nr:tr)(e,t,n,i,s,r,o);l=(u=1!=f.level)?f.from:f.to-1,c=u?f.to:f.from-1}var d,p,h=null,m=null,v=ie((function(t){var n=An(e,i,t);return n.top+=a,n.bottom+=a,!!Zn(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)}),l,c),g=!1;if(m){var y=r-m.left=w.bottom?1:0}return qn(n,v=oe(t.text,v,1),p,g,r-d)}function tr(e,t,n,r,o,i,a){var l=ie((function(l){var c=o[l],u=1!=c.level;return Zn(Gn(e,et(n,u?c.to:c.from,u?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),c=o[l];if(l>0){var u=1!=c.level,s=Gn(e,et(n,u?c.from:c.to,u?"after":"before"),"line",t,r);Zn(s,i,a,!0)&&s.top>a&&(c=o[l-1])}return c}function nr(e,t,n,r,o,i,a){var l=Qn(e,t,r,a),c=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var s=null,f=null,d=0;d=u||p.to<=c)){var h=An(e,r,1!=p.level?Math.min(u,p.to)-1:Math.max(c,p.from)).right,m=hm)&&(s=p,f=m)}}return s||(s=o[o.length-1]),s.fromu&&(s={from:s.from,to:u,level:s.level}),s}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==_n){_n=P("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)_n.appendChild(document.createTextNode("x")),_n.appendChild(P("br"));_n.appendChild(document.createTextNode("x"))}T(e.measure,_n);var n=_n.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),j(e.measure),n||1}function or(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=P("span","xxxxxxxxxx"),n=P("pre",[t],"CodeMirror-line-like");T(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ir(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=i.offsetLeft+i.clientLeft+o,r[l]=i.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function lr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/or(e.display)-3);return function(o){if(Wt(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a0&&(c=$e(e.doc,u.line).text).length==u.ch){var s=z(c,c.length,e.options.tabSize)-c.length;u=et(u.line,Math.max(0,Math.round((i-kn(e.display).left)/or(e.display))-s))}return u}function sr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Ot&&Ft(e.doc,t)o.viewFrom?pr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)pr(e);else if(t<=o.viewFrom){var i=hr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):pr(e)}else if(n>=o.viewTo){var a=hr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):pr(e)}else{var l=hr(e,t,t,-1),c=hr(e,n,n+r,1);l&&c?(o.view=o.view.slice(0,l.index).concat(on(e,l.lineN,c.lineN)).concat(o.view.slice(c.index)),o.viewTo+=r):pr(e)}var u=o.externalMeasured;u&&(n=o.lineN&&t=r.viewTo)){var i=r.view[sr(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==H(a,n)&&a.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var o,i=sr(e,t),a=e.display.view;if(!Ot||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var l=e.display.viewFrom,c=0;c0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,n+=o}for(;Ft(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||l.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(m,n||0,null==r?d:r,(function(e,t,o,f){var v="ltr"==o,g=p(e,v?"left":"right"),y=p(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==d,x=0==f,O=!m||f==m.length-1;if(y.top-g.top<=3){var C=(u?w:b)&&O,S=(u?b:w)&&x?l:(v?g:y).left,k=C?c:(v?y:g).right;s(S,g.top,k-S,g.bottom)}else{var E,j,T,P;v?(E=u&&b&&x?l:g.left,j=u?c:h(e,o,"before"),T=u?l:h(t,o,"after"),P=u&&w&&O?c:y.right):(E=u?h(e,o,"before"):l,j=!u&&b&&x?c:g.right,T=!u&&w&&O?l:y.left,P=u?h(t,o,"after"):c),s(E,g.top,j-E,g.bottom),g.bottom0?t.blinker=setInterval((function(){e.hasFocus()||kr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Or(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Sr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&kr(e))}),100)}function Sr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,A(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),c&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),xr(e))}function kr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Er(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(qe(o.line,c),jr(o.line),o.rest))for(var p=0;pe.display.sizerWidth){var h=Math.ceil(u/or(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function jr(e){if(e.widgets)for(var t=0;t=a&&(i=Qe(t,Ut($e(t,c))-e.wrapper.clientHeight),a=c)}return{from:i,to:Math.max(a,i+1)}}function Pr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Tn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+Sn(n),c=t.topl-r;if(t.topo+i){var s=Math.min(t.top,(u?l:t.bottom)-i);s!=o&&(a.scrollTop=s)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,p=jn(e)-n.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+d-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function Nr(e,t){null!=t&&(Ar(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mr(e){Ar(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Lr(e,t,n){null==t&&null==n||Ar(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ar(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,_r(e,Yn(e,t.from),Yn(e,t.to),t.margin))}function _r(e,t,n,r){var o=Pr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Lr(e,o.scrollLeft,o.scrollTop)}function Dr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||co(e,{top:t}),Ir(e,t,!0),n&&co(e),ro(e,100))}function Ir(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Rr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,fo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function zr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Sn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=P("div",[P("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=P("div",[P("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Hr=function(){};function Wr(e,t){t||(t=zr(e));var n=e.display.barWidth,r=e.display.barHeight;Br(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Er(e),Br(e,zr(e)),n=e.display.barWidth,r=e.display.barHeight}function Br(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Hr.prototype.update=function(){return{bottom:0,right:0}},Hr.prototype.setScrollLeft=function(){},Hr.prototype.setScrollTop=function(){},Hr.prototype.clear=function(){};var Ur={native:Fr,null:Hr};function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ur[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Rr(e,t):Dr(e,t)}),e),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)}var Kr=0;function $r(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Kr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function qr(e){e.updatedDisplay=e.mustUpdate&&ao(e.cm,e.update)}function Xr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Er(t),e.barMeasure=zr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Nn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-jn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!h){var i=P("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Cn(e.display))+"px;\n height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,l=Gn(e,t),c=n&&n!=t?Gn(e,n):l,u=Pr(e,o={left:Math.min(l.left,c.left),top:Math.min(l.top,c.top)-r,right:Math.max(l.left,c.left),bottom:Math.max(l.bottom,c.bottom)+r}),s=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Dr(e,u.scrollTop),Math.abs(e.doc.scrollTop-s)>1&&(a=!0)),null!=u.scrollLeft&&(Rr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}(t,lt(r,e.scrollToPos.from),lt(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,l=i.text.length>e.options.maxHighlightLength?Be(t.mode,r.state):null,c=ft(e,i,r,!0);l&&(r.state=l),i.styles=c.styles;var u=i.styleClasses,s=c.classes;s?i.styleClasses=s:u&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||u!=s&&(!u||!s||u.bgClass!=s.bgClass||u.textClass!=s.textClass),d=0;!f&&dn)return ro(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Zr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;po(e)&&(pr(e),t.dims=ir(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Ot&&(i=Ft(e.doc,i),a=Ht(e.doc,a));var l=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,sr(e,n)))),r.viewTo=n}(e,i,a),n.viewOffset=Ut($e(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=mr(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var s=function(e){if(e.hasFocus())return null;var t=L();if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&M(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function l(t){var n=t.nextSibling;return c&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,s=r.viewFrom,f=0;f-1&&(p=!1),sn(e,d,s,n)),p&&(j(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Ze(e.options,s)))),a=d.node.nextSibling}else{var h=gn(e,d,s,n);i.insertBefore(h,a)}s+=d.size}for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=L()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(s),j(n.cursorDiv),j(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ro(e,400)),n.updateLineNumbers=null,!0}function lo(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=jn(e))r&&(t.visible=Tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Sn(e.display)-Tn(e),n.top)}),t.visible=Tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ao(e,t))break;Er(e);var o=zr(e);vr(e),Wr(e,o),so(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function co(e,t){var n=new io(e,t);if(ao(e,n)){Er(e),lo(e,n);var r=zr(e);vr(e),Wr(e,r),so(e,r),n.finish()}}function uo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function so(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+En(e)+"px"}function fo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;al.clientWidth,s=l.scrollHeight>l.clientHeight;if(o&&u||i&&s){if(i&&y&&c)e:for(var d=t.target,p=a.view;d!=l;d=d.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var So=function(e,t){this.anchor=e,this.head=t};function ko(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=H(t,o);for(var i=1;i0:c>=0){var u=it(l.from(),a.from()),s=ot(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;i<=n&&--n,t.splice(--i,2,new So(f?s:u,f?u:s))}}return new Co(t,n)}function Eo(e,t){return new Co([new So(e,t||e)],0)}function jo(e){return e.text?et(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function To(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return jo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=jo(t).ch-t.to.ch),et(n,r)}function Po(e,t){for(var n=[],r=0;r1&&e.remove(l.line+1,h-1),e.insert(l.line+1,g)}cn(e,"change",e,t)}function Do(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;al-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Ho(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(o,o.lastOp==r)))a=Y(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=jo(t):i.changes.push(Fo(e,t));else{var c=Y(o.done);for(c&&c.ranges||Uo(e.sel,o.done),i={changes:[Fo(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||he(e,"historyAdded")}function Bo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,Y(o.done),t))?o.done[o.done.length-1]=t:Uo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Ho(o.undone)}function Uo(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vo(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Ko(e){if(!e)return null;for(var t,n=0;n-1&&(Y(l)[f]=u[f],delete u[f])}}}return r}function Yo(e,t,n,r){if(r){var o=e.anchor;if(n){var i=tt(t,o)<0;i!=tt(n,o)<0?(o=t,t=n):i!=tt(t,n)<0&&(t=n)}return new So(o,t)}return new So(n||t,t)}function qo(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new Co([Yo(e.sel.primary(),t,n,o)],0),r)}function Xo(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:l.to>t.ch))){if(o&&(he(c,"beforeCursorEnter"),c.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!c.atomic)continue;if(n){var f=c.find(r<0?1:-1),d=void 0;if((r<0?s:u)&&(f=li(e,f,-r,f&&f.line==t.line?i:null)),f&&f.line==t.line&&(d=tt(f,n))&&(r<0?d<0:d>0))return ii(e,f,t,r,o)}var p=c.find(r<0?-1:1);return(r<0?u:s)&&(p=li(e,p,r,p.line==t.line?i:null)),p?ii(e,p,t,r,o):null}}return t}function ai(e,t,n,r,o){var i=r||1,a=ii(e,t,n,i,o)||!o&&ii(e,t,n,i,!0)||ii(e,t,n,-i,o)||!o&&ii(e,t,n,-i,!0);return a||(e.cantEdit=!0,et(e.first,0))}function li(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?lt(e,et(t.line-1)):null:n>0&&t.ch==(r||$e(e,t.line)).text.length?t.line0)){var s=[c,1],f=tt(u.from,l.from),d=tt(u.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&s.push({from:u.from,to:l.from}),(d>0||!a.inclusiveRight&&!d)&&s.push({from:l.to,to:u.to}),o.splice.apply(o,s),c+=s.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)fi(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else fi(e,t)}}function fi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Po(e,t);Wo(e,t,n,e.cm?e.cm.curOp.id:NaN),hi(e,t,n,Et(e,t));var r=[];Do(e,(function(e,n){n||-1!=H(r,e.history)||(yi(e.history,t),r.push(e.history)),hi(e,t,null,Et(e,t))}))}}function di(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,l="undo"==t?i.done:i.undone,c="undo"==t?i.undone:i.done,u=0;u=0;--p){var h=d(p);if(h)return h.v}}}}function pi(e,t){if(0!=t&&(e.first+=t,e.sel=new Co(q(e.sel.ranges,(function(e){return new So(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linei&&(t={from:t.from,to:et(i,$e(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=Po(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,l=!1,c=i.line;e.options.lineWrapping||(c=Xe(zt($e(r,i.line))),r.iter(c,a.line+1,(function(e){if(e==o.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ve(e),_o(r,t,n,lr(e)),e.options.lineWrapping||(r.iter(c,i.line+t.text.length,(function(e){var t=Vt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var o=$e(e,r).stateAfter;if(o&&(!(o instanceof ut)||r+o.lookAhead1||!(this.children[0]instanceof wi))){var l=[];this.collapse(l),this.children=[new wi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=N("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Rt(e,t.line,t,n,i)||t.line!=n.line&&Rt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ot=!0}i.addToHistory&&Wo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,c=t.line,u=e.cm;if(e.iter(c,n.line+1,(function(e){u&&i.collapsed&&!u.options.lineWrapping&&zt(e)==u.display.maxLine&&(l=!0),i.collapsed&&c!=t.line&&qe(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(i,c==t.line?t.ch:null,c==n.line?n.ch:null)),++c})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Wt(e,t)&&qe(t,0)})),i.clearOnEnter&&fe(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Si,i.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),i.collapsed)fr(u,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var s=t.line;s<=n.line;s++)dr(u,s,"text");i.atomic&&ri(u.doc),cn(u,"markerAdded",u,i)}return i}ki.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&$r(e),ge(this,"clear")){var n=this.find();n&&cn(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=s,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&fr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&&cn(e,"markerCleared",e,this,r,o),t&&Gr(e),this.parent&&this.parent.clear()}},ki.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;c--)si(this,r[c]);l?Zo(this,l):this.cm&&Mr(this.cm)})),undo:no((function(){di(this,"undo")})),redo:no((function(){di(this,"redo")})),undoSelection:no((function(){di(this,"undo",!0)})),redoSelection:no((function(){di(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=lt(this,e),t=lt(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var l=0;l=c.to||null==c.from&&o!=e.line||null!=c.from&&o==t.line&&c.from>=t.ch||n&&!n(c.marker)||r.push(c.marker.parent||c.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n})),lt(this,et(n,t))},indexFromPos:function(e){var t=(e=lt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ti(t.doc,Eo(n,n)),d)for(var p=0;p=0;t--)mi(e.doc,"",r[t].from,r[t].to,"+delete");Mr(e)}))}function Ji(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Zi(e,t,n){var r=Ji(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=ue(n,t.doc.direction);if(i){var a,l=o<0?Y(i):i[0],c=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=Ln(t,n);a=o<0?n.text.length-1:0;var s=An(t,u,a).top;a=ie((function(e){return An(t,u,e).top==s}),o<0==(1==l.level)?l.from:l.to-1,a),"before"==c&&(a=Ji(n,a,1))}else a=o<0?l.to:l.from;return new et(r,a,c)}}return new et(r,o<0?n.text.length:0,o<0?"before":"after")}Ui.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ui.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ui.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ui.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ui.default=y?Ui.macDefault:Ui.pcDefault;var ta={selectAll:ci,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),B)},killLine:function(e){return Qi(e,(function(t){if(t.empty()){var n=$e(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)o=new et(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),et(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=$e(e.doc,o.line-1).text;a&&(o=new et(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(o.line-1,a.length-1),o,"+transpose"))}n.push(new So(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((o=u.ranges[o]).from(),t)<0||t.xRel>0)&&(tt(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,u=eo(e,(function(t){c&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Cr(e)),pe(o.wrapper.ownerDocument,"mouseup",u),pe(o.wrapper.ownerDocument,"mousemove",s),pe(o.scroller,"dragstart",f),pe(o.scroller,"drop",u),i||(be(t),r.addNew||qo(e.doc,n,null,null,r.extend),c&&!d||a&&9==l?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),s=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return i=!0};c&&(o.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,fe(o.wrapper.ownerDocument,"mouseup",u),fe(o.wrapper.ownerDocument,"mousemove",s),fe(o.scroller,"dragstart",f),fe(o.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,r,t,i):function(e,t,n,r){a&&Cr(e);var o=e.display,i=e.doc;be(t);var l,c,u=i.sel,s=u.ranges;if(r.addNew&&!r.extend?(c=i.sel.contains(n),l=c>-1?s[c]:new So(n,n)):(l=i.sel.primary(),c=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new So(n,n)),n=ur(e,t,!0,!0),c=-1;else{var f=ga(e,n,r.unit);l=r.extend?Yo(l,f.anchor,f.head,r.extend):f}r.addNew?-1==c?(c=s.length,ei(i,ko(e,s.concat([l]),c),{scroll:!1,origin:"*mouse"})):s.length>1&&s[c].empty()&&"char"==r.unit&&!r.extend?(ei(i,ko(e,s.slice(0,c).concat(s.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),u=i.sel):Qo(i,c,l,U):(c=0,ei(i,new Co([l],0),U),u=i.sel);var d=n;function p(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var o=[],a=e.options.tabSize,s=z($e(i,n.line).text,n.ch,a),f=z($e(i,t.line).text,t.ch,a),p=Math.min(s,f),h=Math.max(s,f),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=$e(i,m).text,y=K(g,p,a);p==h?o.push(new So(et(m,y),et(m,y))):g.length>y&&o.push(new So(et(m,y),et(m,K(g,h,a))))}o.length||o.push(new So(n,n)),ei(i,ko(e,u.ranges.slice(0,c).concat(o),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=ga(e,t,r.unit),O=w.anchor;tt(x.anchor,O)>0?(b=x.head,O=it(w.from(),x.anchor)):(b=x.anchor,O=ot(w.to(),x.head));var C=u.ranges.slice(0);C[c]=function(e,t){var n=t.anchor,r=t.head,o=$e(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var i=ue(o);if(!i)return t;var a=le(i,n.ch,n.sticky),l=i[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var c,u=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==u||u==i.length)return t;if(r.line!=n.line)c=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var s=le(i,r.ch,r.sticky),f=s-a||(r.ch-n.ch)*(1==l.level?-1:1);c=s==u-1||s==u?f<0:f>0}var d=i[u+(c?-1:0)],p=c==(1==d.level),h=p?d.from:d.to,m=p?"after":"before";return n.ch==h&&n.sticky==m?t:new So(new et(n.line,h,m),r)}(e,new So(lt(i,O),b)),ei(i,ko(e,C,c),U)}}var h=o.wrapper.getBoundingClientRect(),m=0;function v(t){e.state.selectingText=!1,m=1/0,t&&(be(t),o.input.focus()),pe(o.wrapper.ownerDocument,"mousemove",g),pe(o.wrapper.ownerDocument,"mouseup",y),i.history.lastSelOrigin=null}var g=eo(e,(function(t){0!==t.buttons&&Se(t)?function t(n){var a=++m,l=ur(e,n,!0,"rectangle"==r.unit);if(l)if(0!=tt(l,d)){e.curOp.focus=L(),p(l);var c=Tr(o,i);(l.line>=c.to||l.lineh.bottom?20:0;u&&setTimeout(eo(e,(function(){m==a&&(o.scroller.scrollTop+=u,t(n))})),50)}}(t):v(t)})),y=eo(e,v);e.state.selectingText=y,fe(o.wrapper.ownerDocument,"mousemove",g),fe(o.wrapper.ownerDocument,"mouseup",y)}(e,r,t,i)}(t,r,i,e):Ce(e)==n.scroller&&be(e):2==o?(r&&qo(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function ga(e,t,n){if("char"==n)return new So(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new So(et(t.line,0),lt(e.doc,et(t.line+1,0)));var r=n(e,t);return new So(r.from,r.to)}function ya(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(i>l.bottom||!ge(e,n))return xe(t);i-=l.top-a.viewOffset;for(var c=0;c=o)return he(e,n,e,Qe(e.doc,i),e.display.gutterSpecs[c].className,t),xe(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function wa(e,t){On(e.display,t)||function(e,t){return!!ge(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function xa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Hn(e)}ma.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Oa={toString:function(){return"CodeMirror.Init"}},Ca={},Sa={};function ka(e,t,n){if(!t!=!(n&&n!=Oa)){var r=e.display.dragFunctions,o=t?fe:pe;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Ea(e){e.options.lineWrapping?(A(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),Kt(e)),cr(e),fr(e),Hn(e),setTimeout((function(){return Wr(e)}),100)}function ja(e,t){var n=this;if(!(this instanceof ja))return new ja(e,t);this.options=t=t?R(t):{},R(Ca,t,!1);var r=t.value;"string"==typeof r?r=new Mi(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new ja.inputStyles[t.inputStyle](this),i=this.display=new go(e,r,o,t);for(var u in i.wrapper.CodeMirror=this,xa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},t.autofocus&&!g&&i.input.focus(),a&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",eo(e,va)),fe(t.scroller,"dblclick",a&&l<11?eo(e,(function(t){if(!me(e,t)){var n=ur(e,t);if(n&&!ba(e,t)&&!On(e.display,t)){be(t);var r=e.findWordAt(n);qo(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),fe(t.scroller,"contextmenu",(function(t){return wa(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||wa(e,n)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}fe(t.scroller,"touchstart",(function(o){if(!me(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!ba(e,o)){t.input.ensurePolled(),clearTimeout(n);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!On(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,l=e.coordsChar(t.activeTouch,"page");a=!r.prev||i(r,r.prev)?new So(l,l):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(l):new So(et(l.line,0),lt(e.doc,et(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}o()})),fe(t.scroller,"touchcancel",o),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Dr(e,t.scroller.scrollTop),Rr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return Oo(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return Oo(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||Oe(t)},over:function(t){me(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=P("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,r)}}(e,t),Oe(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Li<100))Oe(t);else if(!me(e,t)&&!On(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=P("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:eo(e,Ai),leave:function(t){me(e,t)||_i(e)}};var c=t.input.getField();fe(c,"keyup",(function(t){return fa.call(e,t)})),fe(c,"keydown",eo(e,sa)),fe(c,"keypress",eo(e,da)),fe(c,"focus",(function(t){return Sr(e,t)})),fe(c,"blur",(function(t){return kr(e,t)}))}(this),Ri(),$r(this),this.curOp.forceUpdate=!0,Io(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Sr(n)}),20):kr(this),Sa)Sa.hasOwnProperty(u)&&Sa[u](this,t[u],Oa);po(this),t.finishInit&&t.finishInit(this);for(var s=0;s150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>i.first?z($e(i,t-1).text,null,a):0:"add"==n?u=c+e.options.indentUnit:"subtract"==n?u=c-e.options.indentUnit:"number"==typeof n&&(u=c+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)d+=a,f+="\t";if(da,c=Me(t),u=null;if(l&&r.ranges.length>1)if(Na&&Na.text.join("\n")==t){if(r.ranges.length%Na.text.length==0){u=[];for(var s=0;s=0;d--){var p=r.ranges[d],h=p.from(),m=p.to();p.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!l?m=et(m.line,Math.min($e(i,m.line).text.length,m.ch+Y(c).length)):l&&Na&&Na.lineWise&&Na.text.join("\n")==c.join("\n")&&(h=m=et(h.line,0)));var v={from:h,to:m,text:u?u[d%u.length]:c,origin:o||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};si(e.doc,v),cn(e,"inputRead",e,v)}t&&!l&&_a(e,t),Mr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return La(t,n,0,null,"paste")})),!0}function _a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var l=0;l-1){a=Pa(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test($e(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Pa(e,o.head.line,"smart"));a&&cn(e,"electricInput",e,o.head.line)}}}function Da(e){for(var t=[],n=[],r=0;r0?0:-1));a=isNaN(s)?null:new et(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(s>=55296&&s<56320?2:1))),-n)}else a=o?function(e,t,n,r){var o=ue(t,e.doc.direction);if(!o)return Zi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=le(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&d>=s.begin)){var p=f?"before":"after";return new et(n.line,d,p)}}var h=function(e,t,r){for(var i=function(e,t){return t?new et(n.line,c(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=l?r.begin:c(r.end,-1);if(a.from<=u&&u0?s.end:c(s.begin,-1);return null==v||r>0&&v==t.text.length||!(m=h(r>0?0:o.length-1,r,u(v)))?null:m}(e.cm,l,t,n):Zi(l,t,n);if(null==a){if(i||(u=t.line+c)=e.first+e.size||(t=new et(u,t.ch,t.sticky),!(l=$e(e,u))))return!1;t=ea(o,e.cm,l,t.line,c)}else t=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var s=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var h=l.text.charAt(t.ch)||"\n",m=ee(h,d)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||p||m||(m="s"),s&&s!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(s=m),n>0&&!u(!p))break}var v=ai(e,t,i,a,!0);return nt(i,v)&&(v.hitSide=!0),v}function Fa(e,t,n,r){var o,i,a=e.doc,l=t.left;if("page"==r){var c=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(c-.5*rr(e.display),3);o=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Xn(e,l,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var Ha=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Wa(e,t){var n=Mn(e,t.line);if(!n||n.hidden)return null;var r=$e(e.doc,t.line),o=Pn(n,r,t.line),i=ue(r,e.doc.direction),a="left";i&&(a=le(i,t.ch)%2?"right":"left");var l=In(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ba(e,t){return t&&(e.bad=!0),e}function Ua(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ba(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=t.display.viewTo||i.line=t.display.viewFrom&&Wa(t,o)||{node:c[0].measure.map[2],offset:0},s=i.liner.firstLine()&&(a=et(a.line-1,$e(r.doc,a.line-1).length)),l.ch==$e(r.doc,l.line).text.length&&l.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=sr(r,a.line))?(t=Xe(o.view[0].line),n=o.view[0].node):(t=Xe(o.view[e].line),n=o.view[e-1].node.nextSibling);var c,u,s=sr(r,l.line);if(s==o.view.length-1?(c=o.viewTo-1,u=o.lineDiv.lastChild):(c=Xe(o.view[s+1].line)-1,u=o.view[s+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,l=e.doc.lineSeparator(),c=!1;function u(){a&&(i+=l,c&&(i+=l),a=c=!1)}function s(e){e&&(u(),i+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void s(n);var i,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(et(r,0),et(o+1,0),(v=+d,function(e){return e.id==v}));return void(p.length&&(i=p[0].find(0))&&s(Ge(e.doc,i.from,i.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var m=0;m1&&d.length>1;)if(Y(f)==Y(d))f.pop(),d.pop(),c--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var p=0,h=0,m=f[0],v=d[0],g=Math.min(m.length,v.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(p).replace(/\u200b+$/,"");var x=et(t,p),O=et(c,d.length?Y(d).length-h:0);return f.length>1||f[0]||tt(x,O)?(mi(r.doc,f,x,O,"+input"),!0):void 0},Ha.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ha.prototype.reset=function(){this.forceCompositionEnd()},Ha.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ha.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ha.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return fr(e.cm)}))},Ha.prototype.setUneditable=function(e){e.contentEditable="false"},Ha.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,La)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ha.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ha.prototype.onContextMenu=function(){},Ha.prototype.resetPosition=function(){},Ha.prototype.needsContentAttribute=!0;var Ka=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};Ka.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!me(r,e)){if(r.somethingSelected())Ma({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Da(r);Ma({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,B):(n.prevInput="",o.value=t.text.join("\n"),D(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(o.style.width="0px"),fe(o,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(o,"paste",(function(e){me(r,e)||Aa(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(o,"cut",i),fe(o,"copy",i),fe(e.scroller,"paste",(function(t){if(!On(e,t)&&!me(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),fe(e.lineSpace,"selectstart",(function(t){On(e,t)||be(t)})),fe(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ka.prototype.createField=function(e){this.wrapper=Ra(),this.textarea=this.wrapper.firstChild},Ka.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ka.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=gr(e);if(e.options.moveInputWithCursor){var o=Gn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ka.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ka.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&D(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},Ka.prototype.getField=function(){return this.textarea},Ka.prototype.supportsTouch=function(){return!1},Ka.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ka.prototype.blur=function(){this.textarea.blur()},Ka.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ka.prototype.receivedFocus=function(){this.slowPoll()},Ka.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ka.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ka.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Le(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var c=0,u=Math.min(r.length,o.length);c1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ka.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ka.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},Ka.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=ur(n,e),u=r.scroller.scrollTop;if(i&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&eo(n,ei)(n.doc,Eo(i),B);var s,d=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",c&&(s=window.scrollY),r.input.focus(),c&&window.scrollTo(null,s),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&l>=9&&v(),C){Oe(e);var m=function(){pe(window,"mouseup",m),setTimeout(g,20)};fe(window,"mouseup",m)}else setTimeout(g,50)}function v(){if(null!=o.selectionStart){var e=n.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,t.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=d,a&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=o.selectionStart)){(!a||a&&l<9)&&v();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==t.prevInput?eo(n,ci)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Ka.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ka.prototype.setUneditable=function(){},Ka.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=Oa&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Oa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Mo(e)}),!0),n("indentUnit",2,Mo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Lo(e),Hn(e),fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(et(r,i))}r++}));for(var o=n.length-1;o>=0;o--)mi(e.doc,t,n[o],et(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Oa&&e.refresh()})),n("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){xa(e),vo(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xi(t),o=n!=Oa&&Xi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ea,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=ho(t,e.options.lineNumbers),vo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Wr(e)}),!0),n("scrollbarStyle","native",(function(e){Vr(e),Wr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=ho(e.options.gutters,t),vo(e)}),!0),n("firstLineNumber",1,vo,!0),n("lineNumberFormatter",(function(e){return e}),vo,!0),n("showCursorWhenSelecting",!1,vr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(kr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,ka),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vr,!0),n("singleCursorHeightPerLine",!0,vr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Lo,!0),n("addModeClass",!1,Lo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Lo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(ja),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&eo(this,t[e])(this,n,o),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xi(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Pa(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Mr(this));else{var i=o.from(),a=o.to(),l=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&Qo(this.doc,r,new So(i,u[r].to()),B)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,n=dt(this,$e(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]i&&(e=i,o=!0),r=$e(this.doc,e)}else r=e;return Vn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Ut(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,l,c=this.display,u=(e=Gn(this,lt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),c.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var f=Math.max(c.wrapper.clientHeight,this.doc.height),d=Math.max(c.sizer.clientWidth,c.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(u=e.bottom),s+t.offsetWidth>d&&(s=d-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==o?(s=c.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?s=0:"middle"==o&&(s=(c.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&(i=this,a={left:s,top:u,right:s+t.offsetWidth,bottom:u+t.offsetHeight},null!=(l=Pr(i,a)).scrollTop&&Dr(i,l.scrollTop),null!=l.scrollLeft&&Rr(i,l.scrollLeft))},triggerOnKeyDown:to(sa),triggerOnKeyPress:to(da),triggerOnKeyUp:fa,triggerOnMouseDown:to(va),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:to((function(e){_a(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=lt(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&cr(this),he(this,"refresh",this)})),swapDoc:to((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Io(this,e),Hn(this),this.display.input.reset(),Lr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,cn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(ja);var $a="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Mi.prototype)Mi.prototype.hasOwnProperty(Ga)&&H($a,Ga)<0&&(ja.prototype[Ga]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mi.prototype[Ga]));return ye(Mi),ja.inputStyles={textarea:Ka,contenteditable:Ha},ja.defineMode=function(e){ja.defaults.mode||"null"==e||(ja.defaults.mode=e),Re.apply(this,arguments)},ja.defineMIME=function(e,t){Ie[e]=t},ja.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),ja.defineMIME("text/plain","null"),ja.defineExtension=function(e,t){ja.prototype[e]=t},ja.defineDocExtension=function(e,t){Mi.prototype[e]=t},ja.fromTextArea=function(e,t){if((t=t?R(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=L();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var o;if(e.form&&(fe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var l=ja((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l},function(e){e.off=pe,e.on=fe,e.wheelEventPixels=xo,e.Doc=Mi,e.splitLines=Me,e.countColumn=z,e.findColumn=K,e.isWordChar=Z,e.Pass=W,e.signal=he,e.Line=$t,e.changeEnd=jo,e.scrollbarModel=Ur,e.Pos=et,e.cmpPos=tt,e.modes=De,e.mimeModes=Ie,e.resolveMode=ze,e.getMode=Fe,e.modeExtensions=He,e.extendMode=We,e.copyState=Be,e.startState=Ve,e.innerMode=Ue,e.commands=ta,e.keyMap=Ui,e.keyName=qi,e.isModifierKey=Gi,e.lookupKey=$i,e.normalizeKeyMap=Ki,e.StringStream=Ke,e.SharedTextMarker=ji,e.TextMarker=ki,e.LineWidget=Oi,e.e_preventDefault=be,e.e_stopPropagation=we,e.e_stop=Oe,e.addClass=A,e.contains=M,e.rmClass=E,e.keyNames=Fi}(ja),ja.version="5.58.3",ja}()},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(102)},function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r={};function o(e,t){0}function i(e,t){0}function a(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function l(e,t){a(i,e,t)}t.a=function(e,t){a(o,e,t)}},function(e,t,n){"use strict";e.exports=n(110)},function(e,t,n){e.exports=n(105)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";var r=n(1),o=n(2),i=n(5),a=n(6),l=n(0),c=n(30),u=n(24),s=n(4),f=n.n(s),d=n(31);function p(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var h,m,v,g=(h=Object(d.a)(),m="undefined"!=typeof window?window:{},v={animationend:p("Animation","AnimationEnd"),transitionend:p("Transition","TransitionEnd")},h&&("AnimationEvent"in m||delete v.animationend.animation,"TransitionEvent"in m||delete v.transitionend.transition),v),y={};if(Object(d.a)()){var b=document.createElement("div");y=b.style}var w={};function x(e){if(w[e])return w[e];var t=g[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:2;t();var i=Object(N.a)((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),u=Object(i.a)(c,2),s=u[0],f=u[1];return P((function(){if("none"!==o&&"end"!==o){var e=M.indexOf(o),n=M[e+1],r=t(o);!1===r?a(n):s((function(e){function t(){e.isCanceled()||a(n)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,o]),l.useEffect((function(){return function(){f()}}),[]),[function(){a("prepare")},o]};function _(e,t,n,a){var c=a.motionEnter,u=void 0===c||c,s=a.motionAppear,f=void 0===s||s,d=a.motionLeave,p=void 0===d||d,h=a.motionDeadline,m=a.motionLeaveImmediately,v=a.onAppearPrepare,g=a.onEnterPrepare,y=a.onLeavePrepare,b=a.onAppearStart,w=a.onEnterStart,x=a.onLeaveStart,O=a.onAppearActive,C=a.onEnterActive,S=a.onLeaveActive,j=a.onAppearEnd,N=a.onEnterEnd,M=a.onLeaveEnd,_=a.onVisibleChanged,D=T(),I=Object(i.a)(D,2),R=I[0],z=I[1],F=T("none"),H=Object(i.a)(F,2),W=H[0],B=H[1],U=T(null),V=Object(i.a)(U,2),K=V[0],$=V[1],G=Object(l.useRef)(!1),Y=Object(l.useRef)(null),q=Object(l.useRef)(!1),X=Object(l.useRef)(null);function Q(){return n()||X.current}var J=Object(l.useRef)(!1);function Z(e){var t,n=Q();e&&!e.deadline&&e.target!==n||("appear"===W&&J.current?t=null==j?void 0:j(n,e):"enter"===W&&J.current?t=null==N?void 0:N(n,e):"leave"===W&&J.current&&(t=null==M?void 0:M(n,e)),!1===t||q.current||(B("none"),$(null)))}var ee=function(e){var t=Object(l.useRef)(),n=Object(l.useRef)(e);n.current=e;var r=l.useCallback((function(e){n.current(e)}),[]);function o(e){e&&(e.removeEventListener(E,r),e.removeEventListener(k,r))}return l.useEffect((function(){return function(){o(t.current)}}),[]),[function(e){t.current&&t.current!==e&&o(t.current),e&&e!==t.current&&(e.addEventListener(E,r),e.addEventListener(k,r),t.current=e)},o]}(Z),te=Object(i.a)(ee,1)[0],ne=l.useMemo((function(){var e,t,n;switch(W){case"appear":return e={},Object(r.a)(e,"prepare",v),Object(r.a)(e,"start",b),Object(r.a)(e,"active",O),e;case"enter":return t={},Object(r.a)(t,"prepare",g),Object(r.a)(t,"start",w),Object(r.a)(t,"active",C),t;case"leave":return n={},Object(r.a)(n,"prepare",y),Object(r.a)(n,"start",x),Object(r.a)(n,"active",S),n;default:return{}}}),[W]),re=A(W,(function(e){if("prepare"===e){var t=ne.prepare;return!!t&&t(Q())}var n;ae in ne&&$((null===(n=ne[ae])||void 0===n?void 0:n.call(ne,Q(),null))||null);return"active"===ae&&(te(Q()),h>0&&(clearTimeout(Y.current),Y.current=setTimeout((function(){Z({deadline:!0})}),h))),!0})),oe=Object(i.a)(re,2),ie=oe[0],ae=oe[1],le=L(ae);J.current=le,P((function(){z(t);var n,r=G.current;(G.current=!0,e)&&(!r&&t&&f&&(n="appear"),r&&t&&u&&(n="enter"),(r&&!t&&p||!r&&m&&!t&&p)&&(n="leave"),n&&(B(n),ie()))}),[t]),Object(l.useEffect)((function(){("appear"===W&&!f||"enter"===W&&!u||"leave"===W&&!p)&&B("none")}),[f,u,p]),Object(l.useEffect)((function(){return function(){clearTimeout(Y.current),q.current=!0}}),[]),Object(l.useEffect)((function(){void 0!==R&&"none"===W&&(null==_||_(R))}),[R,W]);var ce=K;return ne.prepare&&"start"===ae&&(ce=Object(o.a)({transition:"none"},ce)),[W,ae,ce,null!=R?R:t]}var D=n(7),I=n(8),R=n(10),z=n(9),F=function(e){Object(R.a)(n,e);var t=Object(z.a)(n);function n(){return Object(D.a)(this,n),t.apply(this,arguments)}return Object(I.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(l.Component);var H=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(a.a)(e)&&(t=e.transitionSupport);var s=l.forwardRef((function(e,t){var a=e.visible,s=void 0===a||a,d=e.removeOnLeave,p=void 0===d||d,h=e.forceRender,m=e.children,v=e.motionName,g=e.leavedClassName,y=e.eventProps,b=n(e),w=Object(l.useRef)(),x=Object(l.useRef)();var O=_(b,s,(function(){try{return Object(c.a)(w.current||x.current)}catch(e){return null}}),e),C=Object(i.a)(O,4),S=C[0],k=C[1],E=C[2],T=C[3],P=l.useRef(T);T&&(P.current=!0);var N=Object(l.useRef)(t);N.current=t;var M,A=l.useCallback((function(e){w.current=e,Object(u.b)(N.current,e)}),[]),D=Object(o.a)(Object(o.a)({},y),{},{visible:s});if(m)if("none"!==S&&n(e)){var I,R;"prepare"===k?R="prepare":L(k)?R="active":"start"===k&&(R="start"),M=m(Object(o.a)(Object(o.a)({},D),{},{className:f()(j(v,S),(I={},Object(r.a)(I,j(v,"".concat(S,"-").concat(R)),R),Object(r.a)(I,v,"string"==typeof v),I)),style:E}),A)}else M=T?m(Object(o.a)({},D),A):!p&&P.current?m(Object(o.a)(Object(o.a)({},D),{},{className:g}),A):h?m(Object(o.a)(Object(o.a)({},D),{},{style:{display:"none"}}),A):null;else M=null;return l.createElement(F,{ref:x},M)}));return s.displayName="CSSMotion",s}(S),W=n(3),B=n(11);function U(e){var t;return t=e&&"object"===Object(a.a)(e)&&"key"in e?e:{key:e},Object(o.a)(Object(o.a)({},t),{},{key:String(t.key)})}function V(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(U)}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,i=t.length,a=V(e),l=V(t);a.forEach((function(e){for(var t=!1,a=r;a1}));return u.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||"remove"!==r}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var $=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,n=function(e){Object(R.a)(r,e);var n=Object(z.a)(r);function r(){var e;return Object(D.a)(this,r),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:Object(o.a)(Object(o.a)({},e),{},{status:"removed"})}))}}))},e}return Object(I.a)(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,o=r.component,i=r.children,a=r.onVisibleChanged,c=Object(B.a)(r,["component","children","onVisibleChanged"]),u=o||l.Fragment,s={};return $.forEach((function(e){s[e]=c[e],delete c[e]})),delete c.keys,l.createElement(u,c,n.map((function(n){var r=n.status,o=Object(B.a)(n,["status"]),c="add"===r||"keep"===r;return l.createElement(t,Object(W.a)({},s,{key:o.key,visible:c,eventProps:o,onVisibleChanged:function(t){null==a||a(t,{key:o.key}),t||e.removeKey(o.key)}}),i)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,o=V(n);return{keyEntities:K(r,o).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),r}(l.Component);n.defaultProps={component:"div"}})(S),t.a=H},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return i})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return s}));var r=n(12);function o(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}function i(e,t){var n=t.labelInValue,r=t.combobox,o=new Map;if(void 0===e||""===e&&r)return[[],o];var i=Array.isArray(e)?e:[e],a=i;return n&&(a=i.filter((function(e){return null!==e})).map((function(e){var t=e.key,n=e.value,r=void 0!==n?n:t;return o.set(r,e),r}))),[a,o]}function a(e,t){var n=t.optionLabelProp,r=t.labelInValue,o=t.prevValueMap,i=t.options,a=t.getLabeledValue,l=e;return r&&(l=l.map((function(e){return a(e,{options:i,prevValueMap:o,labelInValue:r,optionLabelProp:n})}))),l}function l(e,t){var n,o=Object(r.a)(t);for(n=e.length-1;n>=0&&e[n].disabled;n-=1);var i=null;return-1!==n&&(i=o[n],o.splice(n,1)),{values:o,removedValue:i}}var c="undefined"!=typeof window&&window.document&&window.document.documentElement,u=0;function s(){var e;return c?(e=u,u+=1):e="TEST_OR_SSR",e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return l}));var r=n(19);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){"function"==typeof e?e(t):"object"===o(e)&&e&&"current"in e&&(e.current=t)}function a(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(2),o=n(7),i=n(8),a=n(10),l=n(9),c=n(0),u=n(30),s=n(53),f=n(66),d=n(24),p=n(54),h=function(e){Object(a.a)(n,e);var t=Object(l.a)(n);function n(){var e;Object(o.a)(this,n);for(var i=arguments.length,a=new Array(i),l=0;l1)Object(f.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(f.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(c.isValidElement(n)&&Object(d.c)(n)){var r=n.ref;t[0]=c.cloneElement(n,{ref:Object(d.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!c.isValidElement(e)||"key"in e&&null!==e.key?e:c.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(c.Component);h.displayName="ResizeObserver",t.a=h},function(e,t,n){"use strict";n.d(t,"d",(function(){return h})),n.d(t,"c",(function(){return v})),n.d(t,"e",(function(){return g})),n.d(t,"b",(function(){return b})),n.d(t,"f",(function(){return w})),n.d(t,"g",(function(){return x})),n.d(t,"a",(function(){return O}));var r=n(1),o=n(50),i=n(52),a=n(35),l=n(51);var c=n(12),u=n(6),s=n(2),f=n(18),d=n(23);function p(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!=r?r:void 0!==n?n:"rc-index-key-".concat(t)}function h(e){var t=[];return function e(n,r){n.forEach((function(n){r||!("options"in n)?t.push({key:p(n,t.length),groupOption:r,data:n}):(t.push({key:p(n,t.length),group:!0,data:n}),e(n.options,!0))}))}(e,!1),t}function m(e){var t=Object(s.a)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Object(f.a)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.prevValueOptions,o=void 0===r?[]:r,i=new Map;return t.forEach((function(e){if(!e.group){var t=e.data;i.set(t.value,t)}})),e.map((function(e){var t=i.get(e);return t||(t=Object(s.a)({},o.find((function(t){return t._INTERNAL_OPTION_VALUE_===e})))),m(t)}))}var g=function(e,t){var n=t.options,r=t.prevValueMap,o=t.labelInValue,i=t.optionLabelProp,a=v([e],n)[0],l={value:e},c=o?r.get(e):void 0;return c&&"object"===Object(u.a)(c)&&"label"in c?(l.label=c.label,a&&"string"==typeof c.label&&"string"==typeof a[i]&&c.label.trim()!==a[i].trim()&&Object(f.a)(!1,"`label` of `value` is not same as `label` in Select options.")):a&&i in a?l.label=a[i]:(l.label=e,l.isCacheable=!0),l.key=l.value,l};function y(e){return Object(d.d)(e).join("")}function b(e,t,n){var r,o=n.optionFilterProp,i=n.filterOption,a=[];return!1===i?Object(c.a)(t):(r="function"==typeof i?i:function(e){return function(t,n){var r=t.toLowerCase();return"options"in n?y(n.label).toLowerCase().includes(r):y(n[e]).toLowerCase().includes(r)}}(o),t.forEach((function(t){if("options"in t)if(r(e,t))a.push(t);else{var n=t.options.filter((function(t){return r(e,t)}));n.length&&a.push(Object(s.a)(Object(s.a)({},t),{},{options:n}))}else r(e,m(t))&&a.push(t)})),a)}function w(e,t){if(!t||!t.length)return null;var n=!1;var r=function e(t,r){var u,s=(u=r,Object(o.a)(u)||Object(i.a)(u)||Object(a.a)(u)||Object(l.a)()),f=s[0],d=s.slice(1);if(!f)return[t];var p=t.split(f);return n=n||p.length>1,p.reduce((function(t,n){return[].concat(Object(c.a)(t),Object(c.a)(e(n,d)))}),[]).filter((function(e){return e}))}(e,t);return n?r:null}function x(e,t){return v([e],t)[0].disabled}function O(e,t,n,o){var i=Object(d.d)(t).slice().sort(),a=Object(c.a)(e),l=new Set;return e.forEach((function(e){e.options?e.options.forEach((function(e){l.add(e.value)})):l.add(e.value)})),i.forEach((function(e){var t,i=o?e.value:e;l.has(i)||a.push(o?(t={},Object(r.a)(t,n,e.label),Object(r.a)(t,"value",i),t):{value:i})})),a}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(17),o=n.n(r);function i(e){return e instanceof HTMLElement?e:o.a.findDOMNode(e)}},function(e,t,n){"use strict";function r(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),o=n(4),i=n.n(o);t.a=function(e){var t,n=e.className,o=e.customizeIcon,a=e.customizeIconProps,l=e.onMouseDown,c=e.onClick,u=e.children;return t="function"==typeof o?o(a):o,r.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),l&&l(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0},void 0!==t?t:r.createElement("span",{className:i()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},u))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(17),o=n.n(r);function i(e,t,n,r){var i=o.a.unstable_batchedUpdates?function(e){o.a.unstable_batchedUpdates(n,e)}:n;return e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,i)}}}},function(e,t,n){var r=n(127),o=n(132);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(41);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),o="".concat("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"," ").concat("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").split(/[\s\n]+/);function i(e,t){return 0===e.indexOf(t)}function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:Object(r.a)({},n);var a={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||i(n,"aria-"))||t.data&&i(n,"data-")||t.attr&&o.includes(n))&&(a[n]=e[n])})),a}},function(e,t,n){var r=n(111),o=n(112),i=n(69),a=n(113);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return l(u(e),arguments)}function a(e,t){return i.apply(null,[e].concat(t||[]))}function l(e,t){var n,r,a,l,c,u,s,f,d,p=1,h=e.length,m="";for(r=0;r=0),l.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,l.width?parseInt(l.width):0);break;case"e":n=l.precision?parseFloat(n).toExponential(l.precision):parseFloat(n).toExponential();break;case"f":n=l.precision?parseFloat(n).toFixed(l.precision):parseFloat(n);break;case"g":n=l.precision?String(Number(n.toPrecision(l.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=l.precision?n.substring(0,l.precision):n;break;case"t":n=String(!!n),n=l.precision?n.substring(0,l.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=l.precision?n.substring(0,l.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=l.precision?n.substring(0,l.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(l.type)?m+=n:(!o.number.test(l.type)||f&&!l.sign?d="":(d=f?"+":"-",n=n.toString().replace(o.sign,"")),u=l.pad_char?"0"===l.pad_char?"0":l.pad_char.charAt(1):" ",s=l.width-(d+n).length,c=l.width&&s>0?u.repeat(s):"",m+=l.align?d+n+c:"0"===u?d+c+n:c+d+n)}return m}var c=Object.create(null);function u(e){if(c[e])return c[e];for(var t,n=e,r=[],i=0;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var a=[],l=t[2],u=[];if(null===(u=o.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=o.key_access.exec(l)))a.push(u[1]);else{if(null===(u=o.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}t[2]=a}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}t.sprintf=i,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=a,void 0===(r=function(){return{sprintf:i,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";var r=n(106),o=n(107),i=n(68);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=[];return o.a.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(a(e)):Object(i.isFragment)(e)&&e.props?n=n.concat(a(e.props.children,t)):n.push(e))})),n}},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),x="undefined"!=typeof WeakMap?new WeakMap:new n,O=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new w(t,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=x.get(this))[e].apply(t,arguments)}}));var C=void 0!==o.ResizeObserver?o.ResizeObserver:O;t.a=C}).call(this,n(38))},function(e,t){function n(e,t,n,r,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function l(e){n(a,o,i,l,c,"next",e)}function c(e){n(a,o,i,l,c,"throw",e)}l(void 0)}))}}},,,function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122?o+=r.charAt(a):l<128?o+=i[l]:l<2048?o+=i[192|l>>6]+i[128|63&l]:l<55296||l>=57344?o+=i[224|l>>12]+i[128|l>>6&63]+i[128|63&l]:(a+=1,l=65536+((1023&l)<<10|1023&r.charCodeAt(a)),o+=i[240|l>>18]+i[128|l>>12&63]+i[128|l>>6&63]+i[128|63&l])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function c(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function u(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function s(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(c(e))continue;return}if(a(e,t+1)){o.lastIndex=t,e.ch=t;var n=o.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function f(e){for(;;){o.lastIndex=e.ch;var t=o.exec(e.text);if(!t){if(l(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(c(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var r=[];;){var o,i=f(e),a=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(o=u(e)))return;if("selfClose"!=o)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(c<0&&(!n||n==i[2]))return{tag:i[2],from:t(a,l),to:t(e.line,e.ch)}}else r.push(i[2])}}function h(e,n){for(var r=[];;){var o=d(e);if(!o)return;if("selfClose"!=o){var i=e.line,a=e.ch,l=s(e);if(!l)return;if(l[1])r.push(l[2]);else{for(var c=r.length-1;c>=0;--c)if(r[c]==l[2]){r.length=c;break}if(c<0&&(!n||n==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(i,a)}}}else s(e)}}e.registerHelper("fold","xml",(function(e,r){for(var o=new i(e,r.line,0);;){var a=f(o);if(!a||o.line!=r.line)return;var l=u(o);if(!l)return;if(!a[1]&&"selfClose"!=l){var c=t(o.line,o.ch),s=p(o,a[2]);return s&&n(s.from,c)>0?{from:c,to:s.from}:null}}})),e.findMatchingTag=function(e,r,o){var a=new i(e,r.line,r.ch,o);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var l=u(a),c=l&&t(a.line,a.ch),f=l&&s(a);if(l&&f&&!(n(a,r)>0)){var d={from:t(a.line,a.ch),to:c,tag:f[2]};return"selfClose"==l?{open:d,close:null,at:"open"}:f[1]?{open:h(a,f[2]),close:d,at:"close"}:{open:d,close:p(a=new i(e,c.line,c.ch,o),f[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var o=new i(e,t.line,t.ch,n);;){var a=h(o,r);if(!a)break;var l=p(new i(e,t.line,t.ch,n),a.tag);if(l)return{open:a,close:l}}},e.scanForClosingTag=function(e,t,n,r){return p(new i(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(16))},function(e,t,n){"use strict";(function(e,r){var o,i=n(88);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var a=Object(i.a)(o);t.a=a}).call(this,n(38),n(109)(e))},function(e,t,n){"use strict";var r=n(19),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function c(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var u=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=s(n);f&&(a=a.concat(f(n)));for(var l=c(t),m=c(n),v=0;ve.length)&&(t=e.length);for(var n=0,r=new Array(t);ns))return!1;var d=c.get(e),p=c.get(t);if(d&&p)return d==t&&p==e;var h=-1,m=!0,v=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++h-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(182),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){var r=n(83).Symbol;e.exports=r},function(e,t,n){!function(e){"use strict";function t(t,n,o,i){if(o&&o.call){var a=o;o=null}else a=r(t,o,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var l=r(t,o,"minFoldSize");function c(e){var r=a(t,n);if(!r||r.to.line-r.from.linet.firstLine();)n=e.Pos(n.line-1,0),u=c(!1);if(u&&!u.cleared&&"unfold"!==i){var s=function(e,t,n){var o=r(e,t,"widget");if("function"==typeof o&&(o=o(n.from,n.to)),"string"==typeof o){var i=document.createTextNode(o);(o=document.createElement("span")).appendChild(i),o.className="CodeMirror-foldmarker"}else o&&(o=o.cloneNode(!0));return o}(t,o,u);e.on(s,"mousedown",(function(t){f.clear(),e.e_preventDefault(t)}));var f=t.markText(u.from,u.to,{replacedWith:s,clearOnEnter:r(t,o,"clearOnEnter"),__isFold:!0});f.on("clear",(function(n,r){e.signal(t,"unfold",t,n,r)})),e.signal(t,"fold",t,u.from,u.to)}}e.newFoldFunction=function(e,n){return function(r,o){t(r,o,{rangeFinder:e,widget:n})}},e.defineExtension("foldCode",(function(e,n,r){t(this,e,n,r)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),n=0;n0&&(!n&&t.content.length>0&&r(t),o(t,e.content))}(e,t,n);else if("Element"===e.type)!function(e,t,n){!n&&t.content.length>0&&r(t);if(o(t,"<"+e.name),a(t,e.attributes),null===e.children){const e=t.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";o(t,e)}else if(0===e.children.length)o(t,">");else{o(t,">"),t.level++;let a="preserve"===e.attributes["xml:space"];if(!a&&t.options.collapseContent){e.children.some((function(e){return"Text"===e.type&&""!==e.content.trim()}))&&(a=!0)}e.children.forEach((function(e){i(e,t,n||a,t.options)})),t.level--,n||a||r(t),o(t,"")}}(e,t,n);else{if("ProcessingInstruction"!==e.type)throw new Error("Unknown node type: "+e.type);l(e,t)}}function a(e,t){Object.keys(t).forEach((function(n){const r=t[n].replace(/"/g,""");o(e," "+n+'="'+r+'"')}))}function l(e,t){t.content.length>0&&r(t),o(t,"")}e.exports=function(e,t={}){t.indentation="indentation"in t?t.indentation:" ",t.collapseContent=!0===t.collapseContent,t.lineSeparator="lineSeparator"in t?t.lineSeparator:"\r\n",t.whiteSpaceAtEndOfSelfclosingTag=!!t.whiteSpaceAtEndOfSelfclosingTag;const r=n(108)(e,{filter:t.filter}),o={content:"",level:0,options:t};return r.declaration&&l(r.declaration,o),r.children.forEach((function(e){i(e,o,!1)})),o.content}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(){var e=navigator.userAgent||navigator.vendor||window.opera;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(e)&&!/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(e.substr(0,4)))}},function(e,t,n){"use strict";t.a=function(e){if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();if(n.width||n.height)return!0}return!1}},function(e,t,n){var r=n(114);e.exports=function(e,t){return r(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r="RC_SELECT_INTERNAL_PROPS_MARK"},function(e,t,n){var r=n(82),o=n(181),i=n(183),a=Math.max,l=Math.min;e.exports=function(e,t,n){var c,u,s,f,d,p,h=0,m=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=c,r=u;return c=u=void 0,h=t,f=e.apply(r,n)}function b(e){return h=e,d=setTimeout(x,t),m?y(e):f}function w(e){var n=e-p;return void 0===p||n>=t||n<0||v&&e-h>=s}function x(){var e=o();if(w(e))return O(e);d=setTimeout(x,function(e){var n=t-(e-p);return v?l(n,s-(e-h)):n}(e))}function O(e){return d=void 0,g&&c?y(e):(c=u=void 0,f)}function C(){var e=o(),n=w(e);if(c=arguments,u=this,p=e,n){if(void 0===d)return b(p);if(v)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(m=!!n.leading,s=(v="maxWait"in n)?a(i(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=p=u=d=void 0},C.flush=function(){return void 0===d?f:O(o())},C}},function(e,t,n){var r=n(189),o=n(190),i=n(69),a=n(191);e.exports=function(e){return r(e)||o(e)||i(e)||a()}},function(e,t,n){"use strict";(function(e){function r(){return(r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:1,n=S+=1;function r(t){if(0===t)E(n),e();else{var o=O((function(){r(t-1)}));k.set(n,o)}}return r(t),n}j.cancel=function(e){var t=k.get(e);return E(t),C(t)};var T=function(e,t){var n=u.useContext(M);if(!n){var o=e.component,i=void 0===o?"div":o,a=Object(c.a)(e,["component"]);return u.createElement(i,Object(r.a)({},a,{ref:t}))}var l=n.className,s=Object(c.a)(n,["className"]),f=e.className,d=Object(c.a)(e,["className"]);return u.createElement(M.Provider,{value:null},u.createElement(x,Object(r.a)({ref:t,className:m()(l,f)},s,d)))},P=u.forwardRef(T);P.displayName="RawItem";var N=P,M=u.createContext(null);function L(e){return"+ ".concat(e.length," ...")}function A(e,t){var n=e.prefixCls,o=void 0===n?"rc-overflow":n,a=e.data,s=void 0===a?[]:a,f=e.renderItem,d=e.renderRawItem,p=e.itemKey,h=e.itemWidth,v=void 0===h?10:h,g=e.ssr,b=e.style,w=e.className,O=e.maxCount,C=e.renderRest,S=e.renderRawRest,k=e.suffix,E=e.component,T=void 0===E?"div":E,P=e.itemComponent,N=e.onVisibleChange,A=Object(c.a)(e,["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"]),_=function(){var e=Object(u.useState)({}),t=Object(l.a)(e,2)[1],n=Object(u.useRef)([]),r=Object(u.useRef)(!1),o=0,i=0;return Object(u.useEffect)((function(){return function(){r.current=!0}}),[]),function(e){var a=o;return o+=1,n.current.lengthO,xe=Object(u.useMemo)((function(){var e=s;return ye?e=null===z&&D?s:s.slice(0,Math.min(s.length,H/v)):"number"==typeof O&&(e=s.slice(0,O)),e}),[s,v,z,O,ye]),Oe=Object(u.useMemo)((function(){return ye?s.slice(fe+1):s.slice(xe.length)}),[s,xe,ye,fe]),Ce=Object(u.useCallback)((function(e,t){var n;return"function"==typeof p?p(e):null!==(n=p&&(null==e?void 0:e[p]))&&void 0!==n?n:t}),[p]),Se=Object(u.useCallback)(f||function(e){return e},[f]);function ke(e,t){se(e),t||(me(eH){ke(r-1),ae(e-o-te+Q);break}}k&&je(0)+te>H&&ae(null)}}),[H,U,Q,te,Ce,xe]);var Te=he&&!!Oe.length,Pe={};null!==ie&&ye&&(Pe={position:"absolute",left:ie,top:0});var Ne,Me={prefixCls:ve,responsive:ye,component:P,invalidate:be},Le=d?function(e,t){var n=Ce(e,t);return u.createElement(M.Provider,{key:n,value:Object(i.a)(Object(i.a)({},Me),{},{order:t,item:e,itemKey:n,registerSize:Ee,display:t<=fe})},d(e,t))}:function(e,t){var n=Ce(e,t);return u.createElement(x,Object(r.a)({},Me,{order:t,key:n,item:e,renderItem:Se,itemKey:n,registerSize:Ee,display:t<=fe}))},Ae={order:Te?fe:Number.MAX_SAFE_INTEGER,className:"".concat(ve,"-rest"),registerSize:function(e,t){J(t),Y(Q)},display:Te};if(S)S&&(Ne=u.createElement(M.Provider,{value:Object(i.a)(Object(i.a)({},Me),Ae)},S(Oe)));else{var _e=C||L;Ne=u.createElement(x,Object(r.a)({},Me,Ae),"function"==typeof _e?_e(Oe):_e)}var De=u.createElement(T,Object(r.a)({className:m()(!be&&o,w),style:b,ref:t},A),xe.map(Le),we?Ne:null,k&&u.createElement(x,Object(r.a)({},Me,{order:fe,className:"".concat(ve,"-suffix"),registerSize:function(e,t){ne(t)},display:!0,style:Pe}),k));return ye&&(De=u.createElement(y.a,{onResize:function(e,t){F(t.clientWidth)}},De)),De}var _=u.forwardRef(A);_.displayName="Overflow",_.Item=N,_.RESPONSIVE="responsive",_.INVALIDATE="invalidate";var D=_,I=n(32),R=function(e,t){var n,r,o=e.prefixCls,a=e.id,l=e.inputElement,c=e.disabled,s=e.tabIndex,f=e.autoFocus,d=e.autoComplete,h=e.editable,v=e.accessibilityIndex,g=e.value,y=e.maxLength,b=e.onKeyDown,w=e.onMouseDown,x=e.onChange,O=e.onPaste,C=e.onCompositionStart,S=e.onCompositionEnd,k=e.open,E=e.attrs,j=l||u.createElement("input",null),T=j,P=T.ref,N=T.props,M=N.onKeyDown,L=N.onChange,A=N.onMouseDown,_=N.onCompositionStart,D=N.onCompositionEnd,I=N.style;return j=u.cloneElement(j,Object(i.a)(Object(i.a)({id:a,ref:p(t,P),disabled:c,tabIndex:s,autoComplete:d||"off",type:"search",autoFocus:f,className:m()("".concat(o,"-selection-search-input"),null===(n=j)||void 0===n||null===(r=n.props)||void 0===r?void 0:r.className),style:Object(i.a)(Object(i.a)({},I),{},{opacity:h?null:0}),role:"combobox","aria-expanded":k,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":"".concat(a,"_list_").concat(v)},E),{},{value:h?g:"",maxLength:y,readOnly:!h,unselectable:h?null:"on",onKeyDown:function(e){b(e),M&&M(e)},onMouseDown:function(e){w(e),A&&A(e)},onChange:function(e){x(e),L&&L(e)},onCompositionStart:function(e){C(e),_&&_(e)},onCompositionEnd:function(e){S(e),D&&D(e)},onPaste:O}))},z=u.forwardRef(R);z.displayName="Input";var F=z,H=n(23);function W(e,t){H.b?u.useLayoutEffect(e,t):u.useEffect(e,t)}var B=function(e){e.preventDefault(),e.stopPropagation()},U=function(e){var t=e.id,n=e.prefixCls,r=e.values,i=e.open,a=e.searchValue,c=e.inputRef,s=e.placeholder,f=e.disabled,d=e.mode,p=e.showSearch,h=e.autoFocus,v=e.autoComplete,y=e.accessibilityIndex,b=e.tabIndex,w=e.removeIcon,x=e.maxTagCount,O=e.maxTagTextLength,C=e.maxTagPlaceholder,S=void 0===C?function(e){return"+ ".concat(e.length," ...")}:C,k=e.tagRender,E=e.onToggleOpen,j=e.onSelect,T=e.onInputChange,P=e.onInputPaste,N=e.onInputKeyDown,M=e.onInputMouseDown,L=e.onInputCompositionStart,A=e.onInputCompositionEnd,_=u.useRef(null),R=Object(u.useState)(0),z=Object(l.a)(R,2),H=z[0],U=z[1],V=Object(u.useState)(!1),K=Object(l.a)(V,2),$=K[0],G=K[1],Y="".concat(n,"-selection"),q=i||"tags"===d?a:"",X="tags"===d||p&&(i||$);function Q(e,t,n,r){return u.createElement("span",{className:m()("".concat(Y,"-item"),Object(o.a)({},"".concat(Y,"-item-disabled"),t))},u.createElement("span",{className:"".concat(Y,"-item-content")},e),n&&u.createElement(I.a,{className:"".concat(Y,"-item-remove"),onMouseDown:B,onClick:r,customizeIcon:w},"×"))}W((function(){U(_.current.scrollWidth)}),[q]);var J=u.createElement("div",{className:"".concat(Y,"-search"),style:{width:H},onFocus:function(){G(!0)},onBlur:function(){G(!1)}},u.createElement(F,{ref:c,open:i,prefixCls:n,id:t,inputElement:null,disabled:f,autoFocus:h,autoComplete:v,editable:X,accessibilityIndex:y,value:q,onKeyDown:N,onMouseDown:M,onChange:T,onPaste:P,onCompositionStart:L,onCompositionEnd:A,tabIndex:b,attrs:Object(g.a)(e,!0)}),u.createElement("span",{ref:_,className:"".concat(Y,"-search-mirror"),"aria-hidden":!0},q," ")),Z=u.createElement(D,{prefixCls:"".concat(Y,"-overflow"),data:r,renderItem:function(e){var t=e.disabled,n=e.label,r=e.value,o=!f&&!t,a=n;if("number"==typeof O&&("string"==typeof n||"number"==typeof n)){var l=String(a);l.length>O&&(a="".concat(l.slice(0,O),"..."))}var c=function(e){e&&e.stopPropagation(),j(r,{selected:!1})};return"function"==typeof k?function(e,t,n,r,o){return u.createElement("span",{onMouseDown:function(e){B(e),E(!i)}},k({label:t,value:e,disabled:n,closable:r,onClose:o}))}(r,a,t,o,c):Q(a,t,o,c)},renderRest:function(e){return Q("function"==typeof S?S(e):S,!1)},suffix:J,itemKey:"key",maxCount:x});return u.createElement(u.Fragment,null,Z,!r.length&&!q&&u.createElement("span",{className:"".concat(Y,"-placeholder")},s))},V=function(e){var t=e.inputElement,n=e.prefixCls,r=e.id,o=e.inputRef,i=e.disabled,a=e.autoFocus,c=e.autoComplete,s=e.accessibilityIndex,f=e.mode,d=e.open,p=e.values,h=e.placeholder,m=e.tabIndex,v=e.showSearch,y=e.searchValue,b=e.activeValue,w=e.maxLength,x=e.onInputKeyDown,O=e.onInputMouseDown,C=e.onInputChange,S=e.onInputPaste,k=e.onInputCompositionStart,E=e.onInputCompositionEnd,j=u.useState(!1),T=Object(l.a)(j,2),P=T[0],N=T[1],M="combobox"===f,L=M||v,A=p[0],_=y||"";M&&b&&!P&&(_=b),u.useEffect((function(){M&&N(!1)}),[M,b]);var D=!("combobox"!==f&&!d)&&!!_,I=!A||"string"!=typeof A.label&&"number"!=typeof A.label?void 0:A.label.toString();return u.createElement(u.Fragment,null,u.createElement("span",{className:"".concat(n,"-selection-search")},u.createElement(F,{ref:o,prefixCls:n,id:r,open:d,inputElement:t,disabled:i,autoFocus:a,autoComplete:c,editable:L,accessibilityIndex:s,value:_,onKeyDown:x,onMouseDown:O,onChange:function(e){N(!0),C(e)},onPaste:S,onCompositionStart:k,onCompositionEnd:E,tabIndex:m,attrs:Object(g.a)(e,!0),maxLength:M?w:void 0})),!M&&A&&!D&&u.createElement("span",{className:"".concat(n,"-selection-item"),title:I},A.label),!A&&!D&&u.createElement("span",{className:"".concat(n,"-selection-placeholder")},h))};function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=u.useRef(null),n=u.useRef(null);function r(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}return u.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},r]}var $=function(e,t){var n=Object(u.useRef)(null),o=Object(u.useRef)(!1),i=e.prefixCls,a=e.multiple,c=e.open,f=e.mode,d=e.showSearch,p=e.tokenWithEnter,h=e.onSearch,m=e.onSearchSubmit,v=e.onToggleOpen,g=e.onInputKeyDown,y=e.domRef;u.useImperativeHandle(t,(function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}}));var b=K(0),w=Object(l.a)(b,2),x=w[0],O=w[1],C=Object(u.useRef)(null),S=function(e){!1!==h(e,!0,o.current)&&v(!0)},k={inputRef:n,onInputKeyDown:function(e){var t=e.which;t!==s.a.UP&&t!==s.a.DOWN||e.preventDefault(),g&&g(e),t!==s.a.ENTER||"tags"!==f||o.current||c||m(e.target.value),[s.a.SHIFT,s.a.TAB,s.a.BACKSPACE,s.a.ESC].includes(t)||v(!0)},onInputMouseDown:function(){O(!0)},onInputChange:function(e){var t=e.target.value;if(p&&C.current&&/[\r\n]/.test(C.current)){var n=C.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,C.current)}C.current=null,S(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");C.current=t},onInputCompositionStart:function(){o.current=!0},onInputCompositionEnd:function(e){o.current=!1,"combobox"!==f&&S(e.target.value)}},E=a?u.createElement(U,Object(r.a)({},e,k)):u.createElement(V,Object(r.a)({},e,k));return u.createElement("div",{ref:y,className:"".concat(i,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=x();e.target===n.current||t||e.preventDefault(),("combobox"===f||d&&t)&&c||(c&&h("",!0,!1),v())}},E)},G=u.forwardRef($);G.displayName="Selector";var Y=G,q=n(97),X=function(e,t){var n=e.prefixCls,a=(e.disabled,e.visible),l=e.children,s=e.popupElement,f=e.containerWidth,d=e.animation,p=e.transitionName,h=e.dropdownStyle,v=e.dropdownClassName,g=e.direction,y=void 0===g?"ltr":g,b=e.dropdownMatchSelectWidth,w=void 0===b||b,x=e.dropdownRender,O=e.dropdownAlign,C=e.getPopupContainer,S=e.empty,k=e.getTriggerDOMNode,E=e.onPopupVisibleChange,j=Object(c.a)(e,["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange"]),T="".concat(n,"-dropdown"),P=s;x&&(P=x(s));var N=u.useMemo((function(){return function(e){var t="number"!=typeof e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}}(w)}),[w]),M=d?"".concat(T,"-").concat(d):p,L=u.useRef(null);u.useImperativeHandle(t,(function(){return{getPopupElement:function(){return L.current}}}));var A=Object(i.a)({minWidth:f},h);return"number"==typeof w?A.width=w:w&&(A.width=f),u.createElement(q.a,Object(r.a)({},j,{showAction:E?["click"]:[],hideAction:E?["click"]:[],popupPlacement:"rtl"===y?"bottomRight":"bottomLeft",builtinPlacements:N,prefixCls:T,popupTransitionName:M,popup:u.createElement("div",{ref:L},P),popupAlign:O,popupVisible:a,getPopupContainer:C,popupClassName:m()(v,Object(o.a)({},"".concat(T,"-empty"),S)),popupStyle:A,getTriggerDOMNode:k,onPopupVisibleChange:E}),l)},Q=u.forwardRef(X);Q.displayName="SelectTrigger";var J=Q,Z=n(92);var ee=n(28);var te=["removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","tabIndex"];function ne(e){var t=e.prefixCls,n=e.components.optionList,f=e.convertChildrenToData,d=e.flattenOptions,h=e.getLabeledValue,g=e.filterOptions,y=e.isValueDisabled,b=e.findValueOption,w=(e.warningProps,e.fillOptionsWithMissingValue),x=e.omitDOMProps;function O(e,O){var C,S=e.prefixCls,k=void 0===S?t:S,E=e.className,j=e.id,T=e.open,P=e.defaultOpen,N=e.options,M=e.children,L=e.mode,A=e.value,_=e.defaultValue,D=e.labelInValue,R=e.showSearch,z=e.inputValue,F=e.searchValue,B=e.filterOption,U=e.filterSort,V=e.optionFilterProp,$=void 0===V?"value":V,G=e.autoClearSearchValue,q=void 0===G||G,X=e.onSearch,Q=e.allowClear,ne=e.clearIcon,re=e.showArrow,oe=e.inputIcon,ie=e.menuItemSelectedIcon,ae=e.disabled,le=e.loading,ce=e.defaultActiveFirstOption,ue=e.notFoundContent,se=void 0===ue?"Not Found":ue,fe=e.optionLabelProp,de=e.backfill,pe=(e.tabIndex,e.getInputElement),he=e.getRawInputElement,me=e.getPopupContainer,ve=e.listHeight,ge=void 0===ve?200:ve,ye=e.listItemHeight,be=void 0===ye?20:ye,we=e.animation,xe=e.transitionName,Oe=e.virtual,Ce=e.dropdownStyle,Se=e.dropdownClassName,ke=e.dropdownMatchSelectWidth,Ee=e.dropdownRender,je=e.dropdownAlign,Te=e.showAction,Pe=void 0===Te?[]:Te,Ne=e.direction,Me=e.tokenSeparators,Le=e.tagRender,Ae=e.onPopupScroll,_e=e.onDropdownVisibleChange,De=e.onFocus,Ie=e.onBlur,Re=e.onKeyUp,ze=e.onKeyDown,Fe=e.onMouseDown,He=e.onChange,We=e.onSelect,Be=e.onDeselect,Ue=e.onClear,Ve=e.internalProps,Ke=void 0===Ve?{}:Ve,$e=Object(c.a)(e,["prefixCls","className","id","open","defaultOpen","options","children","mode","value","defaultValue","labelInValue","showSearch","inputValue","searchValue","filterOption","filterSort","optionFilterProp","autoClearSearchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","menuItemSelectedIcon","disabled","loading","defaultActiveFirstOption","notFoundContent","optionLabelProp","backfill","tabIndex","getInputElement","getRawInputElement","getPopupContainer","listHeight","listItemHeight","animation","transitionName","virtual","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","onChange","onSelect","onDeselect","onClear","internalProps"]),Ge=Ke.mark===Z.a,Ye=x?x($e):$e;te.forEach((function(e){delete Ye[e]}));var qe=Object(u.useRef)(null),Xe=Object(u.useRef)(null),Qe=Object(u.useRef)(null),Je=Object(u.useRef)(null),Ze=Object(u.useMemo)((function(){return(Me||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[Me]),et=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=u.useState(!1),n=Object(l.a)(t,2),r=n[0],o=n[1],i=u.useRef(null),a=function(){window.clearTimeout(i.current)};u.useEffect((function(){return a}),[]);var c=function(t,n){a(),i.current=window.setTimeout((function(){o(t),n&&n()}),e)};return[r,c,a]}(),tt=Object(l.a)(et,3),nt=tt[0],rt=tt[1],ot=tt[2],it=Object(u.useState)(),at=Object(l.a)(it,2),lt=at[0],ct=at[1];Object(u.useEffect)((function(){ct("rc_select_".concat(Object(H.a)()))}),[]);var ut=j||lt,st=fe;void 0===st&&(st=N?"label":"children");var ft="combobox"!==L&&D,dt="tags"===L||"multiple"===L,pt=void 0!==R?R:dt||"combobox"===L,ht=Object(u.useState)(!1),mt=Object(l.a)(ht,2),vt=mt[0],gt=mt[1];Object(u.useEffect)((function(){gt(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;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(e)&&!/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(null==e?void 0:e.substr(0,4)))}())}),[]);var yt=Object(u.useRef)(null);u.useImperativeHandle(O,(function(){var e,t,n;return{focus:null===(e=Qe.current)||void 0===e?void 0:e.focus,blur:null===(t=Qe.current)||void 0===t?void 0:t.blur,scrollTo:null===(n=Je.current)||void 0===n?void 0:n.scrollTo}}));var bt=v(_,{value:A}),wt=Object(l.a)(bt,2),xt=wt[0],Ot=wt[1],Ct=Object(u.useMemo)((function(){return Object(H.e)(xt,{labelInValue:ft,combobox:"combobox"===L})}),[xt,ft]),St=Object(l.a)(Ct,2),kt=St[0],Et=St[1],jt=Object(u.useMemo)((function(){return new Set(kt)}),[kt]),Tt=Object(u.useState)(null),Pt=Object(l.a)(Tt,2),Nt=Pt[0],Mt=Pt[1],Lt=Object(u.useState)(""),At=Object(l.a)(Lt,2),_t=At[0],Dt=At[1],It=_t;"combobox"===L&&void 0!==xt?It=xt:void 0!==F?It=F:z&&(It=z);var Rt=Object(u.useMemo)((function(){var e=N;return void 0===e&&(e=f(M)),"tags"===L&&w&&(e=w(e,xt,st,D)),e||[]}),[N,M,L,xt]),zt=Object(u.useMemo)((function(){return d(Rt,e)}),[Rt]),Ft=function(e){var t=u.useRef(null),n=u.useMemo((function(){var t=new Map;return e.forEach((function(e){var n=e.data.value;t.set(n,e)})),t}),[e]);return t.current=n,function(e){return e.map((function(e){return t.current.get(e)})).filter(Boolean)}}(zt),Ht=Object(u.useMemo)((function(){if(!It||!pt)return Object(a.a)(Rt);var e=g(It,Rt,{optionFilterProp:$,filterOption:"combobox"===L&&void 0===B?function(){return!0}:B});return"tags"===L&&e.every((function(e){return e[$]!==It}))&&e.unshift({value:It,label:It,key:"__RC_SELECT_TAG_PLACEHOLDER__"}),U&&Array.isArray(e)?Object(a.a)(e).sort(U):e}),[Rt,It,L,pt,U]),Wt=Object(u.useMemo)((function(){return d(Ht,e)}),[Ht]);Object(u.useEffect)((function(){Je.current&&Je.current.scrollTo&&Je.current.scrollTo(0)}),[It]);var Bt,Ut,Vt=Object(u.useMemo)((function(){var e=kt.map((function(e){var t=Ft([e]),n=h(e,{options:t,prevValueMap:Et,labelInValue:ft,optionLabelProp:st});return Object(i.a)(Object(i.a)({},n),{},{disabled:y(e,t)})}));return L||1!==e.length||null!==e[0].value||null!==e[0].label?e:[]}),[xt,Rt,L]);Bt=Vt,Ut=u.useRef(Bt),Vt=u.useMemo((function(){var e=new Map;Ut.current.forEach((function(t){var n=t.value,r=t.label;n!==r&&e.set(n,r)}));var t=Bt.map((function(t){var n=e.get(t.value);return t.isCacheable&&n?Object(i.a)(Object(i.a)({},t),{},{label:n}):t}));return Ut.current=t,t}),[Bt]);var Kt=function(e,t,n){var r=Ft([e]),o=b([e],r)[0];if(!Ke.skipTriggerSelect){var i=ft?h(e,{options:r,prevValueMap:Et,labelInValue:ft,optionLabelProp:st}):e;t&&We?We(i,o):!t&&Be&&Be(i,o)}Ge&&(t&&Ke.onRawSelect?Ke.onRawSelect(e,o,n):!t&&Ke.onRawDeselect&&Ke.onRawDeselect(e,o,n))},$t=Object(u.useState)([]),Gt=Object(l.a)($t,2),Yt=Gt[0],qt=Gt[1],Xt=function(e){if(!Ge||!Ke.skipTriggerChange){var t=Ft(e),n=Object(H.f)(Array.from(e),{labelInValue:ft,options:t,getLabeledValue:h,prevValueMap:Et,optionLabelProp:st}),r=dt?n:n[0];if(He&&(0!==kt.length||0!==n.length)){var o=b(e,t,{prevValueOptions:Yt});qt(o.map((function(t,n){var r=Object(i.a)({},t);return Object.defineProperty(r,"_INTERNAL_OPTION_VALUE_",{get:function(){return e[n]}}),r}))),He(r,dt?o:o[0])}Ot(r)}},Qt=function(e,t){var n,r=t.selected,o=t.source;ae||(dt?(n=new Set(kt),r?n.add(e):n.delete(e)):(n=new Set).add(e),(dt||!dt&&Array.from(kt)[0]!==e)&&Xt(Array.from(n)),Kt(e,!dt||r,o),"combobox"===L?(Dt(String(e)),Mt("")):dt&&!q||(Dt(""),Mt("")))},Jt="combobox"===L&&"function"==typeof pe&&pe()||null,Zt="function"==typeof he&&he(),en=v(void 0,{defaultValue:P,value:T}),tn=Object(l.a)(en,2),nn=tn[0],rn=tn[1],on=nn,an=!se&&!Ht.length;(ae||an&&on&&"combobox"===L)&&(on=!1);var ln,cn=!an&&on,un=function(e){var t=void 0!==e?e:!on;nn===t||ae||(rn(t),_e&&_e(t))};Zt&&(ln=function(e){un(e)}),function(e,t,n){var r=u.useRef(null);r.current={open:t,triggerOpen:n},u.useEffect((function(){function t(t){var n=t.target;n.shadowRoot&&t.composed&&(n=t.composedPath()[0]||n),r.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(n)&&e!==n}))&&r.current.triggerOpen(!1)}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[qe.current,null===(e=Xe.current)||void 0===e?void 0:e.getPopupElement()]}),cn,un);var sn=function(e,t,n){var r=!0,o=e;Mt(null);var i=n?null:Object(ee.f)(e,Me),l=i;if("combobox"===L)t&&Xt([o]);else if(i){o="","tags"!==L&&(l=i.map((function(e){var t=zt.find((function(t){return t.data[st]===e}));return t?t.data.value:null})).filter((function(e){return null!==e})));var c=Array.from(new Set([].concat(Object(a.a)(kt),Object(a.a)(l))));Xt(c),c.forEach((function(e){Kt(e,!0,"input")})),un(!1),r=!1}return Dt(o),X&&It!==o&&X(o),r};Object(u.useEffect)((function(){nn&&ae&&rn(!1)}),[ae]),Object(u.useEffect)((function(){on||dt||"combobox"===L||sn("",!1,!1)}),[on]);var fn=K(),dn=Object(l.a)(fn,2),pn=dn[0],hn=dn[1],mn=Object(u.useRef)(!1),vn=[];Object(u.useEffect)((function(){return function(){vn.forEach((function(e){return clearTimeout(e)})),vn.splice(0,vn.length)}}),[]);var gn=Object(u.useState)(0),yn=Object(l.a)(gn,2),bn=yn[0],wn=yn[1],xn=void 0!==ce?ce:"combobox"!==L,On=Object(u.useState)(null),Cn=Object(l.a)(On,2),Sn=Cn[0],kn=Cn[1],En=Object(u.useState)({}),jn=Object(l.a)(En,2)[1];W((function(){if(cn){var e,t=Math.ceil(null===(e=qe.current)||void 0===e?void 0:e.offsetWidth);Sn===t||Number.isNaN(t)||kn(t)}}),[cn]);var Tn,Pn=u.createElement(n,{ref:Je,prefixCls:k,id:ut,open:on,childrenAsData:!N,options:Ht,flattenOptions:Wt,multiple:dt,values:jt,height:ge,itemHeight:be,onSelect:function(e,t){Qt(e,Object(i.a)(Object(i.a)({},t),{},{source:"option"}))},onToggleOpen:un,onActiveValue:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.source,o=void 0===r?"keyboard":r;wn(t),de&&"combobox"===L&&null!==e&&"keyboard"===o&&Mt(String(e))},defaultActiveFirstOption:xn,notFoundContent:se,onScroll:Ae,searchValue:It,menuItemSelectedIcon:ie,virtual:!1!==Oe&&!1!==ke,onMouseEnter:function(){jn({})}});!ae&&Q&&(kt.length||It)&&(Tn=u.createElement(I.a,{className:"".concat(k,"-clear"),onMouseDown:function(){Ge&&Ke.onClear&&Ke.onClear(),Ue&&Ue(),Xt([]),sn("",!1,!1)},customizeIcon:ne},"×"));var Nn,Mn=void 0!==re?re:le||!dt&&"combobox"!==L;Mn&&(Nn=u.createElement(I.a,{className:m()("".concat(k,"-arrow"),Object(o.a)({},"".concat(k,"-arrow-loading"),le)),customizeIcon:oe,customizeIconProps:{loading:le,searchValue:It,open:on,focused:nt,showSearch:pt}}));var Ln=m()(k,E,(C={},Object(o.a)(C,"".concat(k,"-focused"),nt),Object(o.a)(C,"".concat(k,"-multiple"),dt),Object(o.a)(C,"".concat(k,"-single"),!dt),Object(o.a)(C,"".concat(k,"-allow-clear"),Q),Object(o.a)(C,"".concat(k,"-show-arrow"),Mn),Object(o.a)(C,"".concat(k,"-disabled"),ae),Object(o.a)(C,"".concat(k,"-loading"),le),Object(o.a)(C,"".concat(k,"-open"),on),Object(o.a)(C,"".concat(k,"-customize-input"),Jt),Object(o.a)(C,"".concat(k,"-show-search"),pt),C)),An=u.createElement(J,{ref:Xe,disabled:ae,prefixCls:k,visible:cn,popupElement:Pn,containerWidth:Sn,animation:we,transitionName:xe,dropdownStyle:Ce,dropdownClassName:Se,direction:Ne,dropdownMatchSelectWidth:ke,dropdownRender:Ee,dropdownAlign:je,getPopupContainer:me,empty:!Rt.length,getTriggerDOMNode:function(){return yt.current},onPopupVisibleChange:ln},Zt?u.cloneElement(Zt,{ref:p(yt,Zt.props.ref)}):u.createElement(Y,Object(r.a)({},e,{domRef:yt,prefixCls:k,inputElement:Jt,ref:Qe,id:ut,showSearch:pt,mode:L,accessibilityIndex:bn,multiple:dt,tagRender:Le,values:Vt,open:on,onToggleOpen:un,searchValue:It,activeValue:Nt,onSearch:sn,onSearchSubmit:function(e){if(e&&e.trim()){var t=Array.from(new Set([].concat(Object(a.a)(kt),[e])));Xt(t),t.forEach((function(e){Kt(e,!0,"input")})),Dt("")}},onSelect:function(e,t){Qt(e,Object(i.a)(Object(i.a)({},t),{},{source:"selection"}))},tokenWithEnter:Ze})));return Zt?An:u.createElement("div",Object(r.a)({className:Ln},Ye,{ref:qe,onMouseDown:function(e){var t,n=e.target,r=null===(t=Xe.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var o=setTimeout((function(){var e,t=vn.indexOf(o);(-1!==t&&vn.splice(t,1),ot(),vt||r.contains(document.activeElement))||(null===(e=Qe.current)||void 0===e||e.focus())}));vn.push(o)}if(Fe){for(var i=arguments.length,a=new Array(i>1?i-1:0),l=1;l1?i-1:0),l=1;l1?t-1:0),r=1;r=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Oe(e){var t,n,r;if(ge.isWindow(e)||9===e.nodeType){var o=ge.getWindow(e);t={left:ge.getWindowScrollLeft(o),top:ge.getWindowScrollTop(o)},n=ge.viewportWidth(o),r=ge.viewportHeight(o)}else t=ge.offset(e),n=ge.outerWidth(e),r=ge.outerHeight(e);return t.width=n,t.height=r,t}function Ce(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,i=e.height,a=e.left,l=e.top;return"c"===n?l+=i/2:"b"===n&&(l+=i),"c"===r?a+=o/2:"r"===r&&(a+=o),{left:a,top:l}}function Se(e,t,n,r,o){var i=Ce(t,n[1]),a=Ce(e,n[0]),l=[a.left-i.left,a.top-i.top];return{left:Math.round(e.left-l[0]+r[0]-o[0]),top:Math.round(e.top-l[1]+r[1]-o[1])}}function ke(e,t,n){return e.leftn.right}function Ee(e,t,n){return e.topn.bottom}function je(e,t,n){var r=[];return ge.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Te(e,t){return e[t]=-e[t],e}function Pe(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Ne(e,t){e[0]=Pe(e[0],t.width),e[1]=Pe(e[1],t.height)}function Me(e,t,n,r){var o=n.points,i=n.offset||[0,0],a=n.targetOffset||[0,0],l=n.overflow,c=n.source||e;i=[].concat(i),a=[].concat(a);var u={},s=0,f=xe(c,!(!(l=l||{})||!l.alwaysByViewport)),d=Oe(c);Ne(i,d),Ne(a,t);var p=Se(d,t,o,i,a),h=ge.merge(d,p);if(f&&(l.adjustX||l.adjustY)&&r){if(l.adjustX&&ke(p,d,f)){var m=je(o,/[lr]/gi,{l:"r",r:"l"}),v=Te(i,0),g=Te(a,0);(function(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=n.left&&o.left+i.width>n.right&&(i.width-=o.left+i.width-n.right),r.adjustX&&o.left+i.width>n.right&&(o.left=Math.max(n.right-i.width,n.left)),r.adjustY&&o.top=n.top&&o.top+i.height>n.bottom&&(i.height-=o.top+i.height-n.bottom),r.adjustY&&o.top+i.height>n.bottom&&(o.top=Math.max(n.bottom-i.height,n.top)),ge.mix(o,i)}(p,d,f,u))}return h.width!==d.width&&ge.css(c,"width",ge.width(c)+h.width-d.width),h.height!==d.height&&ge.css(c,"height",ge.height(c)+h.height-d.height),ge.offset(c,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:i,targetOffset:a,overflow:u}}function Le(e,t,n){var r=n.target||t;return Me(e,Oe(r),n,!function(e,t){var n=xe(e,t),r=Oe(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}Le.__getOffsetParent=be,Le.__getVisibleRectForElement=xe;var Ae=n(91),_e=n.n(Ae),De=n(54);function Ie(e,t){var n=null,r=null;var o=new De.a((function(e){var o=Object(S.a)(e,1)[0].target;if(document.documentElement.contains(o)){var i=o.getBoundingClientRect(),a=i.width,l=i.height,c=Math.floor(a),u=Math.floor(l);n===c&&r===u||Promise.resolve().then((function(){t({width:c,height:u})})),n=c,r=u}}));return e&&o.observe(e),function(){o.disconnect()}}function Re(e){return"function"!=typeof e?null:e()}function ze(e){return"object"===Object(M.a)(e)&&e?e:null}var Fe=function(e,t){var n=e.children,r=e.disabled,o=e.target,i=e.align,a=e.onAlign,l=e.monitorWindowResize,c=e.monitorBufferTime,u=void 0===c?0:c,s=f.a.useRef({}),d=f.a.useRef(),p=f.a.Children.only(n),h=f.a.useRef({});h.current.disabled=r,h.current.target=o,h.current.align=i,h.current.onAlign=a;var v=function(e,t){var n=f.a.useRef(!1),r=f.a.useRef(null);function o(){window.clearTimeout(r.current)}return[function i(a){if(n.current&&!0!==a)o(),r.current=window.setTimeout((function(){n.current=!1,i()}),t);else{if(!1===e())return;n.current=!0,o(),r.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,o()}]}((function(){var e=h.current,t=e.disabled,n=e.target,r=e.align,o=e.onAlign;if(!t&&n){var i,a=d.current,l=Re(n),c=ze(n);s.current.element=l,s.current.point=c,s.current.align=r;var u=document.activeElement;return l&&Object(L.a)(l)?i=Le(a,l,r):c&&(i=function(e,t,n){var r,o,i=ge.getDocument(e),a=i.defaultView||i.parentWindow,l=ge.getWindowScrollLeft(a),c=ge.getWindowScrollTop(a),u=ge.viewportWidth(a),s=ge.viewportHeight(a),f={left:r="pageX"in t?t.pageX:l+t.clientX,top:o="pageY"in t?t.pageY:c+t.clientY,width:0,height:0},d=r>=0&&r<=l+u&&o>=0&&o<=c+s,p=[n.points[0],"cc"];return Me(e,f,_(_({},n),{},{points:p}),d)}(a,c,r)),function(e,t){e!==document.activeElement&&m(t,e)&&"function"==typeof e.focus&&e.focus()}(u,a),o&&i&&o(a,i),!0}return!1}),u),b=Object(S.a)(v,2),w=b[0],x=b[1],O=f.a.useRef({cancel:function(){}}),C=f.a.useRef({cancel:function(){}});f.a.useEffect((function(){var e,t,n=Re(o),r=ze(o);d.current!==C.current.element&&(C.current.cancel(),C.current.element=d.current,C.current.cancel=Ie(d.current,w)),s.current.element===n&&((e=s.current.point)===(t=r)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&_e()(s.current.align,i)||(w(),O.current.element!==n&&(O.current.cancel(),O.current.element=n,O.current.cancel=Ie(n,w)))})),f.a.useEffect((function(){r?x():w()}),[r]);var k=f.a.useRef(null);return f.a.useEffect((function(){l?k.current||(k.current=Object(y.a)(window,"resize",w)):k.current&&(k.current.remove(),k.current=null)}),[l]),f.a.useEffect((function(){return function(){O.current.cancel(),C.current.cancel(),k.current&&k.current.remove(),x()}}),[]),f.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return w(!0)}}})),f.a.isValidElement(p)&&(p=f.a.cloneElement(p,{ref:Object(g.a)(p.ref,d)})),p},He=f.a.forwardRef(Fe);He.displayName="Align";var We=He,Be=n(20),Ue=n.n(Be),Ve=n(49),Ke=["measure","align",null,"motion"],$e=s.forwardRef((function(e,t){var n=e.visible,i=e.prefixCls,a=e.className,l=e.style,c=e.children,u=e.zIndex,f=e.stretch,d=e.destroyPopupOnHide,p=e.forceRender,m=e.align,v=e.point,g=e.getRootDomNode,y=e.getClassNameFromAlign,b=e.onAlign,w=e.onMouseEnter,x=e.onMouseLeave,C=e.onMouseDown,k=e.onTouchStart,E=Object(s.useRef)(),P=Object(s.useRef)(),N=Object(s.useState)(),M=Object(S.a)(N,2),L=M[0],A=M[1],_=function(e){var t=s.useState({width:0,height:0}),n=Object(S.a)(t,2),r=n[0],o=n[1];return[s.useMemo((function(){var t={};if(e){var n=r.width,o=r.height;-1!==e.indexOf("height")&&o?t.height=o:-1!==e.indexOf("minHeight")&&o&&(t.minHeight=o),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,r]),function(e){o({width:e.offsetWidth,height:e.offsetHeight})}]}(f),D=Object(S.a)(_,2),I=D[0],R=D[1];var z=function(e,t){var n=Object(s.useState)(null),r=Object(S.a)(n,2),o=r[0],i=r[1],a=Object(s.useRef)(),l=Object(s.useRef)(!1);function c(e){l.current||i(e)}function u(){h.a.cancel(a.current)}return Object(s.useEffect)((function(){c("measure")}),[e]),Object(s.useEffect)((function(){switch(o){case"measure":t()}o&&(a.current=Object(h.a)(Object(Ve.a)(Ue.a.mark((function e(){var t,n;return Ue.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ke.indexOf(o),(n=Ke[t+1])&&-1!==t&&c(n);case 3:case"end":return e.stop()}}),e)})))))}),[o]),Object(s.useEffect)((function(){return function(){l.current=!0,u()}}),[]),[o,function(e){u(),a.current=Object(h.a)((function(){c((function(e){switch(o){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){f&&R(g())})),F=Object(S.a)(z,2),H=F[0],W=F[1],B=Object(s.useRef)();function U(){var e;null===(e=E.current)||void 0===e||e.forceAlign()}function V(e,t){var n=y(t);L!==n&&A(n),"align"===H&&(L!==n?Promise.resolve().then((function(){U()})):W((function(){var e;null===(e=B.current)||void 0===e||e.call(B)})),null==b||b(e,t))}var K=Object(r.a)({},T(e));function $(){return new Promise((function(e){B.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=K[e];K[e]=function(e,n){return W(),null==t?void 0:t(e,n)}})),s.useEffect((function(){K.motionName||"motion"!==H||W()}),[K.motionName,H]),s.useImperativeHandle(t,(function(){return{forceAlign:U,getElement:function(){return P.current}}}));var G=Object(r.a)(Object(r.a)({},I),{},{zIndex:u,opacity:"motion"!==H&&"stable"!==H&&n?0:void 0,pointerEvents:"stable"===H?void 0:"none"},l),Y=!0;!(null==m?void 0:m.points)||"align"!==H&&"stable"!==H||(Y=!1);var q=c;return s.Children.count(c)>1&&(q=s.createElement("div",{className:"".concat(i,"-content")},c)),s.createElement(j.a,Object(o.a)({visible:n,ref:P,leavedClassName:"".concat(i,"-hidden")},K,{onAppearPrepare:$,onEnterPrepare:$,removeOnLeave:d,forceRender:p}),(function(e,t){var n=e.className,o=e.style,l=O()(i,a,L,n);return s.createElement(We,{target:v||g,key:"popup",ref:E,monitorWindowResize:!0,disabled:Y,align:m,onAlign:V},s.createElement("div",{ref:t,className:l,onMouseEnter:w,onMouseLeave:x,onMouseDownCapture:C,onTouchStartCapture:k,style:Object(r.a)(Object(r.a)({},o),G)},q))}))}));$e.displayName="PopupInner";var Ge=$e,Ye=s.forwardRef((function(e,t){var n=e.prefixCls,i=e.visible,a=e.zIndex,l=e.children,c=e.mobile,u=(c=void 0===c?{}:c).popupClassName,f=c.popupStyle,d=c.popupMotion,p=void 0===d?{}:d,h=c.popupRender,m=s.useRef();s.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var v=Object(r.a)({zIndex:a},f),g=l;return s.Children.count(l)>1&&(g=s.createElement("div",{className:"".concat(n,"-content")},l)),h&&(g=h(g)),s.createElement(j.a,Object(o.a)({visible:i,ref:m,removeOnLeave:!0},p),(function(e,t){var o=e.className,i=e.style,a=O()(n,u,o);return s.createElement("div",{ref:t,className:a,style:Object(r.a)(Object(r.a)({},i),v)},g)}))}));Ye.displayName="MobilePopupInner";var qe=Ye,Xe=["visible","mobile"],Qe=s.forwardRef((function(e,t){var n=e.visible,i=e.mobile,a=Object(k.a)(e,Xe),l=Object(s.useState)(n),c=Object(S.a)(l,2),u=c[0],f=c[1],d=Object(s.useState)(!1),p=Object(S.a)(d,2),h=p[0],m=p[1],v=Object(r.a)(Object(r.a)({},a),{},{visible:u});Object(s.useEffect)((function(){f(n),n&&i&&m(Object(E.a)())}),[n,i]);var g=h?s.createElement(qe,Object(o.a)({},v,{mobile:i,ref:t})):s.createElement(Ge,Object(o.a)({},v,{ref:t}));return s.createElement("div",null,s.createElement(P,v),g)}));Qe.displayName="Popup";var Je=Qe,Ze=s.createContext(null);function et(){}function tt(){return""}function nt(e){return e?e.ownerDocument:window.document}var rt=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var ot,it;t.a=(ot=w,(it=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(e){var r,a;return Object(i.a)(this,n),(r=t.call(this,e)).popupRef=s.createRef(),r.triggerRef=s.createRef(),r.attachId=void 0,r.clickOutsideHandler=void 0,r.touchOutsideHandler=void 0,r.contextMenuOutsideHandler1=void 0,r.contextMenuOutsideHandler2=void 0,r.mouseDownTimeout=void 0,r.focusTime=void 0,r.preClickTime=void 0,r.preTouchTime=void 0,r.delayTimer=void 0,r.hasPopupMouseDown=void 0,r.onMouseEnter=function(e){var t=r.props.mouseEnterDelay;r.fireEvents("onMouseEnter",e),r.delaySetPopupVisible(!0,t,t?null:e)},r.onMouseMove=function(e){r.fireEvents("onMouseMove",e),r.setPoint(e)},r.onMouseLeave=function(e){r.fireEvents("onMouseLeave",e),r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onPopupMouseEnter=function(){r.clearDelayTimer()},r.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&m(null===(t=r.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||r.delaySetPopupVisible(!1,r.props.mouseLeaveDelay)},r.onFocus=function(e){r.fireEvents("onFocus",e),r.clearDelayTimer(),r.isFocusToShow()&&(r.focusTime=Date.now(),r.delaySetPopupVisible(!0,r.props.focusDelay))},r.onMouseDown=function(e){r.fireEvents("onMouseDown",e),r.preClickTime=Date.now()},r.onTouchStart=function(e){r.fireEvents("onTouchStart",e),r.preTouchTime=Date.now()},r.onBlur=function(e){r.fireEvents("onBlur",e),r.clearDelayTimer(),r.isBlurToHide()&&r.delaySetPopupVisible(!1,r.props.blurDelay)},r.onContextMenu=function(e){e.preventDefault(),r.fireEvents("onContextMenu",e),r.setPopupVisible(!0,e)},r.onContextMenuClose=function(){r.isContextMenuToShow()&&r.close()},r.onClick=function(e){if(r.fireEvents("onClick",e),r.focusTime){var t;if(r.preClickTime&&r.preTouchTime?t=Math.min(r.preClickTime,r.preTouchTime):r.preClickTime?t=r.preClickTime:r.preTouchTime&&(t=r.preTouchTime),Math.abs(t-r.focusTime)<20)return;r.focusTime=0}r.preClickTime=0,r.preTouchTime=0,r.isClickToShow()&&(r.isClickToHide()||r.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!r.state.popupVisible;(r.isClickToHide()&&!n||n&&r.isClickToShow())&&r.setPopupVisible(!r.state.popupVisible,e)},r.onPopupMouseDown=function(){var e;r.hasPopupMouseDown=!0,clearTimeout(r.mouseDownTimeout),r.mouseDownTimeout=window.setTimeout((function(){r.hasPopupMouseDown=!1}),0),r.context&&(e=r.context).onPopupMouseDown.apply(e,arguments)},r.onDocumentClick=function(e){if(!r.props.mask||r.props.maskClosable){var t=e.target,n=r.getRootDomNode(),o=r.getPopupDomNode();m(n,t)&&!r.isContextMenuOnly()||m(o,t)||r.hasPopupMouseDown||r.close()}},r.getRootDomNode=function(){var e=r.props.getTriggerDOMNode;if(e)return e(r.triggerRef.current);try{var t=Object(v.a)(r.triggerRef.current);if(t)return t}catch(e){}return p.a.findDOMNode(Object(l.a)(r))},r.getPopupClassNameFromAlign=function(e){var t=[],n=r.props,o=n.popupPlacement,i=n.builtinPlacements,a=n.prefixCls,l=n.alignPoint,c=n.getPopupClassNameFromAlign;return o&&i&&t.push(function(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;an},e}return t=l,(n=[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(e){e.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var e=this.state,t=e.dragging,n=e.visible,o=this.props.prefixCls,a=this.getSpinHeight(),l=this.getTop(),c=this.showScroll(),u=c&&n;return r.createElement("div",{ref:this.scrollbarRef,className:i()("".concat(o,"-scrollbar"),h({},"".concat(o,"-scrollbar-show"),c)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:u?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},r.createElement("div",{ref:this.thumbRef,className:i()("".concat(o,"-scrollbar-thumb"),h({},"".concat(o,"-scrollbar-thumb-moving"),t)),style:{width:"100%",height:a,top:l,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}])&&v(t.prototype,n),o&&v(t,o),l}(r.Component);function C(e){var t=e.children,n=e.setRef,o=r.useCallback((function(e){n(e)}),[]);return r.cloneElement(t,{ref:o})}var S=n(30);function k(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]&&arguments[1],r=e<0&&a.current.top||e>0&&a.current.bottom;return t&&r?(clearTimeout(o.current),n.current=!1):r&&!n.current||i(),!n.current&&r}};var I=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange"];function R(){return(R=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var V=[],K={overflowY:"auto",overflowAnchor:"none"};function $(e,t){var n=e.prefixCls,o=void 0===n?"rc-virtual-list":n,a=e.className,l=e.height,c=e.itemHeight,u=e.fullHeight,s=void 0===u||u,p=e.style,h=e.data,m=e.children,v=e.itemKey,g=e.virtual,y=e.component,b=void 0===y?"div":y,w=e.onScroll,x=e.onVisibleChange,k=U(e,I),T=!(!1===g||!l||!c),N=T&&h&&c*h.length>l,M=W(Object(r.useState)(0),2),A=M[0],z=M[1],B=W(Object(r.useState)(!1),2),$=B[0],G=B[1],Y=i()(o,a),q=h||V,X=Object(r.useRef)(),Q=Object(r.useRef)(),J=Object(r.useRef)(),Z=r.useCallback((function(e){return"function"==typeof v?v(e):null==e?void 0:e[v]}),[v]),ee={getKey:Z};function te(e){z((function(t){var n=function(e){var t=e;Number.isNaN(ve.current)||(t=Math.min(t,ve.current));return t=Math.max(t,0)}("function"==typeof e?e(t):e);return X.current.scrollTop=n,n}))}var ne=Object(r.useRef)({start:0,end:q.length}),re=Object(r.useRef)(),oe=W(L(q,Z),1)[0];re.current=oe;var ie=W(function(e,t,n){var o=j(r.useState(0),2),i=o[0],a=o[1],l=Object(r.useRef)(new Map),c=Object(r.useRef)(new E),u=Object(r.useRef)(0);function s(){u.current+=1;var e=u.current;Promise.resolve().then((function(){e===u.current&&(l.current.forEach((function(e,t){if(e&&e.offsetParent){var n=Object(S.a)(e),r=n.offsetHeight;c.current.get(t)!==r&&c.current.set(t,n.offsetHeight)}})),a((function(e){return e+1})))}))}return[function(r,o){var i=e(r),a=l.current.get(i);o?(l.current.set(i,o),s()):l.current.delete(i),!a!=!o&&(o?null==t||t(r):null==n||n(r))},s,c.current,i]}(Z,null,null),4),ae=ie[0],le=ie[1],ce=ie[2],ue=ie[3],se=r.useMemo((function(){if(!T)return{scrollHeight:void 0,start:0,end:q.length-1,offset:void 0};var e;if(!N)return{scrollHeight:(null===(e=Q.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:q.length-1,offset:void 0};for(var t,n,r,o=0,i=q.length,a=0;a=A&&void 0===t&&(t=a,n=o),d>A+l&&void 0===r&&(r=a),o=d}return void 0===t&&(t=0,n=0),void 0===r&&(r=q.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,q.length),offset:n}}),[N,T,A,q,ue,l]),fe=se.scrollHeight,de=se.start,pe=se.end,he=se.offset;ne.current.start=de,ne.current.end=pe;var me=fe-l,ve=Object(r.useRef)(me);ve.current=me;var ge=A<=0,ye=A>=me,be=D(ge,ye);var we=W(function(e,t,n,o){var i=Object(r.useRef)(0),a=Object(r.useRef)(null),l=Object(r.useRef)(null),c=Object(r.useRef)(!1),u=D(t,n);return[function(t){if(e){d.a.cancel(a.current);var n=t.deltaY;i.current+=n,l.current=n,u(n)||(_||t.preventDefault(),a.current=Object(d.a)((function(){var e=c.current?10:1;o(i.current*e),i.current=0})))}},function(t){e&&(c.current=t.detail===l.current)}]}(T,ge,ye,(function(e){te((function(t){return t+e}))})),2),xe=we[0],Oe=we[1];!function(e,t,n){var o,i=Object(r.useRef)(!1),a=Object(r.useRef)(0),l=Object(r.useRef)(null),c=Object(r.useRef)(null),u=function(e){if(i.current){var t=Math.ceil(e.touches[0].pageY),r=a.current-t;a.current=t,n(r)&&e.preventDefault(),clearInterval(c.current),c.current=setInterval((function(){(!n(r*=14/15,!0)||Math.abs(r)<=.1)&&clearInterval(c.current)}),16)}},s=function(){i.current=!1,o()},f=function(e){o(),1!==e.touches.length||i.current||(i.current=!0,a.current=Math.ceil(e.touches[0].pageY),l.current=e.target,l.current.addEventListener("touchmove",u),l.current.addEventListener("touchend",s))};o=function(){l.current&&(l.current.removeEventListener("touchmove",u),l.current.removeEventListener("touchend",s))},r.useLayoutEffect((function(){return e&&t.current.addEventListener("touchstart",f),function(){t.current.removeEventListener("touchstart",f),o(),clearInterval(c.current)}}),[e])}(T,X,(function(e,t){return!be(e,t)&&(xe({preventDefault:function(){},deltaY:e}),!0)})),Object(r.useLayoutEffect)((function(){function e(e){T&&e.preventDefault()}return X.current.addEventListener("wheel",xe),X.current.addEventListener("DOMMouseScroll",Oe),X.current.addEventListener("MozMousePixelScroll",e),function(){X.current.removeEventListener("wheel",xe),X.current.removeEventListener("DOMMouseScroll",Oe),X.current.removeEventListener("MozMousePixelScroll",e)}}),[T]);var Ce=function(e,t,n,o,i,a,l,c){var u=r.useRef();return function(r){if(null!=r){if(d.a.cancel(u.current),"number"==typeof r)l(r);else if(r&&"object"===P(r)){var s,f=r.align;s="index"in r?r.index:t.findIndex((function(e){return i(e)===r.key}));var p=r.offset,h=void 0===p?0:p;!function r(c,p){if(!(c<0)&&e.current){var m=e.current.clientHeight,v=!1,g=p;if(m){for(var y=p||f,b=0,w=0,x=0,O=Math.min(t.length,s),C=0;C<=O;C+=1){var S=i(t[C]);w=b;var k=n.get(S);b=x=w+(void 0===k?o:k),C===s&&void 0===k&&(v=!0)}var E=null;switch(y){case"top":E=w-h;break;case"bottom":E=x-m+h;break;default:var j=e.current.scrollTop;wj+m&&(g="bottom")}null!==E&&E!==e.current.scrollTop&&l(E)}u.current=Object(d.a)((function(){v&&a(),r(c-1,g)}))}}(3)}}else c()}}(X,q,ce,c,Z,le,te,(function(){var e;null===(e=J.current)||void 0===e||e.delayHidden()}));r.useImperativeHandle(t,(function(){return{scrollTo:Ce}})),Object(r.useLayoutEffect)((function(){if(x){var e=q.slice(de,pe+1);x(e,q)}}),[de,pe,q]);var Se=function(e,t,n,o,i,a){var l=a.getKey;return e.slice(t,n+1).map((function(e,n){var a=i(e,t+n,{}),c=l(e);return r.createElement(C,{key:c,setRef:function(t){return o(e,t)}},a)}))}(q,de,pe,ae,m,ee),ke=null;return l&&(ke=F(H({},s?"height":"maxHeight",l),K),T&&(ke.overflowY="hidden",$&&(ke.pointerEvents="none"))),r.createElement("div",R({style:F(F({},p),{},{position:"relative"}),className:Y},k),r.createElement(b,{className:"".concat(o,"-holder"),style:ke,ref:X,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==A&&te(t),null==w||w(e)}},r.createElement(f,{prefixCls:o,height:fe,offset:he,onInnerResize:le,ref:Q},Se)),T&&r.createElement(O,{ref:J,prefixCls:o,scrollTop:A,height:l,scrollHeight:fe,count:q.length,onScroll:function(e){te(e)},onStartMove:function(){G(!0)},onStopMove:function(){G(!1)}}))}var G=r.forwardRef($);G.displayName="List";var Y=G;t.a=Y},,function(e,t,n){e.exports=n(213)},function(e,t,n){"use strict"; /** @license React v16.14.0 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(67),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nN.length&&N.push(e)}function A(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var c=!1;if(null===t)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case a:c=!0}}if(c)return r(o,t,""===n?"."+_(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;u