(this.webpackChunktocco_legacy_bundle=this.webpackChunktocco_legacy_bundle||[]).push([[37551],{37551(e,t,n){e=n.nmd(e),ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(t.selection.isEmpty()){var s=t.getCursorPosition(),c=t.session.getWordRange(s.row,s.column),o=t.session.getTextRange(c);if(t.session.tokenRe.lastIndex=0,t.session.tokenRe.test(o)){var r=o+" ";n.value=r,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var l=!1;i.addListener(n,"keydown",(function e(){i.removeListener(n,"keydown",e),l=!0})),t.textInput.setInputHandler((function(e){if(e==r)return"";if(0===e.lastIndexOf(r,0))return e.slice(r.length);if(e.substr(n.selectionEnd)==r)return e.slice(0,-r.length);if(""==e.slice(-2)){var i=e.slice(0,-2);if(" "==i.slice(-1))return l?i.substring(0,n.selectionEnd):(i=i.slice(0,-1),t.session.replace(c,i),"")}return e}))}}};var s=e("../editor").Editor;e("../config").defineOptions(s.prototype,"editor",{spellcheck:{set:function(e){this.textInput.getElement().spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})})),ace.require(["ace/ext/spellcheck"],(function(t){e&&(e.exports=t)}))}}]);