Liferay.Loader.define("liferay!layout-content-page-editor-web$codemirror@5.65.2/addon/mode/multiplex",["module","exports","require","../../lib/codemirror"],(function(e,n,r){window,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((u=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";u>-1&&(t.string=s.slice(0,u));var l=o.mode.token(t,i.inner);return u>-1?t.string=s:t.pos>t.start&&(i.startingInner=!1),u==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 u,d=r[a];if((u=indexOf(s,d.open,t.pos))==t.pos){d.parseDelimiters||t.match(d.open),i.startingInner=!!d.parseDelimiters,i.innerActive=d;var v=0;if(n.indent){var f=n.indent(i.outer,"","");f!==e.Pass&&(v=f)}return i.inner=e.startState(d.mode,v),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=u&&u<c&&(c=u)}c!=1/0&&(t.string=s.slice(0,c));var m=n.token(t,i.outer);return c!=1/0&&(t.string=s),m},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?r("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=multiplex.js.map