(this.webpackChunktocco_widget_bundle=this.webpackChunktocco_widget_bundle||[]).push([[26820],{26820(e,t,n){e=n.nmd(e),ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){for(var n=[],r=[],i=0,o=0,s=Math.min(e.length,1e3),a=0;a<s;a++){var c=e[a];if(/^\s*[^*+\-\s]/.test(c)){if("\t"==c[0])i++,o=-Number.MAX_VALUE;else{var g=c.match(/^ */)[0].length;if(g&&"\t"!=c[g]){var h=g-o;!(h>0)||o%h||g%h||(r[h]=(r[h]||0)+1),n[g]=(n[g]||0)+1}o=g}for(;a<s&&"\\"==c[c.length-1];)c=e[a++]}}function u(e){for(var t=0,r=e;r<n.length;r+=e)t+=n[r]||0;return t}var l=r.reduce((function(e,t){return e+t}),0),d={score:0,length:0},f=0;for(a=1;a<12;a++){var p=u(a);1==a?(f=p,p=n[1]?.9:.8,n.length||(p=0)):p/=f,r[a]&&(p+=r[a]/l),p>d.score&&(d={score:p,length:a})}if(d.score&&d.score>1.4)var v=d.length;return i>f+1?((1==v||f<i/4||d.score<1.8)&&(v=void 0),{ch:"\t",length:v}):f>i+1?{ch:" ",length:v}:void 0},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(" "==r.ch),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,o=[],s=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach((function(e,t,n){var r=n[t+1];r&&r.cursor.row==e.cursor.row||o.push(e.cursor)})):o.push(e.selection.getCursor()),s=0);for(var a=o[s]&&o[s].row,c=0,g=r.length;c<g;c++){var h=r[c],u=h.search(/\s+$/);c==a&&(u<o[s].column&&u>i&&(u=o[s].column),s++,a=o[s]?o[s].row:-1),u>i&&n.removeInLine(c,u,h.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],o=e.getTabSize();n||(n=o),t||(t=i);for(var s="\t"==t?t:r.stringRepeat(t,n),a=e.doc,c=a.getAllLines(),g={},h={},u=0,l=c.length;u<l;u++){var d=c[u].match(/^\s*/)[0];if(d){var f=e.$getStringScreenWidth(d)[0],p=Math.floor(f/o),v=f%o,m=g[p]||(g[p]=r.stringRepeat(s,p));(m+=h[v]||(h[v]=r.stringRepeat(" ",v)))!=d&&(a.removeInLine(u,0,d.length),a.insertInLine({row:u,column:0},m))}}e.setTabSize(n),e.setUseSoftTabs(" "==t)},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch="\t":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?"string"==typeof e?t.$parseStringArg(e):"string"==typeof e.text?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",description:"Detect indentation from content",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",description:"Trim trailing whitespace",exec:function(e,n){t.trimTrailingSpace(e.session,n)}},{name:"convertIndentation",description:"Convert indentation to ...",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",description:"Set indentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(" "==r.ch)}}]})),ace.require(["ace/ext/whitespace"],(function(t){e&&(e.exports=t)}))}}]);