(self.webpackChunk=self.webpackChunk||[]).push([[823],{3823:function(e,n,o){!function(e){function n(n,o,t){var i,u=n.getWrapperElement();return(i=u.appendChild(document.createElement("div"))).className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof o?i.innerHTML=o:i.appendChild(o),e.addClass(u,"dialog-opened"),i}function o(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",(function(t,i,u){u||(u={}),o(this,null);var r=n(this,t,u.bottom),l=!1,a=this;function s(n){if("string"==typeof n)f.value=n;else{if(l)return;l=!0,e.rmClass(r.parentNode,"dialog-opened"),r.parentNode.removeChild(r),a.focus(),u.onClose&&u.onClose(r)}}var c,f=r.getElementsByTagName("input")[0];return f?(f.focus(),u.value&&(f.value=u.value,!1!==u.selectValueOnOpen&&f.select()),u.onInput&&e.on(f,"input",(function(e){u.onInput(e,f.value,s)})),u.onKeyUp&&e.on(f,"keyup",(function(e){u.onKeyUp(e,f.value,s)})),e.on(f,"keydown",(function(n){u&&u.onKeyDown&&u.onKeyDown(n,f.value,s)||((27==n.keyCode||!1!==u.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),s()),13==n.keyCode&&i(f.value,n))})),!1!==u.closeOnBlur&&e.on(r,"focusout",(function(e){null!==e.relatedTarget&&s()}))):(c=r.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){s(),a.focus()})),!1!==u.closeOnBlur&&e.on(c,"blur",s),c.focus()),s})),e.defineExtension("openConfirm",(function(t,i,u){o(this,null);var r=n(this,t,u&&u.bottom),l=r.getElementsByTagName("button"),a=!1,s=this,c=1;function f(){a||(a=!0,e.rmClass(r.parentNode,"dialog-opened"),r.parentNode.removeChild(r),s.focus())}l[0].focus();for(var d=0;d<l.length;++d){var p=l[d];!function(n){e.on(p,"click",(function(o){e.e_preventDefault(o),f(),n&&n(s)}))}(i[d]),e.on(p,"blur",(function(){--c,setTimeout((function(){c<=0&&f()}),200)})),e.on(p,"focus",(function(){++c}))}})),e.defineExtension("openNotification",(function(t,i){o(this,s);var u,r=n(this,t,i&&i.bottom),l=!1,a=i&&void 0!==i.duration?i.duration:5e3;function s(){l||(l=!0,clearTimeout(u),e.rmClass(r.parentNode,"dialog-opened"),r.parentNode.removeChild(r))}return e.on(r,"click",(function(n){e.e_preventDefault(n),s()})),a&&(u=setTimeout(s,a)),s}))}(o(709))}}]);
//# sourceMappingURL=823.js.map