Liferay.Loader.define("liferay!object-js-components-web$codemirror@5.65.12/addon/mode/multiplex",["module","exports","require","../../lib/codemirror"],(function(e,n,r){var t,i=void 0;window;t=function(e){"use strict";e.multiplexingMode=function(n){var r=Array.prototype.slice.call(arguments,1);function indexOf(e,n,r,t){if("string"==typeof n){var i=e.indexOf(n,r);return t&&i>-1?i+n.length:i}var o=n.exec(r?e.slice(r):e);return o?o.index+r+(t?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null,startingInner:!1}},copyState:function(r){return{outer:e.copyState(n,r.outer),innerActive:r.innerActive,inner:r.innerActive&&e.copyState(r.innerActive.mode,r.inner),startingInner:r.startingInner}},token:function(t,i){if(i.innerActive){var o=i.innerActive;if(s=t.string,!o.close&&t.sol())return i.innerActive=i.inner=null,this.token(t,i);if((d=o.close&&!i.startingInner?indexOf(s,o.close,t.pos,o.parseDelimiters):-1)==t.pos&&!o.parseDelimiters)return t.match(o.close),i.innerActive=i.inner=null,o.delimStyle&&o.delimStyle+" "+o.delimStyle+"-close";d>-1&&(t.string=s.slice(0,d));var l=o.mode.token(t,i.inner);return d>-1?t.string=s:t.pos>t.start&&(i.startingInner=!1),d==t.pos&&o.parseDelimiters&&(i.innerActive=i.inner=null),o.innerStyle&&(l=l?l+" "+o.innerStyle:o.innerStyle),l}for(var c=1/0,s=t.string,a=0;a<r.length;++a){var d,u=r[a];if((d=indexOf(s,u.open,t.pos))==t.pos){u.parseDelimiters||t.match(u.open),i.startingInner=!!u.parseDelimiters,i.innerActive=u;var v=0;if(n.indent){var m=n.indent(i.outer,"","");m!==e.Pass&&(v=m)}return i.inner=e.startState(u.mode,v),u.delimStyle&&u.delimStyle+" "+u.delimStyle+"-open"}-1!=d&&d<c&&(c=d)}c!=1/0&&(t.string=s.slice(0,c));var f=n.token(t,i.outer);return c!=1/0&&(t.string=s),f},indent:function(r,t,i){var o=r.innerActive?r.innerActive.mode:n;return o.indent?o.indent(r.innerActive?r.inner:r.outer,t,i):e.Pass},blankLine:function(t){var i=t.innerActive?t.innerActive.mode:n;if(i.blankLine&&i.blankLine(t.innerActive?t.inner:t.outer),t.innerActive)"\n"===t.innerActive.close&&(t.innerActive=t.inner=null);else for(var o=0;o<r.length;++o){var l=r[o];"\n"===l.open&&(t.innerActive=l,t.inner=e.startState(l.mode,i.indent?i.indent(t.outer,"",""):0))}},electricChars:n.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:n}}}}},"object"==typeof n&&"object"==typeof e?t(r("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],t):t(CodeMirror)}));
//# sourceMappingURL=multiplex.js.map